From 77e95e208c9d22eb1350d75135e09426c16a6726 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 8 Apr 2021 17:27:41 +0200 Subject: tdf#141416: partial revert of the fix for tdf#81396 d4743045a0b320449d07a957463a76bb8b13f939 < the cells need to be imported before we handle charts, tdf#81396 > Import time of sample file in tdf#141416 goes from more than an hour to 1 minute while keeping tdf#81396 fixed Unittest for tdf#81396 added in 9a59068fc31d7150e255ada91c59b8299636f185 Change-Id: Ic15d57945069397076c483b6ef8f3070057db317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113818 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 30f222c91fa816a7863bf4bfc4a36e503e0bf2d3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113768 Reviewed-by: Noel Grandin --- sc/source/filter/oox/workbookfragment.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index ac92e96d6e41..7b6a5c2f17a3 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -481,13 +481,10 @@ void WorkbookFragment::finalizeImport() // final conversions, e.g. calculation settings and view settings finalizeWorkbookImport(); - // + //stop preventing establishment of listeners as is done in //ScDocShell::AfterXMLLoading() for ods getScDocument().SetInsertingFromOtherDoc(false); - getDocImport().finalize(); - - recalcFormulaCells(); for( WorksheetHelper* pHelper : aHelpers ) { @@ -501,6 +498,10 @@ void WorkbookFragment::finalizeImport() rxSheetGlob.reset(); } + getDocImport().finalize(); + + recalcFormulaCells(); + OUString aRevHeadersPath = getFragmentPathFromFirstType(CREATE_OFFICEDOC_RELATION_TYPE("revisionHeaders")); if (!aRevHeadersPath.isEmpty()) { -- cgit