summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-21 18:47:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-24 08:29:55 +0200
commit943a2f44bdc67cc795e553fd98693dba501ad717 (patch)
tree776ce344caf910947f5876c2c126bf4fd4d0237e
parent615cccccc81e9c594ae1ae67f5965cb61384ee55 (diff)
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@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/core/data/attarray.cxx4
1 files changed, 3 insertions, 1 deletions
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();