LibreOffice Module sc (master) 1
|
#include <tokenarray.hxx>
Public Member Functions | |
ScTokenArray (const ScDocument &rDoc) | |
ScTokenArray (ScSheetLimits &) | |
ScTokenArray (const ScTokenArray &)=default | |
Assignment with incrementing references of FormulaToken entries (not copied!) More... | |
ScTokenArray (ScTokenArray &&)=default | |
virtual | ~ScTokenArray () override |
bool | EqualTokens (const ScTokenArray *pArr2) const |
virtual void | Clear () override |
std::unique_ptr< ScTokenArray > | Clone () const |
ScTokenArray | CloneValue () const |
True copy! More... | |
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::FormulaToken * | AddRawToken (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::FormulaToken * | AddOpCode (OpCode eCode) override |
formula::FormulaToken * | AddSingleReference (const ScSingleRefData &rRef) |
ScSingleRefToken with ocPush. More... | |
formula::FormulaToken * | AddMatrixSingleReference (const ScSingleRefData &rRef) |
ScSingleRefOpToken with ocMatRef. More... | |
formula::FormulaToken * | AddDoubleReference (const ScComplexRefData &rRef) |
void | AddRangeName (sal_uInt16 n, sal_Int16 nSheet) |
formula::FormulaToken * | AddDBRange (sal_uInt16 n) |
formula::FormulaToken * | AddExternalName (sal_uInt16 nFileId, const svl::SharedString &rName) |
void | AddExternalSingleReference (sal_uInt16 nFileId, const svl::SharedString &rTabName, const ScSingleRefData &rRef) |
formula::FormulaToken * | AddExternalDoubleReference (sal_uInt16 nFileId, const svl::SharedString &rTabName, const ScComplexRefData &rRef) |
formula::FormulaToken * | AddMatrix (const ScMatrixRef &p) |
formula::FormulaToken * | AddColRowName (const ScSingleRefData &rRef) |
ScSingleRefOpToken with ocColRowName. More... | |
virtual formula::FormulaToken * | MergeArray () 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... | |
ScTokenArray & | operator= (const ScTokenArray &) |
Assignment with incrementing references of FormulaToken entries (not copied!) More... | |
ScTokenArray & | operator= (ScTokenArray &&) |
void | ReadjustAbsolute3DReferences (const ScDocument &rOldDoc, ScDocument &rNewDoc, const ScAddress &rPos, bool bRangeName=false) |
Make all absolute references external references pointing to the old document. More... | |
void | AdjustAbsoluteRefs (const ScDocument &rOldDoc, 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) |
sal_Int32 | GetWeight () const |
bool | IsEnabledForOpenCL () const |
bool | IsEnabledForThreading () const |
Public Member Functions inherited from formula::FormulaTokenArray | |
FormulaToken * | ReplaceToken (sal_uInt16 nOffset, FormulaToken *, ReplaceMode eMode) |
sal_uInt16 | RemoveToken (sal_uInt16 nOffset, sal_uInt16 nCount) |
FormulaTokenArray () | |
FormulaTokenArray (const FormulaTokenArray &) | |
FormulaTokenArray (FormulaTokenArray &&) | |
virtual | ~FormulaTokenArray () |
virtual void | Clear () |
void | Finalize () |
void | SetFromRangeName (bool b) |
bool | IsFromRangeName () const |
void | SetShareable (bool b) |
bool | IsShareable () const |
void | DelRPN () |
FormulaToken * | FirstToken () const |
FormulaToken * | TokenAt (sal_uInt16 nIdx) const |
FormulaToken * | PeekPrev (sal_uInt16 &nIdx) const |
OpCode | OpCodeBefore (sal_uInt16 nIdx) const |
FormulaToken * | FirstRPNToken () const |
FormulaToken * | LastRPNToken () 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 |
void | ClearRecalcModeMustAfterImport () |
OpCode | GetOuterFuncOpCode () const |
bool | HasMatrixDoubleRefOps () const |
virtual FormulaToken * | AddOpCode (OpCode e) |
virtual bool | AddFormulaToken (const css::sheet::FormulaToken &rToken, svl::SharedStringPool &rSPool, ExternalReferenceHelper *pExtRef) |
bool | Fill (const css::uno::Sequence< css::sheet::FormulaToken > &rSequence, svl::SharedStringPool &rSPool, ExternalReferenceHelper *pExtRef) |
virtual void | CheckToken (const FormulaToken &t) |
void | CheckAllRPNTokens () |
FormulaToken * | AddToken (const FormulaToken &) |
FormulaToken * | AddString (const svl::SharedString &rStr) |
FormulaToken * | AddDouble (double fVal) |
void | AddExternal (const sal_Unicode *pStr) |
FormulaToken * | AddExternal (const OUString &rStr, OpCode eOp=ocExternal) |
FormulaToken * | AddBad (const OUString &rStr) |
FormulaToken * | AddStringXML (const OUString &rStr) |
virtual FormulaToken * | MergeArray () |
FormulaTokenArray & | operator= (const FormulaTokenArray &) |
FormulaTokenArray & | operator= (FormulaTokenArray &&) |
bool | NeedsPodfRewrite (const MissingConventionODF &rConv) |
bool | NeedsOoxmlRewrite () |
FormulaTokenArray * | RewriteMissing (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< ScSheetLimits > | mxSheetLimits |
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) |
void | Move (FormulaTokenArray &&) |
FormulaToken * | Add (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 |
Definition at line 48 of file tokenarray.hxx.
ScTokenArray::ScTokenArray | ( | const ScDocument & | rDoc | ) |
ScTokenArray::ScTokenArray | ( | ScSheetLimits & | rLimits | ) |
Definition at line 1874 of file token.cxx.
References ResetVectorState().
|
default |
Assignment with incrementing references of FormulaToken entries (not copied!)
|
default |
References Clone().
FormulaToken * ScTokenArray::AddColRowName | ( | const ScSingleRefData & | rRef | ) |
ScSingleRefOpToken with ocColRowName.
Definition at line 2319 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 2297 of file token.cxx.
References formula::FormulaTokenArray::Add(), n, and ocDBArea.
Referenced by AddFormulaToken().
FormulaToken * ScTokenArray::AddDoubleReference | ( | const ScComplexRefData & | rRef | ) |
Definition at line 2282 of file token.cxx.
References formula::FormulaTokenArray::Add(), and mxSheetLimits.
Referenced by AddFormulaToken(), LotusRangeList::Append(), ScViewFunc::GetAutoSumFormula(), TokenPool::GetElement(), ScCompiler::HandleColRowName(), ScCompiler::HandleDbData(), ScCompiler::HandleTableRef(), ScHTMLImport::InsertRangeName(), lcl_AddRef(), and ScFormulaDlg::SetReference().
FormulaToken * ScTokenArray::AddExternalDoubleReference | ( | sal_uInt16 | nFileId, |
const svl::SharedString & | rTabName, | ||
const ScComplexRefData & | rRef | ||
) |
Definition at line 2313 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 2302 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 | ||
) |
Definition at line 2307 of file token.cxx.
References formula::FormulaTokenArray::Add().
Referenced by AddFormulaToken(), TokenPool::GetElement(), and ScInterpreter::ScCellExternal().
|
overridevirtual |
Reimplemented from formula::FormulaTokenArray.
Definition at line 1137 of file token.cxx.
References AddColRowName(), AddDBRange(), AddDoubleReference(), AddExternalDoubleReference(), AddExternalName(), AddExternalSingleReference(), AddMatrix(), AddRangeName(), AddSingleReference(), aName, ScSequenceToMatrix::CreateMixedMatrix(), formula::ExternalReferenceHelper::getCacheTableName(), svl::SharedStringPool::intern(), ocColRowName, ocDBArea, ocName, ocPush, ocTableRef, ScComplexRefData::Ref1, ScComplexRefData::Ref2, SAL_MAX_UINT16, SAL_WARN_IF, ScSingleRefData::SetAbsTab(), and ScSingleRefData::Tab().
FormulaToken * ScTokenArray::AddMatrix | ( | const ScMatrixRef & | p | ) |
Definition at line 2287 of file token.cxx.
References formula::FormulaTokenArray::Add(), and p.
Referenced by AddFormulaToken(), TokenPool::GetElement(), and MergeArray().
FormulaToken * ScTokenArray::AddMatrixSingleReference | ( | const ScSingleRefData & | rRef | ) |
ScSingleRefOpToken with ocMatRef.
Definition at line 2277 of file token.cxx.
References formula::FormulaTokenArray::Add(), mxSheetLimits, and ocMatRef.
|
overridevirtual |
Reimplemented from formula::FormulaTokenArray.
Definition at line 2265 of file token.cxx.
References AddRawToken(), and t.
Referenced by ScFunctionAccess::callFunction(), ScGroupTokenConverter::convert(), XclExpChSourceLink::ConvertDataSequence(), XclTokenArrayHelper::ConvertStringToList(), XclExpFormulaCompiler::CreateFormula(), ScViewFunc::GetAutoSumFormula(), TokenPool::GetElement(), TokenPool::GetElementRek(), ScCompiler::HandleRange(), ScConsData::OutputToDocument(), and ScTableLink::Refresh().
void ScTokenArray::AddRangeName | ( | sal_uInt16 | n, |
sal_Int16 | nSheet | ||
) |
Definition at line 2292 of file token.cxx.
References formula::FormulaTokenArray::Add(), n, and ocName.
Referenced by AddFormulaToken(), and TokenPool::GetElement().
FormulaToken * ScTokenArray::AddRawToken | ( | const ScRawToken & | r | ) |
Definition at line 2047 of file token.cxx.
References formula::FormulaTokenArray::Add(), ScRawToken::CreateToken(), and mxSheetLimits.
Referenced by AddOpCode(), and ScCompiler::NextNewToken().
FormulaToken * ScTokenArray::AddSingleReference | ( | const ScSingleRefData & | rRef | ) |
ScSingleRefToken with ocPush.
Definition at line 2272 of file token.cxx.
References formula::FormulaTokenArray::Add(), and mxSheetLimits.
Referenced by AddFormulaToken(), LotusRangeList::Append(), TokenPool::GetElement(), ScCompiler::HandleColRowName(), ScCompiler::HandleTableRef(), ScConsData::OutputToDocument(), and ScFormulaDlg::SetReference().
void ScTokenArray::AdjustAbsoluteRefs | ( | const ScDocument & | rOldDoc, |
const ScAddress & | rOldPos, | ||
const ScAddress & | rNewPos, | ||
bool | bCheckCopyArea | ||
) |
Make all absolute references pointing to the copied range if the range is copied too.
bCheckCopyArea | should reference pointing into the copy area be adjusted independently from being absolute, should be true only for copy&paste between documents |
Definition at line 2597 of file token.cxx.
References formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, 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 | ||
) |
Definition at line 4083 of file token.cxx.
References ScRange::Contains(), ScDocument::GetSheetLimits(), ScSingleRefData::IsColRel(), ScSingleRefData::IsRowRel(), ScSingleRefData::IsTabRel(), sc::RefUpdateContext::maRange, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateContext::mbTransposed, sc::RefUpdateContext::mnColDelta, sc::RefUpdateContext::mnRowDelta, sc::RefUpdateContext::mnTabDelta, ScRange::Move(), ScAddress::Move(), sc::RefUpdateContext::mrDoc, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScSingleRefData::SetAddress(), ScComplexRefData::SetRange(), svDoubleRef, svSingleRef, ScSingleRefData::toAbs(), ScComplexRefData::toAbs(), and ScAddress::UNINITIALIZED.
Referenced by AdjustReferenceInName().
sc::RefUpdateResult ScTokenArray::AdjustReferenceInName | ( | const sc::RefUpdateContext & | rCxt, |
const ScAddress & | rPos | ||
) |
Adjust all references in named expression.
In named expression, we only update absolute positions, and leave relative positions intact.
rCxt | context that stores details of shifted region |
Definition at line 3811 of file token.cxx.
References AdjustReferenceInMovedName(), ScRange::aEnd, ScRange::aStart, ScAddress::Col(), ScRange::Contains(), ScDocument::GetSheetLimits(), ScAddress::IncCol(), ScSingleRefData::IncCol(), ScAddress::IncRow(), ScSingleRefData::IncRow(), ScRange::Intersects(), ScSingleRefData::IsColRel(), ScRange::IsEndColSticky(), ScRange::IsEndRowSticky(), ScComplexRefData::IsEntireCol(), ScComplexRefData::IsEntireRow(), ScDocument::IsExpandRefs(), ScSingleRefData::IsRowRel(), sc::RefUpdateContext::maRange, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateContext::meMode, sc::RefUpdateContext::mnColDelta, sc::RefUpdateContext::mnRowDelta, sc::RefUpdateContext::mrDoc, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScAddress::Row(), ScSingleRefData::SetAbsCol(), ScSingleRefData::SetAbsRow(), ScAddress::SetCol(), ScSingleRefData::SetColDeleted(), ScAddress::SetRow(), ScSingleRefData::SetRowDeleted(), svDoubleRef, svSingleRef, ScAddress::Tab(), ScSingleRefData::toAbs(), ScComplexRefData::toAbs(), URM_COPY, and URM_MOVE.
void ScTokenArray::AdjustReferenceOnCopy | ( | const ScAddress & | rNewPos | ) |
Adjust internal range references on base position change to justify / put in order the relative references.
Definition at line 4581 of file token.cxx.
References formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::PutInOrder(), and svDoubleRef.
Referenced by ScFormulaCell::ScFormulaCell().
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnDeletedTab | ( | const sc::RefUpdateDeleteTabContext & | rCxt, |
const ScAddress & | rOldPos | ||
) |
Adjust all references on sheet deletion.
nDelPos | position of sheet being deleted. |
nSheets | number of sheets to delete. |
rOldPos | position of formula cell prior to the deletion. |
Definition at line 4255 of file token.cxx.
References sc::RefUpdateDeleteTabContext::maUpdatedNames, sc::RefUpdateResult::mbNameModified, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateDeleteTabContext::mnDeletePos, sc::RefUpdateDeleteTabContext::mnSheets, sc::RefUpdateDeleteTabContext::mrDoc, mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, ocDBArea, ocName, ocTableRef, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, SCTAB_MAX, svDoubleRef, svIndex, svSingleRef, and ScRangeUpdater::UpdateDeleteTab().
Referenced by ScFormulaCell::UpdateDeleteTab().
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnInsertedTab | ( | const sc::RefUpdateInsertTabContext & | rCxt, |
const ScAddress & | rOldPos | ||
) |
Definition at line 4327 of file token.cxx.
References ScAddress::IncTab(), sc::RefUpdateInsertTabContext::maUpdatedNames, sc::RefUpdateResult::mbNameModified, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateInsertTabContext::mnInsertPos, sc::RefUpdateInsertTabContext::mnSheets, sc::RefUpdateInsertTabContext::mrDoc, mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, ocDBArea, ocName, ocTableRef, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, svIndex, svSingleRef, and ScAddress::Tab().
Referenced by ScFormulaCell::UpdateInsertTab().
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove | ( | const sc::RefUpdateContext & | rCxt, |
const ScAddress & | rOldPos, | ||
const ScAddress & | rNewPos | ||
) |
Definition at line 3361 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, ScRange::Contains(), ScSingleRefData::IsFlag3D(), ScSingleRefData::IsTabRel(), sc::RefUpdateContext::maRange, sc::RefUpdateContext::maUpdatedNames, sc::RefUpdateResult::mbNameModified, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateContext::mbTransposed, sc::RefUpdateResult::mbValueChanged, sc::RefUpdateContext::mnColDelta, sc::RefUpdateContext::mnRowDelta, sc::RefUpdateContext::mnTabDelta, ScRange::Move(), ScAddress::Move(), sc::RefUpdateContext::mrDoc, mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, ocDBArea, ocName, ocTableRef, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScSingleRefData::SetAddress(), ScSingleRefData::SetFlag3D(), ScComplexRefData::SetRange(), svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svIndex, svSingleRef, ScAddress::Tab(), ScSingleRefData::toAbs(), ScComplexRefData::toAbs(), and ScAddress::UNINITIALIZED.
Referenced by ScFormulaCell::UpdateReferenceOnMove().
void ScTokenArray::AdjustReferenceOnMovedOrigin | ( | const ScAddress & | rOldPos, |
const ScAddress & | rNewPos | ||
) |
Adjust all internal references on base position change.
Definition at line 4494 of file token.cxx.
References mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScSingleRefData::SetAddress(), ScComplexRefData::SetRange(), svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svSingleRef, ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().
void ScTokenArray::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.
Definition at line 4532 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScSingleRefData::SetAddress(), ScComplexRefData::SetRange(), svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svSingleRef, ScAddress::Tab(), ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMovedTab | ( | const sc::RefUpdateMoveTabContext & | rCxt, |
const ScAddress & | rOldPos | ||
) |
Definition at line 4413 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, sc::RefUpdateMoveTabContext::getNewTab(), sc::RefUpdateMoveTabContext::maUpdatedNames, sc::RefUpdateResult::mbNameModified, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateMoveTabContext::mnNewPos, sc::RefUpdateMoveTabContext::mnOldPos, sc::RefUpdateMoveTabContext::mrDoc, mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, ocDBArea, ocName, ocTableRef, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScSingleRefData::SetAddress(), ScComplexRefData::SetRange(), svDoubleRef, svIndex, svSingleRef, ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().
Referenced by ScFormulaCell::UpdateMoveTab().
sc::RefUpdateResult ScTokenArray::AdjustReferenceOnShift | ( | const sc::RefUpdateContext & | rCxt, |
const ScAddress & | rOldPos | ||
) |
Adjust all references in response to shifting of cells during cell insertion and deletion.
rCxt | context that stores details of shifted region. |
rOldPos | old cell position prior to shifting. |
Definition at line 3130 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, ScRange::Contains(), ScDocument::GetSheetLimits(), ScRange::Intersects(), ScSingleRefData::IsDeleted(), ScComplexRefData::IsDeleted(), sc::RefUpdateContext::isDeleted(), ScComplexRefData::IsEntireCol(), ScComplexRefData::IsEntireRow(), sc::RefUpdateContext::isInserted(), sc::RefUpdateContext::maRange, sc::RefUpdateContext::maUpdatedNames, sc::RefUpdateResult::mbNameModified, sc::RefUpdateResult::mbReferenceModified, sc::RefUpdateResult::mbValueChanged, sc::RefUpdateContext::mnColDelta, sc::RefUpdateContext::mnRowDelta, sc::RefUpdateContext::mnTabDelta, ScAddress::Move(), ScRange::MoveSticky(), sc::RefUpdateContext::mrDoc, mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, ocDBArea, ocName, ocTableRef, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScSingleRefData::SetAddress(), ScComplexRefData::SetRange(), svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svIndex, svSingleRef, ScAddress::Tab(), ScSingleRefData::toAbs(), ScComplexRefData::toAbs(), and ScAddress::UNINITIALIZED.
Referenced by ScFormulaCell::UpdateReferenceOnShift().
When copying a sheet-local named expression, move sheet references that point to the originating sheet to point to the new sheet instead.
Definition at line 2645 of file token.cxx.
References ScSingleRefData::IsTabRel(), formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScSingleRefData::SetAbsTab(), svDoubleRef, svSingleRef, and ScSingleRefData::Tab().
void ScTokenArray::AssignXMLString | ( | const OUString & | rText, |
const OUString & | rFormulaNmsp | ||
) |
Assign XML string placeholder to the array.
Definition at line 2324 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 |
Definition at line 4834 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, i, ScAddress::IncRow(), ScSingleRefData::IsRowRel(), sc::RefUpdateContext::maRange, mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScAddress::Row(), svDoubleRef, and ScComplexRefData::toAbs().
|
private |
Definition at line 1281 of file token.cxx.
References formula::FormulaToken::GetOpCode(), formula::FormulaToken::GetType(), mbThreadingEnabled, ocCell, ocDBAverage, ocDBCount, ocDBCount2, ocDBGet, ocDBMax, ocDBMin, ocDBProduct, ocDBStdDev, ocDBStdDevP, ocDBSum, ocDBVar, ocDBVarP, ocDde, ocExternal, ocGetPivotData, ocIndirect, ocInfo, ocMacro, ocMatch, ocOffset, ocPush, ocSheet, ocStyle, ocTableOp, ocText, ocWebservice, SAL_INFO, StackVarEnumToString(), svExternalDoubleRef, svExternalName, svExternalSingleRef, and svMatrix.
Referenced by CheckToken().
void ScTokenArray::CheckRelativeReferenceBounds | ( | const sc::RefUpdateContext & | rCxt, |
const ScAddress & | rPos, | ||
SCROW | nGroupLen, | ||
std::vector< SCROW > & | rBounds | ||
) | const |
Definition at line 4763 of file token.cxx.
References formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, and svSingleRef.
void ScTokenArray::CheckRelativeReferenceBounds | ( | const ScAddress & | rPos, |
SCROW | nGroupLen, | ||
const ScRange & | rRange, | ||
std::vector< SCROW > & | rBounds | ||
) | const |
Definition at line 4798 of file token.cxx.
References mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, and svSingleRef.
|
overridevirtual |
Reimplemented from formula::FormulaTokenArray.
Definition at line 1355 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, ocWhitespace, 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.
|
overridevirtual |
Reimplemented from formula::FormulaTokenArray.
Definition at line 1924 of file token.cxx.
References mnHashValue, and ResetVectorState().
Referenced by ScFormulaCell::Compile(), ScFormulaCell::CompileXML(), XclTokenArrayHelper::ConvertStringToList(), and operator=().
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.
rPos | position of formula cell |
nStartTab | index of first sheet, inclusive. |
nEndTab | index of last sheet, inclusive. |
Definition at line 4623 of file token.cxx.
References formula::FormulaToken::GetDoubleRef(), formula::FormulaToken::GetSingleRef(), mxSheetLimits, formula::FormulaTokenArray::nLen, p, formula::FormulaTokenArray::pCode, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, and svSingleRef.
std::unique_ptr< ScTokenArray > ScTokenArray::Clone | ( | ) | const |
Definition at line 1931 of file token.cxx.
References formula::FormulaTokenArray::bHyperLink, formula::FormulaToken::Clone(), i, formula::FormulaToken::IncRef(), formula::FormulaTokenArray::mbFromRangeName, mbOpenCLEnabled, formula::FormulaTokenArray::mbShareable, mbThreadingEnabled, meVectorState, mnHashValue, mxSheetLimits, formula::FormulaTokenArray::nError, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nMode, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScTokenArray(), and t.
Referenced by ImportExcel::Formula(), ScCompiler::HandleExternalReference(), ScCompiler::HandleRange(), XclExpFmlaCompImpl::Init(), ScFormulaCell::ScFormulaCell(), ScExternalRefManager::storeRangeNameTokens(), ScFormulaCell::UpdateReferenceOnCopy(), ScFormulaCell::UpdateReferenceOnMove(), ScFormulaCell::UpdateReferenceOnShift(), and ScFormulaCell::UpdateTranspose().
ScTokenArray ScTokenArray::CloneValue | ( | ) | const |
True copy!
Definition at line 1989 of file token.cxx.
References formula::FormulaTokenArray::bHyperLink, formula::FormulaToken::Clone(), i, formula::FormulaToken::IncRef(), formula::FormulaTokenArray::mbFromRangeName, mbOpenCLEnabled, formula::FormulaTokenArray::mbShareable, mbThreadingEnabled, meVectorState, mnHashValue, mxSheetLimits, formula::FormulaTokenArray::nError, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nMode, formula::FormulaTokenArray::nRPN, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, and t.
Referenced by ScFormulaCellGroup::setCode(), and SharedFormulaBuffer::Store().
OUString ScTokenArray::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.
Definition at line 5238 of file token.cxx.
References aBuf, formula::FormulaToken::GetChar(), formula::FormulaToken::GetOpCode(), formula::FormulaTokenArray::IsFromRangeName(), sc::TokenStringContext::mxOpCodeMap, mxSheetLimits, formula::FormulaTokenArray::nLen, ocSpaces, ocWhitespace, p, and formula::FormulaTokenArray::pCode.
Referenced by ScCellShell::ExecuteFillSingleEdit(), and sc::FormulaLogger::GroupScope::Impl::Impl().
bool ScTokenArray::EqualTokens | ( | const ScTokenArray * | pArr2 | ) | const |
Definition at line 1907 of file token.cxx.
References formula::FormulaTokenArray::GetArray(), i, and formula::FormulaTokenArray::nLen.
void ScTokenArray::GenHash | ( | ) |
True copy!
Definition at line 1730 of file token.cxx.
References aStr, eType, i, mnHashValue, n, formula::FormulaTokenArray::nLen, ocPush, p, formula::FormulaTokenArray::pCode, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svByte, svDouble, svDoubleRef, svSingleRef, and svString.
Referenced by ScFormulaCell::ScFormulaCell(), and SharedFormulaBuffer::Store().
bool ScTokenArray::GetAdjacentExtendOfOuterFuncRefs | ( | SCCOLROW & | nExtend, |
const ScAddress & | rPos, | ||
ScDirection | eDir | ||
) |
Determines the extent of direct adjacent references.
Only use with real functions, e.g. GetOuterFuncOpCode() == ocSum !
Definition at line 2337 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), DIR_BOTTOM, DIR_LEFT, DIR_RIGHT, DIR_TOP, mxSheetLimits, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pRPN, ScAddress::Row(), svByte, svDoubleRef, svSingleRef, t, ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().
Referenced by lcl_IsAutoSumData().
|
inline |
Definition at line 79 of file tokenarray.hxx.
Referenced by ScFormulaCell::GetHash().
|
inline |
Definition at line 81 of file tokenarray.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL(), and ScFormulaCell::InterpretInvariantFormulaGroup().
sal_Int32 ScTokenArray::GetWeight | ( | ) | const |
Definition at line 5359 of file token.cxx.
References i, formula::FormulaTokenArray::nRPN, formula::FormulaTokenArray::pRPN, SAL_MAX_INT32, and svDoubleRef.
Referenced by ScFormulaCell::GetWeight().
|
private |
Definition at line 1685 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, formula::FormulaToken::GetType(), mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::pCode, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, svSingleRef, and ScSingleRefData::toAbs().
Referenced by IsReference(), and IsValidReference().
|
inline |
Definition at line 268 of file tokenarray.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupOpenCL().
|
inline |
Definition at line 269 of file tokenarray.hxx.
Referenced by ScFormulaCell::InterpretFormulaGroupThreading(), and lcl_probeLeftOrRightFGs().
bool ScTokenArray::IsFormulaVectorDisabled | ( | ) | const |
Definition at line 1807 of file token.cxx.
References FormulaVectorDisabled, FormulaVectorDisabledByOpCode, FormulaVectorDisabledByStackVariable, FormulaVectorDisabledNotInSubSet, and meVectorState.
Referenced by CheckToken().
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 1823 of file token.cxx.
References ScSingleRefData::IsRowRel(), formula::FormulaTokenArray::nLen, p, formula::FormulaTokenArray::pCode, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svIndex, and svSingleRef.
Exactly and only one range (valid or deleted)
Definition at line 1857 of file token.cxx.
References ImplGetReference().
Exactly and only one valid range (no #REF!s)
Definition at line 1862 of file token.cxx.
References ImplGetReference().
Referenced by ScValidationData::GetSelectionFromFormula().
|
overridevirtual |
Reimplemented from formula::FormulaTokenArray.
Definition at line 2062 of file token.cxx.
References AddMatrix(), checkArraySep(), i, formula::FormulaTokenArray::nLen, ocAdd, ocArrayClose, ocArrayColSep, ocArrayOpen, ocArrayRowSep, ocFalse, ocMissing, ocNegSub, ocPush, ocSep, ocSpaces, ocTrue, ocWhitespace, formula::FormulaTokenArray::pCode, ScMatrix::PutBoolean(), ScMatrix::PutDouble(), ScMatrix::PutEmpty(), ScMatrix::PutString(), svDouble, svString, and t.
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 2237 of file token.cxx.
References formula::FormulaToken::DecRef(), extendRangeReference(), formula::FormulaToken::GetOpCode(), mxSheetLimits, formula::FormulaTokenArray::nLen, ocRange, p, 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.
rPos | position of this formula cell |
nTab | sheet where columns are reordered. |
nRow1 | top row of reordered range. |
nRow2 | bottom row of reordered range. |
rColMap | old-to-new column mapping. |
Definition at line 3524 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), sc::ColRowReorderMapType::end(), sc::ColRowReorderMapType::find(), mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, 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 | ||
) |
Definition at line 3594 of file token.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), sc::ColRowReorderMapType::end(), sc::ColRowReorderMapType::find(), mxSheetLimits, formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScAddress::Row(), ScSingleRefData::SetAddress(), ScComplexRefData::SetRange(), ScAddress::SetRow(), svDoubleRef, svSingleRef, ScAddress::Tab(), ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().
Referenced by ScFormulaCell::Notify().
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.
ScTokenArray & ScTokenArray::operator= | ( | ScTokenArray && | rArr | ) |
Definition at line 1896 of file token.cxx.
References mbOpenCLEnabled, mbThreadingEnabled, meVectorState, mnHashValue, formula::FormulaTokenArray::Move(), and mxSheetLimits.
void ScTokenArray::ReadjustAbsolute3DReferences | ( | const ScDocument & | rOldDoc, |
ScDocument & | rNewDoc, | ||
const ScAddress & | rPos, | ||
bool | bRangeName = false |
||
) |
Make all absolute references external references pointing to the old document.
rOldDoc | old document |
rNewDoc | new document |
rPos | position of the cell to determine if the reference is in the copied area |
bRangeName | set for range names, range names have special handling for absolute sheet ref + relative col/row ref |
Definition at line 2545 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().
Returns true if the sheet nTab is referenced in code.
Relative sheet references are evaluated using nPosTab.
Definition at line 2693 of file token.cxx.
References ScSingleRefData::IsTabRel(), formula::FormulaTokenArray::nLen, formula::FormulaTokenArray::nRPN, p, formula::FormulaTokenArray::pCode, formula::FormulaTokenArray::pRPN, ScComplexRefData::Ref1, ScComplexRefData::Ref2, svDoubleRef, svSingleRef, and ScSingleRefData::Tab().
Referenced by ScDocument::FindRangeNamesReferencingSheet().
void ScTokenArray::ResetVectorState | ( | ) |
Definition at line 1800 of file token.cxx.
References FormulaVectorDisabled, FormulaVectorEnabled, ScCalcConfig::isOpenCLEnabled(), ScCalcConfig::isThreadingEnabled(), mbOpenCLEnabled, mbThreadingEnabled, and meVectorState.
Referenced by Clear(), and ScTokenArray().
Definition at line 5316 of file token.cxx.
References formula::FormulaToken::GetDoubleRef(), formula::FormulaToken::GetSingleRef(), ScComplexRefData::IsEntireCol(), ScComplexRefData::IsEntireRow(), mxSheetLimits, formula::FormulaTokenArray::nLen, p, formula::FormulaTokenArray::pCode, ScRange::PutInOrder(), ScSingleRefData::SetAddress(), ScComplexRefData::SetRange(), svDoubleRef, svSingleRef, ScSingleRefData::toAbs(), and ScComplexRefData::toAbs().
Referenced by ImportExcel::Formula(), and ImportExcel::Shrfmla().
|
friend |
Definition at line 50 of file tokenarray.hxx.
|
private |
Definition at line 58 of file tokenarray.hxx.
Referenced by CheckToken(), Clone(), CloneValue(), operator=(), and ResetVectorState().
|
private |
Definition at line 59 of file tokenarray.hxx.
Referenced by CheckForThreading(), CheckToken(), Clone(), CloneValue(), operator=(), and ResetVectorState().
|
private |
Definition at line 57 of file tokenarray.hxx.
Referenced by CheckToken(), Clone(), CloneValue(), IsFormulaVectorDisabled(), operator=(), and ResetVectorState().
|
private |
Definition at line 56 of file tokenarray.hxx.
Referenced by Clear(), Clone(), CloneValue(), GenHash(), and operator=().
|
private |
Definition at line 55 of file tokenarray.hxx.
Referenced by AddColRowName(), AddDoubleReference(), AddMatrixSingleReference(), AddRawToken(), AddSingleReference(), AdjustReferenceOnDeletedTab(), AdjustReferenceOnInsertedTab(), AdjustReferenceOnMove(), AdjustReferenceOnMovedOrigin(), AdjustReferenceOnMovedOriginIfOtherSheet(), AdjustReferenceOnMovedTab(), AdjustReferenceOnShift(), CheckExpandReferenceBounds(), CheckRelativeReferenceBounds(), ClearTabDeleted(), Clone(), CloneValue(), CreateString(), GetAdjacentExtendOfOuterFuncRefs(), ImplGetReference(), MergeRangeReference(), MoveReferenceColReorder(), MoveReferenceRowReorder(), operator=(), and WrapReference().