summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-10-20 00:58:06 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-10-25 11:11:50 +0000
commit15054d82cc94a392ff708d499e395ab184818c24 (patch)
treed641cd2e20f48bd5967b4b58d7a1c55b66c94408
parent022f5998094a16cc33f5ac1b2acb031f852ca140 (diff)
Resolves: tdf#85553 intern SharedString of cached external references result
(cherry picked from commit 0d2797fdb06f504e7213b3859a53c363f4f56bc9) Conflicts: sc/source/filter/excel/xilink.cxx Change-Id: I13f19b5bd5f2897eb48af69742be885803cca066 Reviewed-on: https://gerrit.libreoffice.org/30069 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/filter/excel/xilink.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 467cc99a5208..f779a5f593d3 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -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(rStr));
+ 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();
}
}