LibreOffice Module formula (master) 1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
formula::FormulaTokenArray Class Reference

#include <tokenarray.hxx>

Collaboration diagram for formula::FormulaTokenArray:
[legend]

Public Types

enum  ReplaceMode {
  CODE_ONLY ,
  CODE_AND_RPN
}
 

Public Member Functions

FormulaTokenReplaceToken (sal_uInt16 nOffset, FormulaToken *, ReplaceMode eMode)
 Also used by the compiler. More...
 
sal_uInt16 RemoveToken (sal_uInt16 nOffset, sal_uInt16 nCount)
 Remove a sequence of tokens from pCode array, and pRPN array if the tokens are referenced there. More...
 
 FormulaTokenArray ()
 
 FormulaTokenArray (const FormulaTokenArray &)
 Assignment with incrementing references of FormulaToken entries (not copied!) More...
 
 FormulaTokenArray (FormulaTokenArray &&)
 
virtual ~FormulaTokenArray ()
 
virtual void Clear ()
 
void Finalize ()
 The array has its final used size and no more token can be added. More...
 
void SetFromRangeName (bool b)
 
bool IsFromRangeName () const
 
void SetShareable (bool b)
 
bool IsShareable () const
 Check if this token array is shareable between multiple adjacent formula cells. More...
 
void DelRPN ()
 
FormulaTokenFirstToken () const
 
FormulaTokenTokenAt (sal_uInt16 nIdx) const
 Return pCode[nIdx], or nullptr if nIdx is out of bounds. More...
 
FormulaTokenPeekPrev (sal_uInt16 &nIdx) const
 Peek at nIdx-1 if not out of bounds, decrements nIdx if successful. Returns NULL if not. More...
 
OpCode OpCodeBefore (sal_uInt16 nIdx) const
 Return the opcode at pCode[nIdx-1], ocNone if nIdx-1 is out of bounds. More...
 
FormulaTokenFirstRPNToken () const
 
FormulaTokenLastRPNToken () const
 
bool HasReferences () const
 
bool HasExternalRef () const
 
bool HasOpCode (OpCode) const
 
bool HasOpCodeRPN (OpCode) const
 
bool HasNameOrColRowName () const
 Token of type svIndex or opcode ocColRowName. More...
 
bool HasOpCodes (const unordered_opcode_set &rOpCodes) const
 Check if the token array contains any of specified opcode tokens. More...
 
void CreateNewRPNArrayFromData (FormulaToken **pData, sal_uInt16 nSize)
 Assign pRPN to point to a newly created array filled with the data from pData. More...
 
FormulaToken ** GetArray () const
 
FormulaTokenArrayStandardRange Tokens () const
 
FormulaToken ** GetCode () const
 
FormulaTokenArrayStandardRange RPNTokens () const
 
FormulaTokenArrayReferencesRange References () const
 
sal_uInt16 GetLen () const
 
sal_uInt16 GetCodeLen () const
 
FormulaError GetCodeError () const
 
void SetCodeError (FormulaError n)
 
void SetHyperLink (bool bVal)
 
bool IsHyperLink () const
 
ScRecalcMode GetRecalcMode () const
 
void SetCombinedBitsRecalcMode (ScRecalcMode nBits)
 
ScRecalcMode GetCombinedBitsRecalcMode () const
 
void SetMaskedRecalcMode (ScRecalcMode nBits)
 Exclusive bits already set in nMode are zero'ed, nBits may contain combined bits, but only one exclusive bit may be set! More...
 
void AddRecalcMode (ScRecalcMode nBits)
 Bits aren't set directly but validated and handled according to priority if more than one exclusive bit was set. More...
 
void ClearRecalcMode ()
 
void SetExclusiveRecalcModeNormal ()
 
void SetExclusiveRecalcModeAlways ()
 
void SetRecalcModeForced ()
 
void SetRecalcModeOnRefMove ()
 
bool IsRecalcModeNormal () const
 
bool IsRecalcModeAlways () const
 
bool IsRecalcModeForced () const
 
bool IsRecalcModeOnRefMove () const
 
bool IsRecalcModeMustAfterImport () const
 Whether recalculation must happen after import, for example OOXML. More...
 
void ClearRecalcModeMustAfterImport ()
 
OpCode GetOuterFuncOpCode () const
 Get OpCode of the most outer function. More...
 
bool HasMatrixDoubleRefOps () const
 Operators +,-,*,/,^,&,=,<>,<,>,<=,>= with DoubleRef in Formula? More...
 
virtual FormulaTokenAddOpCode (OpCode e)
 
virtual bool AddFormulaToken (const css::sheet::FormulaToken &rToken, svl::SharedStringPool &rSPool, ExternalReferenceHelper *pExtRef)
 Adds the single token to array. More...
 
bool Fill (const css::uno::Sequence< css::sheet::FormulaToken > &rSequence, svl::SharedStringPool &rSPool, ExternalReferenceHelper *pExtRef)
 fill the array with the tokens from the sequence. More...
 
virtual void CheckToken (const FormulaToken &t)
 Do some checking based on the individual tokens. More...
 
void CheckAllRPNTokens ()
 Call CheckToken() for all RPN tokens. More...
 
FormulaTokenAddToken (const FormulaToken &)
 Clones the token and then adds the clone to the pCode array. More...
 
FormulaTokenAddString (const svl::SharedString &rStr)
 
FormulaTokenAddDouble (double fVal)
 
void AddExternal (const sal_Unicode *pStr)
 
FormulaTokenAddExternal (const OUString &rStr, OpCode eOp=ocExternal)
 Xcl import may play dirty tricks with OpCode!=ocExternal. More...
 
FormulaTokenAddBad (const OUString &rStr)
 
FormulaTokenAddStringXML (const OUString &rStr)
 ocBad with OUString More...
 
virtual FormulaTokenMergeArray ()
 ocStringXML with OUString, temporary during import More...
 
FormulaTokenArrayoperator= (const FormulaTokenArray &)
 Assignment with incrementing references of FormulaToken entries (not copied!) More...
 
FormulaTokenArrayoperator= (FormulaTokenArray &&)
 
bool NeedsPodfRewrite (const MissingConventionODF &rConv)
 Determines if this formula needs any changes to convert it to something previous versions of OOo could consume (Plain Old Formula, pre-ODFF, or also ODFF) More...
 
bool NeedsOoxmlRewrite ()
 Determines if this formula needs any changes to convert it to OOXML. More...
 
FormulaTokenArrayRewriteMissing (const MissingConvention &rConv)
 Rewrites to Plain Old Formula or OOXML, substituting missing parameters. More...
 
bool MayReferenceFollow ()
 Determines if this formula may be followed by a reference. More...
 
void ReinternStrings (svl::SharedStringPool &rPool)
 Re-intern SharedString in case the SharedStringPool differs. More...
 

Protected Member Functions

void Assign (const FormulaTokenArray &)
 
void Assign (sal_uInt16 nCode, FormulaToken **pTokens)
 Optimisation for efficiently creating StringXML placeholders. More...
 
void Move (FormulaTokenArray &&)
 
FormulaTokenAdd (FormulaToken *)
 Also used by the compiler. The token MUST had been allocated with new! More...
 

Protected Attributes

std::unique_ptr< FormulaToken *[]> pCode
 
FormulaToken ** pRPN
 
sal_uInt16 nLen
 
sal_uInt16 nRPN
 
FormulaError nError
 
ScRecalcMode nMode
 
bool bHyperLink:1
 
bool mbFromRangeName:1
 
bool mbShareable:1
 
bool mbFinalized:1
 

Detailed Description

Definition at line 234 of file tokenarray.hxx.

Member Enumeration Documentation

◆ ReplaceMode

Enumerator
CODE_ONLY 

replacement only in pCode

CODE_AND_RPN 

replacement in pCode and pRPN

Definition at line 257 of file tokenarray.hxx.

Constructor & Destructor Documentation

◆ FormulaTokenArray() [1/3]

formula::FormulaTokenArray::FormulaTokenArray ( )

Definition at line 588 of file token.cxx.

References NONE, and NORMAL.

Referenced by RewriteMissing().

◆ FormulaTokenArray() [2/3]

formula::FormulaTokenArray::FormulaTokenArray ( const FormulaTokenArray rArr)

Assignment with incrementing references of FormulaToken entries (not copied!)

Definition at line 601 of file token.cxx.

References Assign().

◆ FormulaTokenArray() [3/3]

formula::FormulaTokenArray::FormulaTokenArray ( FormulaTokenArray &&  rArr)

Definition at line 606 of file token.cxx.

References Move().

◆ ~FormulaTokenArray()

formula::FormulaTokenArray::~FormulaTokenArray ( )
virtual

Definition at line 611 of file token.cxx.

References Clear().

Member Function Documentation

◆ Add()

FormulaToken * formula::FormulaTokenArray::Add ( FormulaToken t)
protected

Also used by the compiler. The token MUST had been allocated with new!

Definition at line 843 of file token.cxx.

References CheckToken(), FORMULA_MAXTOKENS, mbFinalized, MergeArray(), nLen, ocArrayClose, ocStop, pCode, and t.

Referenced by AddBad(), AddDouble(), AddExternal(), AddFormulaToken(), AddOpCode(), AddString(), AddStringXML(), AddToken(), and RewriteMissing().

◆ AddBad()

FormulaToken * formula::FormulaTokenArray::AddBad ( const OUString &  rStr)

Definition at line 909 of file token.cxx.

References Add(), and ocBad.

Referenced by AddFormulaToken().

◆ AddDouble()

FormulaToken * formula::FormulaTokenArray::AddDouble ( double  fVal)

Definition at line 893 of file token.cxx.

References Add().

Referenced by AddFormulaToken().

◆ AddExternal() [1/2]

FormulaToken * formula::FormulaTokenArray::AddExternal ( const OUString &  rStr,
OpCode  eOp = ocExternal 
)

Xcl import may play dirty tricks with OpCode!=ocExternal.

Others don't use!

Definition at line 903 of file token.cxx.

References Add().

◆ AddExternal() [2/2]

void formula::FormulaTokenArray::AddExternal ( const sal_Unicode pStr)

Definition at line 898 of file token.cxx.

References AddExternal().

Referenced by AddExternal().

◆ AddFormulaToken()

bool formula::FormulaTokenArray::AddFormulaToken ( const css::sheet::FormulaToken &  rToken,
svl::SharedStringPool rSPool,
ExternalReferenceHelper pExtRef 
)
virtual

Adds the single token to array.

Derived classes must override it when they want to support derived classes from FormulaToken.

Returns
true when an error occurs

assuming equal values for the moment

Definition at line 397 of file token.cxx.

References Add(), AddBad(), AddDouble(), AddOpCode(), AddString(), AddStringXML(), svl::SharedStringPool::intern(), nValue, ocBad, ocDBArea, ocExternal, ocMacro, ocPush, ocSpaces, ocStringXML, ocTableRef, and ocWhitespace.

Referenced by Fill().

◆ AddOpCode()

FormulaToken * formula::FormulaTokenArray::AddOpCode ( OpCode  e)
virtual

◆ AddRecalcMode()

void formula::FormulaTokenArray::AddRecalcMode ( ScRecalcMode  nBits)

Bits aren't set directly but validated and handled according to priority if more than one exclusive bit was set.

Definition at line 920 of file token.cxx.

References EMask, nMode, SetCombinedBitsRecalcMode(), and SetMaskedRecalcMode().

Referenced by formula::FormulaCompiler::Factor(), and RewriteMissing().

◆ AddString()

FormulaToken * formula::FormulaTokenArray::AddString ( const svl::SharedString rStr)

