LibreOffice Module sc (master)  1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ScTokenArray Class Referencefinal

#include <tokenarray.hxx>

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

Public Member Functions

 ScTokenArray (const ScDocument *pDoc)
 
 ScTokenArray (ScSheetLimits &)
 
 ScTokenArray (const ScTokenArray &)=default
 Assignment with incrementing references of FormulaToken entries (not copied!) More...
 
virtual ~ScTokenArray () override
 
bool EqualTokens (const ScTokenArray *pArr2) const
 
virtual void Clear () override
 
std::unique_ptr< ScTokenArrayClone () const
 
void GenHash ()
 True copy! More...
 
size_t GetHash () const
 
ScFormulaVectorState GetVectorState () const
 
void ResetVectorState ()
 
bool IsFormulaVectorDisabled () const
 
bool IsInvariant () const
 If the array contains at least one relative row reference or named expression, it's variant. More...
 
bool IsReference (ScRange &rRange, const ScAddress &rPos) const
 Exactly and only one range (valid or deleted) More...
 
bool IsValidReference (ScRange &rRange, const ScAddress &rPos) const
 Exactly and only one valid range (no #REF!s) More...
 
bool GetAdjacentExtendOfOuterFuncRefs (SCCOLROW &nExtend, const ScAddress &rPos, ScDirection)
 Determines the extent of direct adjacent references. More...
 
formula::FormulaTokenAddRawToken (const ScRawToken &)
 
virtual bool AddFormulaToken (const css::sheet::FormulaToken &rToken, svl::SharedStringPool &rSPool, formula::ExternalReferenceHelper *_pRef) override
 
virtual void CheckToken (const formula::FormulaToken &r) override
 
virtual formula::FormulaTokenAddOpCode (OpCode eCode) override
 
formula::FormulaTokenAddSingleReference (const ScSingleRefData &rRef)
 ScSingleRefToken with ocPush. More...
 
formula::FormulaTokenAddMatrixSingleReference (const ScSingleRefData &rRef)
 ScSingleRefOpToken with ocMatRef. More...
 
formula::FormulaTokenAddDoubleReference (const ScComplexRefData &rRef)
 
void AddRangeName (sal_uInt16 n, sal_Int16 nSheet)
 
formula::FormulaTokenAddDBRange (sal_uInt16 n)
 
formula::FormulaTokenAddExternalName (sal_uInt16 nFileId, const svl::SharedString &rName)
 
void AddExternalSingleReference (sal_uInt16 nFileId, const svl::SharedString &rTabName, const ScSingleRefData &rRef)
 
formula::FormulaTokenAddExternalDoubleReference (sal_uInt16 nFileId, const svl::SharedString &rTabName, const ScComplexRefData &rRef)
 
formula::FormulaTokenAddMatrix (const ScMatrixRef &p)
 
formula::FormulaTokenAddColRowName (const ScSingleRefData &rRef)
 ScSingleRefOpToken with ocColRowName. More...
 
virtual formula::FormulaTokenMergeArray () override
 
void MergeRangeReference (const ScAddress &rPos)
 Merge very last SingleRef+ocRange+SingleRef combination into DoubleRef and adjust pCode array, or do nothing if conditions not met. More...
 
void AssignXMLString (const OUString &rText, const OUString &rFormulaNmsp)
 Assign XML string placeholder to the array. More...
 
ScTokenArrayoperator= (const ScTokenArray &)
 Assignment with incrementing references of FormulaToken entries (not copied!) More...
 
void ReadjustAbsolute3DReferences (const ScDocument *pOldDoc, ScDocument *pNewDoc, const ScAddress &rPos, bool bRangeName=false)
 Make all absolute references external references pointing to the old document. More...
 
void AdjustAbsoluteRefs (const ScDocument *pOldDoc, const ScAddress &rOldPos, const ScAddress &rNewPos, bool bCheckCopyArea)
 Make all absolute references pointing to the copied range if the range is copied too. More...
 
void AdjustSheetLocalNameReferences (SCTAB nOldTab, SCTAB nNewTab)
 When copying a sheet-local named expression, move sheet references that point to the originating sheet to point to the new sheet instead. More...
 
bool ReferencesSheet (SCTAB nTab, SCTAB nPosTab) const
 Returns true if the sheet nTab is referenced in code. More...
 
sc::RefUpdateResult AdjustReferenceOnShift (const sc::RefUpdateContext &rCxt, const ScAddress &rOldPos)
 Adjust all references in response to shifting of cells during cell insertion and deletion. More...
 
sc::RefUpdateResult AdjustReferenceOnMove (const sc::RefUpdateContext &rCxt, const ScAddress &rOldPos, const ScAddress &rNewPos)
 
void MoveReferenceColReorder (const ScAddress &rPos, SCTAB nTab, SCROW nRow1, SCROW nRow2, const sc::ColRowReorderMapType &rColMap)
 Move reference positions in response to column reordering. More...
 
void MoveReferenceRowReorder (const ScAddress &rPos, SCTAB nTab, SCCOL nCol1, SCCOL nCol2, const sc::ColRowReorderMapType &rRowMap)
 
sc::RefUpdateResult AdjustReferenceInName (const sc::RefUpdateContext &rCxt, const ScAddress &rPos)
 Adjust all references in named expression. More...
 
sc::RefUpdateResult AdjustReferenceInMovedName (const sc::RefUpdateContext &rCxt, const ScAddress &rPos)
 
sc::RefUpdateResult AdjustReferenceOnDeletedTab (const sc::RefUpdateDeleteTabContext &rCxt, const ScAddress &rOldPos)
 Adjust all references on sheet deletion. More...
 
sc::RefUpdateResult AdjustReferenceOnInsertedTab (const sc::RefUpdateInsertTabContext &rCxt, const ScAddress &rOldPos)
 
sc::RefUpdateResult AdjustReferenceOnMovedTab (const sc::RefUpdateMoveTabContext &rCxt, const ScAddress &rOldPos)
 
void AdjustReferenceOnMovedOrigin (const ScAddress &rOldPos, const ScAddress &rNewPos)
 Adjust all internal references on base position change. More...
 
void AdjustReferenceOnMovedOriginIfOtherSheet (const ScAddress &rOldPos, const ScAddress &rNewPos)
 Adjust all internal references on base position change if they point to a sheet other than the one of rOldPos. More...
 
void AdjustReferenceOnCopy (const ScAddress &rNewPos)
 Adjust internal range references on base position change to justify / put in order the relative references. More...
 
void ClearTabDeleted (const ScAddress &rPos, SCTAB nStartTab, SCTAB nEndTab)
 Clear sheet deleted flag from internal reference tokens if the sheet index falls within specified range. More...
 
void CheckRelativeReferenceBounds (const sc::RefUpdateContext &rCxt, const ScAddress &rPos, SCROW nGroupLen, std::vector< SCROW > &rBounds) const
 
void CheckRelativeReferenceBounds (const ScAddress &rPos, SCROW nGroupLen, const ScRange &rRange, std::vector< SCROW > &rBounds) const
 
void CheckExpandReferenceBounds (const sc::RefUpdateContext &rCxt, const ScAddress &rPos, SCROW nGroupLen, std::vector< SCROW > &rBounds) const
 
OUString CreateString (sc::TokenStringContext &rCxt, const ScAddress &rPos) const
 Create a string representation of formula token array without modifying the internal state of the token array. More...
 
void WrapReference (const ScAddress &rPos, SCCOL nMaxCol, SCROW nMaxRow)
 
bool NeedsWrapReference (const ScAddress &rPos, SCCOL nMaxCol, SCROW nMaxRow) const
 
sal_Int32 GetWeight () const
 
bool IsEnabledForOpenCL () const
 
bool IsEnabledForThreading () const
 
- Public Member Functions inherited from formula::FormulaTokenArray
FormulaTokenReplaceToken (sal_uInt16 nOffset, FormulaToken *, ReplaceMode eMode)
 
sal_uInt16 RemoveToken (sal_uInt16 nOffset, sal_uInt16 nCount)
 
 FormulaTokenArray ()
 
 FormulaTokenArray (const FormulaTokenArray &)
 
virtual ~FormulaTokenArray ()
 
void Finalize ()
 
void SetFromRangeName (bool b)
 
bool IsFromRangeName () const
 
void SetShareable (bool b)
 
bool IsShareable () const
 
void DelRPN ()
 
FormulaTokenFirstToken () const
 
FormulaTokenTokenAt (sal_uInt16 nIdx) const
 
FormulaTokenPeekPrev (sal_uInt16 &nIdx) const
 
OpCode OpCodeBefore (sal_uInt16 nIdx) const
 
FormulaTokenFirstRPNToken () const
 
bool HasReferences () const
 
bool HasExternalRef () const
 
bool HasOpCode (OpCode) const
 
bool HasOpCodeRPN (OpCode) const
 
bool HasNameOrColRowName () const
 
bool HasOpCodes (const unordered_opcode_set &rOpCodes) const
 
void CreateNewRPNArrayFromData (FormulaToken **pData, sal_uInt16 nSize)
 
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)
 
void AddRecalcMode (ScRecalcMode nBits)
 
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
 
OpCode GetOuterFuncOpCode () const
 
bool HasMatrixDoubleRefOps () const
 
bool Fill (const css::uno::Sequence< css::sheet::FormulaToken > &rSequence, svl::SharedStringPool &rSPool, ExternalReferenceHelper *pExtRef)
 
void CheckAllRPNTokens ()
 
FormulaTokenAddToken (const FormulaToken &)
 
FormulaTokenAddString (const svl::SharedString &rStr)
 
FormulaTokenAddDouble (double fVal)
 
void AddExternal (const sal_Unicode *pStr)
 
FormulaTokenAddExternal (const OUString &rStr, OpCode eOp=ocExternal)
 
FormulaTokenAddBad (const OUString &rStr)
 
FormulaTokenAddStringXML (const OUString &rStr)
 
FormulaTokenArrayoperator= (const FormulaTokenArray &)
 
bool NeedsPodfRewrite (const MissingConventionODF &rConv)
 
bool NeedsOoxmlRewrite ()
 
FormulaTokenArrayRewriteMissing (const MissingConvention &rConv)
 
bool MayReferenceFollow ()
 
void ReinternStrings (svl::SharedStringPool &rPool)
 

Private Member Functions

bool ImplGetReference (ScRange &rRange, const ScAddress &rPos, bool bValidOnly) const
 
void CheckForThreading (const formula::FormulaToken &r)
 

Private Attributes

rtl::Reference< ScSheetLimitsmxSheetLimits
 
size_t mnHashValue
 
ScFormulaVectorState meVectorState: 4
 
bool mbOpenCLEnabled: 1
 
bool mbThreadingEnabled: 1
 

Friends

class ScCompiler
 

Additional Inherited Members

- Public Types inherited from formula::FormulaTokenArray
enum  ReplaceMode
 
- Public Attributes inherited from formula::FormulaTokenArray
 CODE_ONLY
 
 CODE_AND_RPN
 
- Protected Member Functions inherited from formula::FormulaTokenArray
void Assign (const FormulaTokenArray &)
 
void Assign (sal_uInt16 nCode, FormulaToken **pTokens)
 
FormulaTokenAdd (FormulaToken *)
 
- Protected Attributes inherited from formula::FormulaTokenArray
std::unique_ptr< FormulaToken *[]> pCode
 
FormulaToken ** pRPN
 
sal_uInt16 nLen
 
sal_uInt16 nRPN
 
FormulaError nError
 
ScRecalcMode nMode
 
bool bHyperLink
 
bool mbFromRangeName
 
bool mbShareable
 
bool mbFinalized
 

Detailed Description

Definition at line 49 of file tokenarray.hxx.

Constructor & Destructor Documentation

ScTokenArray::ScTokenArray ( const ScDocument pDoc)

Definition at line 1865 of file token.cxx.

References ResetVectorState().

Referenced by Clone().

ScTokenArray::ScTokenArray ( ScSheetLimits rLimits)

Definition at line 1873 of file token.cxx.

References ResetVectorState().

ScTokenArray::ScTokenArray ( const ScTokenArray )
default

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

ScTokenArray::~ScTokenArray ( )
overridevirtual

Definition at line 1881 of file token.cxx.

Member Function Documentation

FormulaToken * ScTokenArray::AddColRowName ( const ScSingleRefData rRef)

ScSingleRefOpToken with ocColRowName.

Definition at line 2249 of file token.cxx.

References formula::FormulaTokenArray::Add(), mxSheetLimits, and ocColRowName.

Referenced by AddFormulaToken(), and TokenPool::GetElement().

FormulaToken * ScTokenArray::AddDBRange ( sal_uInt16  n)

Definition at line 2227 of file token.cxx.

References formula::FormulaTokenArray::Add(), and ocDBArea.

Referenced by AddFormulaToken().

