sc/source/filter/oox/extlstcontext.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit f99b8fc6ef3cd311b8bab52b3674d2637cb547e2 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Apr 17 14:06:57 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon May 6 13:13:49 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 <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit dac30c44c606232ce23d52a423d0bf8010f25d4f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167077 Tested-by: Jenkins 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;