LibreOffice Module sc (master) 1
xlformula.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <osl/diagnose.h>
23#include <formula/opcode.hxx>
24#include <address.hxx>
25#include "ftools.hxx"
26#include <map>
27#include <memory>
28
29namespace svl {
30
31class SharedStringPool;
32
33}
34
35// Constants ==================================================================
36
37const size_t EXC_TOKARR_MAXLEN = 4096;
38
39// Token class flags ----------------------------------------------------------
40
46
47// Base tokens ----------------------------------------------------------------
48
50
60const sal_uInt8 EXC_TOKID_LT = 0x09;
61const sal_uInt8 EXC_TOKID_LE = 0x0A;
62const sal_uInt8 EXC_TOKID_EQ = 0x0B;
63const sal_uInt8 EXC_TOKID_GE = 0x0C;
64const sal_uInt8 EXC_TOKID_GT = 0x0D;
65const sal_uInt8 EXC_TOKID_NE = 0x0E;
83
84// Base IDs of classified tokens ----------------------------------------------
85
108
109// specific token constants ---------------------------------------------------
110
111const sal_uInt16 EXC_TOK_STR_MAXLEN = 255;
112
115
123
131
132const sal_uInt16 EXC_TOK_FUNCVAR_CMD = 0x8000;
133const sal_uInt16 EXC_TOK_FUNCVAR_INDEXMASK = 0x7FFF;
136
137const sal_uInt16 EXC_TOK_REF_COLREL = 0x4000;
138const sal_uInt16 EXC_TOK_REF_ROWREL = 0x8000;
139
153const sal_uInt16 EXC_TOK_NLR_REL = 0x8000;
154
155const sal_uInt32 EXC_TOK_NLR_ADDREL = 0x80000000;
156const sal_uInt32 EXC_TOK_NLR_ADDMASK = 0x3FFFFFFF;
157
160{
172
173// Function parameter info ====================================================
174
177{
183
186{
194
276{
280};
281
282// Function data ==============================================================
283
285
287
293
294// selected function IDs
295const sal_uInt16 EXC_FUNCID_IF = 1;
296const sal_uInt16 EXC_FUNCID_SUM = 4;
297const sal_uInt16 EXC_FUNCID_AND = 36;
298const sal_uInt16 EXC_FUNCID_OR = 37;
299const sal_uInt16 EXC_FUNCID_CHOOSE = 100;
300const sal_uInt16 EXC_FUNCID_EXTERNCALL = 255;
301
311{
313 sal_uInt16 mnXclFunc;
319 const char* mpcMacroName;
332 bool IsMacroFunc() const { return mpcMacroName != nullptr && !(mnFlags & EXC_FUNCFLAG_ADDINEQUIV); }
334 bool IsAddInEquivalent() const { return mpcMacroName != nullptr && (mnFlags & EXC_FUNCFLAG_ADDINEQUIV); }
336 OUString GetMacroFuncName() const;
338 OUString GetAddInEquivalentFuncName() const;
339};
340
341class XclRoot;
342
345{
346public:
347 explicit XclFunctionProvider( const XclRoot& rRoot );
348
350 const XclFunctionInfo* GetFuncInfoFromXclFunc( sal_uInt16 nXclFunc ) const;
352 const XclFunctionInfo* GetFuncInfoFromXclMacroName( const OUString& rXclMacroName ) const;
354 const XclFunctionInfo* GetFuncInfoFromOpCode( OpCode eOpCode ) const;
355
356private:
357 void FillXclFuncMap( const XclFunctionInfo* pBeg, const XclFunctionInfo* pEnd );
358 void FillScFuncMap( const XclFunctionInfo* pBeg, const XclFunctionInfo* pEnd );
359
360private:
361 typedef ::std::map< sal_uInt16, const XclFunctionInfo* > XclFuncMap;
362 typedef ::std::map< OUString, const XclFunctionInfo* > XclMacroNameMap;
363 typedef ::std::map< OpCode, const XclFunctionInfo* > ScFuncMap;
364
368};
369
370// Token array ================================================================
371
372class XclImpStream;
373class XclExpStream;
374
377{
378public:
380 explicit XclTokenArray( bool bVolatile = false );
382 explicit XclTokenArray( ScfUInt8Vec& rTokVec, ScfUInt8Vec& rExtDataVec, bool bVolatile = false );
383
385 bool Empty() const { return maTokVec.empty(); }
387 sal_uInt16 GetSize() const;
389 const sal_uInt8* GetData() const { return maTokVec.empty() ? nullptr : maTokVec.data(); }
391 bool IsVolatile() const { return mbVolatile; }
392
394 static sal_uInt16 ReadSize(XclImpStream& rStrm);
396 void ReadArray(sal_uInt16 nSize, XclImpStream& rStrm);
398 void Read( XclImpStream& rStrm );
399
401 void WriteSize( XclExpStream& rStrm ) const;
403 void WriteArray( XclExpStream& rStrm ) const;
405 void Write( XclExpStream& rStrm ) const;
406
408 bool operator==( const XclTokenArray& rTokArr ) const;
409
410private:
414};
415
416typedef std::shared_ptr< XclTokenArray > XclTokenArrayRef;
417
421XclExpStream& operator<<( XclExpStream& rStrm, const XclTokenArray& rTokArr );
423XclExpStream& operator<<( XclExpStream& rStrm, const XclTokenArrayRef& rxTokArr );
424
425namespace formula { class FormulaToken; }
426class ScTokenArray;
427
439{
440public:
441 explicit XclTokenArrayIterator();
442 explicit XclTokenArrayIterator( const ScTokenArray& rScTokArr, bool bSkipSpaces );
444 explicit XclTokenArrayIterator( const XclTokenArrayIterator& rTokArrIt, bool bSkipSpaces );
445
446 void Init( const ScTokenArray& rScTokArr, bool bSkipSpaces );
447
448 bool Is() const { return mppScToken != nullptr; }
449 bool operator!() const { return !Is(); }
450 const ::formula::FormulaToken* Get() const { return mppScToken ? *mppScToken : nullptr; }
451 const ::formula::FormulaToken* operator->() const { return Get(); }
452 const ::formula::FormulaToken& operator*() const { return *Get(); }
453
455
456private:
457 void NextRawToken();
458 void SkipSpaces();
459
460private:
461 const ::formula::FormulaToken*const* mppScTokenBeg;
462 const ::formula::FormulaToken*const* mppScTokenEnd;
463 const ::formula::FormulaToken*const* mppScToken;
465};
466
469{
476};
477
486{
487public:
488 // token identifiers ------------------------------------------------------
489
491 inline static sal_uInt8 GetTokenId( sal_uInt8 nBaseId, sal_uInt8 nTokenClass );
492
494 static sal_uInt8 GetTokenClass( sal_uInt8 nTokenId ) { return nTokenId & EXC_TOKCLASS_MASK; }
496 inline static void ChangeTokenClass( sal_uInt8& rnTokenId, sal_uInt8 nTokenClass );
497
498 // strings and string lists -----------------------------------------------
499
503 static bool GetTokenString( OUString& rString, const ::formula::FormulaToken& rScToken );
504
508 static bool GetString( OUString& rString, const ScTokenArray& rScTokArr );
509
517 static bool GetStringList( OUString& rStringList, const ScTokenArray& rScTokArr, sal_Unicode cSep );
518
525 static void ConvertStringToList(
526 ScTokenArray& rScTokArr, svl::SharedStringPool& rSPool, sal_Unicode cStringSep );
527
528 // multiple operations ----------------------------------------------------
529
534 static bool GetMultipleOpRefs( const ScDocument& rDoc, XclMultipleOpRefs& rRefs, const ScTokenArray& rScTokArr, const ScAddress& rScPos );
535};
536
538{
539 OSL_ENSURE( !::get_flag( nBaseId, static_cast< sal_uInt8 >( ~EXC_TOKID_MASK ) ), "XclTokenArrayHelper::GetTokenId - invalid token ID" );
540 OSL_ENSURE( !::get_flag( nTokenClass, static_cast< sal_uInt8 >( ~EXC_TOKCLASS_MASK ) ), "XclTokenArrayHelper::GetTokenId - invalid token class" );
541 return nBaseId | nTokenClass;
542}
543
544inline void XclTokenArrayHelper::ChangeTokenClass( sal_uInt8& rnTokenId, sal_uInt8 nTokenClass )
545{
546 OSL_ENSURE( !::get_flag( nTokenClass, static_cast< sal_uInt8 >( ~EXC_TOKCLASS_MASK ) ), "XclTokenArrayHelper::ChangeTokenClass - invalid token class" );
547 ::set_flag( rnTokenId, EXC_TOKCLASS_MASK, false );
548 ::set_flag( rnTokenId, nTokenClass );
549}
550
551/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class is used to export Excel record streams.
Definition: xestream.hxx:73
Provides access to function info structs for all available functions.
Definition: xlformula.hxx:345
::std::map< OUString, const XclFunctionInfo * > XclMacroNameMap
Definition: xlformula.hxx:362
void FillScFuncMap(const XclFunctionInfo *pBeg, const XclFunctionInfo *pEnd)
Definition: xlformula.cxx:714
XclFuncMap maXclFuncMap
Definition: xlformula.hxx:365
const XclFunctionInfo * GetFuncInfoFromXclMacroName(const OUString &rXclMacroName) const
Returns the function data for an Excel function simulated by a macro call, or 0 on error.
Definition: xlformula.cxx:684
const XclFunctionInfo * GetFuncInfoFromXclFunc(sal_uInt16 nXclFunc) const
Returns the function data for an Excel function index, or 0 on error.
Definition: xlformula.cxx:676
void FillXclFuncMap(const XclFunctionInfo *pBeg, const XclFunctionInfo *pEnd)
Definition: xlformula.cxx:700
::std::map< OpCode, const XclFunctionInfo * > ScFuncMap
Definition: xlformula.hxx:363
::std::map< sal_uInt16, const XclFunctionInfo * > XclFuncMap
Definition: xlformula.hxx:361
ScFuncMap maScFuncMap
Maps macro function names to function data.
Definition: xlformula.hxx:367
const XclFunctionInfo * GetFuncInfoFromOpCode(OpCode eOpCode) const
Returns the function data for a Calc opcode, or 0 on error.
Definition: xlformula.cxx:692
XclMacroNameMap maXclMacroNameMap
Maps Excel function indexes to function data.
Definition: xlformula.hxx:366
XclFunctionProvider(const XclRoot &rRoot)
Definition: xlformula.cxx:649
This class is used to import record oriented streams.
Definition: xistream.hxx:278
Access to global data for a filter object (imported or exported document) from other classes.
Definition: xlroot.hxx:128
A helper with Excel specific token array functions.
Definition: xlformula.hxx:486
static bool GetMultipleOpRefs(const ScDocument &rDoc, XclMultipleOpRefs &rRefs, const ScTokenArray &rScTokArr, const ScAddress &rScPos)
Parses the passed formula and tries to extract references of a multiple operation.
Definition: xlformula.cxx:961
static bool GetTokenString(OUString &rString, const ::formula::FormulaToken &rScToken)
Tries to extract a string from the passed token.
Definition: xlformula.cxx:879
static sal_uInt8 GetTokenClass(sal_uInt8 nTokenId)
Returns the token class of the passed token ID.
Definition: xlformula.hxx:494
static sal_uInt8 GetTokenId(sal_uInt8 nBaseId, sal_uInt8 nTokenClass)
Returns the classified token ID from a base ID and the token class.
Definition: xlformula.hxx:537
static void ChangeTokenClass(sal_uInt8 &rnTokenId, sal_uInt8 nTokenClass)
Changes the token class in the passed classified token ID.
Definition: xlformula.hxx:544
static bool GetString(OUString &rString, const ScTokenArray &rScTokArr)
Parses the passed formula and tries to find a single string token, i.e.
Definition: xlformula.cxx:886
static void ConvertStringToList(ScTokenArray &rScTokArr, svl::SharedStringPool &rSPool, sal_Unicode cStringSep)
Tries to convert a formula that consists of a single string token to a list of strings.
Definition: xlformula.cxx:921
static bool GetStringList(OUString &rStringList, const ScTokenArray &rScTokArr, sal_Unicode cSep)
Parses the passed formula and tries to find a string token list, i.e.
Definition: xlformula.cxx:893
Special token array iterator for the Excel filters.
Definition: xlformula.hxx:439
const ::formula::FormulaToken *const * mppScToken
Pointer behind last token pointer of token array.
Definition: xlformula.hxx:463
const ::formula::FormulaToken *const * mppScTokenEnd
Pointer to first token pointer of token array.
Definition: xlformula.hxx:462
const ::formula::FormulaToken * operator->() const
Definition: xlformula.hxx:451
bool mbSkipSpaces
Pointer to current token pointer of token array.
Definition: xlformula.hxx:464
void Init(const ScTokenArray &rScTokArr, bool bSkipSpaces)
Definition: xlformula.cxx:843
const ::formula::FormulaToken & operator*() const
Definition: xlformula.hxx:452
const ::formula::FormulaToken *const * mppScTokenBeg
Definition: xlformula.hxx:461
XclTokenArrayIterator & operator++()
Definition: xlformula.cxx:853
const ::formula::FormulaToken * Get() const
Definition: xlformula.hxx:450
bool operator!() const
Definition: xlformula.hxx:449
Binary representation of an Excel token array.
Definition: xlformula.hxx:377
void ReadArray(sal_uInt16 nSize, XclImpStream &rStrm)
Reads the tokens of the token array (without size field).
Definition: xlformula.cxx:746
bool operator==(const XclTokenArray &rTokArr) const
Compares this token array with the passed.
Definition: xlformula.cxx:795
XclTokenArray(bool bVolatile=false)
Creates an empty token array.
Definition: xlformula.cxx:723
sal_uInt16 GetSize() const
Returns the size of the token array in bytes.
Definition: xlformula.cxx:735
void WriteSize(XclExpStream &rStrm) const
Writes the size field of the token array.
Definition: xlformula.cxx:776
void Write(XclExpStream &rStrm) const
Writes size field and the tokens.
Definition: xlformula.cxx:789
ScfUInt8Vec maExtDataVec
Byte vector containing token data.
Definition: xlformula.hxx:412
bool Empty() const
Returns true, if the token array is empty.
Definition: xlformula.hxx:385
bool mbVolatile
Byte vector containing extended data (arrays, stacked NLRs).
Definition: xlformula.hxx:413
static sal_uInt16 ReadSize(XclImpStream &rStrm)
Reads the size field of the token array.
Definition: xlformula.cxx:741
void WriteArray(XclExpStream &rStrm) const
Writes the tokens of the token array (without size field).
Definition: xlformula.cxx:781
bool IsVolatile() const
Returns true, if the formula contains a volatile function.
Definition: xlformula.hxx:391
const sal_uInt8 * GetData() const
Returns read-only access to the byte vector storing token data.
Definition: xlformula.hxx:389
ScfUInt8Vec maTokVec
Definition: xlformula.hxx:411
void Read(XclImpStream &rStrm)
Reads size field and the tokens.
Definition: xlformula.cxx:771
::std::vector< sal_uInt8 > ScfUInt8Vec
Definition: ftools.hxx:253
bool get_flag(Type nBitField, Type nMask)
Returns true, if at least one of the bits set in nMask is set in nBitField.
Definition: ftools.hxx:75
void set_flag(Type &rnBitField, Type nMask, bool bSet=true)
Sets or clears (according to bSet) all set bits of nMask in rnBitField.
Definition: ftools.hxx:95
These need to be in global namespace just like their respective types are.
OpCode
Structure that contains all needed information for a parameter in a function.
Definition: xlformula.hxx:276
bool mbValType
Token class conversion type.
Definition: xlformula.hxx:279
XclFuncParamConv meConv
Parameter validity.
Definition: xlformula.hxx:278
XclFuncParamValidity meValid
Definition: xlformula.hxx:277
Represents information for a spreadsheet function for import and export.
Definition: xlformula.hxx:311
bool IsVolatile() const
Function name, if simulated by a macro call (UTF-8) EXC_FUNCFLAG_ADDINEQUIV is 0; or programmatical a...
Definition: xlformula.hxx:326
OUString GetMacroFuncName() const
Returns the name of the external function as string.
Definition: xlformula.cxx:35
bool IsParamPairs() const
Returns true, if optional parameters are expected to appear in pairs.
Definition: xlformula.hxx:328
OUString GetAddInEquivalentFuncName() const
Returns the programmatical name of the Add-In function as string.
Definition: xlformula.cxx:42
XclFuncParamInfo mpParamInfos[EXC_FUNCINFO_PARAMINFO_COUNT]
Token class of the return value.
Definition: xlformula.hxx:317
sal_uInt8 mnRetClass
Maximum number of parameters.
Definition: xlformula.hxx:316
sal_uInt8 mnFlags
Information for all parameters.
Definition: xlformula.hxx:318
sal_uInt16 mnXclFunc
Calc function opcode.
Definition: xlformula.hxx:313
const char * mpcMacroName
Additional flags (EXC_FUNCFLAG_* constants).
Definition: xlformula.hxx:319
bool IsMacroFunc() const
Returns true, if the function is simulated by a macro call.
Definition: xlformula.hxx:332
bool IsAddInEquivalent() const
Returns true, if the function is stored as an add-in call.
Definition: xlformula.hxx:334
bool IsFixedParamCount() const
Returns true, if the function parameter count is fixed.
Definition: xlformula.hxx:330
sal_uInt8 mnMinParamCount
Excel function index.
Definition: xlformula.hxx:314
sal_uInt8 mnMaxParamCount
Minimum number of parameters.
Definition: xlformula.hxx:315
Contains all cell references that can be extracted from a multiple operations formula.
Definition: xlformula.hxx:469
ScAddress maColRelScPos
Definition: xlformula.hxx:472
ScAddress maRowRelScPos
Definition: xlformula.hxx:474
ScAddress maRowFirstScPos
Definition: xlformula.hxx:473
ScAddress maFmlaScPos
Definition: xlformula.hxx:470
ScAddress maColFirstScPos
Position of the (first) formula cell.
Definition: xlformula.hxx:471
unsigned char sal_uInt8
sal_uInt16 sal_Unicode
const sal_uInt8 EXC_TOKID_MEMFUNC
Constant reference subexpression without result.
Definition: xlformula.hxx:95
const sal_uInt32 EXC_TOK_NLR_ADDREL
True = Natural language ref is relative.
Definition: xlformula.hxx:155
const sal_uInt8 EXC_TOKID_AREA
2D cell reference.
Definition: xlformula.hxx:91
const sal_uInt8 EXC_TOKID_LIST
Intersection operator.
Definition: xlformula.hxx:67
const sal_uInt8 EXC_TOKID_TBL
Array or shared formula reference.
Definition: xlformula.hxx:53
const sal_uInt8 EXC_TOKID_MEMAREA
2D area reference.
Definition: xlformula.hxx:92
const sal_uInt8 EXC_TOKID_UMINUS
Unary plus.
Definition: xlformula.hxx:70
const sal_uInt8 EXC_TOKID_ISECT
Not equal operator.
Definition: xlformula.hxx:66
const sal_uInt8 EXC_TOKID_INT
Boolean constant.
Definition: xlformula.hxx:81
const sal_uInt8 EXC_TOKID_DIV
Multiplication operator.
Definition: xlformula.hxx:57
const sal_uInt8 EXC_TOKCLASS_VAL
20-3F: Reference class tokens.
Definition: xlformula.hxx:44
const sal_uInt8 EXC_TOKID_REF3D
External reference.
Definition: xlformula.hxx:104
const sal_uInt8 EXC_TOK_BOOL_TRUE
sal_False value of a tBool token.
Definition: xlformula.hxx:114
const sal_uInt8 EXC_TOKID_SUB
Addition operator.
Definition: xlformula.hxx:55
const sal_uInt8 EXC_TOKCLASS_MASK
Maximum size of a token array.
Definition: xlformula.hxx:41
const sal_uInt16 EXC_FUNCID_SUM
Definition: xlformula.hxx:296
const sal_uInt8 EXC_TOKID_NAME
Function, variable number of arguments.
Definition: xlformula.hxx:89
const sal_uInt8 EXC_FUNCFLAG_EXPORTONLY
Only used in import filter.
Definition: xlformula.hxx:290
const sal_uInt16 EXC_FUNCID_IF
Function is an add-in equivalent.
Definition: xlformula.hxx:295
const sal_uInt8 EXC_FUNC_MAXPARAM
Definition: xlformula.hxx:284
const sal_uInt8 EXC_FUNCFLAG_IMPORTONLY
Result is volatile (e.g. NOW() function).
Definition: xlformula.hxx:289
const sal_uInt8 EXC_TOK_ATTR_SPACE_BR_OPEN
Spaces before opening parenthesis.
Definition: xlformula.hxx:127
const sal_uInt16 EXC_FUNCID_OR
Definition: xlformula.hxx:298
const sal_uInt16 EXC_TOK_NLR_REL
NLR: Pivot table name.
Definition: xlformula.hxx:153
const sal_uInt8 EXC_FUNCFLAG_VOLATILE
Number of parameter info entries.
Definition: xlformula.hxx:288
const sal_uInt8 EXC_TOKID_CONCAT
Power operator.
Definition: xlformula.hxx:59
const sal_uInt8 EXC_TOKID_REFERR
Variable reference subexpression.
Definition: xlformula.hxx:96
const sal_uInt8 EXC_TOK_ATTR_IF
Volatile function.
Definition: xlformula.hxx:117
const sal_uInt8 EXC_TOK_NLR_ROWV
NLR: Column index.
Definition: xlformula.hxx:143
const sal_uInt8 EXC_TOK_NLR_RANGE
NLR: Value in column.
Definition: xlformula.hxx:145
const sal_uInt8 EXC_TOK_BOOL_FALSE
Maximum string length of a tStr token.
Definition: xlformula.hxx:113
const sal_uInt8 EXC_TOKID_MEMERR
Constant reference subexpression.
Definition: xlformula.hxx:93
const sal_uInt8 EXC_TOKCLASS_ARR
40-5F: Value class tokens.
Definition: xlformula.hxx:45
const sal_uInt8 EXC_FUNCFLAG_PARAMPAIRS
Only used in export filter.
Definition: xlformula.hxx:291
const sal_uInt16 EXC_TOK_FUNCVAR_CMD
Spaces before formula (BIFF3).
Definition: xlformula.hxx:132
XclFuncParamConv
Enumerates different types of token class conversion in function parameters.
Definition: xlformula.hxx:186
@ EXC_PARAMCONV_VAL
Use original class of current token.
Definition: xlformula.hxx:188
@ EXC_PARAMCONV_ORG
Definition: xlformula.hxx:187
@ EXC_PARAMCONV_RPX
Repeat parent conversion in VALTYPE parameters.
Definition: xlformula.hxx:191
@ EXC_PARAMCONV_RPT
Convert tokens to ARR class.
Definition: xlformula.hxx:190
@ EXC_PARAMCONV_ARR
Convert tokens to VAL class.
Definition: xlformula.hxx:189
@ EXC_PARAMCONV_RPO
Repeat parent conversion in REFTYPE parameters.
Definition: xlformula.hxx:192
const sal_uInt8 EXC_TOK_ATTR_SPACE_BR_CLOSE
Spaces before closing parenthesis.
Definition: xlformula.hxx:129
const sal_uInt8 EXC_TOKID_SHEET
Special attribute.
Definition: xlformula.hxx:77
const sal_uInt8 EXC_TOKID_FUNC
Array constant.
Definition: xlformula.hxx:87
const sal_uInt8 EXC_TOK_NLR_SROWR
Stacked NLR: Range.
Definition: xlformula.hxx:147
const sal_uInt8 EXC_TOKID_AREAERR3D
Deleted 3D cell reference.
Definition: xlformula.hxx:107
const sal_uInt8 EXC_TOKID_GT
Greater than or equal operator.
Definition: xlformula.hxx:64
const sal_uInt8 EXC_TOK_NLR_RANGEERR
Stacked NLR: Value in column.
Definition: xlformula.hxx:151
const sal_uInt8 EXC_TOK_ATTR_SPACE_SP_OPEN
Line breaks before next token.
Definition: xlformula.hxx:126
const sal_uInt8 EXC_TOK_NLR_COLV
NLR: Value in row.
Definition: xlformula.hxx:144
XclExpStream & operator<<(XclExpStream &rStrm, const XclTokenArray &rTokArr)
Calls the Write() function at the passed token array.
Definition: xlformula.cxx:806
const sal_uInt8 EXC_TOKID_MUL
Subtraction operator.
Definition: xlformula.hxx:56
const sal_uInt8 EXC_TOKID_MASK
60-7F: Array class tokens.
Definition: xlformula.hxx:49
const sal_uInt8 EXC_TOKID_NE
Greater than operator.
Definition: xlformula.hxx:65
XclFuncParamValidity
Enumerates validity modes for a function parameter.
Definition: xlformula.hxx:177
@ EXC_PARAM_NONE
Definition: xlformula.hxx:178
@ EXC_PARAM_EXCELONLY
Parameter supported by Calc only.
Definition: xlformula.hxx:181
@ EXC_PARAM_CALCONLY
Parameter supported by Calc and Excel.
Definition: xlformula.hxx:180
@ EXC_PARAM_REGULAR
Default for an unspecified entry in a C-array.
Definition: xlformula.hxx:179
const sal_uInt32 EXC_TOK_NLR_ADDMASK
NLR relative (in appended data).
Definition: xlformula.hxx:156
const sal_uInt8 EXC_TOKID_FUNCCE
Reference subexpression (in names) without result.
Definition: xlformula.hxx:102
const sal_uInt8 EXC_TOKID_NAMEX
Definition: xlformula.hxx:103
const sal_uInt8 EXC_TOKID_REFERR3D
3D area reference.
Definition: xlformula.hxx:106
const sal_uInt8 EXC_TOKID_REFN
Deleted 2D area reference.
Definition: xlformula.hxx:98
const sal_uInt8 EXC_TOK_NLR_COLR
NLR: Row index.
Definition: xlformula.hxx:142
const sal_uInt8 EXC_TOKID_ARRAY
Floating-point constant.
Definition: xlformula.hxx:86
const sal_uInt8 EXC_TOKID_AREAERR
Deleted 2D cell reference.
Definition: xlformula.hxx:97
const sal_uInt8 EXC_TOKID_REF
Defined name.
Definition: xlformula.hxx:90
const sal_uInt8 EXC_FUNCFLAG_ADDINEQUIV
Optional parameters are expected to appear in pairs.
Definition: xlformula.hxx:292
const sal_uInt8 EXC_TOK_ATTR_SPACE_SP
Spaces in formula representation.
Definition: xlformula.hxx:124
const sal_uInt8 EXC_TOK_FUNCVAR_PROMPT
Mask for function/command index.
Definition: xlformula.hxx:134
const sal_uInt8 EXC_TOKID_MISSARG
Parentheses.
Definition: xlformula.hxx:73
const sal_uInt8 EXC_TOKID_MEMNOMEM
Deleted reference subexpression.
Definition: xlformula.hxx:94
XclFormulaType
Mask for number of appended ranges.
Definition: xlformula.hxx:160
@ EXC_FMLATYPE_CHART
Defined name.
Definition: xlformula.hxx:167
@ EXC_FMLATYPE_MATRIX
Simple cell formula, also used in change tracking.
Definition: xlformula.hxx:162
@ EXC_FMLATYPE_NAME
Data validation.
Definition: xlformula.hxx:166
@ EXC_FMLATYPE_SHARED
Matrix (array) formula.
Definition: xlformula.hxx:163
@ EXC_FMLATYPE_CONTROL
Chart source ranges.
Definition: xlformula.hxx:168
@ EXC_FMLATYPE_DATAVAL
Conditional format.
Definition: xlformula.hxx:165
@ EXC_FMLATYPE_WQUERY
Spreadsheet links in form controls.
Definition: xlformula.hxx:169
@ EXC_FMLATYPE_LISTVAL
Web query source range.
Definition: xlformula.hxx:170
@ EXC_FMLATYPE_CONDFMT
Shared formula.
Definition: xlformula.hxx:164
@ EXC_FMLATYPE_CELL
Definition: xlformula.hxx:161
const sal_uInt8 EXC_TOKID_RANGE
List operator.
Definition: xlformula.hxx:68
const sal_uInt8 EXC_TOK_ATTR_SUM
Jump to token.
Definition: xlformula.hxx:120
const sal_uInt8 EXC_TOKID_ENDSHEET
Start of a sheet reference (BIFF2-BIFF4).
Definition: xlformula.hxx:78
std::shared_ptr< XclTokenArray > XclTokenArrayRef
Definition: xlformula.hxx:416
const sal_uInt8 EXC_TOK_ATTR_VOLATILE
sal_True value of a tBool token.
Definition: xlformula.hxx:116
const sal_uInt8 EXC_TOKID_GE
Equal operator.
Definition: xlformula.hxx:63
const sal_uInt8 EXC_TOK_NLR_SCOLR
Stacked NLR: Row index.
Definition: xlformula.hxx:148
const sal_uInt8 EXC_TOKID_LE
Less than operator.
Definition: xlformula.hxx:61
const sal_uInt8 EXC_TOK_NLR_SCOLV
Stacked NLR: Value in row.
Definition: xlformula.hxx:150
const sal_uInt16 EXC_TOK_STR_MAXLEN
Deleted 3D area reference.
Definition: xlformula.hxx:111
const sal_uInt8 EXC_TOK_ATTR_SPACE_SP_PRE
Line breaks before closing parenthesis.
Definition: xlformula.hxx:130
const sal_uInt8 EXC_TOK_NLR_SXNAME
NLR: Invalid/deleted range.
Definition: xlformula.hxx:152
const sal_uInt8 EXC_TOKID_MEMAREAN
Relative 2D area reference (in names).
Definition: xlformula.hxx:100
const sal_uInt8 EXC_TOKCLASS_REF
00-1F: Base tokens.
Definition: xlformula.hxx:43
const sal_uInt16 EXC_TOK_REF_ROWREL
True = Column is relative.
Definition: xlformula.hxx:138
const sal_uInt8 EXC_TOK_NLR_SRANGE
NLR: Range.
Definition: xlformula.hxx:146
const sal_uInt8 EXC_TOKID_ERR
End of a sheet reference (BIFF2-BIFF4).
Definition: xlformula.hxx:79
const sal_uInt8 EXC_TOK_ATTR_SPACE_SP_CLOSE
Line breaks before opening parenthesis.
Definition: xlformula.hxx:128
const sal_uInt16 EXC_FUNCID_CHOOSE
Definition: xlformula.hxx:299
const sal_uInt8 EXC_TOKID_NLR
String constant.
Definition: xlformula.hxx:75
const size_t EXC_TOKARR_MAXLEN
Definition: xlformula.hxx:37
const sal_uInt8 EXC_TOKID_AREA3D
3D cell reference.
Definition: xlformula.hxx:105
const sal_uInt16 EXC_TOK_FUNCVAR_INDEXMASK
Macro command.
Definition: xlformula.hxx:133
const sal_uInt8 EXC_TOK_ATTR_CHOOSE
Start of true condition in IF function.
Definition: xlformula.hxx:118
const sal_uInt8 EXC_TOKID_LT
String concatenation operator.
Definition: xlformula.hxx:60
const sal_uInt8 EXC_TOK_ATTR_GOTO
Jump array of CHOOSE function.
Definition: xlformula.hxx:119
const sal_uInt8 EXC_TOK_ATTR_SPACE_BR
Spaces before next token.
Definition: xlformula.hxx:125
const sal_uInt8 EXC_TOKID_EQ
Less than or equal operator.
Definition: xlformula.hxx:62
const sal_uInt8 EXC_TOKID_STR
Missing argument.
Definition: xlformula.hxx:74
const sal_uInt8 EXC_TOKID_NUM
Integer constant.
Definition: xlformula.hxx:82
const sal_uInt8 EXC_TOKID_ADD
Multiple operation reference.
Definition: xlformula.hxx:54
const sal_uInt8 EXC_TOK_ATTR_ASSIGN
SUM function with one parameter.
Definition: xlformula.hxx:121
const sal_uInt8 EXC_TOKID_NONE
Definition: xlformula.hxx:51
const sal_uInt8 EXC_TOKID_ATTR
Natural language reference (NLR).
Definition: xlformula.hxx:76
const sal_uInt8 EXC_TOKID_POWER
Division operator.
Definition: xlformula.hxx:58
const sal_uInt8 EXC_TOKID_FUNCVAR
Function, fixed number of arguments.
Definition: xlformula.hxx:88
const sal_uInt8 EXC_TOKID_BOOL
Error constant.
Definition: xlformula.hxx:80
const sal_uInt16 EXC_FUNCID_AND
Definition: xlformula.hxx:297
const sal_uInt8 EXC_TOK_NLR_SROWV
Stacked NLR: Column index.
Definition: xlformula.hxx:149
const sal_uInt8 EXC_TOKID_MEMNOMEMN
Reference subexpression (in names).
Definition: xlformula.hxx:101
XclImpStream & operator>>(XclImpStream &rStrm, XclTokenArray &rTokArr)
Calls the Read() function at the passed token array.
Definition: xlformula.cxx:800
const sal_uInt8 EXC_TOKID_PERCENT
Unary minus.
Definition: xlformula.hxx:71
const sal_uInt8 EXC_TOKID_PAREN
Percent sign.
Definition: xlformula.hxx:72
const size_t EXC_FUNCINFO_PARAMINFO_COUNT
Maximum parameter count.
Definition: xlformula.hxx:286
const sal_uInt8 EXC_TOKID_UPLUS
Range operator.
Definition: xlformula.hxx:69
const sal_uInt8 EXC_TOK_FUNCVAR_COUNTMASK
User prompt for macro commands.
Definition: xlformula.hxx:135
const sal_uInt16 EXC_FUNCID_EXTERNCALL
Definition: xlformula.hxx:300
const sal_uInt8 EXC_TOKCLASS_NONE
Definition: xlformula.hxx:42
const sal_uInt8 EXC_TOK_NLR_ERR
True = Row is relative.
Definition: xlformula.hxx:140
const sal_uInt16 EXC_TOK_REF_COLREL
Mask for parameter count.
Definition: xlformula.hxx:137
const sal_uInt8 EXC_TOK_ATTR_SPACE
BASIC style assignment.
Definition: xlformula.hxx:122
const sal_uInt8 EXC_TOK_NLR_ROWR
NLR: Invalid/deleted.
Definition: xlformula.hxx:141
const sal_uInt8 EXC_TOKID_AREAN
Relative 2D cell reference (in names).
Definition: xlformula.hxx:99
const sal_uInt8 EXC_TOKID_EXP
Placeholder for invalid token id.
Definition: xlformula.hxx:52