diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-13 15:37:42 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-13 17:53:19 +0000 |
commit | 351aa7246deee977e90c0f0756df96e3b965effe (patch) | |
tree | f766b0773309512f50c149710cd66ca93d387ba4 | |
parent | 8110dd24d11229b6518c8b2cd5289c20589e8258 (diff) |
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/26223
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 2a40cf3e3f38..ab9917e322e6 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -37,6 +37,7 @@ #include "drawdoc.hxx" #include "AccessibleDrawDocumentView.hxx" #include "WindowUpdater.hxx" +#include "ViewShellBase.hxx" #include <vcl/svapp.hxx> #include <vcl/settings.hxx> @@ -1016,7 +1017,13 @@ void Window::LogicInvalidate(const Rectangle* pRectangle) aRectangle = OutputDevice::LogicToLogic(aRectangle, MAP_100TH_MM, MAP_TWIP); 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 |