FormulaToken * ScTokenArray::AddDoubleReference ( const ScComplexRefData rRef)
FormulaToken * ScTokenArray::AddExternalDoubleReference ( sal_uInt16  nFileId,
const svl::SharedString rTabName,
const ScComplexRefData rRef 
)

Definition at line 2243 of file token.cxx.

References formula::FormulaTokenArray::Add().

Referenced by AddFormulaToken(), and TokenPool::GetElement().

FormulaToken * ScTokenArray::AddExternalName ( sal_uInt16  nFileId,
const svl::SharedString rName 
)

Definition at line 2232 of file token.cxx.

References formula::FormulaTokenArray::Add().

Referenced by AddFormulaToken(), and TokenPool::GetElement().

void ScTokenArray::AddExternalSingleReference ( sal_uInt16  nFileId,
const svl::SharedString rTabName,
const ScSingleRefData rRef 
)
bool ScTokenArray::AddFormulaToken ( const css::sheet::FormulaToken &  rToken,
svl::SharedStringPool rSPool,
formula::ExternalReferenceHelper _pRef 
)
overridevirtual
FormulaToken * ScTokenArray::AddMatrix ( const ScMatrixRef p)

Definition at line 2217 of file token.cxx.

References formula::FormulaTokenArray::Add().

Referenced by AddFormulaToken(), TokenPool::GetElement(), and MergeArray().

FormulaToken * ScTokenArray::AddMatrixSingleReference ( const ScSingleRefData rRef)

ScSingleRefOpToken with ocMatRef.

Definition at line 2207 of file token.cxx.

References formula::FormulaTokenArray::Add(), mxSheetLimits, and ocMatRef.

Referenced by ScDocument::InsertMatrixFormula(), and ScDocumentImport::setMatrixCells().

FormulaToken * ScTokenArray::AddOpCode ( OpCode  eCode)
overridevirtual
void ScTokenArray::AddRangeName ( sal_uInt16  n,
sal_Int16  nSheet 
)

Definition at line 2222 of file token.cxx.

References formula::FormulaTokenArray::Add(), and ocName.

Referenced by AddFormulaToken(), and TokenPool::GetElement().

FormulaToken * ScTokenArray::AddRawToken ( const ScRawToken r)

Definition at line 1978 of file token.cxx.

References formula::FormulaTokenArray::Add(), ScRawToken::CreateToken(), and mxSheetLimits.

Referenced by AddOpCode().

FormulaToken * ScTokenArray::AddSingleReference ( const ScSingleRefData rRef)
void ScTokenArray::AdjustAbsoluteRefs ( const ScDocument pOldDoc,
const ScAddress rOldPos,
const ScAddress rNewPos,
bool  bCheckCopyArea 
)

Make all absolute references pointing to the copied range if the range is copied too.

Parameters
bCheckCopyAreashould reference pointing into the copy area be adjusted independently from being absolute, should be true only for copy&paste between documents

Definition at line 2527 of file token.cxx.

References formula::FormulaToken::GetDoubleRef(), formula::FormulaToken::GetSingleRef(), formula::FormulaToken::GetType(), formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, and svSingleRef.

Referenced by ScFormulaCell::ScFormulaCell().

sc::RefUpdateResult ScTokenArray::AdjustReferenceInMovedName ( const sc::RefUpdateContext rCxt,
const ScAddress rPos 
)
sc::RefUpdateResult ScTokenArray::AdjustReferenceInName ( const sc::RefUpdateContext rCxt,
const ScAddress rPos 
)
void ScTokenArray::AdjustReferenceOnCopy ( const ScAddress rNewPos)
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnDeletedTab ( const sc::RefUpdateDeleteTabContext rCxt,
const ScAddress rOldPos 
)
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnInsertedTab ( const sc::RefUpdateInsertTabContext rCxt,
const ScAddress rOldPos 
)
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove ( const sc::RefUpdateContext rCxt,
const ScAddress rOldPos,
const ScAddress rNewPos 
)
void ScTokenArray::AdjustReferenceOnMovedOrigin ( const ScAddress rOldPos,
const ScAddress rNewPos 
)
void ScTokenArray::AdjustReferenceOnMovedOriginIfOtherSheet ( const ScAddress rOldPos,
const ScAddress rNewPos 
)
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMovedTab ( const sc::RefUpdateMoveTabContext rCxt,
const ScAddress rOldPos 
)
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnShift ( const sc::RefUpdateContext rCxt,
const ScAddress rOldPos 
)
void ScTokenArray::AdjustSheetLocalNameReferences ( SCTAB  nOldTab,
SCTAB  nNewTab 
)
void ScTokenArray::AssignXMLString ( const OUString &  rText,
const OUString &  rFormulaNmsp 
)

