summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-03 09:23:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-10 12:05:18 +0100
commit6935465f9b56d99557ba627d845b9d1a2f2f2d07 (patch)
tree70b6da3c96d916032b040adf57a3ebeaffcfb914
parentf10cbeffba8dc52b971bc3f6644eb0cf4bbeb5eb (diff)
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@collabora.co.uk> (cherry picked from commit edf13fe1247e7ef411a9ff5435385573fad01f56) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90044
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index 7e7edc655a59..4146a60eb310 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>
@@ -344,6 +345,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
@@ -505,6 +512,8 @@ void WorkbookFragment::finalizeImport()
// attach macros to registered objects now that all objects have been created.
getBaseFilter().getVbaProject().attachMacros();
+
+ pModel->setLock(bWasLocked);
}
namespace {