sc/source/core/data/attarray.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 943a2f44bdc67cc795e553fd98693dba501ad717 Author: Noel Grandin <[email protected]> AuthorDate: Sun Apr 21 18:47:25 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Apr 24 08:29:55 2019 +0200 tdf#81765 slow loading of .ods with >1000 of conditional formats, part 4 This takes the loading time from 13s to 10.5s Avoid expensive text-invalidation while we are loading Change-Id: Ia74b84575fbf635b5ab5618c74ea2efc9f6ad827 Reviewed-on: https://gerrit.libreoffice.org/71043 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> Tested-by: Noel Grandin <[email protected]> diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 7559331533ff..3c91d5b9dc03 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -27,6 +27,7 @@ #include <editeng/justifyitem.hxx> #include <osl/diagnose.h> #include <svl/poolcach.hxx> +#include <sfx2/objsh.hxx> #include <global.hxx> #include <document.hxx> @@ -494,9 +495,10 @@ const ScPatternAttr* ScAttrArray::SetPatternAreaImpl(SCROW nStartRow, SCROW nEnd // ensure that attributing changes text width of cell // otherwise, conditional formats need to be reset or deleted + bool bIsLoading = !pDocument->GetDocumentShell() || pDocument->GetDocumentShell()->IsLoading(); while ( ns <= nEndRow ) { - if ( nCol != -1 ) + if ( nCol != -1 && !bIsLoading ) { const SfxItemSet& rNewSet = pPattern->GetItemSet(); const SfxItemSet& rOldSet = mvData[nx].pPattern->GetItemSet(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
