sd/source/ui/docshell/docshel2.cxx | 12 ------------ sd/source/ui/view/FormShellManager.cxx | 9 +++++++++ 2 files changed, 9 insertions(+), 12 deletions(-)
New commits: commit cfab88fe202a2b505ec61f235bd27027b68d30b0 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Mar 3 20:29:38 2025 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Mar 4 14:13:06 2025 +0000 cool#10967: LOK Impress: Invalidate tiles on switching the CenterPane and not at DrawDocShell::Connect which happens on switching view which happens frequently with multiple users which creates a storm of invalidations. #0 SfxViewShell::libreOfficeKitViewInvalidateTilesCallback (this=0x3301ce40, pRect=0x0, nPart=0, nMode=0) at sfx2/source/view/viewsh.cxx:3331 #1 0x00007fd0f1bae136 in sd::DrawDocShell::Connect (this=0x352e3e50, pViewSh=0x3700bed0) at sd/source/ui/docshell/docshel2.cxx:159 #2 0x00007fd0f2168cae in sd::ViewShell::Activate (this=0x3700bed0, bIsMDIActivate=true) at sd/source/ui/view/viewshel.cxx:350 #3 0x00007fd0f202c41b in sd::DrawViewShell::Activate (this=0x3700bed0, bIsMDIActivate=true) at sd/source/ui/view/drviews1.cxx:84 #4 0x00007fd115efb7d6 in SfxShell::DoActivate_Impl (this=0x3700bed0, pFrame=0x37066300, bMDI=true) at sfx2/source/control/shell.cxx:326 #5 0x00007fd115ebed5e in SfxDispatcher::DoActivate_Impl (this=0x370481c0, bMDI=true) at sfx2/source/control/dispatch.cxx:600 #6 0x00007fd1163b9f00 in SfxViewFrame::DoActivate (this=0x37066300, bUI=true) at sfx2/source/view/viewfrm.cxx:1196 #7 0x00007fd115da26b6 in SfxApplication::SetViewFrame_Impl (this=0x318c3ba0, pFrame=0x37066300) at sfx2/source/appl/app.cxx:260 #8 0x00007fd1163c8126 in SfxViewFrame::SetViewFrame (pFrame=0x37066300) at sfx2/source/view/viewfrm.cxx:3652 #9 0x00007fd1163c02ba in SfxViewFrame::MakeActive_Impl (this=0x37066300, bGrabFocus=false) at sfx2/source/view/viewfrm.cxx:2252 #10 0x00007fd116374bba in SfxLokHelper::setView (nId=5) at sfx2/source/view/lokhelper.cxx:221 #11 0x00007fd1164a59ce in doc_setView (nId=5) at desktop/source/lib/init.cxx:6918 Change-Id: Id4883d99009544cee8a239471f3ae65eb3646306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182443 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com> (cherry picked from commit 22307f05056aefebc4ba5d0ab60445b30adfc00c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182464 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index caf6c44f1778..6a3ea2edfda1 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -39,9 +39,6 @@ #include <rtl/character.hxx> #include <tools/debug.hxx> -#include <sfx2/lokhelper.hxx> -#include <comphelper/lok.hxx> - namespace sd { /** @@ -150,15 +147,6 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect, void DrawDocShell::Connect(ViewShell* pViewSh) { mpViewShell = pViewSh; - - if (comphelper::LibreOfficeKit::isActive()) - { - SfxViewShell* sfxViewShell = mpViewShell->GetViewShell(); - if (sfxViewShell) - { - mpViewShell->GetViewShell()->libreOfficeKitViewInvalidateTilesCallback(nullptr, sfxViewShell->getPart(), sfxViewShell->getEditMode()); - } - } } void DrawDocShell::Disconnect(ViewShell const * pViewSh) diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx index d2cb6ebfee21..3aad7a10a2a3 100644 --- a/sd/source/ui/view/FormShellManager.cxx +++ b/sd/source/ui/view/FormShellManager.cxx @@ -24,6 +24,8 @@ #include <ViewShellBase.hxx> #include <ViewShellManager.hxx> #include <Window.hxx> +#include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> #include <vcl/vclevent.hxx> #include <svx/fmshell.hxx> #include <osl/diagnose.h> @@ -156,6 +158,13 @@ void FormShellManager::RegisterAtCenterPane() mpSubShellFactory = std::make_shared<FormShellManagerFactory>(*pShell, *this); mrBase.GetViewShellManager()->AddSubShellFactory(pShell,mpSubShellFactory); mrBase.GetViewShellManager()->ActivateSubShell(*pShell, ToolbarId::FormLayer_Toolbox); + + if (comphelper::LibreOfficeKit::isActive()) + { + SfxViewShell* sfxViewShell = pShell->GetViewShell(); + if (sfxViewShell) + pShell->GetViewShell()->libreOfficeKitViewInvalidateTilesCallback(nullptr, sfxViewShell->getPart(), sfxViewShell->getEditMode()); + } } void FormShellManager::UnregisterAtCenterPane()