Assign XML string placeholder to the array.

Definition at line 2254 of file token.cxx.

References formula::FormulaTokenArray::Assign(), and ocStringXML.

Referenced by ScMyTables::AddMatrixRange(), and ScDocFunc::EnterMatrix().

void ScTokenArray::CheckExpandReferenceBounds ( const sc::RefUpdateContext rCxt,
const ScAddress rPos,
SCROW  nGroupLen,
std::vector< SCROW > &  rBounds 
) const
void ScTokenArray::CheckForThreading ( const formula::FormulaToken r)
private
void ScTokenArray::CheckRelativeReferenceBounds ( const sc::RefUpdateContext rCxt,
const ScAddress rPos,
SCROW  nGroupLen,
std::vector< SCROW > &  rBounds 
) const
void ScTokenArray::CheckRelativeReferenceBounds ( const ScAddress rPos,
SCROW  nGroupLen,
const ScRange rRange,
std::vector< SCROW > &  rBounds 
) const
void ScTokenArray::CheckToken ( const formula::FormulaToken r)
overridevirtual

Reimplemented from formula::FormulaTokenArray.

Definition at line 1354 of file token.cxx.

References CheckForThreading(), FormulaVectorCheckReference, FormulaVectorDisabledByOpCode, FormulaVectorDisabledByStackVariable, FormulaVectorDisabledNotInSubSet, ScInterpreter::GetGlobalConfig(), formula::FormulaToken::GetOpCode(), formula::FormulaToken::GetType(), IsFormulaVectorDisabled(), mbOpenCLEnabled, mbThreadingEnabled, meVectorState, ScCalcConfig::mpOpenCLSubsetOpCodes, ocAbs, ocAnd, ocArcCos, ocArcCosHyp, ocArcCot, ocArcCotHyp, ocArcSin, ocArcSinHyp, ocArcTan, ocArcTan2, ocArcTanHyp, ocArrayClose, ocArrayColSep, ocArrayOpen, ocArrayRowSep, ocAveDev, ocAverage, ocAverageA, ocAverageIf, ocAverageIfs, ocB, ocBad, ocBetaDist, ocBetaInv, ocBinomDist, ocBitAnd, ocBitLshift, ocBitOr, ocBitRshift, ocBitXor, ocCeil, ocChiDist, ocChiInv, ocChiSqDist, ocChiSqInv, ocChoose, ocClose, ocColRowName, ocColRowNameAuto, ocCombin, ocCombinA, ocConfidence, ocCorrel, ocCos, ocCosecant, ocCosecantHyp, ocCosHyp, ocCot, ocCotHyp, ocCount, ocCount2, ocCountIf, ocCountIfs, ocCovar, ocCritBinom, ocDB, ocDBArea, ocDBAverage, ocDBCount, ocDBCount2, ocDBMax, ocDBMin, ocDBProduct, ocDBStdDev, ocDBStdDevP, ocDBSum, ocDBVar, ocDBVarP, ocDDB, ocDeg, ocDevSq, ocErrDivZero, ocErrNA, ocErrName, ocErrNull, ocErrNum, ocErrRef, ocErrValue, ocEven, ocExp, ocExpDist, ocExternal, ocFact, ocFDist, ocFInv, ocFisher, ocFisherInv, ocFloor, ocForecast, ocFTest, ocFV, ocGamma, ocGammaDist, ocGammaInv, ocGammaLn, ocGauss, ocGeoMean, ocHarMean, ocHypGeomDist, ocIf, ocIfError, ocIfNA, ocInt, ocIntercept, ocIpmt, ocIRR, ocIsEven, ocIsOdd, ocISPMT, ocKurt, ocLn, ocLog, ocLog10, ocLogInv, ocLogNormDist, ocMax, ocMaxA, ocMedian, ocMin, ocMinA, ocMIRR, ocMissing, ocMod, ocName, ocNegBinomVert, ocNegSub, ocNormDist, ocNormInv, ocNot, ocNotAvail, ocNper, ocNPV, ocOdd, ocOpen, ocOr, ocPDuration, ocPearson, ocPercentSign, ocPermut, ocPermutationA, ocPhi, ocPi, ocPMT, ocPoissonDist, ocPower, ocPpmt, ocProduct, ocPush, ocPV, ocRad, ocRandom, ocRate, ocRound, ocRoundDown, ocRoundUp, ocRRI, ocRSQ, ocSecant, ocSecantHyp, ocSep, ocSin, ocSinHyp, ocSkew, ocSkewp, ocSkip, ocSLN, ocSlope, ocSNormInv, ocSpaces, ocSqrt, ocStandard, ocStDev, ocStDevA, ocStDevP, ocStDevPA, ocStdNormDist, ocSTEYX, ocStop, ocSum, ocSumIf, ocSumIfs, ocSumProduct, ocSumSQ, ocSumX2DY2, ocSumX2MY2, ocSumXMY2, ocSYD, ocTableRef, ocTan, ocTanHyp, ocTDist, ocTInv, ocTrunc, ocTTest, ocVar, ocVarA, ocVarP, ocVarPA, ocVBD, ocVLookup, ocWeibull, ocXor, ocZTest, SAL_INFO, SC_OPCODE_START_BIN_OP, SC_OPCODE_START_FUNCTION, SC_OPCODE_STOP_FUNCTION, SC_OPCODE_STOP_UN_OP, StackVarEnumToString(), svByte, svDouble, svDoubleRef, svEmptyCell, svError, svExternal, svExternalDoubleRef, svExternalName, svExternalSingleRef, svFAP, svHybridCell, svIndex, svJump, svJumpMatrix, svMatrix, svMatrixCell, svMissing, svRefList, svSep, svSingleRef, svString, and svUnknown.

