merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sheet / FormulaMapGroupSpecialOffset.idl
blob06008bbc059dc049ce5db26476ddbe57cf58238d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__
29 #define __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__
31 // ===========================================================================
33 module com { module sun { module star { module sheet {
35 // ===========================================================================
37 /** Constants designating the offsets within the sequence returned by
38 <member>XFormulaOpCodeMapper::getAvailableMappings</member> when
39 called for group <const>FormulaMapGroup::SPECIAL</const>.
41 <p>The number of constants may grow in future versions!</p>
43 constants FormulaMapGroupSpecialOffset
45 // -----------------------------------------------------------------------
47 /** Formula tokens containing the op-code obtained from this offset
48 describe a formula operand token that will be pushed onto the formula
49 stack while the formula is interpreted.
51 <p>The <member>FormulaToken::Data</member> member shall contain one of
52 the following values:</p>
54 <ul>
55 <li>A value of type <atom>double</atom> for literal floating-point
56 constants.</li>
57 <li>A <atom>string</atom> for literal text.</li>
58 <li>A <atom dim="[][]">any</atom> for a literal array. The contained
59 values shall be of type <atom>double</atom> or atom>string</atom>.
60 Floating-point values and strings may occur together in an array.</li>
61 <li>A struct of type <type>SingleReference</type> for a reference to a
62 single cell in the own document.</li>
63 <li>A struct of type <type>ComplexReference</type> for a reference to
64 a range of cells in the own document.</li>
65 <li>A struct of type <type>ExternalReference</type> for a reference to
66 a cell, a range of cells, or a defined name in an external document.</li>
67 </ul>
69 const long PUSH = 0;
71 // -----------------------------------------------------------------------
73 const long CALL = 1;
75 // -----------------------------------------------------------------------
77 /** Formula tokens containing the op-code obtained from this offset
78 instruct the formula interpreter to immediately stop interpreting the
79 formula.
81 <p>The <member>FormulaToken::Data</member> member is not used
82 and should be empty.</p>
84 const long STOP = 2;
86 // -----------------------------------------------------------------------
88 /** Formula tokens containing the op-code obtained from this offset
89 describe the reference to an external function (e.g. add-in function)
90 used in formulas.
92 <p>The <member>FormulaToken::Data</member> member shall contain a
93 <atom>string</atom> with the programmatical name of the function, e.g.
94 "com.sun.star.sheet.addin.Analysis.getEomonth" for the EOMONTH
95 function from the Analsysis add-in.</p>
97 const long EXTERNAL = 3;
99 // -----------------------------------------------------------------------
101 /** Formula tokens containing the op-code obtained from this offset
102 describe the reference to a defined name (also known as named range)
103 used in formulas.
105 <p>The <member>FormulaToken::Data</member> member shall contain an
106 integer value of type <atom>long</atom> specifying the index of the
107 defined name. This index can be obtained from the defined name using
108 its <member>NamedRange::TokenIndex</member> property.</p>
110 @see NamedRange
112 const long NAME = 4;
114 // -----------------------------------------------------------------------
116 /** Formula tokens containing the op-code obtained from this offset
117 describe an invalid name that resolves to the #NAME? error in formulas.
119 <p>The <member>FormulaToken::Data</member> member is not used
120 and should be empty.</p>
122 const long NO_NAME = 5;
124 // -----------------------------------------------------------------------
126 /** Formula tokens containing the op-code obtained from this offset
127 describe an empty function parameter.
129 <p>Example: In the formula <code>=SUM(1;;2)</code> the second
130 parameter is empty and represented by a formula token containing the
131 "missing" op-code.</p>
133 <p>The <member>FormulaToken::Data</member> member is not used
134 and should be empty.</p>
136 const long MISSING = 6;
138 // -----------------------------------------------------------------------
140 /** Formula tokens containing the op-code obtained from this offset
141 describe "bad" data in a formula, e.g. data the formula parser was not
142 able to parse.
144 <p>The <member>FormulaToken::Data</member> member shall contain a
145 <atom>string</string> with the bad data. This string will be displayed
146 literally in the formula.</p>
148 const long BAD = 7;
150 // -----------------------------------------------------------------------
152 /** Formula tokens containing the op-code obtained from this offset
153 describe whitespace characters within the string representation of a
154 formula.
156 <p>Whitespace characters in formulas are used for readability and do
157 not affect the result of the formula.</p>
159 <p>The <member>FormulaToken::Data</member> member shall contain a
160 positive integer value of type <atom>long</atom> specifying the number
161 of space characters.</p>
163 <p>Attention: This may change in next versions to support other
164 characters than simple space characters (e.g. line feeds, horizontal
165 tabulators, non-breakable spaces).</p>
167 const long SPACES = 8;
169 // -----------------------------------------------------------------------
171 const long MAT_REF = 9;
173 // -----------------------------------------------------------------------
175 /** Formula tokens containing the op-code obtained from this offset
176 describe the reference to a database range used in formulas.
178 <p>The <member>FormulaToken::Data</member> member shall contain an
179 integer value of type <atom>long</atom> specifying the index of the
180 database range. This index can be obtained from the database range
181 using its <member>DatabaseRange::TokenIndex</member> property.</p>
183 @see DatabaseRange
185 const long DB_AREA = 10;
187 // -----------------------------------------------------------------------
189 /** Formula tokens containing the op-code obtained from this offset
190 describe the reference to a macro function called in a formula.
192 <p>The <member>FormulaToken::Data</member> member shall contain a
193 <atom>string</atom> specifying the name of the macro function.</p>
195 const long MACRO = 11;
197 // -----------------------------------------------------------------------
199 const long COL_ROW_NAME = 12;
201 // -----------------------------------------------------------------------
205 // ===========================================================================
207 }; }; }; };
209 #endif