Definition at line 888 of file token.cxx.

References Add().

Referenced by AddFormulaToken().

◆ AddStringXML()

FormulaToken * formula::FormulaTokenArray::AddStringXML ( const OUString &  rStr)

ocBad with OUString

Definition at line 914 of file token.cxx.

References Add(), and ocStringXML.

Referenced by AddFormulaToken().

◆ AddToken()

FormulaToken * formula::FormulaTokenArray::AddToken ( const FormulaToken r)

Clones the token and then adds the clone to the pCode array.

For just new'ed tokens use Add() instead of cloning it again. Use this AddToken() when adding a token from another origin.

Definition at line 751 of file token.cxx.

References Add(), and formula::FormulaToken::Clone().

Referenced by RewriteMissing().

◆ Assign() [1/2]

void formula::FormulaTokenArray::Assign ( const FormulaTokenArray r)
protected

Definition at line 628 of file token.cxx.

References bHyperLink, i, mbFinalized, mbFromRangeName, mbShareable, nError, nLen, nMode, nRPN, pCode, and pRPN.

Referenced by FormulaTokenArray(), and operator=().

◆ Assign() [2/2]

void formula::FormulaTokenArray::Assign ( sal_uInt16  nCode,
FormulaToken **  pTokens 
)
protected

Optimisation for efficiently creating StringXML placeholders.

Definition at line 677 of file token.cxx.

References i, mbFinalized, nLen, ocStringXML, pCode, and t.

◆ CheckAllRPNTokens()

void formula::FormulaTokenArray::CheckAllRPNTokens ( )

Call CheckToken() for all RPN tokens.

Definition at line 739 of file token.cxx.

References CheckToken(), i, nRPN, p, and pRPN.

Referenced by formula::FormulaCompiler::CompileTokenArray().

◆ CheckToken()

void formula::FormulaTokenArray::CheckToken ( const FormulaToken t)
virtual

Do some checking based on the individual tokens.

For now, we use this only to check whether we can vectorize the token array.

Definition at line 734 of file token.cxx.

Referenced by Add(), CheckAllRPNTokens(), and ReplaceToken().

◆ Clear()

void formula::FormulaTokenArray::Clear ( )
virtual

Definition at line 712 of file token.cxx.

References bHyperLink, ClearRecalcMode(), DelRPN(), i, mbFinalized, mbFromRangeName, mbShareable, nError, nLen, NONE, nRPN, p, pCode, and pRPN.

Referenced by operator=(), and ~FormulaTokenArray().

◆ ClearRecalcMode()

void formula::FormulaTokenArray::ClearRecalcMode ( )
inline

Definition at line 412 of file tokenarray.hxx.

References NORMAL.

Referenced by Clear(), and formula::FormulaCompiler::CompileTokenArray().

◆ ClearRecalcModeMustAfterImport()

void formula::FormulaTokenArray::ClearRecalcModeMustAfterImport ( )
inline

Definition at line 433 of file tokenarray.hxx.

◆ CreateNewRPNArrayFromData()

void formula::FormulaTokenArray::CreateNewRPNArrayFromData ( FormulaToken **  pData,
sal_uInt16  nSize 
)
inline

Assign pRPN to point to a newly created array filled with the data from pData.

Definition at line 361 of file tokenarray.hxx.

References pData.

Referenced by formula::FormulaCompiler::CompileTokenArray().

◆ DelRPN()

void formula::FormulaTokenArray::DelRPN ( )

Definition at line 477 of file token.cxx.

References i, nRPN, p, and pRPN.

Referenced by Clear(), and formula::FormulaCompiler::CompileTokenArray().

◆ Fill()

bool formula::FormulaTokenArray::Fill ( const css::uno::Sequence< css::sheet::FormulaToken > &  rSequence,
svl::SharedStringPool rSPool,
ExternalReferenceHelper pExtRef 
)

fill the array with the tokens from the sequence.

It calls AddFormulaToken for each token in the list.

