diff options
author | Eike Rathke <erack@redhat.com> | 2016-04-23 14:33:50 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-04-23 15:52:35 +0200 |
commit | f41257dc9913cd6020a3a37bf425c20b51e18ece (patch) | |
tree | 57386538d6c6cc828d611ada4efb123c66ee52fd /sc/source | |
parent | 9185f889ed9da48aad07d6a552224561f38e9b99 (diff) |
simplify the ReplaceToken() offset logic to absolute offsets
Change-Id: I8d02fb63bc0c5cb48aabaf7a8800f5f9ac95cbf5
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index e16446a8606a..f6472867b291 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4325,8 +4325,8 @@ ScTokenArray* ScCompiler::CompileString( const OUString& rFormula ) FormulaToken* pTableRefToken = new ScTableRefToken( pPrev->GetIndex(), ScTableRefToken::TABLE); maTableRefs.push_back( TableRefEntry( pTableRefToken)); // pPrev may be dead hereafter. - static_cast<ScTokenArray*>(pArr)->ReplaceToken( 1, pTableRefToken, - FormulaTokenArray::ReplaceMode::BACKWARD_CODE_ONLY); + static_cast<ScTokenArray*>(pArr)->ReplaceToken( nIdx, pTableRefToken, + FormulaTokenArray::ReplaceMode::CODE_ONLY); } } switch (eOp) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 154868ed24be..00203e05cdf8 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2397,7 +2397,7 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons OUString aTabName; sal_uInt16 nFileId; GetExternalTableData(pOldDoc, pNewDoc, rRef1.Tab(), aTabName, nFileId); - ReplaceToken( j, new ScExternalDoubleRefToken(nFileId, aTabName, rRef), FORWARD_CODE_AND_RPN); + ReplaceToken( j, new ScExternalDoubleRefToken(nFileId, aTabName, rRef), CODE_AND_RPN); // ATTENTION: rRef can't be used after this point } } @@ -2414,7 +2414,7 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons OUString aTabName; sal_uInt16 nFileId; GetExternalTableData(pOldDoc, pNewDoc, rRef.Tab(), aTabName, nFileId); - ReplaceToken( j, new ScExternalSingleRefToken(nFileId, aTabName, rRef), FORWARD_CODE_AND_RPN); + ReplaceToken( j, new ScExternalSingleRefToken(nFileId, aTabName, rRef), CODE_AND_RPN); // ATTENTION: rRef can't be used after this point } } |