23#include <tokenarray.hxx>
55#define RO { EXC_PARAM_REGULAR, EXC_PARAMCONV_ORG, false }
56#define RA { EXC_PARAM_REGULAR, EXC_PARAMCONV_ARR, false }
57#define RR { EXC_PARAM_REGULAR, EXC_PARAMCONV_RPT, false }
58#define RX { EXC_PARAM_REGULAR, EXC_PARAMCONV_RPX, false }
59#define VO { EXC_PARAM_REGULAR, EXC_PARAMCONV_ORG, true }
60#define VV { EXC_PARAM_REGULAR, EXC_PARAMCONV_VAL, true }
61#define VA { EXC_PARAM_REGULAR, EXC_PARAMCONV_ARR, true }
62#define VR { EXC_PARAM_REGULAR, EXC_PARAMCONV_RPT, true }
63#define VX { EXC_PARAM_REGULAR, EXC_PARAMCONV_RPX, true }
64#define RO_E { EXC_PARAM_EXCELONLY, EXC_PARAMCONV_ORG, false }
65#define VR_E { EXC_PARAM_EXCELONLY, EXC_PARAMCONV_RPT, true }
66#define C { EXC_PARAM_CALCONLY, EXC_PARAMCONV_ORG, false }
71#define EXC_FUNCNAME( ascii ) "_xlfn." ascii
72#define EXC_FUNCNAME_ODF( ascii ) "_xlfnodf." ascii
73#define EXC_FUNCNAME_ADDIN( ascii ) "com.sun.star.sheet.addin." ascii
79 {
ocIf, 1, 2, 3,
R, {
VO,
RO }, 0,
nullptr },
80 {
ocIsNA, 2, 1, 1,
V, {
VR }, 0,
nullptr },
86 {
ocRow, 8, 0, 1,
V, {
RO }, 0,
nullptr },
92 {
ocFixed, 14, 1, 2,
V, {
VR,
VR,
C }, 0,
nullptr },
93 {
ocSin, 15, 1, 1,
V, {
VR }, 0,
nullptr },
95 {
ocCos, 16, 1, 1,
V, {
VR }, 0,
nullptr },
97 {
ocTan, 17, 1, 1,
V, {
VR }, 0,
nullptr },
101 {
ocPi, 19, 0, 0,
V, {}, 0,
nullptr },
102 {
ocSqrt, 20, 1, 1,
V, {
VR }, 0,
nullptr },
103 {
ocExp, 21, 1, 1,
V, {
VR }, 0,
nullptr },
104 {
ocLn, 22, 1, 1,
V, {
VR }, 0,
nullptr },
106 {
ocAbs, 24, 1, 1,
V, {
VR }, 0,
nullptr },
107 {
ocInt, 25, 1, 1,
V, {
VR }, 0,
nullptr },
112 {
ocRept, 30, 2, 2,
V, {
VR }, 0,
nullptr },
113 {
ocMid, 31, 3, 3,
V, {
VR }, 0,
nullptr },
114 {
ocLen, 32, 1, 1,
V, {
VR }, 0,
nullptr },
116 {
ocTrue, 34, 0, 0,
V, {}, 0,
nullptr },
117 {
ocFalse, 35, 0, 0,
V, {}, 0,
nullptr },
119 {
ocOr, 37, 1,
MX,
V, {
RX }, 0,
nullptr },
120 {
ocNot, 38, 1, 1,
V, {
VR }, 0,
nullptr },
121 {
ocMod, 39, 2, 2,
V, {
VR }, 0,
nullptr },
130 {
ocText, 48, 2, 2,
V, {
VR }, 0,
nullptr },
131 {
ocLinest, 49, 1, 2,
A, {
RA,
RA,
C,
C }, 0,
nullptr },
132 {
ocTrend, 50, 1, 3,
A, {
RA,
RA,
RA,
C }, 0,
nullptr },
133 {
ocLogest, 51, 1, 2,
A, {
RA,
RA,
C,
C }, 0,
nullptr },
134 {
ocGrowth, 52, 1, 3,
A, {
RA,
RA,
RA,
C }, 0,
nullptr },
135 {
ocPV, 56, 3, 5,
V, {
VR }, 0,
nullptr },
136 {
ocFV, 57, 3, 5,
V, {
VR }, 0,
nullptr },
137 {
ocNper, 58, 3, 5,
V, {
VR }, 0,
nullptr },
138 {
ocPMT, 59, 3, 5,
V, {
VR }, 0,
nullptr },
139 {
ocRate, 60, 3, 6,
V, {
VR }, 0,
nullptr },
141 {
ocIRR, 62, 1, 2,
V, {
RA,
VR }, 0,
nullptr },
143 {
ocMatch, 64, 2, 3,
V, {
VR,
RX,
RR }, 0,
nullptr },
155 {
ocRows, 76, 1, 1,
V, {
RO }, 0,
nullptr },
160 {
ocType, 86, 1, 1,
V, {
VX }, 0,
nullptr },
165 {
ocHLookup, 101, 3, 3,
V, {
VV,
RO,
RO,
C }, 0,
nullptr },
166 {
ocVLookup, 102, 3, 3,
V, {
VV,
RO,
RO,
C }, 0,
nullptr },
167 {
ocIsRef, 105, 1, 1,
V, {
RX }, 0,
nullptr },
168 {
ocLog, 109, 1, 2,
V, {
VR }, 0,
nullptr },
169 {
ocChar, 111, 1, 1,
V, {
VR }, 0,
nullptr },
170 {
ocLower, 112, 1, 1,
V, {
VR }, 0,
nullptr },
171 {
ocUpper, 113, 1, 1,
V, {
VR }, 0,
nullptr },
173 {
ocLeft, 115, 1, 2,
V, {
VR }, 0,
nullptr },
174 {
ocRight, 116, 1, 2,
V, {
VR }, 0,
nullptr },
175 {
ocExact, 117, 2, 2,
V, {
VR }, 0,
nullptr },
176 {
ocTrim, 118, 1, 1,
V, {
VR }, 0,
nullptr },
179 {
ocCode, 121, 1, 1,
V, {
VR }, 0,
nullptr },
180 {
ocFind, 124, 2, 3,
V, {
VR }, 0,
nullptr },
182 {
ocIsErr, 126, 1, 1,
V, {
VR }, 0,
nullptr },
186 {
ocT, 130, 1, 1,
V, {
RO }, 0,
nullptr },
187 {
ocN, 131, 1, 1,
V, {
RO }, 0,
nullptr },
190 {
ocSLN, 142, 3, 3,
V, {
VR }, 0,
nullptr },
191 {
ocSYD, 143, 4, 4,
V, {
VR }, 0,
nullptr },
192 {
ocDDB, 144, 4, 5,
V, {
VR }, 0,
nullptr },
194 {
ocClean, 162, 1, 1,
V, {
VR }, 0,
nullptr },
198 {
ocIpmt, 167, 4, 6,
V, {
VR }, 0,
nullptr },
199 {
ocPpmt, 168, 4, 6,
V, {
VR }, 0,
nullptr },
202 {
ocFact, 184, 1, 1,
V, {
VR }, 0,
nullptr },
213 {
ocFindB, 205, 2, 3,
V, {
VR }, 0,
nullptr },
216 {
ocLeftB, 208, 1, 2,
V, {
VR }, 0,
nullptr },
218 {
ocMidB, 210, 3, 3,
V, {
VR }, 0,
nullptr },
219 {
ocLenB, 211, 1, 1,
V, {
VR }, 0,
nullptr },
228 {
ocLinest, 49, 1, 4,
A, {
RA,
RA,
VV }, 0,
nullptr },
229 {
ocTrend, 50, 1, 4,
A, {
RA,
RA,
RA,
VV }, 0,
nullptr },
230 {
ocLogest, 51, 1, 4,
A, {
RA,
RA,
VV }, 0,
nullptr },
231 {
ocGrowth, 52, 1, 4,
A, {
RA,
RA,
RA,
VV }, 0,
nullptr },
232 {
ocTrunc, 197, 1, 2,
V, {
VR }, 0,
nullptr },
234 {
ocGetDiffDate360, 220, 2, 2,
V, {
VR,
VR,
C }, 0,
nullptr },
236 {
ocVBD, 222, 5, 7,
V, {
VR }, 0,
nullptr },
257 {
ocAsc, 214, 1, 1,
V, {
VR }, 0,
nullptr },
258 {
ocJis, 215, 1, 1,
V, {
VR }, 0,
nullptr },
259 {
ocRank, 216, 2, 3,
V, {
VR,
RO,
VR }, 0,
nullptr },
260 {
ocDB, 247, 4, 5,
V, {
VR }, 0,
nullptr },
273 {
ocEven, 279, 1, 1,
V, {
VR }, 0,
nullptr },
275 {
ocFDist, 281, 3, 3,
V, {
VR }, 0,
nullptr },
276 {
ocFInv, 282, 3, 3,
V, {
VR }, 0,
nullptr },
292 {
ocOdd, 298, 1, 1,
V, {
VR }, 0,
nullptr },
295 {
ocTDist, 301, 3, 3,
V, {
VR }, 0,
nullptr },
302 {
ocCovar, 308, 2, 2,
V, {
VA }, 0,
nullptr },
304 {
ocFTest, 310, 2, 2,
V, {
VA }, 0,
nullptr },
307 {
ocRSQ, 313, 2, 2,
V, {
VA }, 0,
nullptr },
308 {
ocSTEYX, 314, 2, 2,
V, {
VA }, 0,
nullptr },
309 {
ocSlope, 315, 2, 2,
V, {
VA }, 0,
nullptr },
310 {
ocTTest, 316, 4, 4,
V, {
VA,
VA,
VR }, 0,
nullptr },
311 {
ocProb, 317, 3, 4,
V, {
VA,
VA,
VR }, 0,
nullptr },
323 {
ocPercentrank, 329, 2, 3,
V, {
RX,
VR,
VR_E }, 0,
nullptr },
326 {
ocTInv, 332, 2, 2,
V, {
VR }, 0,
nullptr },
346 {
ocHLookup, 101, 3, 4,
V, {
VV,
RO,
RO,
VV }, 0,
nullptr },
347 {
ocVLookup, 102, 3, 4,
V, {
VV,
RO,
RO,
VV }, 0,
nullptr },
352 {
ocPower, 337, 2, 2,
V, {
VR }, 0,
nullptr },
353 {
ocRad, 342, 1, 1,
V, {
VR }, 0,
nullptr },
354 {
ocDeg, 343, 1, 1,
V, {
VR }, 0,
nullptr },
356 {
ocSumIf, 345, 2, 3,
V, {
RO,
VR,
RO }, 0,
nullptr },
359 {
ocISPMT, 350, 4, 4,
V, {
VR }, 0,
nullptr },
369 {
ocGetPivotData, 358, 2,
MX,
V, {
RR,
RR,
VR }, 0,
nullptr },
384#define EXC_FUNCENTRY_V_VR( opcode, minparam, maxparam, flags, asciiname ) \
385 { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \
386 { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
392 {
ocCountIfs, 255, 3,
MX,
V, {
RO_E,
RO,
VR },
EXC_FUNCFLAG_EXPORTONLY|
EXC_FUNCFLAG_PARAMPAIRS,
EXC_FUNCNAME(
"COUNTIFS" ) },
393 {
ocSumIfs,
NOID, 3,
MX,
V, {
RO,
RO,
VR },
EXC_FUNCFLAG_IMPORTONLY|
EXC_FUNCFLAG_PARAMPAIRS,
EXC_FUNCNAME(
"SUMIFS" ) },
394 {
ocSumIfs, 255, 4,
MX,
V, {
RO_E,
RO,
RO,
VR },
EXC_FUNCFLAG_EXPORTONLY|
EXC_FUNCFLAG_PARAMPAIRS,
EXC_FUNCNAME(
"SUMIFS" ) },
395 {
ocAverageIf,
NOID, 2, 3,
V, {
RO,
VR,
RO },
EXC_FUNCFLAG_IMPORTONLY,
EXC_FUNCNAME(
"AVERAGEIF" ) },
396 {
ocAverageIf, 255, 3, 4,
V, {
RO_E,
RO,
VR,
RO },
EXC_FUNCFLAG_EXPORTONLY,
EXC_FUNCNAME(
"AVERAGEIF" ) },
397 {
ocAverageIfs,
NOID, 3,
MX,
V, {
RO,
RO,
VR },
EXC_FUNCFLAG_IMPORTONLY|
EXC_FUNCFLAG_PARAMPAIRS,
EXC_FUNCNAME(
"AVERAGEIFS" ) },
398 {
ocAverageIfs, 255, 4,
MX,
V, {
RO_E,
RO,
RO,
VR },
EXC_FUNCFLAG_EXPORTONLY|
EXC_FUNCFLAG_PARAMPAIRS,
EXC_FUNCNAME(
"AVERAGEIFS" ) },
400 {
ocIfError, 255, 3, 3,
V, {
RO_E,
VO,
RO },
EXC_FUNCFLAG_EXPORTONLY,
EXC_FUNCNAME(
"IFERROR" ) },
401 {
ocNetWorkdays_MS,
NOID, 2, 4,
V, {
VR,
VR,
RO,
RO },
EXC_FUNCFLAG_IMPORTONLY,
EXC_FUNCNAME(
"NETWORKDAYS.INTL" ) },
402 {
ocNetWorkdays_MS, 255, 3, 5,
V, {
RO_E,
VR,
VR,
RO,
RO },
EXC_FUNCFLAG_EXPORTONLY,
EXC_FUNCNAME(
"NETWORKDAYS.INTL" ) },
403 {
ocWorkday_MS,
NOID, 2, 4,
V, {
VR,
VR,
VR,
RO },
EXC_FUNCFLAG_IMPORTONLY,
EXC_FUNCNAME(
"WORKDAY.INTL" ) },
404 {
ocWorkday_MS, 255, 3, 5,
V, {
RO_E,
VR,
VR,
VR,
RO },
EXC_FUNCFLAG_EXPORTONLY,
EXC_FUNCNAME(
"WORKDAY.INTL" ) },
408#define EXC_FUNCENTRY_V_VR_IMPORT( opcode, minparam, maxparam, flags, asciiname ) \
409 { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
411#define EXC_FUNCENTRY_V_RO_EXPORT( opcode, minparam, maxparam, flags, asciiname ) \
412 { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
414#define EXC_FUNCENTRY_A_VR( opcode, minparam, maxparam, flags, asciiname ) \
415 { opcode, NOID, minparam, maxparam, A, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \
416 { opcode, 255, (minparam)+1, (maxparam)+1, A, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
418#define EXC_FUNCENTRY_V_RO( opcode, minparam, maxparam, flags, asciiname ) \
419 { opcode, NOID, minparam, maxparam, V, { RO }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \
420 { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
423#define EXC_FUNCENTRY_V_RX( opcode, minparam, maxparam, flags, asciiname ) \
424 { opcode, NOID, minparam, MX, V, { RX }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \
425 { opcode, 255, (minparam)+1, MX, V, { RO_E, RX }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
427#define EXC_FUNCENTRY_V_VA( opcode, minparam, maxparam, flags, asciiname ) \
428 { opcode, NOID, minparam, maxparam, V, { VA }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \
429 { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
550 {
ocIfNA, 255, 3, 3,
V, {
RO_E,
VO,
RO },
EXC_FUNCFLAG_EXPORTONLY,
EXC_FUNCNAME(
"IFNA" ) },
596#define EXC_FUNCENTRY_ODF( opcode, minparam, maxparam, flags, asciiname ) \
597 { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME_ODF( asciiname ) }, \
598 { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME_ODF( asciiname ) }
607#undef EXC_FUNCENTRY_ODF
609#define EXC_FUNCENTRY_OOO( opcode, minparam, maxparam, flags, asciiname ) \
610 { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \
611 { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }
614#define EXC_FUNCENTRY_OOO_IBR( opcode, minparam, maxparam, flags, asciiname ) \
615 { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), asciiname }
646#undef EXC_FUNCENTRY_OOO_IBR
647#undef EXC_FUNCENTRY_OOO
679 OSL_ENSURE( !
maXclFuncMap.empty(),
"XclFunctionProvider::GetFuncInfoFromXclFunc - wrong filter" );
680 XclFuncMap::const_iterator aIt =
maXclFuncMap.find( nXclFunc );
681 return (aIt ==
maXclFuncMap.end()) ? nullptr : aIt->second;
687 OSL_ENSURE( !
maXclFuncMap.empty(),
"XclFunctionProvider::GetFuncInfoFromXclMacroName - wrong filter" );
695 OSL_ENSURE( !
maScFuncMap.empty(),
"XclFunctionProvider::GetFuncInfoFromOpCode - wrong filter" );
696 ScFuncMap::const_iterator aIt =
maScFuncMap.find( eOpCode );
697 return (aIt ==
maScFuncMap.end()) ? nullptr : aIt->second;
706 if( pIt->mnXclFunc !=
NOID )
708 if( pIt->IsMacroFunc() )
724 mbVolatile( bVolatile )
729 mbVolatile( bVolatile )
737 OSL_ENSURE(
maTokVec.size() <= 0xFFFF,
"XclTokenArray::GetSize - array too long" );
738 return limit_cast< sal_uInt16 >(
maTokVec.size() );
743 return rStrm.ReaduInt16();
750 const std::size_t nMaxBuffer = 4096;
751 std::size_t nBytesLeft = nSize;
752 std::size_t nTotalRead = 0;
760 auto nRead =
rStrm.Read(
maTokVec.data() + nTotalRead, nReadRequest);
762 if (nRead != nReadRequest)
817 rStrm << sal_uInt16( 0 );
822 mppScTokenBeg( nullptr ),
823 mppScTokenEnd( nullptr ),
824 mppScToken( nullptr ),
825 mbSkipSpaces( false )
831 Init( rScTokArr, bSkipSpaces );
835 mppScTokenBeg( rTokArrIt.mppScTokenBeg ),
836 mppScTokenEnd( rTokArrIt.mppScTokenEnd ),
837 mppScToken( rTokArrIt.mppScToken ),
838 mbSkipSpaces( bSkipSpaces )
845 sal_uInt16 nTokArrLen = rScTokArr.
GetLen();
846 mppScTokenBeg =
static_cast< const FormulaToken* const*
>( nTokArrLen ? rScTokArr.
GetArray() : nullptr );
881 bool bIsStr = (rScToken.GetType() ==
svString) && (rScToken.GetOpCode() ==
ocPush);
882 if( bIsStr ) rString = rScToken.GetString().getString();
897 enum { STATE_START, STATE_STR, STATE_SEP, STATE_END } eState = STATE_START;
898 while( eState != STATE_END )
switch( eState )
901 eState = aIt.
Is() ? STATE_STR : STATE_END;
907 if( bRet ) rStringList += aString ;
908 eState = (bRet && (++aIt).Is()) ? STATE_SEP : STATE_END;
913 if( bRet ) rStringList += OUStringChar(cSep);
914 eState = (bRet && (++aIt).Is()) ? STATE_STR : STATE_END;
929 if (aString.isEmpty())
931 sal_Int32 nStringIx = 0;
934 OUString aToken( aString.getToken( 0, cStringSep, nStringIx ) );
953 rAddress = rRef.
toAbs(rDoc, rPos);
968 stBegin, stTableOp, stOpen, stFormula, stFormulaSep,
969 stColFirst, stColFirstSep, stColRel, stColRelSep,
970 stRowFirst, stRowFirstSep, stRowRel, stClose, stError
974 OpCode eOpCode = aIt->GetOpCode();
975 bool bIsSep = eOpCode ==
ocSep;
979 eState = (eOpCode ==
ocTableOp) ? stTableOp : stError;
982 eState = (eOpCode ==
ocOpen) ? stOpen : stError;
985 eState = lclGetAddress(rDoc, rRefs.
maFmlaScPos, *aIt, rScPos) ? stFormula : stError;
988 eState = bIsSep ? stFormulaSep : stError;
991 eState = lclGetAddress(rDoc, rRefs.
maColFirstScPos, *aIt, rScPos) ? stColFirst : stError;
994 eState = bIsSep ? stColFirstSep : stError;
997 eState = lclGetAddress(rDoc, rRefs.
maColRelScPos, *aIt, rScPos) ? stColRel : stError;
1000 eState = bIsSep ? stColRelSep : ((eOpCode ==
ocClose) ? stClose : stError);
1003 eState = lclGetAddress(rDoc, rRefs.
maRowFirstScPos, *aIt, rScPos) ? stRowFirst : stError;
1007 eState = bIsSep ? stRowFirstSep : stError;
1010 eState = lclGetAddress(rDoc, rRefs.
maRowRelScPos, *aIt, rScPos) ? stRowRel : stError;
1013 eState = (eOpCode ==
ocClose) ? stClose : stError;
1019 return eState == stClose;
virtual formula::FormulaToken * AddOpCode(OpCode eCode) override
virtual void Clear() override
This class is used to export Excel record streams.
std::size_t Write(const void *pData, std::size_t nBytes)
Writes nBytes bytes from memory.
Provides access to function info structs for all available functions.
void FillScFuncMap(const XclFunctionInfo *pBeg, const XclFunctionInfo *pEnd)
const XclFunctionInfo * GetFuncInfoFromXclMacroName(const OUString &rXclMacroName) const
Returns the function data for an Excel function simulated by a macro call, or 0 on error.
const XclFunctionInfo * GetFuncInfoFromXclFunc(sal_uInt16 nXclFunc) const
Returns the function data for an Excel function index, or 0 on error.
void FillXclFuncMap(const XclFunctionInfo *pBeg, const XclFunctionInfo *pEnd)
ScFuncMap maScFuncMap
Maps macro function names to function data.
const XclFunctionInfo * GetFuncInfoFromOpCode(OpCode eOpCode) const
Returns the function data for a Calc opcode, or 0 on error.
XclMacroNameMap maXclMacroNameMap
Maps Excel function indexes to function data.
XclFunctionProvider(const XclRoot &rRoot)
This class is used to import record oriented streams.
Access to global data for a filter object (imported or exported document) from other classes.
bool IsImport() const
Returns true, if currently a document is imported.
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
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.
static bool GetTokenString(OUString &rString, const ::formula::FormulaToken &rScToken)
Tries to extract a string from the passed token.
static bool GetString(OUString &rString, const ScTokenArray &rScTokArr)
Parses the passed formula and tries to find a single string token, i.e.
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.
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.
Special token array iterator for the Excel filters.
const ::formula::FormulaToken *const * mppScToken
Pointer behind last token pointer of token array.
const ::formula::FormulaToken *const * mppScTokenEnd
Pointer to first token pointer of token array.
bool mbSkipSpaces
Pointer to current token pointer of token array.
void Init(const ScTokenArray &rScTokArr, bool bSkipSpaces)
const ::formula::FormulaToken *const * mppScTokenBeg
XclTokenArrayIterator & operator++()
Binary representation of an Excel token array.
void ReadArray(sal_uInt16 nSize, XclImpStream &rStrm)
Reads the tokens of the token array (without size field).
bool operator==(const XclTokenArray &rTokArr) const
Compares this token array with the passed.
XclTokenArray(bool bVolatile=false)
Creates an empty token array.
sal_uInt16 GetSize() const
Returns the size of the token array in bytes.
void WriteSize(XclExpStream &rStrm) const
Writes the size field of the token array.
void Write(XclExpStream &rStrm) const
Writes size field and the tokens.
ScfUInt8Vec maExtDataVec
Byte vector containing token data.
bool mbVolatile
Byte vector containing extended data (arrays, stacked NLRs).
static sal_uInt16 ReadSize(XclImpStream &rStrm)
Reads the size field of the token array.
void WriteArray(XclExpStream &rStrm) const
Writes the tokens of the token array (without size field).
void Read(XclImpStream &rStrm)
Reads size field and the tokens.
SharedString intern(const OUString &rStr)
OString stripStart(const OString &rIn, char c)
T sanitizing_min(T a, T b)
Single reference (one address) into the sheet.
ScAddress toAbs(const ScSheetLimits &rLimits, const ScAddress &rPos) const
Represents information for a spreadsheet function for import and export.
OUString GetMacroFuncName() const
Returns the name of the external function as string.
OUString GetAddInEquivalentFuncName() const
Returns the programmatical name of the Add-In function as string.
const char * mpcMacroName
Additional flags (EXC_FUNCFLAG_* constants).
bool IsMacroFunc() const
Returns true, if the function is simulated by a macro call.
bool IsAddInEquivalent() const
Returns true, if the function is stored as an add-in call.
Contains all cell references that can be extracted from a multiple operations formula.
ScAddress maRowFirstScPos
ScAddress maColFirstScPos
Position of the (first) formula cell.
XclBiff
An enumeration for all Excel file format types (BIFF types).
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)