[Libreoffice-commits] .: Branch 'feature/gsoc-calc-perf2' - sc/source

Daniel Bankston dbank at kemper.freedesktop.org
Tue Jul 31 04:52:05 PDT 2012


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

New commits:
commit 3c95101f43a8abb2a644fa2bdb3468cda5e459b0
Author: Daniel Bankston <daniel.e.bankston at gmail.com>
Date:   Tue Jul 31 06:43:06 2012 -0500

    Prevent broadcasts to gain xlsx formula import performance boost
    
    oox import filter was spending a lot of time in ScFormulaCell::Notify()
    because of unnecessary broadcasts.
    Now the oox import filter will use the same approach
    that the xml import filter uses to prevent this from happening which
    results in shorter import time.
    
    Change-Id: I65e86919f352de0b22916a8d57d3166af0a58984

diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index db6342d..5aaf414 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -553,6 +553,10 @@ void WorkbookGlobals::initialize( bool bWorkbookFile )
         //! TODO: localize progress bar text
         mxProgressBar.reset( new SegmentProgressBar( mrBaseFilter.getStatusIndicator(), CREATE_OUSTRING( "Loading..." ) ) );
         mxFmlaParser.reset( new FormulaParser( *this ) );
+
+        //prevent unnecessary broadcasts and "half way listeners" as
+        //is done in ScDocShell::BeforeXMLLoading() for ods
+        getScDocument().SetInsertingFromOtherDoc(true);
     }
     else if( mrBaseFilter.isExportFilter() )
     {
@@ -597,6 +601,10 @@ void WorkbookGlobals::finalize()
         aPropSet.setProperty( PROP_IsChangeReadOnlyEnabled, false );
         // #111099# open forms in alive mode (has no effect, if no controls in document)
         aPropSet.setProperty( PROP_ApplyFormDesignMode, false );
+
+        //stop preventing establishment of listeners as is done in
+        //ScDocShell::AfterXMLLoading() for ods
+        getScDocument().SetInsertingFromOtherDoc(false);
     }
 }
 


More information about the Libreoffice-commits mailing list