void ScTokenArray::Clear ( )
overridevirtual
void ScTokenArray::ClearTabDeleted ( const ScAddress rPos,
SCTAB  nStartTab,
SCTAB  nEndTab 
)

Clear sheet deleted flag from internal reference tokens if the sheet index falls within specified range.

Note that when a reference is on a sheet that's been deleted, its referenced sheet index retains the original index of the deleted sheet.

Parameters
rPosposition of formula cell
nStartTabindex of first sheet, inclusive.
nEndTabindex of last sheet, inclusive.

Definition at line 4489 of file token.cxx.

References formula::FormulaToken::GetDoubleRef(), formula::FormulaToken::GetSingleRef(), mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::pCode, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, and svSingleRef.

std::unique_ptr< ScTokenArray > ScTokenArray::Clone ( ) const
OUString ScTokenArray::CreateString ( sc::TokenStringContext rCxt,
const ScAddress rPos 
) const
bool ScTokenArray::EqualTokens ( const ScTokenArray pArr2) const
void ScTokenArray::GenHash ( )
bool ScTokenArray::GetAdjacentExtendOfOuterFuncRefs ( SCCOLROW nExtend,
const ScAddress rPos,
ScDirection  eDir 
)
size_t ScTokenArray::GetHash ( ) const
inline

Definition at line 78 of file tokenarray.hxx.

Referenced by ScFormulaCell::GetHash().

ScFormulaVectorState ScTokenArray::GetVectorState ( ) const
inline
sal_Int32 ScTokenArray::GetWeight ( ) const
bool ScTokenArray::ImplGetReference ( ScRange rRange,
const ScAddress rPos,
bool  bValidOnly 
) const
private
bool ScTokenArray::IsEnabledForOpenCL ( ) const
inline

Definition at line 267 of file tokenarray.hxx.

Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL().

bool ScTokenArray::IsEnabledForThreading ( ) const
inline
bool ScTokenArray::IsFormulaVectorDisabled ( ) const
bool ScTokenArray::IsInvariant ( ) const

If the array contains at least one relative row reference or named expression, it's variant.

Otherwise invariant.

Definition at line 1821 of file token.cxx.

References ScSingleRefData::IsRowRel(), formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::pCode, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svIndex, and svSingleRef.

bool ScTokenArray::IsReference ( ScRange rRange,
const ScAddress rPos 
) const

Exactly and only one range (valid or deleted)

Definition at line 1855 of file token.cxx.

References ImplGetReference().

bool ScTokenArray::IsValidReference ( ScRange rRange,
const ScAddress rPos 
) const

