sc/inc/document.hxx | 1 + sc/source/core/data/documen2.cxx | 2 +- sc/source/core/data/document.cxx | 6 ++---- sc/source/core/data/document10.cxx | 7 +++++++ 4 files changed, 11 insertions(+), 5 deletions(-)
New commits: commit bb1bea8e01f899e43da4372fc4121e387d60102c Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Mon Apr 14 11:23:23 2014 -0400 fdo#77209: Share string pool with clip documents. We do the same with undo documents, and it will only make sense to do the same with clip documents as well. Also, put the sharing part into a common method (for ease of tracking). (cherry picked from commit 8f403051968298fbabd61de82fbb6a77762c83cc) Conflicts: sc/inc/document.hxx Change-Id: I342b22d95374ee06d16318a66ffea0ac5b42621c Reviewed-on: https://gerrit.libreoffice.org/9005 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index b4e86f3..8c8cbf1 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2123,6 +2123,7 @@ private: // CLOOK-Impl-methods std::map< SCTAB, ScSortParam > mSheetSortParams; + 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 daa4e2a..eb3eab2 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -478,7 +478,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 90128ef..bc66735 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 ba95499..823f992 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. @@ -67,4 +68,10 @@ void ScDocument::PostprocessRangeNameUpdate() } } +void ScDocument::SharePooledResources( ScDocument* pSrcDoc ) +{ + xPoolHelper = pSrcDoc->xPoolHelper; + mpCellStringPool = pSrcDoc->mpCellStringPool; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits