diff options
author | Eike Rathke <erack@redhat.com> | 2015-06-15 17:50:10 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-06-15 17:52:17 +0200 |
commit | d53ad9250d77f89a2a7d260a98090a8504c12108 (patch) | |
tree | 46e842ea633318f93ade9f37b5c98acf94958429 | |
parent | 1d463600f4db2993838c7660da2cb87aa19218fd (diff) |
use ReplaceToken() in ReadjustAbsolute3DReferences()
Actually the RPN token needs to be replaced as well if it was
referenced.
Change-Id: Ie548568dceadaf315ae5596c480916730bed2dca
-rw-r--r-- | sc/source/core/tool/token.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 4479488eac64..71bc28c544a5 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2360,10 +2360,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons OUString aTabName; sal_uInt16 nFileId; GetExternalTableData(pOldDoc, pNewDoc, rRef1.Tab(), aTabName, nFileId); - ScExternalDoubleRefToken* pToken = new ScExternalDoubleRefToken(nFileId, aTabName, rRef); - pToken->IncRef(); - pCode[j]->DecRef(); // ATTENTION: rRef can't be used after this point - pCode[j] = pToken; + ReplaceToken( j, new ScExternalDoubleRefToken(nFileId, aTabName, rRef), FORWARD_CODE_AND_RPN); + // ATTENTION: rRef can't be used after this point } } break; @@ -2379,11 +2377,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons OUString aTabName; sal_uInt16 nFileId; GetExternalTableData(pOldDoc, pNewDoc, rRef.Tab(), aTabName, nFileId); - //replace with ScExternalSingleRefToken and adjust references - ScExternalSingleRefToken* pToken = new ScExternalSingleRefToken(nFileId, aTabName, rRef); - pToken->IncRef(); - pCode[j]->DecRef(); // ATTENTION: rRef can't be used after this point - pCode[j] = pToken; + ReplaceToken( j, new ScExternalSingleRefToken(nFileId, aTabName, rRef), FORWARD_CODE_AND_RPN); + // ATTENTION: rRef can't be used after this point } } break; |