xref: /AOO41X/main/offapi/com/sun/star/sheet/XSheetCondition.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_sheet_XSheetCondition_idl__
25#define __com_sun_star_sheet_XSheetCondition_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_sheet_ConditionOperator_idl__
32#include <com/sun/star/sheet/ConditionOperator.idl>
33#endif
34
35#ifndef __com_sun_star_table_CellAddress_idl__
36#include <com/sun/star/table/CellAddress.idl>
37#endif
38
39//=============================================================================
40
41module com {  module sun {  module star {  module sheet {
42
43//=============================================================================
44
45/** provides methods to access the settings of a condition in a
46    conditional format or data validation.
47
48    @see com::sun::star::sheet::TableConditionalEntry
49    @see com::sun::star::sheet::TableValidation
50 */
51published interface XSheetCondition: com::sun::star::uno::XInterface
52{
53    //-------------------------------------------------------------------------
54
55    /** returns the operator in the condition.
56     */
57    com::sun::star::sheet::ConditionOperator getOperator();
58
59    //-------------------------------------------------------------------------
60
61    /** sets the operator in the condition.
62     */
63    void setOperator(
64            [in] com::sun::star::sheet::ConditionOperator nOperator );
65
66    //-------------------------------------------------------------------------
67
68    /** returns either the comparison value, which is used in the condition,
69        or the first value if two values are needed for the operator.
70
71        @returns
72            a formula, a numeric constant, or a string constant in quotes.
73     */
74    string getFormula1();
75
76    //-------------------------------------------------------------------------
77
78    /** sets either the comparison value, which is used in the condition,
79        or the first value if two values are needed for the operator.
80
81        @param aFormula1
82            a formula, a numeric constant, or a string constant in quotes.
83     */
84    void setFormula1( [in] string aFormula1 );
85
86    //-------------------------------------------------------------------------
87
88    /** if two values are needed for the operator, this method returns
89        the second one.
90
91        @returns
92            a formula, a numeric constant, or a string constant in quotes.
93     */
94    string getFormula2();
95
96    //-------------------------------------------------------------------------
97
98    /** if two values are needed for the operator, this method sets
99        the second one.
100
101        @param aFormula2
102            a formula, a numeric constant, or a string constant in quotes.
103     */
104    void setFormula2( [in] string aFormula2 );
105
106    //-------------------------------------------------------------------------
107
108    /** returns the position in the document which is used as a base for
109        relative references in the formulas.
110     */
111    com::sun::star::table::CellAddress getSourcePosition();
112
113    //-------------------------------------------------------------------------
114
115    /** sets the position in the document which is used as a base for
116        relative references in the formulas.
117     */
118    void setSourcePosition(
119            [in] com::sun::star::table::CellAddress aSourcePosition );
120
121};
122
123//=============================================================================
124
125}; }; }; };
126
127#endif
128
129