diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-12-19 15:44:32 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-12-19 18:33:35 +0200 |
commit | 9adb00cf4df13e6f251c0ff5f71bce5ca2c7525d (patch) | |
tree | 94140c213f84fcfd6e4162c84c01dfd744521b20 /formula | |
parent | e155e05ab70f1744d296dbee8c61564a5b7d346c (diff) |
The value of the nRefs field is not used anywhere
Change-Id: I9116611d04846af7f00cb366e9174fd99e741d5c
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 11 | ||||
-rw-r--r-- | formula/source/core/api/token.cxx | 8 |
2 files changed, 1 insertions, 18 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(); |