[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 3 09:38:15 UTC 2020


 sc/source/core/data/documen2.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit b0556da3a0966c9c68c6a57909524058d0bb5e07
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu May 28 16:18:58 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jun 3 11:37:43 2020 +0200

    purge shared string pool if ScDocument is closed (tdf#125428)
    
    Especially with the testcases given in the bugreport the undo history
    would keep many unused shared strings.
    
    Change-Id: I57fcad73532fdcbad0a1298fbd06cb35c058bf96
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95045
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit 861fbd998f2b526c2aea073c9471613bf728fa75)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95323
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index cc45c83c30d4..3cbe6374d676 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -390,6 +390,9 @@ ScDocument::~ScDocument()
     SAL_WARN_IF( pAutoNameCache, "sc.core", "AutoNameCache still set in dtor" );
 
     mpFormulaGroupCxt.reset();
+    // Purge unused items if the string pool will be still used (e.g. by undo history).
+    if(mpCellStringPool.use_count() > 1)
+        mpCellStringPool->purge();
     mpCellStringPool.reset();
 }
 


More information about the Libreoffice-commits mailing list