sc/source/filter/oox/extlstcontext.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ca46dfb93b802ed4ee3210d0abc80ca37934a9e6
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Apr 17 14:06:57 2024 +0200
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue May 7 10:08:06 2024 +0200

    tdf#160706 speed up loading conditional formatting rule in XLS
    
    we only need to finalizeImport on the last ExtDxf we loaded, otherwise
    we end up with an O(n^2) performance problem
    
    Change-Id: I566ef43189a1bb7ac7c55e1bccf9445c9cea19b9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166179
    Tested-by: Noel Grandin <[email protected]>
    Reviewed-by: Noel Grandin <[email protected]>
    (cherry picked from commit 41895d8fb79001f29bdc0d2aac523eac22fd14c5)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166100
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Meeks <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit b684c805a70abd48ba1fda861b74fe2732dc988d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166899

diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 58e4c7931729..d6af04240572 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -292,7 +292,8 @@ void ExtConditionalFormattingContext::onEndElement()
                 maModel.eOperator = ScConditionMode::Direct;
             }
 
-            getStyles().getExtDxfs().forEachMem( &Dxf::finalizeImport );
+            if (Dxf* pDxf = getStyles().getExtDxfs().get(rStyleIdx).get())
+                pDxf->finalizeImport();
             maModel.aStyle = getStyles().createExtDxfStyle(rStyleIdx);
             rStyleIdx++;
             nFormulaCount = 0;

Reply via email to