summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-09-05 15:01:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-20 19:20:54 +0200
commite1972743d692c8d8611912c31aae2cb08ae7636d (patch)
tree65817acedf6f17ab8af8df33b2f7abe80fe363d7 /sd
parenteb830ad284f245165b6ab5e8647d48834622f2d5 (diff)
be more disciplined with SetUpdateLayout on editengine
save/restore in more places, and check in more places before doing layout, so we dont waste time on expensive layout Change-Id: I311f1f7f97a508da296078e936cb3704938dfdc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/outlview.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index de86a8695605..0ebe41c8e630 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1639,10 +1639,10 @@ void SdOutliner::EnterEditMode (bool bGrabFocus)
mpSearchSpellTextObj->setActiveText(mnText);
// Turn on the edit mode for the text object.
+ SetUpdateLayout(true);
mpView->SdrBeginTextEdit(mpSearchSpellTextObj, pPV, mpWindow, true, this,
pOutlinerView, true, true, bGrabFocus);
- SetUpdateLayout(true);
mbFoundObject = true;
}
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 13501f4f6553..4a4bb45f1f1b 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1003,7 +1003,7 @@ void OutlineView::FillOutliner()
mrOutliner.GetUndoManager().Clear();
mrOutliner.EnableUndo(false);
ResetLinks();
- mrOutliner.SetUpdateLayout(false);
+ const bool bPrevUpdateLayout = mrOutliner.SetUpdateLayout(false);
Paragraph* pTitleToSelect = nullptr;
sal_uInt16 nPageCount = mrDoc.GetSdPageCount(PageKind::Standard);
@@ -1098,7 +1098,7 @@ void OutlineView::FillOutliner()
mrOutliner.EnableUndo(true);
- mrOutliner.SetUpdateLayout(true);
+ mrOutliner.SetUpdateLayout(bPrevUpdateLayout);
}
/**