summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-13 15:37:42 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-12 22:06:36 -0400
commitf238c21dd16bb9cb8bf3868b56e5fca210aeaeb6 (patch)
treef9b52377b70926a0a5fea3af3f787908b02bfbad /sd
parente8f80a45942a4c26e2d7495ec46db36d753fb158 (diff)
sd: implement per-view LOK_CALLBACK_INVALIDATE_TILES
With this, gtktiledviewer no longer crashes on load when opening a sample ODP file. Reviewed-on: https://gerrit.libreoffice.org/26223 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 351aa7246deee977e90c0f0756df96e3b965effe) Change-Id: I19857d6dcfab74c9fa282754e450c951f7ca564c
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/sdwindow.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index effde241b9b0..ac6679ab337d 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -37,10 +37,12 @@
#include "drawdoc.hxx"
#include "AccessibleDrawDocumentView.hxx"
#include "WindowUpdater.hxx"
+#include "ViewShellBase.hxx"
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <comphelper/lok.hxx>
namespace sd {
@@ -1018,7 +1020,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