diff options
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/documen2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/document10.cxx | 7 |
4 files changed, 12 insertions, 5 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 6fe5f9f128bf..582d086e68ee 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2147,6 +2147,8 @@ private: // CLOOK-Impl-methods SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const; SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const; bool ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve ); + + void SharePooledResources( ScDocument* pSrcDoc ); }; inline void ScDocument::GetSortParam( ScSortParam& rParam, SCTAB nTab ) { diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 3390f8af0675..1ea05ca78768 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -464,7 +464,7 @@ void ScDocument::InitClipPtrs( ScDocument* pSourceDoc ) Clear(); - xPoolHelper = pSourceDoc->xPoolHelper; + SharePooledResources(pSourceDoc); // bedingte Formate / Gueltigkeiten //! Vorlagen kopieren? diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index b5f412b8a26b..4f90b2fdd503 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1831,8 +1831,7 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe { Clear(); - xPoolHelper = pSrcDoc->xPoolHelper; - + SharePooledResources(pSrcDoc); OUString aString; for (SCTAB nTab = 0; nTab <= rTabSelection.GetLastSelected(); nTab++) @@ -1867,8 +1866,7 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, Clear(); // Undo document shares its pooled resources with the source document. - xPoolHelper = pSrcDoc->xPoolHelper; - mpCellStringPool = pSrcDoc->mpCellStringPool; + SharePooledResources(pSrcDoc); if (pSrcDoc->pShell->GetMedium()) maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI); diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index e4a2ff15b046..a04e8f9188e1 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -16,6 +16,7 @@ #include <editutil.hxx> #include <listenercontext.hxx> #include <tokenstringcontext.hxx> +#include <poolhelp.hxx> // Add totally brand-new methods to this source file. @@ -263,4 +264,10 @@ void ScDocument::PostprocessRangeNameUpdate() } } +void ScDocument::SharePooledResources( ScDocument* pSrcDoc ) +{ + xPoolHelper = pSrcDoc->xPoolHelper; + mpCellStringPool = pSrcDoc->mpCellStringPool; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |