summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-15 16:30:15 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-12 22:06:39 -0400
commit297d11c3882e425d9a4cb1077262e34db79dc5c1 (patch)
treed03fc37e0619af89a20200c646b359ef720263d1 /sd
parentd3f3aa7822984a11808b0302b59bb3ad5ecbba80 (diff)
sc, sd: add per-view support to recently added LOK_CALLBACK_SET_PART calls
These caushed an assertion failure when opening a Calc or Impress document in gtktiledviewer. Change-Id: If9cf1ef6c5a9d8e1b0d578b20dd3f513989b669b Reviewed-on: https://gerrit.libreoffice.org/26311 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 50787b48a8378a555a71cc2c6b0966debb2e5104)
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews1.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 9140a96c92ee..c48966c0540b 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -930,9 +930,18 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
// never at a masterpage)
GetDoc()->SetSelected(mpActualPage, true);
- // notify LibreOfficeKit about changed page
- OString aPayload = OString::number(nSelectedPage);
- GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // notify LibreOfficeKit about changed page
+ OString aPayload = OString::number(nSelectedPage);
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ {
+ if (SfxViewShell* pViewShell = GetViewShell())
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
+ }
+ else
+ GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
+ }
rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) );
if( !xSlideshow.is() || !xSlideshow->isRunning() || ( xSlideshow->getAnimationMode() != ANIMATIONMODE_SHOW ) )