From be053a75aa851acd85d08b97f2eb636354a92e63 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 14 Jun 2016 19:14:30 +0200 Subject: intern SharedString Change-Id: Ic8e6d3595002094792462b585d427f58c5c84156 --- sc/inc/tokenarray.hxx | 2 +- sc/source/core/tool/token.cxx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sc') diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 061d044f093a..892cb88d66ba 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -129,7 +129,7 @@ public: * @param rPos position of the cell to determine if the reference is in the copied area * @param bRangeName set for range names, range names have special handling for absolute sheet ref + relative col/row ref */ - void ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, const ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName = false ); + void ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName = false ); /** * Make all absolute references pointing to the copied range if the range is copied too diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index c7f03f2b6f56..38f2f24f44c9 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2383,7 +2383,7 @@ void AdjustSingleRefData( ScSingleRefData& rRef, const ScAddress& rOldPos, const } -void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, const ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName ) +void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName ) { for ( sal_uInt16 j=0; jGetSharedStringPool().intern( aTabName), rRef), CODE_AND_RPN); // ATTENTION: rRef can't be used after this point } } @@ -2421,8 +2421,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons OUString aTabName; sal_uInt16 nFileId; GetExternalTableData(pOldDoc, pNewDoc, rRef.Tab(), aTabName, nFileId); - ReplaceToken( j, new ScExternalSingleRefToken(nFileId, svl::SharedString( aTabName), rRef), - CODE_AND_RPN); // string not interned (pNewDoc would have to be non-const) + ReplaceToken( j, new ScExternalSingleRefToken( nFileId, + pNewDoc->GetSharedStringPool().intern( aTabName), rRef), CODE_AND_RPN); // ATTENTION: rRef can't be used after this point } } -- cgit