[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/inc sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed Feb 26 22:47:44 PST 2014


 sc/inc/document.hxx              |    4 +++-
 sc/source/core/data/document.cxx |    3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 4274001144adeb0b0a1e7da05d52c1bedbe899e5
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Feb 24 13:10:17 2014 -0500

    fdo#75259: Let undo document share its string pool with the source doc.
    
    We already do that for the pool helper.  It would only make sense to do
    it for shared strings as well.
    
    Change-Id: I813d262799af6f0c1d3fa12246ad973f852ac199
    (cherry picked from commit e752620bf593af8839831f693ec21bb02a8b23d6)
    Reviewed-on: https://gerrit.libreoffice.org/8210
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index f26c3c7..ed2626a 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -46,6 +46,8 @@
 #include <vector>
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
+
 #include "markdata.hxx"
 
 namespace editeng { class SvxBorderLine; }
@@ -257,7 +259,7 @@ private:
 
     rtl::Reference<ScPoolHelper> xPoolHelper;
 
-    boost::scoped_ptr<svl::SharedStringPool> mpCellStringPool;
+    boost::shared_ptr<svl::SharedStringPool> mpCellStringPool;
     boost::scoped_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt;
     mutable boost::scoped_ptr<sc::DocumentLinkManager> mpDocLinkMgr;
 
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index ec2c21a..ab39965 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1852,7 +1852,10 @@ 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;
+
         if (pSrcDoc->pShell->GetMedium())
             maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
 


More information about the Libreoffice-commits mailing list