summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-06-14 19:14:30 +0200
committerEike Rathke <erack@redhat.com>2016-06-14 19:16:20 +0200
commitbe053a75aa851acd85d08b97f2eb636354a92e63 (patch)
treef345a2e937b4c42cf4ce656f942ce3b0a6727df3 /sc
parent25a60d19d56a4bdb4f1b6ef27d842f90617fcff8 (diff)
intern SharedString
Change-Id: Ic8e6d3595002094792462b585d427f58c5c84156
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/tokenarray.hxx2
-rw-r--r--sc/source/core/tool/token.cxx10
2 files changed, 6 insertions, 6 deletions
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; j<nLen; ++j )
{
@@ -2403,8 +2403,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
OUString aTabName;
sal_uInt16 nFileId;
GetExternalTableData(pOldDoc, pNewDoc, rRef1.Tab(), aTabName, nFileId);
- ReplaceToken( j, new ScExternalDoubleRefToken(nFileId, svl::SharedString( aTabName), rRef),
- CODE_AND_RPN); // string not interned (pNewDoc would have to be non-const)
+ ReplaceToken( j, new ScExternalDoubleRefToken( nFileId,
+ pNewDoc->GetSharedStringPool().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
}
}