[Libreoffice-commits] core.git: sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 10 08:26:50 UTC 2020


 sc/source/filter/oox/workbookfragment.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit edf13fe1247e7ef411a9ff5435385573fad01f56
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Mar 3 09:23:30 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 10 09:26:19 2020 +0100

    tdf#93831 xlsx file full of pictures of numbers slow to open
    
    Change-Id: I6c984c84c409519a986eacb265c943307a7b57af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90245
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index 1971b0abf000..7bcada3bdf08 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -50,6 +50,7 @@
 #include <biffhelper.hxx>
 
 #include <document.hxx>
+#include <drwlayer.hxx>
 #include <docsh.hxx>
 #include <calcconfig.hxx>
 #include <globstr.hrc>
@@ -343,6 +344,12 @@ void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVect
 
 void WorkbookFragment::finalizeImport()
 {
+    // lock the model to prevent broadcasting, speeds up load a lot
+    getScDocument().InitDrawLayer();
+    auto pModel = getScDocument().GetDrawLayer();
+    bool bWasLocked = pModel->isLocked();
+    pModel->setLock(true);
+
     ISegmentProgressBarRef xGlobalSegment = getProgressBar().createSegment( PROGRESS_LENGTH_GLOBALS );
 
     // read the theme substream
@@ -504,6 +511,8 @@ void WorkbookFragment::finalizeImport()
 
     // attach macros to registered objects now that all objects have been created.
     getBaseFilter().getVbaProject().attachMacros();
+
+    pModel->setLock(bWasLocked);
 }
 
 namespace {


More information about the Libreoffice-commits mailing list