update dev300-m58
[ooovba.git] / offapi / com / sun / star / sheet / FormulaMapGroupSpecialOffset.idl
blobc4b2babd7b4c89f10670c8419acd33d928c40bad
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FormulaMapGroupSpecialOffset.idl,v $
10 * $Revision: 1.3.114.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__
32 #define __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__
34 // ===========================================================================
36 module com { module sun { module star { module sheet {
38 // ===========================================================================
40 /** Constants designating the offsets within the sequence returned by
41 <member>XFormulaOpCodeMapper::getAvailableMappings</member> when
42 called for group <const>FormulaMapGroup::SPECIAL</const>.
44 <p>The number of constants may grow in future versions!</p>
46 constants FormulaMapGroupSpecialOffset
48 // -----------------------------------------------------------------------
50 /** Formula tokens containing the op-code obtained from this offset
51 describe a formula operand token that will be pushed onto the formula
52 stack while the formula is interpreted.
54 <p>The <member>FormulaToken::Data</member> member shall contain one of
55 the following values:</p>
57 <ul>
58 <li>A value of type <atom>double</atom> for literal floating-point
59 constants.</li>
60 <li>A <atom>string</atom> for literal text.</li>
61 <li>A <atom dim="[][]">any</atom> for a literal array. The contained
62 values shall be of type <atom>double</atom> or atom>string</atom>.
63 Floating-point values and strings may occur together in an array.</li>
64 <li>A struct of type <type>SingleReference</type> for a reference to a
65 single cell in the own document.</li>
66 <li>A struct of type <type>ComplexReference</type> for a reference to
67 a range of cells in the own document.</li>
68 <li>A struct of type <type>ExternalReference</type> for a reference to
69 a cell, a range of cells, or a defined name in an external document.</li>
70 </ul>
72 const long PUSH = 0;
74 // -----------------------------------------------------------------------
76 const long CALL = 1;
78 // -----------------------------------------------------------------------
80 /** Formula tokens containing the op-code obtained from this offset
81 instruct the formula interpreter to immediately stop interpreting the
82 formula.
84 <p>The <member>FormulaToken::Data</member> member is not used
85 and should be empty.</p>
87 const long STOP = 2;
89 // -----------------------------------------------------------------------
91 /** Formula tokens containing the op-code obtained from this offset
92 describe the reference to an external function (e.g. add-in function)
93 used in formulas.
95 <p>The <member>FormulaToken::Data</member> member shall contain a
96 <atom>string</atom> with the programmatical name of the function, e.g.
97 "com.sun.star.sheet.addin.Analysis.getEomonth" for the EOMONTH
98 function from the Analsysis add-in.</p>
100 const long EXTERNAL = 3;
102 // -----------------------------------------------------------------------
104 /** Formula tokens containing the op-code obtained from this offset
105 describe the reference to a defined name (also known as named range)
106 used in formulas.
108 <p>The <member>FormulaToken::Data</member> member shall contain an
109 integer value of type <atom>long</atom> specifying the index of the
110 defined name. This index can be obtained from the defined name using
111 its <member>NamedRange::TokenIndex</member> property.</p>
113 @see NamedRange
115 const long NAME = 4;
117 // -----------------------------------------------------------------------
119 /** Formula tokens containing the op-code obtained from this offset
120 describe an invalid name that resolves to the #NAME? error in formulas.
122 <p>The <member>FormulaToken::Data</member> member is not used
123 and should be empty.</p>
125 const long NO_NAME = 5;
127 // -----------------------------------------------------------------------
129 /** Formula tokens containing the op-code obtained from this offset
130 describe an empty function parameter.
132 <p>Example: In the formula <code>=SUM(1;;2)</code> the second
133 parameter is empty and represented by a formula token containing the
134 "missing" op-code.</p>
136 <p>The <member>FormulaToken::Data</member> member is not used
137 and should be empty.</p>
139 const long MISSING = 6;
141 // -----------------------------------------------------------------------
143 /** Formula tokens containing the op-code obtained from this offset
144 describe "bad" data in a formula, e.g. data the formula parser was not
145 able to parse.
147 <p>The <member>FormulaToken::Data</member> member shall contain a
148 <atom>string</string> with the bad data. This string will be displayed
149 literally in the formula.</p>
151 const long BAD = 7;
153 // -----------------------------------------------------------------------
155 /** Formula tokens containing the op-code obtained from this offset
156 describe whitespace characters within the string representation of a
157 formula.
159 <p>Whitespace characters in formulas are used for readability and do
160 not affect the result of the formula.</p>
162 <p>The <member>FormulaToken::Data</member> member shall contain a
163 positive integer value of type <atom>long</atom> specifying the number
164 of space characters.</p>
166 <p>Attention: This may change in next versions to support other
167 characters than simple space characters (e.g. line feeds, horizontal
168 tabulators, non-breakable spaces).</p>
170 const long SPACES = 8;
172 // -----------------------------------------------------------------------
174 const long MAT_REF = 9;
176 // -----------------------------------------------------------------------
178 /** Formula tokens containing the op-code obtained from this offset
179 describe the reference to a database range used in formulas.
181 <p>The <member>FormulaToken::Data</member> member shall contain an
182 integer value of type <atom>long</atom> specifying the index of the
183 database range. This index can be obtained from the database range
184 using its <member>DatabaseRange::TokenIndex</member> property.</p>
186 @see DatabaseRange
188 const long DB_AREA = 10;
190 // -----------------------------------------------------------------------
192 /** Formula tokens containing the op-code obtained from this offset
193 describe the reference to a macro function called in a formula.
195 <p>The <member>FormulaToken::Data</member> member shall contain a
196 <atom>string</atom> specifying the name of the macro function.</p>
198 const long MACRO = 11;
200 // -----------------------------------------------------------------------
202 const long COL_ROW_NAME = 12;
204 // -----------------------------------------------------------------------
208 // ===========================================================================
210 }; }; }; };
212 #endif