Kaydet (Commit) be053a75 authored tarafından Eike Rathke's avatar Eike Rathke

intern SharedString

Change-Id: Ic8e6d3595002094792462b585d427f58c5c84156
üst 25a60d19
...@@ -129,7 +129,7 @@ public: ...@@ -129,7 +129,7 @@ public:
* @param rPos position of the cell to determine if the reference is in the copied area * @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 * @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 * Make all absolute references pointing to the copied range if the range is copied too
......
...@@ -2383,7 +2383,7 @@ void AdjustSingleRefData( ScSingleRefData& rRef, const ScAddress& rOldPos, const ...@@ -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 ) for ( sal_uInt16 j=0; j<nLen; ++j )
{ {
...@@ -2403,8 +2403,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons ...@@ -2403,8 +2403,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
OUString aTabName; OUString aTabName;
sal_uInt16 nFileId; sal_uInt16 nFileId;
GetExternalTableData(pOldDoc, pNewDoc, rRef1.Tab(), aTabName, nFileId); GetExternalTableData(pOldDoc, pNewDoc, rRef1.Tab(), aTabName, nFileId);
ReplaceToken( j, new ScExternalDoubleRefToken(nFileId, svl::SharedString( aTabName), rRef), ReplaceToken( j, new ScExternalDoubleRefToken( nFileId,
CODE_AND_RPN); // string not interned (pNewDoc would have to be non-const) pNewDoc->GetSharedStringPool().intern( aTabName), rRef), CODE_AND_RPN);
// ATTENTION: rRef can't be used after this point // ATTENTION: rRef can't be used after this point
} }
} }
...@@ -2421,8 +2421,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons ...@@ -2421,8 +2421,8 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
OUString aTabName; OUString aTabName;
sal_uInt16 nFileId; sal_uInt16 nFileId;
GetExternalTableData(pOldDoc, pNewDoc, rRef.Tab(), aTabName, nFileId); GetExternalTableData(pOldDoc, pNewDoc, rRef.Tab(), aTabName, nFileId);
ReplaceToken( j, new ScExternalSingleRefToken(nFileId, svl::SharedString( aTabName), rRef), ReplaceToken( j, new ScExternalSingleRefToken( nFileId,
CODE_AND_RPN); // string not interned (pNewDoc would have to be non-const) pNewDoc->GetSharedStringPool().intern( aTabName), rRef), CODE_AND_RPN);
// ATTENTION: rRef can't be used after this point // ATTENTION: rRef can't be used after this point
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment