Skip to content

Commit cfab88f

Browse files
committed
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 <[email protected]> Reviewed-by: Gökay ŞATIR <[email protected]> (cherry picked from commit 22307f0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182464 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins
1 parent d37b46c commit cfab88f

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

sd/source/ui/docshell/docshel2.cxx

-12
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
#include <rtl/character.hxx>
4040
#include <tools/debug.hxx>
4141

42-
#include <sfx2/lokhelper.hxx>
43-
#include <comphelper/lok.hxx>
44-
4542
namespace sd {
4643

4744
/**
@@ -150,15 +147,6 @@ ::tools::Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const
150147
void DrawDocShell::Connect(ViewShell* pViewSh)
151148
{
152149
mpViewShell = pViewSh;
153-
154-
if (comphelper::LibreOfficeKit::isActive())
155-
{
156-
SfxViewShell* sfxViewShell = mpViewShell->GetViewShell();
157-
if (sfxViewShell)
158-
{
159-
mpViewShell->GetViewShell()->libreOfficeKitViewInvalidateTilesCallback(nullptr, sfxViewShell->getPart(), sfxViewShell->getEditMode());
160-
}
161-
}
162150
}
163151

164152
void DrawDocShell::Disconnect(ViewShell const * pViewSh)

sd/source/ui/view/FormShellManager.cxx

+9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <ViewShellBase.hxx>
2525
#include <ViewShellManager.hxx>
2626
#include <Window.hxx>
27+
#include <comphelper/lok.hxx>
28+
#include <sfx2/lokhelper.hxx>
2729
#include <vcl/vclevent.hxx>
2830
#include <svx/fmshell.hxx>
2931
#include <osl/diagnose.h>
@@ -156,6 +158,13 @@ void FormShellManager::RegisterAtCenterPane()
156158
mpSubShellFactory = std::make_shared<FormShellManagerFactory>(*pShell, *this);
157159
mrBase.GetViewShellManager()->AddSubShellFactory(pShell,mpSubShellFactory);
158160
mrBase.GetViewShellManager()->ActivateSubShell(*pShell, ToolbarId::FormLayer_Toolbox);
161+
162+
if (comphelper::LibreOfficeKit::isActive())
163+
{
164+
SfxViewShell* sfxViewShell = pShell->GetViewShell();
165+
if (sfxViewShell)
166+
pShell->GetViewShell()->libreOfficeKitViewInvalidateTilesCallback(nullptr, sfxViewShell->getPart(), sfxViewShell->getEditMode());
167+
}
159168
}
160169

161170
void FormShellManager::UnregisterAtCenterPane()

0 commit comments

Comments
 (0)