diff options
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 11 | ||||
-rw-r--r-- | formula/source/core/api/token.cxx | 8 | ||||
-rw-r--r-- | include/formula/tokenarray.hxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 2 |
5 files changed, 2 insertions, 25 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 9b7da1a98338..cda306e51460 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1108,14 +1108,6 @@ bool FormulaCompiler::GetToken() { return HandleDbData(); } - else if( mpToken->GetType() == svSingleRef ) - { - pArr->nRefs++; - } - else if( mpToken->GetType() == svDoubleRef ) - { - pArr->nRefs++; - } return true; } @@ -1636,7 +1628,6 @@ bool FormulaCompiler::MergeRangeReference( FormulaToken * * const pCode1, Formul p2->DecRef(); *pCode1 = p.get(); --pCode, --pc; - pArr->nRefs--; return true; } @@ -1652,7 +1643,6 @@ bool FormulaCompiler::CompileTokenArray() aCorrectedFormula.clear(); aCorrectedSymbol.clear(); } - pArr->nRefs = 0; // count from start pArr->DelRPN(); pStack = NULL; FormulaToken* pData[ FORMULA_MAXTOKENS ]; @@ -1708,7 +1698,6 @@ void FormulaCompiler::PopTokenArray() { FormulaArrayStack* p = pStack; pStack = p->pNext; - p->pArr->nRefs = sal::static_int_cast<short>( p->pArr->nRefs + pArr->nRefs ); // obtain special RecalcMode from SharedFormula if ( pArr->IsRecalcModeAlways() ) p->pArr->SetExclusiveRecalcModeAlways(); diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index fe7b11372c2c..1824c7a3476f 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -695,7 +695,6 @@ FormulaTokenArray::FormulaTokenArray() : nRPN(0), nIndex(0), nError(0), - nRefs(0), nMode(RECALCMODE_NORMAL), bHyperLink(false) { @@ -717,7 +716,6 @@ void FormulaTokenArray::Assign( const FormulaTokenArray& r ) nRPN = r.nRPN; nIndex = r.nIndex; nError = r.nError; - nRefs = r.nRefs; nMode = r.nMode; bHyperLink = r.bHyperLink; pCode = NULL; @@ -769,7 +767,6 @@ FormulaTokenArray* FormulaTokenArray::Clone() const FormulaTokenArray* p = new FormulaTokenArray; p->nLen = nLen; p->nRPN = nRPN; - p->nRefs = nRefs; p->nMode = nMode; p->nError = nError; p->bHyperLink = bHyperLink; @@ -828,7 +825,7 @@ void FormulaTokenArray::Clear() delete [] pCode; } pCode = NULL; pRPN = NULL; - nError = nLen = nIndex = nRPN = nRefs = 0; + nError = nLen = nIndex = nRPN = 0; bHyperLink = false; ClearRecalcMode(); } @@ -856,9 +853,6 @@ FormulaToken* FormulaTokenArray::Add( FormulaToken* t ) { CheckToken(*t); pCode[ nLen++ ] = t; - if( t->GetOpCode() == ocPush - && ( t->GetType() == svSingleRef || t->GetType() == svDoubleRef ) ) - nRefs++; t->IncRef(); if( t->GetOpCode() == ocArrayClose ) return MergeArray(); diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx index ceb84253f246..043e349bf0cd 100644 --- a/include/formula/tokenarray.hxx +++ b/include/formula/tokenarray.hxx @@ -103,7 +103,6 @@ protected: sal_uInt16 nRPN; // Length of RPN array sal_uInt16 nIndex; // Current step index sal_uInt16 nError; // Error code - short nRefs; // Count of cell references ScRecalcMode nMode; // Flags to indicate when to recalc this code bool bHyperLink; // If HYPERLINK() occurs in the formula. @@ -176,8 +175,6 @@ public: void Reset() { nIndex = 0; } sal_uInt16 GetCodeError() const { return nError; } void SetCodeError( sal_uInt16 n ) { nError = n; } - short GetRefs() const { return nRefs; } - void IncrementRefs() { ++nRefs; } void SetHyperLink( bool bVal ) { bHyperLink = bVal; } bool IsHyperLink() const { return bHyperLink; } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index fbf8fb99937c..0c273b3fe5f3 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4000,8 +4000,7 @@ bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken) { case svExternalSingleRef: case svExternalDoubleRef: - pArr->IncrementRefs(); - break; + break; case svExternalName: { ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index f0ba930da443..e52d5817bef2 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1574,7 +1574,6 @@ ScTokenArray* ScTokenArray::Clone() const ScTokenArray* p = new ScTokenArray(); p->nLen = nLen; p->nRPN = nRPN; - p->nRefs = nRefs; p->nMode = nMode; p->nError = nError; p->bHyperLink = bHyperLink; @@ -1832,7 +1831,6 @@ FormulaToken* ScTokenArray::MergeRangeReference( const ScAddress & rPos ) p3->DecRef(); nLen -= 2; pCode[ nLen-1 ] = p.get(); - nRefs--; } } return pCode[ nLen-1 ]; |