Parameters
_aSequencethe token to add
Returns
true when an error occurs

Definition at line 459 of file token.cxx.

References AddFormulaToken(), AddOpCode(), nCount, nPos, and ocErrName.

◆ Finalize()

void formula::FormulaTokenArray::Finalize ( )

The array has its final used size and no more token can be added.

Definition at line 616 of file token.cxx.

References mbFinalized, nLen, and pCode.

◆ FirstRPNToken()

FormulaToken * formula::FormulaTokenArray::FirstRPNToken ( ) const

Definition at line 506 of file token.cxx.

References nRPN, and pRPN.

◆ FirstToken()

FormulaToken * formula::FormulaTokenArray::FirstToken ( ) const

Definition at line 492 of file token.cxx.

References nLen, and pCode.

◆ GetArray()

FormulaToken ** formula::FormulaTokenArray::GetArray ( ) const
inline

◆ GetCode()

FormulaToken ** formula::FormulaTokenArray::GetCode ( ) const
inline

◆ GetCodeError()

FormulaError formula::FormulaTokenArray::GetCodeError ( ) const
inline

◆ GetCodeLen()

sal_uInt16 formula::FormulaTokenArray::GetCodeLen ( ) const
inline

Definition at line 388 of file tokenarray.hxx.

Referenced by formula::FormulaTokenArrayPlainIterator::LastRPN().

◆ GetCombinedBitsRecalcMode()

ScRecalcMode formula::FormulaTokenArray::GetCombinedBitsRecalcMode ( ) const
inline

Definition at line 398 of file tokenarray.hxx.

◆ GetLen()

sal_uInt16 formula::FormulaTokenArray::GetLen ( ) const
inline

◆ GetOuterFuncOpCode()

OpCode formula::FormulaTokenArray::GetOuterFuncOpCode ( ) const
inline

Get OpCode of the most outer function.

Definition at line 517 of file tokenarray.hxx.

References formula::FormulaToken::GetOpCode(), nRPN, ocNone, and pRPN.

◆ GetRecalcMode()

ScRecalcMode formula::FormulaTokenArray::GetRecalcMode ( ) const
inline

Definition at line 394 of file tokenarray.hxx.

Referenced by formula::FormulaCompiler::PopTokenArray(), and RewriteMissing().

◆ HasExternalRef()

bool formula::FormulaTokenArray::HasExternalRef ( ) const

Definition at line 537 of file token.cxx.

References i, and Tokens().

◆ HasMatrixDoubleRefOps()

bool formula::FormulaTokenArray::HasMatrixDoubleRefOps ( ) const

◆ HasNameOrColRowName()

bool formula::FormulaTokenArray::HasNameOrColRowName ( ) const

Token of type svIndex or opcode ocColRowName.

Definition at line 567 of file token.cxx.

References i, ocColRowName, formula::svIndex, and Tokens().

◆ HasOpCode()

bool formula::FormulaTokenArray::HasOpCode ( OpCode  eOp) const

Definition at line 547 of file token.cxx.

References i, and Tokens().

◆ HasOpCodeRPN()

bool formula::FormulaTokenArray::HasOpCodeRPN ( OpCode  eOp) const

Definition at line 557 of file token.cxx.

References i, and RPNTokens().

◆ HasOpCodes()

bool formula::FormulaTokenArray::HasOpCodes ( const unordered_opcode_set rOpCodes) const

Check if the token array contains any of specified opcode tokens.

Parameters
rOpCodescollection of opcodes to check against.
Returns
true if the token array contains at least one of the specified opcode tokens, false otherwise.

Definition at line 577 of file token.cxx.

References i, and Tokens().

◆ HasReferences()

bool formula::FormulaTokenArray::HasReferences ( ) const

Definition at line 520 of file token.cxx.

References i, RPNTokens(), and Tokens().

◆ IsFromRangeName()

bool formula::FormulaTokenArray::IsFromRangeName ( ) const
inline

Definition at line 304 of file tokenarray.hxx.

◆ IsHyperLink()

bool formula::FormulaTokenArray::IsHyperLink ( ) const
inline

Definition at line 392 of file tokenarray.hxx.

Referenced by formula::FormulaCompiler::PopTokenArray().

◆ IsRecalcModeAlways()

bool formula::FormulaTokenArray::IsRecalcModeAlways ( ) const
inline

Definition at line 423 of file tokenarray.hxx.

References ALWAYS.

Referenced by formula::FormulaCompiler::PopTokenArray().

◆ IsRecalcModeForced()

bool formula::FormulaTokenArray::IsRecalcModeForced ( ) const
inline

◆ IsRecalcModeMustAfterImport()

bool formula::FormulaTokenArray::IsRecalcModeMustAfterImport ( ) const
inline

Whether recalculation must happen after import, for example OOXML.

Definition at line 431 of file tokenarray.hxx.

References EMask, and ONLOAD_ONCE.

◆ IsRecalcModeNormal()

bool formula::FormulaTokenArray::IsRecalcModeNormal ( ) const
inline

Definition at line 421 of file tokenarray.hxx.

References NORMAL.

Referenced by formula::FormulaCompiler::PopTokenArray().

◆ IsRecalcModeOnRefMove()

bool formula::FormulaTokenArray::IsRecalcModeOnRefMove ( ) const
inline

Definition at line 427 of file tokenarray.hxx.

References ONREFMOVE.

◆ IsShareable()

bool formula::FormulaTokenArray::IsShareable ( ) const
inline

Check if this token array is shareable between multiple adjacent formula cells.

Certain tokens may not function correctly when shared.

Returns
true if the token array is shareable, false otherwise.

Definition at line 314 of file tokenarray.hxx.

◆ LastRPNToken()

FormulaToken * formula::FormulaTokenArray::LastRPNToken ( ) const

Definition at line 513 of file token.cxx.

References nRPN, and pRPN.

◆ MayReferenceFollow()

bool formula::FormulaTokenArray::MayReferenceFollow ( )

Determines if this formula may be followed by a reference.

Definition at line 1540 of file token.cxx.

References i, isWhitespace(), nLen, pCode, SC_OPCODE_OPEN, SC_OPCODE_SEP, SC_OPCODE_START_BIN_OP, SC_OPCODE_START_UN_OP, SC_OPCODE_STOP_BIN_OP, and SC_OPCODE_STOP_UN_OP.

◆ MergeArray()

FormulaToken * formula::FormulaTokenArray::MergeArray ( )
virtual

ocStringXML with OUString, temporary during import

Definition at line 756 of file token.cxx.

Referenced by Add().

◆ Move()

void formula::FormulaTokenArray::Move ( FormulaTokenArray &&  r)
protected

Definition at line 659 of file token.cxx.

References bHyperLink, mbFinalized, mbFromRangeName, mbShareable, nError, nLen, nMode, nRPN, pCode, and pRPN.

Referenced by FormulaTokenArray(), and operator=().

◆ NeedsOoxmlRewrite()

bool formula::FormulaTokenArray::NeedsOoxmlRewrite ( )

Determines if this formula needs any changes to convert it to OOXML.

Definition at line 1367 of file token.cxx.

References i, formula::MissingConventionOOXML::isRewriteNeeded(), and Tokens().

Referenced by formula::FormulaCompiler::CreateStringFromTokenArray().

◆ NeedsPodfRewrite()

bool formula::FormulaTokenArray::NeedsPodfRewrite ( const MissingConventionODF rConv)

Determines if this formula needs any changes to convert it to something previous versions of OOo could consume (Plain Old Formula, pre-ODFF, or also ODFF)

Definition at line 1357 of file token.cxx.

References i, formula::MissingConventionODF::isRewriteNeeded(), and Tokens().

Referenced by formula::FormulaCompiler::CreateStringFromTokenArray().

◆ OpCodeBefore()

