sw/source/uibase/uiview/view.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 96be41d5ba28e1d3b361efdad5e8cad9d9d0fe77 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon May 22 16:12:23 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed May 24 08:10:33 2023 +0200 tdf#155410 speedup shutdown when document has lots of images prevent unnecessary broadcasting during teardown of draw model regression from commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 ref-count SdrObject The above patch seems to have changed the destruction ordering and now we do lots of unnecessary broadcasting. Change-Id: I90f4e560bc82834246a323275d13ef8ee8abeae0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152140 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit 4fac9a110961f19006c3041be0c4b920a5eafe7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152104 diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 5b14cd43842b..1ef5049e7982 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1145,7 +1145,14 @@ SwView::~SwView() m_pViewImpl->Invalidate(); EndListening(*GetViewFrame()); EndListening(*GetDocShell()); + + // tdf#155410 speedup shutdown, prevent unnecessary broadcasting during teardown of draw model + auto pDrawModel = GetWrtShell().getIDocumentDrawModelAccess().GetDrawModel(); + const bool bWasLocked = pDrawModel->isLocked(); + pDrawModel->setLock(true); m_pWrtShell.reset(); // reset here so that it is not accessible by the following dtors. + pDrawModel->setLock(bWasLocked); + m_pHScrollbar.disposeAndClear(); m_pVScrollbar.disposeAndClear(); m_pHRuler.disposeAndClear();