Exactly and only one valid range (no #REF!s)

Definition at line 1860 of file token.cxx.

References ImplGetReference().

Referenced by ScValidationData::GetSelectionFromFormula().

FormulaToken * ScTokenArray::MergeArray ( )
overridevirtual
void ScTokenArray::MergeRangeReference ( const ScAddress rPos)

Merge very last SingleRef+ocRange+SingleRef combination into DoubleRef and adjust pCode array, or do nothing if conditions not met.

Definition at line 2167 of file token.cxx.

References formula::FormulaToken::DecRef(), extendRangeReference(), formula::FormulaToken::GetOpCode(), mxSheetLimits, formula::FormulaTokenArray::nLen, ocRange, formula::FormulaTokenArray::pCode, and formula::FormulaTokenArray::PeekPrev().

void ScTokenArray::MoveReferenceColReorder ( const ScAddress rPos,
SCTAB  nTab,
SCROW  nRow1,
SCROW  nRow2,
const sc::ColRowReorderMapType rColMap 
)

Move reference positions in response to column reordering.

A range reference gets moved only when the whole range fits in a single column.

Parameters
rPosposition of this formula cell
nTabsheet where columns are reordered.
nRow1top row of reordered range.
nRow2bottom row of reordered range.
rColMapold-to-new column mapping.

Definition at line 3414 of file token.cxx.

References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), sc::ColRowReorderMapType::end(), sc::ColRowReorderMapType::find(), formula::FormulaToken::GetDoubleRef(), formula::FormulaToken::GetSingleRef(), mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::pCode, ScAddress::Row(), ScSingleRefData::SetAddress(), ScAddress::SetCol(), ScComplexRefData::SetRange(), svDoubleRef, svSingleRef, ScAddress::Tab(), ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().

Referenced by ScFormulaCell::Notify().

void ScTokenArray::MoveReferenceRowReorder ( const ScAddress rPos,
SCTAB  nTab,
SCCOL  nCol1,
SCCOL  nCol2,
const sc::ColRowReorderMapType rRowMap 
)
bool ScTokenArray::NeedsWrapReference ( const ScAddress rPos,
SCCOL  nMaxCol,
SCROW  nMaxRow 
) const
ScTokenArray & ScTokenArray::operator= ( const ScTokenArray rArr)

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

Definition at line 1885 of file token.cxx.

References formula::FormulaTokenArray::Assign(), Clear(), mbOpenCLEnabled, mbThreadingEnabled, meVectorState, and mnHashValue.

void ScTokenArray::ReadjustAbsolute3DReferences ( const ScDocument pOldDoc,
ScDocument pNewDoc,
const ScAddress rPos,
bool  bRangeName = false 
)

Make all absolute references external references pointing to the old document.

Parameters
pOldDocold document
pNewDocnew document
rPosposition of the cell to determine if the reference is in the copied area
bRangeNameset for range names, range names have special handling for absolute sheet ref + relative col/row ref

Definition at line 2475 of file token.cxx.

References formula::FormulaTokenArray::CODE_AND_RPN, ScDocument::GetSharedStringPool(), svl::SharedStringPool::intern(), ScSingleRefData::IsFlag3D(), ScSingleRefData::IsTabRel(), formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::pCode, ScComplexRefData::Ref1, ScComplexRefData::Ref2, formula::FormulaTokenArray::ReplaceToken(), svDoubleRef, svSingleRef, and ScSingleRefData::Tab().

Referenced by ScFormulaCell::ScFormulaCell().

bool ScTokenArray::ReferencesSheet ( SCTAB  nTab,
SCTAB  nPosTab 
) const
void ScTokenArray::ResetVectorState ( )
void ScTokenArray::WrapReference ( const ScAddress rPos,
SCCOL  nMaxCol,
SCROW  nMaxRow 
)

Friends And Related Function Documentation

friend class ScCompiler
friend

Definition at line 51 of file tokenarray.hxx.

Member Data Documentation

bool ScTokenArray::mbOpenCLEnabled
private

Definition at line 59 of file tokenarray.hxx.

Referenced by CheckToken(), Clone(), operator=(), and ResetVectorState().

bool ScTokenArray::mbThreadingEnabled
private

Definition at line 60 of file tokenarray.hxx.

Referenced by CheckForThreading(), CheckToken(), Clone(), operator=(), and ResetVectorState().

ScFormulaVectorState ScTokenArray::meVectorState
private
size_t ScTokenArray::mnHashValue
private

Definition at line 57 of file tokenarray.hxx.

Referenced by Clear(), Clone(), GenHash(), and operator=().

rtl::Reference<ScSheetLimits> ScTokenArray::mxSheetLimits
private

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