Kaydet (Commit) 943a2f44 authored tarafından Noel Grandin's avatar Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 615ccccc
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <editeng/justifyitem.hxx> #include <editeng/justifyitem.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <svl/poolcach.hxx> #include <svl/poolcach.hxx>
#include <sfx2/objsh.hxx>
#include <global.hxx> #include <global.hxx>
#include <document.hxx> #include <document.hxx>
...@@ -494,9 +495,10 @@ const ScPatternAttr* ScAttrArray::SetPatternAreaImpl(SCROW nStartRow, SCROW nEnd ...@@ -494,9 +495,10 @@ const ScPatternAttr* ScAttrArray::SetPatternAreaImpl(SCROW nStartRow, SCROW nEnd
// ensure that attributing changes text width of cell // ensure that attributing changes text width of cell
// otherwise, conditional formats need to be reset or deleted // otherwise, conditional formats need to be reset or deleted
bool bIsLoading = !pDocument->GetDocumentShell() || pDocument->GetDocumentShell()->IsLoading();
while ( ns <= nEndRow ) while ( ns <= nEndRow )
{ {
if ( nCol != -1 ) if ( nCol != -1 && !bIsLoading )
{ {
const SfxItemSet& rNewSet = pPattern->GetItemSet(); const SfxItemSet& rNewSet = pPattern->GetItemSet();
const SfxItemSet& rOldSet = mvData[nx].pPattern->GetItemSet(); const SfxItemSet& rOldSet = mvData[nx].pPattern->GetItemSet();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment