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)
 
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...
 
long GetCharWidth () const
 Returns the width of the '0' character (default font) for the current printer (twips). More...
 
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' character (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 (const OUString &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

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

Definition at line 455 of file xeformula.cxx.

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

Definition at line 456 of file xeformula.cxx.

Constructor & Destructor Documentation

XclExpFmlaCompImpl::XclExpFmlaCompImpl ( const XclExpRoot rRoot)
explicit

Definition at line 472 of file xeformula.cxx.

References Col, maCfgMap, and Row.

Member Function Documentation

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

Definition at line 1028 of file xeformula.cxx.

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

Referenced by ConcatTerm().

XclExpScToken XclExpFmlaCompImpl::AndTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private
void XclExpFmlaCompImpl::Append ( sal_uInt8  nData)
private
void XclExpFmlaCompImpl::Append ( sal_uInt8  nData,
size_t  nCount 
)
private

Definition at line 2274 of file xeformula.cxx.

References mxData.

void XclExpFmlaCompImpl::Append ( sal_uInt16  nData)
private

Definition at line 2279 of file xeformula.cxx.

References mxData.

void XclExpFmlaCompImpl::Append ( sal_uInt32  nData)
private

Definition at line 2284 of file xeformula.cxx.

References mxData.

void XclExpFmlaCompImpl::Append ( double  fData)
private

Definition at line 2289 of file xeformula.cxx.

References mxData.

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

Definition at line 2294 of file xeformula.cxx.

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

void XclExpFmlaCompImpl::AppendAddInCallToken ( const XclExpExtFuncData &  rExtFuncData)
private
void XclExpFmlaCompImpl::AppendAddress ( const XclAddress rXclPos)
private

Definition at line 2299 of file xeformula.cxx.

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

Referenced by ProcessCellRef(), and ProcessExternalCellRef().

void XclExpFmlaCompImpl::AppendBinaryOperatorToken ( sal_uInt8  nTokenId,
bool  bValType,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendBoolToken ( bool  bValue,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendDefaultParam ( XclExpFuncData &  rFuncData)
private
void XclExpFmlaCompImpl::AppendErrorToken ( sal_uInt8  nErrCode,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendEuroToolCallToken ( const XclExpExtFuncData &  rExtFuncData)
private

Definition at line 2420 of file xeformula.cxx.

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

Referenced by AppendDefaultParam().

void XclExpFmlaCompImpl::AppendExt ( sal_uInt8  nData)
private

Definition at line 2561 of file xeformula.cxx.

References mxData.

Referenced by ProcessMatrix().

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

Definition at line 2566 of file xeformula.cxx.

References mxData.

void XclExpFmlaCompImpl::AppendExt ( sal_uInt16  nData)
private

Definition at line 2571 of file xeformula.cxx.

References mxData.

void XclExpFmlaCompImpl::AppendExt ( double  fData)
private

Definition at line 2576 of file xeformula.cxx.

References mxData.

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

Definition at line 2581 of file xeformula.cxx.

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

void XclExpFmlaCompImpl::AppendFuncToken ( const XclExpFuncData &  rFuncData)
private
void XclExpFmlaCompImpl::AppendIntToken ( sal_uInt16  nValue,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendJumpToken ( XclExpFuncData &  rFuncData,
sal_uInt8  nAttrType 
)
private

Definition at line 2496 of file xeformula.cxx.

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

Referenced by FinishFunction(), and PrepareParam().

void XclExpFmlaCompImpl::AppendLogicalOperatorToken ( sal_uInt16  nXclFuncIdx,
sal_uInt8  nOpCount 
)
private
void XclExpFmlaCompImpl::AppendMacroCallToken ( const XclExpExtFuncData &  rExtFuncData)
private
void XclExpFmlaCompImpl::AppendMissingNameToken ( const OUString &  rName,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendMissingToken ( sal_uInt8  nSpaces = 0)
private
void XclExpFmlaCompImpl::AppendNameToken ( sal_uInt16  nNameIdx,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendNameXToken ( sal_uInt16  nExtSheet,
sal_uInt16  nExtName,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendNumToken ( double  fValue,
sal_uInt8  nSpaces = 0 
)
private

Definition at line 2348 of file xeformula.cxx.

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

Referenced by PrepareFunction(), and ProcessDouble().

void XclExpFmlaCompImpl::AppendOperandTokenId ( sal_uInt8  nTokenId,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendOperatorTokenId ( sal_uInt8  nTokenId,
const XclExpOperandListRef &  rxOperands,
sal_uInt8  nSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendParenToken ( sal_uInt8  nOpenSpaces = 0,
sal_uInt8  nCloseSpaces = 0 
)
private
void XclExpFmlaCompImpl::AppendRange ( const XclRange rXclRange)
private
void XclExpFmlaCompImpl::AppendSpaceToken ( sal_uInt8  nType,
sal_uInt8  nCount 
)
private
void XclExpFmlaCompImpl::AppendTrailingParam ( XclExpFuncData &  rFuncData)
private
void XclExpFmlaCompImpl::AppendUnaryOperatorToken ( sal_uInt8  nTokenId,
sal_uInt8  nSpaces = 0 
)
private

Definition at line 2436 of file xeformula.cxx.

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

Referenced by UnaryPostTerm(), and UnaryPreTerm().

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

Definition at line 998 of file xeformula.cxx.

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

Referenced by AndTerm().

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

Definition at line 1013 of file xeformula.cxx.

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

Referenced by CompareTerm().

void XclExpFmlaCompImpl::ConvertRefData ( ScSingleRefData rRefData,
XclAddress rXclPos,
bool  bNatLangRef,
bool  bTruncMaxCol,
bool  bTruncMaxRow 
) const
private
void XclExpFmlaCompImpl::ConvertRefData ( ScComplexRefData rRefData,
XclRange rXclRange,
bool  bNatLangRef 
) const
private
XclTokenArrayRef XclExpFmlaCompImpl::CreateErrorFormula ( sal_uInt8  nErrCode)

Creates a single error token containing the passed error code.

Definition at line 530 of file xeformula.cxx.

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

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

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

Definition at line 546 of file xeformula.cxx.

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

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

Creates a single token for a special cell reference.

Definition at line 537 of file xeformula.cxx.

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

XclTokenArrayRef XclExpFmlaCompImpl::CreateTokenArray ( )
private

Definition at line 785 of file xeformula.cxx.

References maDataStack, and mxData.

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

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

Definition at line 935 of file xeformula.cxx.

References mxData, and OrTerm().

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

XclExpScToken XclExpFmlaCompImpl::Factor ( XclExpScToken  aTokData)
private
void XclExpFmlaCompImpl::FinalizeFormula ( )
private
void XclExpFmlaCompImpl::FinishChooseFunction ( XclExpFuncData &  rFuncData)
private

Definition at line 1539 of file xeformula.cxx.

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

Referenced by FinishFunction().

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

Definition at line 1525 of file xeformula.cxx.

References Overwrite(), and UpdateAttrGoto().

Referenced by FinishFunction().

void XclExpFmlaCompImpl::FinishParam ( XclExpFuncData &  rFuncData)
private
const XclExpCompConfig * XclExpFmlaCompImpl::GetConfigForType ( XclFormulaType  eType) const
private

Definition at line 561 of file xeformula.cxx.

References maCfgMap.

Referenced by Init(), and Is3DRefOnly().

XclExpRefLogEntry * XclExpFmlaCompImpl::GetNewRefLogEntry ( )
private

Definition at line 1937 of file xeformula.cxx.

References mxData.

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

const FormulaToken * XclExpFmlaCompImpl::GetNextRawToken ( )
private

Definition at line 806 of file xeformula.cxx.

References mxData.

Referenced by GetNextToken().

bool XclExpFmlaCompImpl::GetNextToken ( XclExpScToken &  rTokData)
private

Definition at line 826 of file xeformula.cxx.

References GetNextRawToken(), and ocSpaces.

XclExpScToken XclExpFmlaCompImpl::GetNextToken ( )
private
SCTAB XclExpFmlaCompImpl::GetScTab ( const ScSingleRefData rRefData) const
private
sal_uInt16 XclExpFmlaCompImpl::GetSize ( ) const
inlineprivate
void XclExpFmlaCompImpl::Init ( XclFormulaType  eType)
private
void XclExpFmlaCompImpl::Init ( XclFormulaType  eType,
const ScTokenArray rScTokArr,
const ScAddress pScBasePos,
XclExpRefLog pRefLog 
)
private
void XclExpFmlaCompImpl::InsertZeros ( sal_uInt16  nInsertPos,
sal_uInt16  nInsertSize 
)
private

Definition at line 2506 of file xeformula.cxx.

References mxData.

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

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

Definition at line 1139 of file xeformula.cxx.

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

Referenced by ListTerm().

bool XclExpFmlaCompImpl::Is3DRefOnly ( XclFormulaType  eType) const

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

Definition at line 553 of file xeformula.cxx.

References GetConfigForType().

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

Definition at line 1867 of file xeformula.cxx.

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

bool XclExpFmlaCompImpl::IsSpaceToken ( sal_uInt16  nPos) const
private

Definition at line 2543 of file xeformula.cxx.

References EXC_TOK_ATTR_SPACE, EXC_TOKID_ATTR, o3tl::make_unsigned(), and mxData.

Referenced by FinalizeFormula(), and RemoveTrailingParen().

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

Definition at line 1043 of file xeformula.cxx.

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

Referenced by AddSubTerm().

XclExpScToken XclExpFmlaCompImpl::OrTerm ( XclExpScToken  aTokData,
bool  bInParentheses 
)
private
void XclExpFmlaCompImpl::Overwrite ( sal_uInt16  nWriteToPos,
sal_uInt16  nOffset 
)
private

Definition at line 2527 of file xeformula.cxx.

References o3tl::make_unsigned(), and mxData.

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

const FormulaToken * XclExpFmlaCompImpl::PeekNextRawToken ( ) const
private

Definition at line 813 of file xeformula.cxx.

References XclTokenArrayIterator::Get(), and mxData.

Referenced by ProcessExternal().

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

Definition at line 1058 of file xeformula.cxx.

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

Referenced by MulDivTerm().

void XclExpFmlaCompImpl::PrepareFunction ( const XclExpFuncData &  rFuncData)
private
void XclExpFmlaCompImpl::PrepareParam ( XclExpFuncData &  rFuncData)
private
void XclExpFmlaCompImpl::ProcessBad ( const XclExpScToken &  rTokData)
private

Definition at line 1229 of file xeformula.cxx.

References AppendErrorToken(), and EXC_ERR_NA.

Referenced by Factor().

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

Definition at line 1241 of file xeformula.cxx.

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

Referenced by Factor().

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

Definition at line 1261 of file xeformula.cxx.

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

Referenced by Factor().

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

Definition at line 1207 of file xeformula.cxx.

References AppendIntToken(), and AppendNumToken().

Referenced by Factor().

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

Definition at line 1283 of file xeformula.cxx.

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

Referenced by Factor().

void XclExpFmlaCompImpl::ProcessExternalCellRef ( const XclExpScToken &  rTokData)
private
void XclExpFmlaCompImpl::ProcessExternalName ( const XclExpScToken &  rTokData)
private
void XclExpFmlaCompImpl::ProcessExternalRangeRef ( const XclExpScToken &  rTokData)
private
void XclExpFmlaCompImpl::ProcessFunction ( const XclExpScToken &  rTokData)
private
void XclExpFmlaCompImpl::ProcessMatrix ( const XclExpScToken &  rTokData)
private
void XclExpFmlaCompImpl::ProcessMissing ( const XclExpScToken &  rTokData)
private

Definition at line 1224 of file xeformula.cxx.

References AppendMissingToken().

Referenced by Factor().

XclExpScToken XclExpFmlaCompImpl::ProcessParam ( XclExpScToken  aTokData,
XclExpFuncData &  rFuncData 
)
private
void XclExpFmlaCompImpl::ProcessParentheses ( const XclExpScToken &  rTokData)
private

Definition at line 1234 of file xeformula.cxx.

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

Referenced by Factor().

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

Definition at line 1218 of file xeformula.cxx.

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

Referenced by Factor().

void XclExpFmlaCompImpl::PushOperandPos ( sal_uInt16  nTokPos)
private

Definition at line 2212 of file xeformula.cxx.

References mxData.

Referenced by AppendOperandTokenId(), and PushOperatorPos().

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

Definition at line 2217 of file xeformula.cxx.

References mxData, and PushOperandPos().

Referenced by AppendOperatorTokenId(), and ListTerm().

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

Definition at line 1155 of file xeformula.cxx.

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

Referenced by IntersectTerm().

void XclExpFmlaCompImpl::RecalcTokenClass ( const XclExpTokenConvInfo &  rConvInfo,
XclFuncParamConv  ePrevConv,
XclExpClassConv  ePrevClassConv,
bool  bWasRefClass 
)
private
void XclExpFmlaCompImpl::RecalcTokenClasses ( )
private

Definition at line 618 of file xeformula.cxx.

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

Referenced by CreateFormula().

void XclExpFmlaCompImpl::RemoveTrailingParen ( )
private

Definition at line 2551 of file xeformula.cxx.

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

Referenced by AndTerm(), and OrTerm().

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

Definition at line 950 of file xeformula.cxx.

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

Referenced by ProcessParam().

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

Definition at line 1074 of file xeformula.cxx.

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

Referenced by PowTerm().

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

Definition at line 1089 of file xeformula.cxx.

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

Referenced by UnaryPostTerm().

void XclExpFmlaCompImpl::UpdateAttrGoto ( sal_uInt16  nAttrPos)
private

Definition at line 2533 of file xeformula.cxx.

References GetSize(), and Overwrite().

Referenced by FinishChooseFunction(), and FinishIfFunction().

Member Data Documentation

XclExpCompConfigMap XclExpFmlaCompImpl::maCfgMap
private

Definition at line 458 of file xeformula.cxx.

Referenced by GetConfigForType(), and XclExpFmlaCompImpl().

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

Working data for current formula.

Definition at line 462 of file xeformula.cxx.

Referenced by CreateTokenArray(), and Init().

XclFunctionProvider XclExpFmlaCompImpl::maFuncProv
private

Compiler configuration map for all formula types.

Definition at line 459 of file xeformula.cxx.

Referenced by ProcessFunction().

const XclBiff XclExpFmlaCompImpl::meBiff
private
const SCCOL XclExpFmlaCompImpl::mnMaxAbsCol
private

Cached BIFF version to save GetBiff() calls.

Definition at line 464 of file xeformula.cxx.

Referenced by ConvertRefData().

const SCROW XclExpFmlaCompImpl::mnMaxAbsRow
private

Maximum column index.

Definition at line 465 of file xeformula.cxx.

Referenced by ConvertRefData().

const sal_uInt16 XclExpFmlaCompImpl::mnMaxColMask
private

Maximum row index in Calc itself.

Definition at line 468 of file xeformula.cxx.

Referenced by ConvertRefData().

const sal_uInt32 XclExpFmlaCompImpl::mnMaxRowMask
private

Mask to delete invalid bits in column fields.

Definition at line 469 of file xeformula.cxx.

Referenced by ConvertRefData().

const SCCOL XclExpFmlaCompImpl::mnMaxScCol
private

Maximum row index.

Definition at line 466 of file xeformula.cxx.

Referenced by ConvertRefData().

const SCROW XclExpFmlaCompImpl::mnMaxScRow
private

Maximum column index in Calc itself.

Definition at line 467 of file xeformula.cxx.

Referenced by ConvertRefData().

XclExpCompDataRef XclExpFmlaCompImpl::mxData
private

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