1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__
21 #define __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__
24 module com
{ module sun
{ module star
{ module sheet
{
27 /** Constants designating the offsets within the sequence returned by
28 XFormulaOpCodeMapper::getAvailableMappings() when
29 called for group FormulaMapGroup::SPECIAL.
31 <p>The number of constants may grow in future versions!</p>
33 constants FormulaMapGroupSpecialOffset
36 /** Formula tokens containing the op-code obtained from this offset
37 describe a formula operand token that will be pushed onto the formula
38 stack while the formula is interpreted.
40 <p>The FormulaToken::Data member shall contain one of
41 the following values:</p>
44 <li>A value of type `double` for literal floating-point
46 <li>A `string` for literal text.</li>
47 <li>A `any[][]` for a literal array. The contained
48 values shall be of type `double` or `string`.
49 Floating-point values and strings may occur together in an array.</li>
50 <li>A struct of type SingleReference for a reference to a
51 single cell in the own document.</li>
52 <li>A struct of type ComplexReference for a reference to
53 a range of cells in the own document.</li>
54 <li>A struct of type ExternalReference for a reference to
55 a cell, a range of cells, or a defined name in an external document.</li>
64 /** Formula tokens containing the op-code obtained from this offset
65 instruct the formula interpreter to immediately stop interpreting the
68 <p>The FormulaToken::Data member is not used
69 and should be empty.</p>
74 /** Formula tokens containing the op-code obtained from this offset
75 describe the reference to an external function (e.g. add-in function)
78 <p>The FormulaToken::Data member shall contain a
79 `string` with the programmatic name of the function, e.g.
80 "com.sun.star.sheet.addin.Analysis.getEomonth" for the EOMONTH
81 function from the Analysis add-in.</p>
83 const long EXTERNAL
= 3;
86 /** Formula tokens containing the op-code obtained from this offset
87 describe the reference to a defined name (also known as named range)
90 <p>The FormulaToken::Data member shall contain an
91 integer value of type `long` specifying the index of the
92 defined name. This index can be obtained from the defined name using
93 its NamedRange::TokenIndex property.</p>
100 /** Formula tokens containing the op-code obtained from this offset
101 describe an invalid name that resolves to the #NAME? error in formulas.
103 <p>The FormulaToken::Data member is not used
104 and should be empty.</p>
106 const long NO_NAME
= 5;
109 /** Formula tokens containing the op-code obtained from this offset
110 describe an empty function parameter.
112 <p>Example: In the formula <code>=SUM(1;;2)</code> the second
113 parameter is empty and represented by a formula token containing the
114 "missing" op-code.</p>
116 <p>The FormulaToken::Data member is not used
117 and should be empty.</p>
119 const long MISSING
= 6;
122 /** Formula tokens containing the op-code obtained from this offset
123 describe "bad" data in a formula, e.g. data the formula parser was not
126 <p>The FormulaToken::Data member shall contain a
127 `string` with the bad data. This string will be displayed
128 literally in the formula.</p>
133 /** Formula tokens containing the op-code obtained from this offset
134 describe whitespace characters within the string representation of a
137 <p>Whitespace characters in formulas are used for readability and do
138 not affect the result of the formula.</p>
140 <p>The FormulaToken::Data member shall contain a
141 positive integer value of type `long` specifying the number
142 of space characters.</p>
144 <p>Attention: This may change in next versions to support other
145 characters than simple space characters (e.g. line feeds, horizontal
146 tabulators, non-breakable spaces).</p>
148 const long SPACES
= 8;
151 const long MAT_REF
= 9;
154 /** Formula tokens containing the op-code obtained from this offset
155 describe the reference to a database range used in formulas.
157 <p>The FormulaToken::Data member shall contain an
158 integer value of type `long` specifying the index of the
159 database range. This index can be obtained from the database range
160 using its DatabaseRange::TokenIndex property.</p>
164 const long DB_AREA
= 10;
167 /** Formula tokens containing the op-code obtained from this offset
168 describe the reference to a macro function called in a formula.
170 <p>The FormulaToken::Data member shall contain a
171 `string` specifying the name of the macro function.</p>
173 const long MACRO
= 11;
176 const long COL_ROW_NAME
= 12;
186 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */