sw/source/uibase/uiview/view.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 4fac9a110961f19006c3041be0c4b920a5eafe7b Author: Noel Grandin <[email protected]> AuthorDate: Mon May 22 16:12:23 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue May 23 14:33:49 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 <[email protected]> diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index d0d654479a4e..b035e53eb38f 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1153,7 +1153,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();
