22#include <osl/diagnose.h>
31class SharedStringPool;
361 typedef ::std::map< sal_uInt16, const XclFunctionInfo* >
XclFuncMap;
363 typedef ::std::map< OpCode, const XclFunctionInfo* >
ScFuncMap;
425namespace formula {
class FormulaToken; }
503 static bool GetTokenString( OUString& rString, const ::formula::FormulaToken& rScToken );
541 return nBaseId | nTokenClass;
This class is used to export Excel record streams.
Provides access to function info structs for all available functions.
::std::map< OUString, const XclFunctionInfo * > XclMacroNameMap
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)
::std::map< OpCode, const XclFunctionInfo * > ScFuncMap
::std::map< sal_uInt16, const XclFunctionInfo * > XclFuncMap
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.
A helper with Excel specific token array functions.
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 sal_uInt8 GetTokenClass(sal_uInt8 nTokenId)
Returns the token class of the passed token ID.
static sal_uInt8 GetTokenId(sal_uInt8 nBaseId, sal_uInt8 nTokenClass)
Returns the classified token ID from a base ID and the token class.
static void ChangeTokenClass(sal_uInt8 &rnTokenId, sal_uInt8 nTokenClass)
Changes the token class in the passed classified token ID.
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.
const ::formula::FormulaToken * operator->() const
bool mbSkipSpaces
Pointer to current token pointer of token array.
void Init(const ScTokenArray &rScTokArr, bool bSkipSpaces)
const ::formula::FormulaToken & operator*() const
const ::formula::FormulaToken *const * mppScTokenBeg
XclTokenArrayIterator & operator++()
const ::formula::FormulaToken * Get() const
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 Empty() const
Returns true, if the token array is empty.
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).
bool IsVolatile() const
Returns true, if the formula contains a volatile function.
const sal_uInt8 * GetData() const
Returns read-only access to the byte vector storing token data.
void Read(XclImpStream &rStrm)
Reads size field and the tokens.
These need to be in global namespace just like their respective types are.
Structure that contains all needed information for a parameter in a function.
bool mbValType
Token class conversion type.
XclFuncParamConv meConv
Parameter validity.
XclFuncParamValidity meValid
Represents information for a spreadsheet function for import and export.
bool IsVolatile() const
Function name, if simulated by a macro call (UTF-8) EXC_FUNCFLAG_ADDINEQUIV is 0; or programmatical a...
OUString GetMacroFuncName() const
Returns the name of the external function as string.
bool IsParamPairs() const
Returns true, if optional parameters are expected to appear in pairs.
OUString GetAddInEquivalentFuncName() const
Returns the programmatical name of the Add-In function as string.
XclFuncParamInfo mpParamInfos[EXC_FUNCINFO_PARAMINFO_COUNT]
Token class of the return value.
sal_uInt8 mnRetClass
Maximum number of parameters.
sal_uInt8 mnFlags
Information for all parameters.
sal_uInt16 mnXclFunc
Calc function opcode.
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.
bool IsFixedParamCount() const
Returns true, if the function parameter count is fixed.
sal_uInt8 mnMinParamCount
Excel function index.
sal_uInt8 mnMaxParamCount
Minimum number of parameters.
Contains all cell references that can be extracted from a multiple operations formula.
ScAddress maRowFirstScPos
ScAddress maColFirstScPos
Position of the (first) formula cell.