OpCode formula::FormulaTokenArray::OpCodeBefore ( sal_uInt16  nIdx) const
inline

Return the opcode at pCode[nIdx-1], ocNone if nIdx-1 is out of bounds.

Definition at line 331 of file tokenarray.hxx.

References ocNone.

Referenced by formula::FormulaCompiler::GetToken().

◆ operator=() [1/2]

FormulaTokenArray & formula::FormulaTokenArray::operator= ( const FormulaTokenArray rArr)

Assignment with incrementing references of FormulaToken entries (not copied!)

Definition at line 695 of file token.cxx.

References Assign(), and Clear().

◆ operator=() [2/2]

FormulaTokenArray & formula::FormulaTokenArray::operator= ( FormulaTokenArray &&  rArr)

Definition at line 705 of file token.cxx.

References Clear(), and Move().

◆ PeekPrev()

FormulaToken * formula::FormulaTokenArray::PeekPrev ( sal_uInt16 &  nIdx) const

Peek at nIdx-1 if not out of bounds, decrements nIdx if successful. Returns NULL if not.

Definition at line 499 of file token.cxx.

References nLen, and pCode.

◆ References()

FormulaTokenArrayReferencesRange formula::FormulaTokenArray::References ( ) const
inline

Definition at line 382 of file tokenarray.hxx.

◆ ReinternStrings()

void formula::FormulaTokenArray::ReinternStrings ( svl::SharedStringPool rPool)

Re-intern SharedString in case the SharedStringPool differs.

Definition at line 1599 of file token.cxx.

References i, svl::SharedStringPool::intern(), formula::svString, and Tokens().

◆ RemoveToken()

sal_uInt16 formula::FormulaTokenArray::RemoveToken ( sal_uInt16  nOffset,
sal_uInt16  nCount 
)

Remove a sequence of tokens from pCode array, and pRPN array if the tokens are referenced there.

nLen and nRPN are adapted.

Parameters
nOffsetStart offset into pCode.
nCountCount of tokens to remove.
Returns
Count of tokens removed.

Definition at line 794 of file token.cxx.

References i, nCount, nLen, nRPN, p, pCode, pRPN, SAL_WARN, SAL_WARN_IF, and x.

Referenced by formula::FormulaCompiler::Factor().

◆ ReplaceToken()

FormulaToken * formula::FormulaTokenArray::ReplaceToken ( sal_uInt16  nOffset,
FormulaToken t,
FormulaTokenArray::ReplaceMode  eMode 
)

Also used by the compiler.

The token MUST had been allocated with new!

Parameters
nOffsetAbsolute offset in pCode of the token to be replaced.
eModeIf CODE_ONLY only the token in pCode at nOffset is replaced. If CODE_AND_RPN the token in pCode at nOffset is replaced; if the original token was also referenced in the pRPN array then that reference is replaced with a reference to the new token as well.

Definition at line 761 of file token.cxx.

References CheckToken(), CODE_AND_RPN, eMode, i, nLen, nRPN, p, pCode, pRPN, and t.

Referenced by formula::FormulaCompiler::IntersectionLine().

◆ RewriteMissing()

FormulaTokenArray * formula::FormulaTokenArray::RewriteMissing ( const MissingConvention rConv)

◆ RPNTokens()

FormulaTokenArrayStandardRange formula::FormulaTokenArray::RPNTokens ( ) const
inline

Definition at line 377 of file tokenarray.hxx.

Referenced by HasMatrixDoubleRefOps(), HasOpCodeRPN(), and HasReferences().

◆ SetCodeError()

void formula::FormulaTokenArray::SetCodeError ( FormulaError  n)
inline

Definition at line 390 of file tokenarray.hxx.

References n.

Referenced by formula::FormulaCompiler::CompileTokenArray().

◆ SetCombinedBitsRecalcMode()

void formula::FormulaTokenArray::SetCombinedBitsRecalcMode ( ScRecalcMode  nBits)
inline

