1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__ 25cdf0e10cSrcweir#define __com_sun_star_sheet_FormulaMapGroupSpecialOffset_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir// =========================================================================== 28cdf0e10cSrcweir 29cdf0e10cSrcweirmodule com { module sun { module star { module sheet { 30cdf0e10cSrcweir 31cdf0e10cSrcweir// =========================================================================== 32cdf0e10cSrcweir 33cdf0e10cSrcweir/** Constants designating the offsets within the sequence returned by 34cdf0e10cSrcweir <member>XFormulaOpCodeMapper::getAvailableMappings</member> when 35cdf0e10cSrcweir called for group <const>FormulaMapGroup::SPECIAL</const>. 36cdf0e10cSrcweir 37cdf0e10cSrcweir <p>The number of constants may grow in future versions!</p> 38cdf0e10cSrcweir */ 39cdf0e10cSrcweirconstants FormulaMapGroupSpecialOffset 40cdf0e10cSrcweir{ 41cdf0e10cSrcweir // ----------------------------------------------------------------------- 42cdf0e10cSrcweir 43cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 44cdf0e10cSrcweir describe a formula operand token that will be pushed onto the formula 45cdf0e10cSrcweir stack while the formula is interpreted. 46cdf0e10cSrcweir 47cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member shall contain one of 48cdf0e10cSrcweir the following values:</p> 49cdf0e10cSrcweir 50cdf0e10cSrcweir <ul> 51cdf0e10cSrcweir <li>A value of type <atom>double</atom> for literal floating-point 52cdf0e10cSrcweir constants.</li> 53cdf0e10cSrcweir <li>A <atom>string</atom> for literal text.</li> 54cdf0e10cSrcweir <li>A <atom dim="[][]">any</atom> for a literal array. The contained 55cdf0e10cSrcweir values shall be of type <atom>double</atom> or <atom>string</atom>. 56cdf0e10cSrcweir Floating-point values and strings may occur together in an array.</li> 57cdf0e10cSrcweir <li>A struct of type <type>SingleReference</type> for a reference to a 58cdf0e10cSrcweir single cell in the own document.</li> 59cdf0e10cSrcweir <li>A struct of type <type>ComplexReference</type> for a reference to 60cdf0e10cSrcweir a range of cells in the own document.</li> 61cdf0e10cSrcweir <li>A struct of type <type>ExternalReference</type> for a reference to 62cdf0e10cSrcweir a cell, a range of cells, or a defined name in an external document.</li> 63cdf0e10cSrcweir </ul> 64cdf0e10cSrcweir */ 65cdf0e10cSrcweir const long PUSH = 0; 66cdf0e10cSrcweir 67cdf0e10cSrcweir // ----------------------------------------------------------------------- 68cdf0e10cSrcweir 69cdf0e10cSrcweir const long CALL = 1; 70cdf0e10cSrcweir 71cdf0e10cSrcweir // ----------------------------------------------------------------------- 72cdf0e10cSrcweir 73cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 74cdf0e10cSrcweir instruct the formula interpreter to immediately stop interpreting the 75cdf0e10cSrcweir formula. 76cdf0e10cSrcweir 77cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member is not used 78cdf0e10cSrcweir and should be empty.</p> 79cdf0e10cSrcweir */ 80cdf0e10cSrcweir const long STOP = 2; 81cdf0e10cSrcweir 82cdf0e10cSrcweir // ----------------------------------------------------------------------- 83cdf0e10cSrcweir 84cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 85cdf0e10cSrcweir describe the reference to an external function (e.g. add-in function) 86cdf0e10cSrcweir used in formulas. 87cdf0e10cSrcweir 88cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member shall contain a 89cdf0e10cSrcweir <atom>string</atom> with the programmatical name of the function, e.g. 90cdf0e10cSrcweir "com.sun.star.sheet.addin.Analysis.getEomonth" for the EOMONTH 91cdf0e10cSrcweir function from the Analsysis add-in.</p> 92cdf0e10cSrcweir */ 93cdf0e10cSrcweir const long EXTERNAL = 3; 94cdf0e10cSrcweir 95cdf0e10cSrcweir // ----------------------------------------------------------------------- 96cdf0e10cSrcweir 97cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 98cdf0e10cSrcweir describe the reference to a defined name (also known as named range) 99cdf0e10cSrcweir used in formulas. 100cdf0e10cSrcweir 101cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member shall contain an 102cdf0e10cSrcweir integer value of type <atom>long</atom> specifying the index of the 103cdf0e10cSrcweir defined name. This index can be obtained from the defined name using 104cdf0e10cSrcweir its <member>NamedRange::TokenIndex</member> property.</p> 105cdf0e10cSrcweir 106cdf0e10cSrcweir @see NamedRange 107cdf0e10cSrcweir */ 108cdf0e10cSrcweir const long NAME = 4; 109cdf0e10cSrcweir 110cdf0e10cSrcweir // ----------------------------------------------------------------------- 111cdf0e10cSrcweir 112cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 113cdf0e10cSrcweir describe an invalid name that resolves to the #NAME? error in formulas. 114cdf0e10cSrcweir 115cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member is not used 116cdf0e10cSrcweir and should be empty.</p> 117cdf0e10cSrcweir */ 118cdf0e10cSrcweir const long NO_NAME = 5; 119cdf0e10cSrcweir 120cdf0e10cSrcweir // ----------------------------------------------------------------------- 121cdf0e10cSrcweir 122cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 123cdf0e10cSrcweir describe an empty function parameter. 124cdf0e10cSrcweir 125cdf0e10cSrcweir <p>Example: In the formula <code>=SUM(1;;2)</code> the second 126cdf0e10cSrcweir parameter is empty and represented by a formula token containing the 127cdf0e10cSrcweir "missing" op-code.</p> 128cdf0e10cSrcweir 129cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member is not used 130cdf0e10cSrcweir and should be empty.</p> 131cdf0e10cSrcweir */ 132cdf0e10cSrcweir const long MISSING = 6; 133cdf0e10cSrcweir 134cdf0e10cSrcweir // ----------------------------------------------------------------------- 135cdf0e10cSrcweir 136cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 137cdf0e10cSrcweir describe "bad" data in a formula, e.g. data the formula parser was not 138cdf0e10cSrcweir able to parse. 139cdf0e10cSrcweir 140cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member shall contain a 141cdf0e10cSrcweir <atom>string</atom> with the bad data. This string will be displayed 142cdf0e10cSrcweir literally in the formula.</p> 143cdf0e10cSrcweir */ 144cdf0e10cSrcweir const long BAD = 7; 145cdf0e10cSrcweir 146cdf0e10cSrcweir // ----------------------------------------------------------------------- 147cdf0e10cSrcweir 148cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 149cdf0e10cSrcweir describe whitespace characters within the string representation of a 150cdf0e10cSrcweir formula. 151cdf0e10cSrcweir 152cdf0e10cSrcweir <p>Whitespace characters in formulas are used for readability and do 153cdf0e10cSrcweir not affect the result of the formula.</p> 154cdf0e10cSrcweir 155cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member shall contain a 156cdf0e10cSrcweir positive integer value of type <atom>long</atom> specifying the number 157cdf0e10cSrcweir of space characters.</p> 158cdf0e10cSrcweir 159cdf0e10cSrcweir <p>Attention: This may change in next versions to support other 160cdf0e10cSrcweir characters than simple space characters (e.g. line feeds, horizontal 161cdf0e10cSrcweir tabulators, non-breakable spaces).</p> 162cdf0e10cSrcweir */ 163cdf0e10cSrcweir const long SPACES = 8; 164cdf0e10cSrcweir 165cdf0e10cSrcweir // ----------------------------------------------------------------------- 166cdf0e10cSrcweir 167cdf0e10cSrcweir const long MAT_REF = 9; 168cdf0e10cSrcweir 169cdf0e10cSrcweir // ----------------------------------------------------------------------- 170cdf0e10cSrcweir 171cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 172cdf0e10cSrcweir describe the reference to a database range used in formulas. 173cdf0e10cSrcweir 174cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member shall contain an 175cdf0e10cSrcweir integer value of type <atom>long</atom> specifying the index of the 176cdf0e10cSrcweir database range. This index can be obtained from the database range 177cdf0e10cSrcweir using its <member>DatabaseRange::TokenIndex</member> property.</p> 178cdf0e10cSrcweir 179cdf0e10cSrcweir @see DatabaseRange 180cdf0e10cSrcweir */ 181cdf0e10cSrcweir const long DB_AREA = 10; 182cdf0e10cSrcweir 183cdf0e10cSrcweir // ----------------------------------------------------------------------- 184cdf0e10cSrcweir 185cdf0e10cSrcweir /** Formula tokens containing the op-code obtained from this offset 186cdf0e10cSrcweir describe the reference to a macro function called in a formula. 187cdf0e10cSrcweir 188cdf0e10cSrcweir <p>The <member>FormulaToken::Data</member> member shall contain a 189cdf0e10cSrcweir <atom>string</atom> specifying the name of the macro function.</p> 190cdf0e10cSrcweir */ 191cdf0e10cSrcweir const long MACRO = 11; 192cdf0e10cSrcweir 193cdf0e10cSrcweir // ----------------------------------------------------------------------- 194cdf0e10cSrcweir 195cdf0e10cSrcweir const long COL_ROW_NAME = 12; 196cdf0e10cSrcweir 197cdf0e10cSrcweir // ----------------------------------------------------------------------- 198cdf0e10cSrcweir 199cdf0e10cSrcweir}; 200cdf0e10cSrcweir 201cdf0e10cSrcweir// =========================================================================== 202cdf0e10cSrcweir 203cdf0e10cSrcweir}; }; }; }; 204cdf0e10cSrcweir 205cdf0e10cSrcweir#endif 206cdf0e10cSrcweir 207