[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 24 06:30:56 UTC 2019
sc/source/core/data/attarray.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 943a2f44bdc67cc795e553fd98693dba501ad717
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Apr 21 18:47:25 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
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 <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
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();
More information about the Libreoffice-commits
mailing list