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

Resolves: tdf#85553 intern SharedString of cached external references result

Change-Id: I13f19b5bd5f2897eb48af69742be885803cca066
üst 8c4fdffb
......@@ -71,7 +71,8 @@ public:
/** Reads a CRN record (external referenced cell) at the specified address. */
void ReadCrn( XclImpStream& rStrm, const XclAddress& rXclPos );
void LoadCachedValues(const ScExternalRefCache::TableTypeRef& pCacheTable);
void LoadCachedValues( const ScExternalRefCache::TableTypeRef& pCacheTable,
svl::SharedStringPool& rPool );
private:
typedef std::shared_ptr< XclImpCrn > XclImpCrnRef;
......@@ -574,7 +575,8 @@ void XclImpSupbookTab::ReadCrn( XclImpStream& rStrm, const XclAddress& rXclPos )
maCrnList.push_back( crnRef );
}
void XclImpSupbookTab::LoadCachedValues(const ScExternalRefCache::TableTypeRef& pCacheTable)
void XclImpSupbookTab::LoadCachedValues( const ScExternalRefCache::TableTypeRef& pCacheTable,
svl::SharedStringPool& rPool )
{
if (maCrnList.empty())
return;
......@@ -608,8 +610,8 @@ void XclImpSupbookTab::LoadCachedValues(const ScExternalRefCache::TableTypeRef&
break;
case EXC_CACHEDVAL_STRING:
{
const OUString& rStr = pCrn->GetString();
ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken( svl::SharedString( rStr))); // string not interned
svl::SharedString aSS( rPool.intern( pCrn->GetString()));
ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken( aSS));
pCacheTable->setCell(rAddr.mnCol, rAddr.mnRow, pToken, 0, false);
}
break;
......@@ -753,7 +755,7 @@ void XclImpSupbook::LoadCachedValues()
{
const OUString& rTabName = (*itTab)->GetTabName();
ScExternalRefCache::TableTypeRef pCacheTable = pRefMgr->getCacheTable(nFileId, rTabName, true);
(*itTab)->LoadCachedValues(pCacheTable);
(*itTab)->LoadCachedValues( pCacheTable, GetSharedStringPool());
pCacheTable->setWholeTableCached();
}
}
......
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