Definition at line 396 of file tokenarray.hxx.

Referenced by AddRecalcMode().

◆ SetExclusiveRecalcModeAlways()

void formula::FormulaTokenArray::SetExclusiveRecalcModeAlways ( )
inline

Definition at line 415 of file tokenarray.hxx.

References ALWAYS.

Referenced by formula::FormulaCompiler::Factor().

◆ SetExclusiveRecalcModeNormal()

void formula::FormulaTokenArray::SetExclusiveRecalcModeNormal ( )
inline

Definition at line 413 of file tokenarray.hxx.

References NORMAL.

◆ SetFromRangeName()

void formula::FormulaTokenArray::SetFromRangeName ( bool  b)
inline

Definition at line 303 of file tokenarray.hxx.

◆ SetHyperLink()

void formula::FormulaTokenArray::SetHyperLink ( bool  bVal)
inline

◆ SetMaskedRecalcMode()

void formula::FormulaTokenArray::SetMaskedRecalcMode ( ScRecalcMode  nBits)
inline

Exclusive bits already set in nMode are zero'ed, nBits may contain combined bits, but only one exclusive bit may be set!

Definition at line 404 of file tokenarray.hxx.

Referenced by AddRecalcMode().

◆ SetRecalcModeForced()

void formula::FormulaTokenArray::SetRecalcModeForced ( )
inline

Definition at line 417 of file tokenarray.hxx.

References FORCED.

Referenced by formula::FormulaCompiler::CompileTokenArray().

◆ SetRecalcModeOnRefMove()

void formula::FormulaTokenArray::SetRecalcModeOnRefMove ( )
inline

Definition at line 419 of file tokenarray.hxx.

References ONREFMOVE.

Referenced by formula::FormulaCompiler::Factor().

◆ SetShareable()

void formula::FormulaTokenArray::SetShareable ( bool  b)
inline

Definition at line 306 of file tokenarray.hxx.

◆ TokenAt()

FormulaToken * formula::FormulaTokenArray::TokenAt ( sal_uInt16  nIdx) const
inline

Return pCode[nIdx], or nullptr if nIdx is out of bounds.

Definition at line 320 of file tokenarray.hxx.

Referenced by formula::FormulaCompiler::Factor().

◆ Tokens()

FormulaTokenArrayStandardRange formula::FormulaTokenArray::Tokens ( ) const
inline

Member Data Documentation

◆ bHyperLink

bool formula::FormulaTokenArray::bHyperLink
protected

Definition at line 243 of file tokenarray.hxx.

Referenced by Assign(), Clear(), and Move().

◆ mbFinalized

bool formula::FormulaTokenArray::mbFinalized
protected

Definition at line 246 of file tokenarray.hxx.

Referenced by Add(), Assign(), Clear(), Finalize(), and Move().

◆ mbFromRangeName

bool formula::FormulaTokenArray::mbFromRangeName
protected

Definition at line 244 of file tokenarray.hxx.

Referenced by Assign(), Clear(), and Move().

◆ mbShareable

bool formula::FormulaTokenArray::mbShareable
protected

Definition at line 245 of file tokenarray.hxx.

Referenced by Assign(), Clear(), and Move().

◆ nError

FormulaError formula::FormulaTokenArray::nError
protected

Definition at line 241 of file tokenarray.hxx.

Referenced by Assign(), Clear(), and Move().

◆ nLen

sal_uInt16 formula::FormulaTokenArray::nLen
protected

◆ nMode

ScRecalcMode formula::FormulaTokenArray::nMode
protected

Definition at line 242 of file tokenarray.hxx.

Referenced by AddRecalcMode(), Assign(), and Move().

◆ nRPN

sal_uInt16 formula::FormulaTokenArray::nRPN
protected

◆ pCode

std::unique_ptr<FormulaToken*[]> formula::FormulaTokenArray::pCode
protected

◆ pRPN

FormulaToken** formula::FormulaTokenArray::pRPN
protected

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