Kaydet (Commit) 351aa724 authored tarafından Miklos Vajna's avatar Miklos Vajna

sd: implement per-view LOK_CALLBACK_INVALIDATE_TILES

With this, gtktiledviewer no longer crashes on load when opening a
sample ODP file.

Change-Id: I19857d6dcfab74c9fa282754e450c951f7ca564c
Reviewed-on: https://gerrit.libreoffice.org/26223Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 8110dd24
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "drawdoc.hxx" #include "drawdoc.hxx"
#include "AccessibleDrawDocumentView.hxx" #include "AccessibleDrawDocumentView.hxx"
#include "WindowUpdater.hxx" #include "WindowUpdater.hxx"
#include "ViewShellBase.hxx"
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
...@@ -1016,7 +1017,13 @@ void Window::LogicInvalidate(const Rectangle* pRectangle) ...@@ -1016,7 +1017,13 @@ void Window::LogicInvalidate(const Rectangle* pRectangle)
aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP); aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP);
sRectangle = aRectangle.toString(); sRectangle = aRectangle.toString();
} }
mpViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr()); if (comphelper::LibreOfficeKit::isViewCallback())
{
SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase();
rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
}
else
mpViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
} }
} // end of namespace sd } // end of namespace sd
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment