summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2021-01-24 04:10:41 +0000
committerMichael Meeks <michael.meeks@collabora.com>2021-03-11 17:06:14 +0100
commit40c58f6039fb02cff74e442f6adc5ba38adcff1d (patch)
tree387d5ba2fd338f255b2079be72b54915c4dc43da
parenta6b9b1128d5ced0e3f82f88e442a7bba243ce164 (diff)
lok: avoid a set of invalidations per view on re-size.
Unfortunate to have N^2 invalidations in the number of views on resize - particularly for calc, when you re-size/wrap-text on a row during editing. Change-Id: I93f75c4543ad072684e5575a2cbe0e8abcab0d80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109913 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112094 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sfx2/source/view/lokhelper.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 2a5ea882d92d..0da6b9b88682 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -539,7 +539,10 @@ void SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc
// Should we then do this for all views of all open documents
// or not?
if (pCurrentViewShell == nullptr || pViewShell->GetDocId() == pCurrentViewShell-> GetDocId())
+ {
SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, bInvalidateAll);
+ bInvalidateAll = false; // we direct invalidations to all views anyway.
+ }
pViewShell = SfxViewShell::GetNext(*pViewShell);
}
}