LibreOffice Module sc (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
XclExpFmlaCompImpl Class Reference

Implementation class of the export formula compiler. More...

Inheritance diagram for XclExpFmlaCompImpl:
[legend]
Collaboration diagram for XclExpFmlaCompImpl:
[legend]

Public Member Functions

 XclExpFmlaCompImpl (const XclExpRoot &rRoot)
 
XclTokenArrayRef CreateFormula (XclFormulaType eType, const ScTokenArray &rScTokArr, const ScAddress *pScBasePos=nullptr, XclExpRefLog *pRefLog=nullptr)
 Creates an Excel token array from the passed Calc token array. More...
 
XclTokenArrayRef CreateErrorFormula (sal_uInt8 nErrCode)
 Creates a single error token containing the passed error code. More...
 
XclTokenArrayRef CreateSpecialRefFormula (sal_uInt8 nTokenId, const XclAddress &rXclPos)
 Creates a single token for a special cell reference. More...
 
XclTokenArrayRef CreateNameXFormula (sal_uInt16 nExtSheet, sal_uInt16 nExtName)
 Creates a single tNameXR token for a reference to an external name. More...
 
bool Is3DRefOnly (XclFormulaType eType) const
 Returns true, if the passed formula type allows 3D references only. More...
 
bool IsRef2D (const ScSingleRefData &rRefData, bool bCheck3DFlag) const
 
bool IsRef2D (const ScComplexRefData &rRefData, bool bCheck3DFlag) const
 

Private Types

typedef std::map< XclFormulaType, XclExpCompConfig > XclExpCompConfigMap
 
typedef std::shared_ptr< XclExpCompData > XclExpCompDataRef
 

Private Member Functions

const XclExpCompConfig * GetConfigForType (XclFormulaType eType) const
 
sal_uInt16 GetSize () const
 
void Init (XclFormulaType eType)
 
void Init (XclFormulaType eType, const ScTokenArray &rScTokArr, const ScAddress *pScBasePos, XclExpRefLog *pRefLog)
 
void RecalcTokenClasses ()
 
void RecalcTokenClass (const XclExpTokenConvInfo &rConvInfo, XclFuncParamConv ePrevConv, XclExpClassConv ePrevClassConv, bool bWasRefClass, o3tl::sorted_vector< const XclExpTokenConvInfo * > &rSeenTokens)
 
void FinalizeFormula ()
 
XclTokenArrayRef CreateTokenArray ()
 
const FormulaToken * GetNextRawToken ()
 
const FormulaToken * PeekNextRawToken () const
 
bool GetNextToken (XclExpScToken &rTokData)
 
XclExpScToken GetNextToken ()
 
XclExpScToken Expression (XclExpScToken aTokData, bool bInParentheses, bool bStopAtSep)
 
XclExpScToken SkipExpression (XclExpScToken aTokData, bool bStopAtSep)
 
XclExpScToken OrTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken AndTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken CompareTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken ConcatTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken AddSubTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken MulDivTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken PowTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken UnaryPostTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken UnaryPreTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken ListTerm (XclExpScToken aTokData, bool bInParentheses)
 
XclExpScToken IntersectTerm (XclExpScToken aTokData, bool &rbHasRefOp)
 
XclExpScToken RangeTerm (XclExpScToken aTokData, bool &rbHasRefOp)
 
XclExpScToken Factor (XclExpScToken aTokData)
 
void ProcessDouble (const XclExpScToken &rTokData)
 
void ProcessString (const XclExpScToken &rTokData)
 
void ProcessMissing (const XclExpScToken &rTokData)
 
void ProcessBad (const XclExpScToken &rTokData)
 
void ProcessParentheses (const XclExpScToken &rTokData)
 
void ProcessBoolean (const XclExpScToken &rTokData)
 
void ProcessDdeLink (const XclExpScToken &rTokData)
 
void ProcessExternal (const XclExpScToken &rTokData)
 
void ProcessMatrix (const XclExpScToken &rTokData)
 
void ProcessFunction (const XclExpScToken &rTokData)
 
void PrepareFunction (const XclExpFuncData &rFuncData)
 
void FinishFunction (XclExpFuncData &rFuncData, sal_uInt8 nCloseSpaces)
 
void FinishIfFunction (XclExpFuncData &rFuncData)
 
void FinishChooseFunction (XclExpFuncData &rFuncData)
 
XclExpScToken ProcessParam (XclExpScToken aTokData, XclExpFuncData &rFuncData)
 
void PrepareParam (XclExpFuncData &rFuncData)
 
void FinishParam (XclExpFuncData &rFuncData)
 
void AppendDefaultParam (XclExpFuncData &rFuncData)
 
void AppendTrailingParam (XclExpFuncData &rFuncData)
 
SCTAB GetScTab (const ScSingleRefData &rRefData) const
 
void ConvertRefData (ScSingleRefData &rRefData, XclAddress &rXclPos, bool bNatLangRef, bool bTruncMaxCol, bool bTruncMaxRow) const
 
void ConvertRefData (ScComplexRefData &rRefData, XclRange &rXclRange, bool bNatLangRef) const
 
XclExpRefLogEntryGetNewRefLogEntry ()
 
void ProcessCellRef (const XclExpScToken &rTokData)
 
void ProcessRangeRef (const XclExpScToken &rTokData)
 
void ProcessExternalCellRef (const XclExpScToken &rTokData)
 
void ProcessExternalRangeRef (const XclExpScToken &rTokData)
 
void ProcessDefinedName (const XclExpScToken &rTokData)
 
void ProcessExternalName (const XclExpScToken &rTokData)
 
void PushOperandPos (sal_uInt16 nTokPos)
 
void PushOperatorPos (sal_uInt16 nTokPos, const XclExpOperandListRef &rxOperands)
 
sal_uInt16 PopOperandPos ()
 
void Append (sal_uInt8 nData)
 
void Append (sal_uInt8 nData, size_t nCount)
 
void Append (sal_uInt16 nData)
 
void Append (sal_uInt32 nData)
 
void Append (double fData)
 
void Append (const OUString &rString)
 
void AppendAddress (const XclAddress &rXclPos)
 
void AppendRange (const XclRange &rXclRange)
 
void AppendSpaceToken (sal_uInt8 nType, sal_uInt8 nCount)
 
void AppendOperandTokenId (sal_uInt8 nTokenId, sal_uInt8 nSpaces=0)
 
void AppendIntToken (sal_uInt16 nValue, sal_uInt8 nSpaces=0)
 
void AppendNumToken (double fValue, sal_uInt8 nSpaces=0)
 
void AppendBoolToken (bool bValue, sal_uInt8 nSpaces=0)
 
void AppendErrorToken (sal_uInt8 nErrCode, sal_uInt8 nSpaces=0)
 
void AppendMissingToken (sal_uInt8 nSpaces=0)
 
void AppendNameToken (sal_uInt16 nNameIdx, sal_uInt8 nSpaces=0)
 
void AppendMissingNameToken (const OUString &rName, sal_uInt8 nSpaces=0)
 
void AppendNameXToken (sal_uInt16 nExtSheet, sal_uInt16 nExtName, sal_uInt8 nSpaces=0)
 
void AppendMacroCallToken (const XclExpExtFuncData &rExtFuncData)
 
void AppendAddInCallToken (const XclExpExtFuncData &rExtFuncData)
 
void AppendEuroToolCallToken (const XclExpExtFuncData &rExtFuncData)
 
void AppendOperatorTokenId (sal_uInt8 nTokenId, const XclExpOperandListRef &rxOperands, sal_uInt8 nSpaces=0)
 
void AppendUnaryOperatorToken (sal_uInt8 nTokenId, sal_uInt8 nSpaces=0)
 
void AppendBinaryOperatorToken (sal_uInt8 nTokenId, bool bValType, sal_uInt8 nSpaces=0)
 
void AppendLogicalOperatorToken (sal_uInt16 nXclFuncIdx, sal_uInt8 nOpCount)
 
void AppendFuncToken (const XclExpFuncData &rFuncData)
 
void AppendParenToken (sal_uInt8 nOpenSpaces=0, sal_uInt8 nCloseSpaces=0)
 
void AppendJumpToken (XclExpFuncData &rFuncData, sal_uInt8 nAttrType)
 
void InsertZeros (sal_uInt16 nInsertPos, sal_uInt16 nInsertSize)
 
void Overwrite (sal_uInt16 nWriteToPos, sal_uInt16 nOffset)
 
void UpdateAttrGoto (sal_uInt16 nAttrPos)
 
bool IsSpaceToken (sal_uInt16 nPos) const
 
void RemoveTrailingParen ()
 
void AppendExt (sal_uInt8 nData)
 
void AppendExt (sal_uInt8 nData, size_t nCount)
 
void AppendExt (sal_uInt16 nData)
 
void AppendExt (double fData)
 
void AppendExt (const OUString &rString)
 

Private Attributes

XclExpCompConfigMap maCfgMap
 
XclFunctionProvider maFuncProv
 Compiler configuration map for all formula types. More...
 
XclExpCompDataRef mxData
 Excel function data provider. More...
 
std::vector< XclExpCompDataRefmaDataStack
 Working data for current formula. More...
 
const XclBiff meBiff
 Stack for working data, when compiler is called recursively. More...
 
const SCCOL mnMaxAbsCol
 Cached BIFF version to save GetBiff() calls. More...
 
const SCROW mnMaxAbsRow
 Maximum column index. More...
 
const SCCOL mnMaxScCol
 Maximum row index. More...
 
const SCROW mnMaxScRow
 Maximum column index in Calc itself. More...
 
const sal_uInt16 mnMaxColMask
 Maximum row index in Calc itself. More...
 
const sal_uInt32 mnMaxRowMask
 Mask to delete invalid bits in column fields. More...
 

Additional Inherited Members

- Protected Member Functions inherited from XclExpRoot
 XclExpRoot (XclExpRootData &rExpRootData)
 
const XclExpRootGetRoot () const
 Returns this root instance - for code readability in derived classes. More...
 
bool IsRelUrl () const
 Returns true, if URLs should be stored relative to the document location. More...
 
sc::CompileFormulaContextGetCompileFormulaContext () const
 
XclExpTabInfoGetTabInfo () const
 Returns the buffer for Calc->Excel sheet index conversion. More...
 
XclExpAddressConverterGetAddressConverter () const
 Returns the address converter. More...
 
XclExpFormulaCompilerGetFormulaCompiler () const
 Returns the formula compiler to produce formula token arrays. More...
 
XclExpProgressBarGetProgressBar () const
 Returns the export progress bar. More...
 
XclExpSstGetSst () const
 Returns the shared string table. More...
 
XclExpPaletteGetPalette () const
 Returns the color buffer. More...
 
XclExpFontBufferGetFontBuffer () const
 Returns the font buffer. More...
 
XclExpNumFmtBufferGetNumFmtBuffer () const
 Returns the number format buffer. More...
 
XclExpXFBufferGetXFBuffer () const
 Returns the cell formatting attributes buffer. More...
 
XclExpLinkManagerGetGlobalLinkManager () const
 Returns the global link manager for defined names. More...
 
XclExpLinkManagerGetLocalLinkManager () const
 Returns the local link manager for the current sheet. More...
 
XclExpNameManagerGetNameManager () const
 Returns the buffer that contains internal defined names. More...
 
XclExpObjectManagerGetObjectManager () const
 Returns the drawing object manager. More...
 
XclExpFilterManagerGetFilterManager () const
 Returns the filter manager. More...
 
XclExpPivotTableManagerGetPivotTableManager () const
 Returns the pivot table manager. More...
 
XclExpDxfsGetDxfs () const
 Returns the differential formatting list. More...
 
OStringBuffer & GetStringBuf () const
 Clean and return the OStringBuffer. More...
 
XclExpXmlPivotTableManagerGetXmlPivotTableManager ()
 
XclExpTablesManagerGetTablesManager ()
 
void InitializeConvert ()
 Is called when export filter starts to create the Excel document (all BIFF versions). More...
 
void InitializeGlobals ()
 Is called when export filter starts to create the workbook global data (>=BIFF5). More...
 
void InitializeTable (SCTAB nScTab)
 Is called when export filter starts to create data for a single sheet (all BIFF versions). More...
 
void InitializeSave ()
 Is called before export filter starts to write the records to the stream. More...
 
XclExpRecordRef CreateRecord (sal_uInt16 nRecId) const
 Returns the reference to a record (or record list) representing a root object. More...
 
bool IsDocumentEncrypted () const
 
css::uno::Sequence< css::beans::NamedValue > GetEncryptionData () const
 
- Protected Member Functions inherited from XclRoot
 XclRoot (XclRootData &rRootData)
 
 XclRoot (const XclRoot &rRoot)
 
virtual ~XclRoot ()
 
XclRootoperator= (const XclRoot &rRoot)
 
RootDataGetOldRoot () const
 Returns old RootData struct. More...
 
XclBiff GetBiff () const
 Returns the current BIFF version of the importer/exporter. More...
 
XclOutput GetOutput () const
 Returns the current output format of the importer/exporter. More...
 
bool IsImport () const
 Returns true, if currently a document is imported. More...
 
rtl_TextEncoding GetTextEncoding () const
 Returns the text encoding to import/export byte strings. More...
 
LanguageType GetSysLanguage () const
 Returns the system language, i.e. More...
 
LanguageType GetDocLanguage () const
 Returns the document language. More...
 
LanguageType GetUILanguage () const
 Returns the UI language. More...
 
sal_Int16 GetDefApiScript () const
 Returns the default script type, e.g. More...
 
tools::Long GetCharWidth () const
 Returns the width of the '0' character (default font) for the current printer (twips). More...
 
tools::Long GetSpaceWidth () const
 
bool IsInGlobals () const
 Returns the current Calc sheet index. More...
 
SCTAB GetCurrScTab () const
 Returns the current Calc sheet index. More...
 
sal_Int32 GetHmmFromPixelX (double fPixelX) const
 Calculates the width of the passed number of pixels in 1/100 mm. More...
 
sal_Int32 GetHmmFromPixelY (double fPixelY) const
 Calculates the height of the passed number of pixels in 1/100 mm. More...
 
SfxMediumGetMedium () const
 Returns the medium to import from. More...
 
const OUString & GetDocUrl () const
 Returns the document URL of the imported/exported file. More...
 
const OUString & GetBasePath () const
 Returns the base path of the imported/exported file. More...
 
const OUString & GetUserName () const
 Returns the current user name. More...
 
css::uno::Sequence< css::beans::NamedValue > RequestEncryptionData (::comphelper::IDocPasswordVerifier &rVerifier) const
 Requests and verifies a password from the medium or the user. More...
 
const tools::SvRef< SotStorage > & GetRootStorage () const
 Returns the OLE2 root storage of the imported/exported file. More...
 
bool HasVbaStorage () const
 Returns true, if the document contains a VBA storage. More...
 
tools::SvRef< SotStorageOpenStorage (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrgName) const
 Tries to open a storage as child of the specified storage for reading or writing. More...
 
tools::SvRef< SotStorageOpenStorage (const OUString &rStrgName) const
 Tries to open a storage as child of the root storage for reading or writing. More...
 
tools::SvRef< SotStorageStreamOpenStream (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrmName) const
 Tries to open a new stream in the specified storage for reading or writing. More...
 
tools::SvRef< SotStorageStreamOpenStream (const OUString &rStrmName) const
 Tries to open a new stream in the root storage for reading or writing. More...
 
ScDocumentGetDoc () const
 Returns reference to the destination document (import) or source document (export). More...
 
SfxObjectShellGetDocShell () const
 Returns the object shell of the Calc document. More...
 
ScModelObjGetDocModelObj () const
 Returns the object model of the Calc document. More...
 
OutputDeviceGetPrinter () const
 Returns pointer to the printer of the Calc document. More...
 
ScStyleSheetPoolGetStyleSheetPool () const
 Returns the style sheet pool of the Calc document. More...
 
ScRangeNameGetNamedRanges () const
 Returns the defined names container of the Calc document. More...
 
SdrPageGetSdrPage (SCTAB nScTab) const
 Returns the drawing layer page of the passed sheet, if present. More...
 
SvNumberFormatterGetFormatter () const
 Returns the number formatter of the Calc document. More...
 
DateTime GetNullDate () const
 Returns the null date of the current number formatter. More...
 
sal_uInt16 GetBaseYear () const
 Returns the base year depending on the current null date (1900 or 1904). More...
 
double GetDoubleFromDateTime (const DateTime &rDateTime) const
 Converts a date/time value to a floating-point value. More...
 
DateTime GetDateTimeFromDouble (double fValue) const
 Converts a floating-point value to a date/time value. More...
 
ScEditEngineDefaulterGetEditEngine () const
 Returns the edit engine for import/export of rich strings etc. More...
 
ScHeaderEditEngineGetHFEditEngine () const
 Returns the edit engine for import/export of headers/footers. More...
 
EditEngineGetDrawEditEngine () const
 Returns the edit engine for import/export of drawing text boxes. More...
 
XclFontPropSetHelperGetFontPropSetHelper () const
 Returns the property set helper for fonts. More...
 
XclChPropSetHelperGetChartPropSetHelper () const
 Returns the property set helper for the chart filters. More...
 
ScExtDocOptionsGetExtDocOptions () const
 Returns the extended document options. More...
 
XclTracerGetTracer () const
 Returns the filter tracer. More...
 
const ScAddressGetScMaxPos () const
 Returns the highest possible cell address in a Calc document. More...
 
const ScAddressGetXclMaxPos () const
 Returns the highest possible cell address in an Excel document (using current BIFF version). More...
 
const ScAddressGetMaxPos () const
 Returns the highest possible cell address valid in Calc and Excel (using current BIFF version). More...
 
void SetDocLanguage (LanguageType eLang)
 Sets the document language. More...
 
void SetUILanguage (LanguageType eLang)
 Sets the UI language, i.e. More...
 
void SetTextEncoding (rtl_TextEncoding eTextEnc)
 Sets the text encoding to import/export byte strings. More...
 
void SetCharWidth (const XclFontData &rFontData)
 Sets the width of the '0' - '9' digit character as well as the ' ' space char (using the default font) for the current printer (twips). More...
 
void SetCurrScTab (SCTAB nScTab)
 Sets the current Calc sheet index. More...
 
void IncCurrScTab ()
 Increases the current Calc sheet index by 1. More...
 
- Static Protected Member Functions inherited from XclExpRoot
static css::uno::Sequence< css::beans::NamedValue > GenerateEncryptionData (std::u16string_view aPass)
 
static css::uno::Sequence< css::beans::NamedValue > GenerateDefaultEncryptionData ()
 
- Static Protected Member Functions inherited from XclRoot
static OUString GetDefaultPassword ()
 Returns the default password used for stream encryption. More...
 
- Static Protected Member Functions inherited from XclTokenArrayHelper
static sal_uInt8 GetTokenId (sal_uInt8 nBaseId, sal_uInt8 nTokenClass)
 Returns the classified token ID from a base ID and the token class. More...
 
static sal_uInt8 GetTokenClass (sal_uInt8 nTokenId)
 Returns the token class of the passed token ID. More...
 
static void ChangeTokenClass (sal_uInt8 &rnTokenId, sal_uInt8 nTokenClass)
 Changes the token class in the passed classified token ID. More...
 
static bool GetTokenString (OUString &rString, const ::formula::FormulaToken &rScToken)
 Tries to extract a string from the passed token. More...
 
static bool GetString (OUString &rString, const ScTokenArray &rScTokArr)
 Parses the passed formula and tries to find a single string token, i.e. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

Implementation class of the export formula compiler.

Definition at line 297 of file xeformula.cxx.

Member Typedef Documentation

◆ XclExpCompConfigMap

typedef std::map< XclFormulaType, XclExpCompConfig > XclExpFmlaCompImpl::XclExpCompConfigMap
private

Definition at line 456 of file xeformula.cxx.

◆ XclExpCompDataRef

typedef std::shared_ptr< XclExpCompData > XclExpFmlaCompImpl::XclExpCompDataRef
private

Definition at line 457 of file xeformula.cxx.

Constructor & Destructor Documentation

◆ XclExpFmlaCompImpl()

XclExpFmlaCompImpl::XclExpFmlaCompImpl ( const XclExpRoot rRoot)
explicit

Definition at line 473 of file xeformula.cxx.

References Col, maCfgMap, and Row.

Member Function Documentation

◆ AddSubTerm()

XclExpScToken XclExpFmlaCompImpl::AddSubTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

Definition at line 1047 of file xeformula.cxx.

References AppendBinaryOperatorToken(), EXC_TOKID_NONE, GetNextToken(), MulDivTerm(), and mxData.

Referenced by ConcatTerm().

◆ AndTerm()

XclExpScToken XclExpFmlaCompImpl::AndTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

◆ Append() [1/6]

void XclExpFmlaCompImpl::Append ( const OUString &  rString)
private

Definition at line 2313 of file xeformula.cxx.

References EightBitLength, XclExpRoot::GetRoot(), and mxData.

◆ Append() [2/6]

void XclExpFmlaCompImpl::Append ( double  fData)
private

Definition at line 2308 of file xeformula.cxx.

References mxData.

◆ Append() [3/6]

void XclExpFmlaCompImpl::Append ( sal_uInt16  nData)
private

Definition at line 2298 of file xeformula.cxx.

References mxData.

◆ Append() [4/6]

void XclExpFmlaCompImpl::Append ( sal_uInt32  nData)
private

Definition at line 2303 of file xeformula.cxx.

References mxData.

◆ Append() [5/6]

void XclExpFmlaCompImpl::Append ( sal_uInt8  nData)
private

◆ Append() [6/6]

void XclExpFmlaCompImpl::Append ( sal_uInt8  nData,
size_t  nCount 
)
private

Definition at line 2293 of file xeformula.cxx.

References mxData, and nCount.

◆ AppendAddInCallToken()

void XclExpFmlaCompImpl::AppendAddInCallToken ( const XclExpExtFuncData &  rExtFuncData)
private

◆ AppendAddress()

void XclExpFmlaCompImpl::AppendAddress ( const XclAddress rXclPos)
private

Definition at line 2318 of file xeformula.cxx.

References Append(), EXC_BIFF5, meBiff, XclAddress::mnCol, and XclAddress::mnRow.

Referenced by ProcessCellRef(), and ProcessExternalCellRef().

◆ AppendBinaryOperatorToken()

void XclExpFmlaCompImpl::AppendBinaryOperatorToken ( sal_uInt8  nTokenId,
bool  bValType,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendBoolToken()

void XclExpFmlaCompImpl::AppendBoolToken ( bool  bValue,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendDefaultParam()

void XclExpFmlaCompImpl::AppendDefaultParam ( XclExpFuncData &  rFuncData)
private

◆ AppendErrorToken()

void XclExpFmlaCompImpl::AppendErrorToken ( sal_uInt8  nErrCode,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendEuroToolCallToken()

void XclExpFmlaCompImpl::AppendEuroToolCallToken ( const XclExpExtFuncData &  rExtFuncData)
private

Definition at line 2439 of file xeformula.cxx.

References AppendMacroCallToken(), AppendNameXToken(), and mxData.

Referenced by AppendDefaultParam().

◆ AppendExt() [1/5]

void XclExpFmlaCompImpl::AppendExt ( const OUString &  rString)
private

Definition at line 2600 of file xeformula.cxx.

References EightBitLength, EXC_BIFF8, XclExpRoot::GetRoot(), meBiff, mxData, and NONE.

◆ AppendExt() [2/5]

void XclExpFmlaCompImpl::AppendExt ( double  fData)
private

Definition at line 2595 of file xeformula.cxx.

References mxData.

◆ AppendExt() [3/5]

void XclExpFmlaCompImpl::AppendExt ( sal_uInt16  nData)
private

Definition at line 2590 of file xeformula.cxx.

References mxData.

◆ AppendExt() [4/5]

void XclExpFmlaCompImpl::AppendExt ( sal_uInt8  nData)
private

Definition at line 2580 of file xeformula.cxx.

References mxData.

Referenced by ProcessMatrix().

◆ AppendExt() [5/5]

void XclExpFmlaCompImpl::AppendExt ( sal_uInt8  nData,
size_t  nCount 
)
private

Definition at line 2585 of file xeformula.cxx.

References mxData, and nCount.

◆ AppendFuncToken()

void XclExpFmlaCompImpl::AppendFuncToken ( const XclExpFuncData &  rFuncData)
private

◆ AppendIntToken()

void XclExpFmlaCompImpl::AppendIntToken ( sal_uInt16  nValue,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendJumpToken()

void XclExpFmlaCompImpl::AppendJumpToken ( XclExpFuncData &  rFuncData,
sal_uInt8  nAttrType 
)
private

Definition at line 2515 of file xeformula.cxx.

References Append(), EXC_TOKID_ATTR, and GetSize().

Referenced by FinishFunction(), and PrepareParam().

◆ AppendLogicalOperatorToken()

void XclExpFmlaCompImpl::AppendLogicalOperatorToken ( sal_uInt16  nXclFuncIdx,
sal_uInt8  nOpCount 
)
private

◆ AppendMacroCallToken()

void XclExpFmlaCompImpl::AppendMacroCallToken ( const XclExpExtFuncData &  rExtFuncData)
private

◆ AppendMissingNameToken()

void XclExpFmlaCompImpl::AppendMissingNameToken ( const OUString &  rName,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendMissingToken()

void XclExpFmlaCompImpl::AppendMissingToken ( sal_uInt8  nSpaces = 0)
private

◆ AppendNameToken()

void XclExpFmlaCompImpl::AppendNameToken ( sal_uInt16  nNameIdx,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendNameXToken()

void XclExpFmlaCompImpl::AppendNameXToken ( sal_uInt16  nExtSheet,
sal_uInt16  nExtName,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendNumToken()

void XclExpFmlaCompImpl::AppendNumToken ( double  fValue,
sal_uInt8  nSpaces = 0 
)
private

Definition at line 2367 of file xeformula.cxx.

References Append(), AppendOperandTokenId(), and EXC_TOKID_NUM.

Referenced by PrepareFunction(), and ProcessDouble().

◆ AppendOperandTokenId()

void XclExpFmlaCompImpl::AppendOperandTokenId ( sal_uInt8  nTokenId,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendOperatorTokenId()

void XclExpFmlaCompImpl::AppendOperatorTokenId ( sal_uInt8  nTokenId,
const XclExpOperandListRef &  rxOperands,
sal_uInt8  nSpaces = 0 
)
private

◆ AppendParenToken()

void XclExpFmlaCompImpl::AppendParenToken ( sal_uInt8  nOpenSpaces = 0,
sal_uInt8  nCloseSpaces = 0 
)
private

◆ AppendRange()

void XclExpFmlaCompImpl::AppendRange ( const XclRange rXclRange)
private

◆ AppendSpaceToken()

void XclExpFmlaCompImpl::AppendSpaceToken ( sal_uInt8  nType,
sal_uInt8  nCount 
)
private

◆ AppendTrailingParam()

void XclExpFmlaCompImpl::AppendTrailingParam ( XclExpFuncData &  rFuncData)
private

◆ AppendUnaryOperatorToken()

void XclExpFmlaCompImpl::AppendUnaryOperatorToken ( sal_uInt8  nTokenId,
sal_uInt8  nSpaces = 0 
)
private

Definition at line 2455 of file xeformula.cxx.

References AppendOperatorTokenId(), EXC_PARAMCONV_RPO, and PopOperandPos().

Referenced by UnaryPostTerm(), and UnaryPreTerm().

◆ CompareTerm()

XclExpScToken XclExpFmlaCompImpl::CompareTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

Definition at line 1017 of file xeformula.cxx.

References AppendBinaryOperatorToken(), ConcatTerm(), EXC_TOKID_NONE, GetNextToken(), and mxData.

Referenced by AndTerm().

◆ ConcatTerm()

XclExpScToken XclExpFmlaCompImpl::ConcatTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

Definition at line 1032 of file xeformula.cxx.

References AddSubTerm(), AppendBinaryOperatorToken(), EXC_TOKID_NONE, GetNextToken(), and mxData.

Referenced by CompareTerm().

◆ ConvertRefData() [1/2]

void XclExpFmlaCompImpl::ConvertRefData ( ScComplexRefData rRefData,
XclRange rXclRange,
bool  bNatLangRef 
) const
private

◆ ConvertRefData() [2/2]

void XclExpFmlaCompImpl::ConvertRefData ( ScSingleRefData rRefData,
XclAddress rXclPos,
bool  bNatLangRef,
bool  bTruncMaxCol,
bool  bTruncMaxRow 
) const
private

◆ CreateErrorFormula()

XclTokenArrayRef XclExpFmlaCompImpl::CreateErrorFormula ( sal_uInt8  nErrCode)

Creates a single error token containing the passed error code.

Definition at line 531 of file xeformula.cxx.

References AppendErrorToken(), CreateTokenArray(), EXC_FMLATYPE_NAME, and Init().

◆ CreateFormula()

XclTokenArrayRef XclExpFmlaCompImpl::CreateFormula ( XclFormulaType  eType,
const ScTokenArray rScTokArr,
const ScAddress pScBasePos = nullptr,
XclExpRefLog pRefLog = nullptr 
)

◆ CreateNameXFormula()

XclTokenArrayRef XclExpFmlaCompImpl::CreateNameXFormula ( sal_uInt16  nExtSheet,
sal_uInt16  nExtName 
)

Creates a single tNameXR token for a reference to an external name.

Definition at line 547 of file xeformula.cxx.

References AppendNameXToken(), CreateTokenArray(), EXC_FMLATYPE_NAME, and Init().

◆ CreateSpecialRefFormula()

XclTokenArrayRef XclExpFmlaCompImpl::CreateSpecialRefFormula ( sal_uInt8  nTokenId,
const XclAddress rXclPos 
)

Creates a single token for a special cell reference.

Definition at line 538 of file xeformula.cxx.

References Append(), AppendOperandTokenId(), CreateTokenArray(), EXC_FMLATYPE_NAME, Init(), XclAddress::mnCol, and XclAddress::mnRow.

◆ CreateTokenArray()

XclTokenArrayRef XclExpFmlaCompImpl::CreateTokenArray ( )
private

Definition at line 800 of file xeformula.cxx.

References maDataStack, and mxData.

Referenced by CreateErrorFormula(), CreateFormula(), CreateNameXFormula(), and CreateSpecialRefFormula().

◆ Expression()

XclExpScToken XclExpFmlaCompImpl::Expression ( XclExpScToken  aTokData,
bool  bInParentheses,
bool  bStopAtSep 
)
private

Definition at line 954 of file xeformula.cxx.

References mxData, and OrTerm().

Referenced by CreateFormula(), ProcessParam(), and ProcessParentheses().

◆ Factor()

XclExpScToken XclExpFmlaCompImpl::Factor ( XclExpScToken  aTokData)
private

◆ FinalizeFormula()

void XclExpFmlaCompImpl::FinalizeFormula ( )
private

◆ FinishChooseFunction()

void XclExpFmlaCompImpl::FinishChooseFunction ( XclExpFuncData &  rFuncData)
private

Definition at line 1558 of file xeformula.cxx.

References InsertZeros(), Overwrite(), and UpdateAttrGoto().

Referenced by FinishFunction().

◆ FinishFunction()

void XclExpFmlaCompImpl::FinishFunction ( XclExpFuncData &  rFuncData,
sal_uInt8  nCloseSpaces 
)
private

◆ FinishIfFunction()

void XclExpFmlaCompImpl::FinishIfFunction ( XclExpFuncData &  rFuncData)
private

Definition at line 1544 of file xeformula.cxx.

References Overwrite(), and UpdateAttrGoto().

Referenced by FinishFunction().

◆ FinishParam()

void XclExpFmlaCompImpl::FinishParam ( XclExpFuncData &  rFuncData)
private

◆ GetConfigForType()

const XclExpCompConfig * XclExpFmlaCompImpl::GetConfigForType ( XclFormulaType  eType) const
private

Definition at line 562 of file xeformula.cxx.

References eType, and maCfgMap.

Referenced by Init(), and Is3DRefOnly().

◆ GetNewRefLogEntry()

XclExpRefLogEntry * XclExpFmlaCompImpl::GetNewRefLogEntry ( )
private

Definition at line 1956 of file xeformula.cxx.

References mxData.

Referenced by ProcessCellRef(), ProcessExternalCellRef(), ProcessExternalRangeRef(), and ProcessRangeRef().

◆ GetNextRawToken()

const FormulaToken * XclExpFmlaCompImpl::GetNextRawToken ( )
private

Definition at line 821 of file xeformula.cxx.

References mxData.

Referenced by GetNextToken().

◆ GetNextToken() [1/2]

XclExpScToken XclExpFmlaCompImpl::GetNextToken ( )
private

◆ GetNextToken() [2/2]

bool XclExpFmlaCompImpl::GetNextToken ( XclExpScToken &  rTokData)
private

Definition at line 841 of file xeformula.cxx.

References GetNextRawToken(), ocSpaces, and ocWhitespace.

◆ GetScTab()

SCTAB XclExpFmlaCompImpl::GetScTab ( const ScSingleRefData rRefData) const
private

◆ GetSize()

sal_uInt16 XclExpFmlaCompImpl::GetSize ( ) const
inlineprivate

◆ Init() [1/2]

void XclExpFmlaCompImpl::Init ( XclFormulaType  eType)
private

◆ Init() [2/2]

void XclExpFmlaCompImpl::Init ( XclFormulaType  eType,
const ScTokenArray rScTokArr,
const ScAddress pScBasePos,
XclExpRefLog pRefLog 
)
private

◆ InsertZeros()

void XclExpFmlaCompImpl::InsertZeros ( sal_uInt16  nInsertPos,
sal_uInt16  nInsertSize 
)
private

Definition at line 2525 of file xeformula.cxx.

References mxData.

Referenced by FinalizeFormula(), FinishChooseFunction(), and ListTerm().

◆ IntersectTerm()

XclExpScToken XclExpFmlaCompImpl::IntersectTerm ( XclExpScToken  aTokData,
bool &  rbHasRefOp 
)
private

Definition at line 1158 of file xeformula.cxx.

References AppendBinaryOperatorToken(), EXC_TOKID_NONE, GetNextToken(), mxData, and RangeTerm().

Referenced by ListTerm().

◆ Is3DRefOnly()

bool XclExpFmlaCompImpl::Is3DRefOnly ( XclFormulaType  eType) const

Returns true, if the passed formula type allows 3D references only.

Definition at line 554 of file xeformula.cxx.

References eType, and GetConfigForType().

◆ IsRef2D() [1/2]

bool XclExpFmlaCompImpl::IsRef2D ( const ScComplexRefData rRefData,
bool  bCheck3DFlag 
) const

Definition at line 1886 of file xeformula.cxx.

References IsRef2D(), ScComplexRefData::Ref1, and ScComplexRefData::Ref2.

◆ IsRef2D() [2/2]

bool XclExpFmlaCompImpl::IsRef2D ( const ScSingleRefData rRefData,
bool  bCheck3DFlag 
) const

◆ IsSpaceToken()

bool XclExpFmlaCompImpl::IsSpaceToken ( sal_uInt16  nPos) const
private

◆ ListTerm()

XclExpScToken XclExpFmlaCompImpl::ListTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

◆ MulDivTerm()

XclExpScToken XclExpFmlaCompImpl::MulDivTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

Definition at line 1062 of file xeformula.cxx.

References AppendBinaryOperatorToken(), EXC_TOKID_NONE, GetNextToken(), mxData, and PowTerm().

Referenced by AddSubTerm().

◆ OrTerm()

XclExpScToken XclExpFmlaCompImpl::OrTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

◆ Overwrite()

void XclExpFmlaCompImpl::Overwrite ( sal_uInt16  nWriteToPos,
sal_uInt16  nOffset 
)
private

Definition at line 2546 of file xeformula.cxx.

References o3tl::make_unsigned(), and mxData.

Referenced by FinishChooseFunction(), FinishIfFunction(), ListTerm(), and UpdateAttrGoto().

◆ PeekNextRawToken()

const FormulaToken * XclExpFmlaCompImpl::PeekNextRawToken ( ) const
private

Definition at line 828 of file xeformula.cxx.

References XclTokenArrayIterator::Get(), and mxData.

Referenced by ProcessExternal().

◆ PopOperandPos()

sal_uInt16 XclExpFmlaCompImpl::PopOperandPos ( )
private

◆ PowTerm()

XclExpScToken XclExpFmlaCompImpl::PowTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

Definition at line 1077 of file xeformula.cxx.

References AppendBinaryOperatorToken(), EXC_TOKID_NONE, GetNextToken(), mxData, and UnaryPostTerm().

Referenced by MulDivTerm().

◆ PrepareFunction()

void XclExpFmlaCompImpl::PrepareFunction ( const XclExpFuncData &  rFuncData)
private

◆ PrepareParam()

void XclExpFmlaCompImpl::PrepareParam ( XclExpFuncData &  rFuncData)
private

◆ ProcessBad()

void XclExpFmlaCompImpl::ProcessBad ( const XclExpScToken &  rTokData)
private

Definition at line 1248 of file xeformula.cxx.

References AppendErrorToken(), and EXC_ERR_NA.

Referenced by Factor().

◆ ProcessBoolean()

void XclExpFmlaCompImpl::ProcessBoolean ( const XclExpScToken &  rTokData)
private

Definition at line 1260 of file xeformula.cxx.

References AppendBoolToken(), GetNextToken(), mxData, ocClose, ocOpen, and ocTrue.

Referenced by Factor().

◆ ProcessCellRef()

void XclExpFmlaCompImpl::ProcessCellRef ( const XclExpScToken &  rTokData)
private

◆ ProcessDdeLink()

void XclExpFmlaCompImpl::ProcessDdeLink ( const XclExpScToken &  rTokData)
private

Definition at line 1280 of file xeformula.cxx.

References AppendErrorToken(), AppendNameXToken(), EXC_ERR_NA, GetNextToken(), mxData, ocClose, ocOpen, and ocSep.

Referenced by Factor().

◆ ProcessDefinedName()

void XclExpFmlaCompImpl::ProcessDefinedName ( const XclExpScToken &  rTokData)
private

◆ ProcessDouble()

void XclExpFmlaCompImpl::ProcessDouble ( const XclExpScToken &  rTokData)
private

Definition at line 1226 of file xeformula.cxx.

References AppendIntToken(), and AppendNumToken().

Referenced by Factor().

◆ ProcessExternal()

void XclExpFmlaCompImpl::ProcessExternal ( const XclExpScToken &  rTokData)
private

Definition at line 1302 of file xeformula.cxx.

References AppendMissingNameToken(), ocOpen, PeekNextRawToken(), and ProcessFunction().

Referenced by Factor().

◆ ProcessExternalCellRef()

void XclExpFmlaCompImpl::ProcessExternalCellRef ( const XclExpScToken &  rTokData)
private

◆ ProcessExternalName()

void XclExpFmlaCompImpl::ProcessExternalName ( const XclExpScToken &  rTokData)
private

◆ ProcessExternalRangeRef()

void XclExpFmlaCompImpl::ProcessExternalRangeRef ( const XclExpScToken &  rTokData)
private

◆ ProcessFunction()

void XclExpFmlaCompImpl::ProcessFunction ( const XclExpScToken &  rTokData)
private

◆ ProcessMatrix()

void XclExpFmlaCompImpl::ProcessMatrix ( const XclExpScToken &  rTokData)
private

◆ ProcessMissing()

void XclExpFmlaCompImpl::ProcessMissing ( const XclExpScToken &  rTokData)
private

Definition at line 1243 of file xeformula.cxx.

References AppendMissingToken().

Referenced by Factor().

◆ ProcessParam()

XclExpScToken XclExpFmlaCompImpl::ProcessParam ( XclExpScToken  aTokData,
XclExpFuncData &  rFuncData 
)
private

◆ ProcessParentheses()

void XclExpFmlaCompImpl::ProcessParentheses ( const XclExpScToken &  rTokData)
private

Definition at line 1253 of file xeformula.cxx.

References AppendParenToken(), Expression(), GetNextToken(), mxData, and ocClose.

Referenced by Factor().

◆ ProcessRangeRef()

void XclExpFmlaCompImpl::ProcessRangeRef ( const XclExpScToken &  rTokData)
private

◆ ProcessString()

void XclExpFmlaCompImpl::ProcessString ( const XclExpScToken &  rTokData)
private

Definition at line 1237 of file xeformula.cxx.

References Append(), AppendOperandTokenId(), and EXC_TOKID_STR.

Referenced by Factor().

◆ PushOperandPos()

void XclExpFmlaCompImpl::PushOperandPos ( sal_uInt16  nTokPos)
private

Definition at line 2231 of file xeformula.cxx.

References mxData.

Referenced by AppendOperandTokenId(), and PushOperatorPos().

◆ PushOperatorPos()

void XclExpFmlaCompImpl::PushOperatorPos ( sal_uInt16  nTokPos,
const XclExpOperandListRef &  rxOperands 
)
private

Definition at line 2236 of file xeformula.cxx.

References mxData, and PushOperandPos().

Referenced by AppendOperatorTokenId(), and ListTerm().

◆ RangeTerm()

XclExpScToken XclExpFmlaCompImpl::RangeTerm ( XclExpScToken  aTokData,
bool &  rbHasRefOp 
)
private

Definition at line 1174 of file xeformula.cxx.

References AppendBinaryOperatorToken(), EXC_TOKID_NONE, Factor(), GetNextToken(), and mxData.

Referenced by IntersectTerm().

◆ RecalcTokenClass()

void XclExpFmlaCompImpl::RecalcTokenClass ( const XclExpTokenConvInfo &  rConvInfo,
XclFuncParamConv  ePrevConv,
XclExpClassConv  ePrevClassConv,
bool  bWasRefClass,
o3tl::sorted_vector< const XclExpTokenConvInfo * > &  rSeenTokens 
)
private

◆ RecalcTokenClasses()

void XclExpFmlaCompImpl::RecalcTokenClasses ( )
private

Definition at line 622 of file xeformula.cxx.

References EXC_PARAMCONV_ARR, EXC_PARAMCONV_VAL, mxData, PopOperandPos(), and RecalcTokenClass().

Referenced by CreateFormula().

◆ RemoveTrailingParen()

void XclExpFmlaCompImpl::RemoveTrailingParen ( )
private

Definition at line 2570 of file xeformula.cxx.

References EXC_TOKID_PAREN, GetSize(), IsSpaceToken(), and mxData.

Referenced by AndTerm(), and OrTerm().

◆ SkipExpression()

XclExpScToken XclExpFmlaCompImpl::SkipExpression ( XclExpScToken  aTokData,
bool  bStopAtSep 
)
private

Definition at line 969 of file xeformula.cxx.

References GetNextToken(), mxData, ocClose, ocOpen, ocSep, and SkipExpression().

Referenced by ProcessParam(), and SkipExpression().

◆ UnaryPostTerm()

XclExpScToken XclExpFmlaCompImpl::UnaryPostTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

Definition at line 1093 of file xeformula.cxx.

References AppendUnaryOperatorToken(), EXC_TOKID_NONE, GetNextToken(), mxData, and UnaryPreTerm().

Referenced by PowTerm().

◆ UnaryPreTerm()

XclExpScToken XclExpFmlaCompImpl::UnaryPreTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private

◆ UpdateAttrGoto()

void XclExpFmlaCompImpl::UpdateAttrGoto ( sal_uInt16  nAttrPos)
private

Definition at line 2552 of file xeformula.cxx.

References GetSize(), and Overwrite().

Referenced by FinishChooseFunction(), and FinishIfFunction().

Member Data Documentation

◆ maCfgMap

XclExpCompConfigMap XclExpFmlaCompImpl::maCfgMap
private

Definition at line 459 of file xeformula.cxx.

Referenced by GetConfigForType(), and XclExpFmlaCompImpl().

◆ maDataStack

std::vector< XclExpCompDataRef > XclExpFmlaCompImpl::maDataStack
private

Working data for current formula.

Definition at line 463 of file xeformula.cxx.

Referenced by CreateTokenArray(), and Init().

◆ maFuncProv

XclFunctionProvider XclExpFmlaCompImpl::maFuncProv
private

Compiler configuration map for all formula types.

Definition at line 460 of file xeformula.cxx.

Referenced by ProcessFunction().

◆ meBiff

const XclBiff XclExpFmlaCompImpl::meBiff
private

◆ mnMaxAbsCol

const SCCOL XclExpFmlaCompImpl::mnMaxAbsCol
private

Cached BIFF version to save GetBiff() calls.

Definition at line 465 of file xeformula.cxx.

Referenced by ConvertRefData().

◆ mnMaxAbsRow

const SCROW XclExpFmlaCompImpl::mnMaxAbsRow
private

Maximum column index.

Definition at line 466 of file xeformula.cxx.

Referenced by ConvertRefData().

◆ mnMaxColMask

const sal_uInt16 XclExpFmlaCompImpl::mnMaxColMask
private

Maximum row index in Calc itself.

Definition at line 469 of file xeformula.cxx.

Referenced by ConvertRefData().

◆ mnMaxRowMask

const sal_uInt32 XclExpFmlaCompImpl::mnMaxRowMask
private

Mask to delete invalid bits in column fields.

Definition at line 470 of file xeformula.cxx.

Referenced by ConvertRefData().

◆ mnMaxScCol

const SCCOL XclExpFmlaCompImpl::mnMaxScCol
private

Maximum row index.

Definition at line 467 of file xeformula.cxx.

Referenced by ConvertRefData().

◆ mnMaxScRow

const SCROW XclExpFmlaCompImpl::mnMaxScRow
private

Maximum column index in Calc itself.

Definition at line 468 of file xeformula.cxx.

Referenced by ConvertRefData().

◆ mxData

XclExpCompDataRef XclExpFmlaCompImpl::mxData
private

The documentation for this class was generated from the following file: