summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-02-04 14:48:57 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-09 08:12:09 +0100
commitb25dd857b42352cce6174744a5350ab2c0566c16 (patch)
treea548138e79bff8c8173b378572a5df498d05022f /sd
parent36e701b1db76557121edc7bed46e4c1e694856ed (diff)
android: In Impress, switch to the 'Normal' (slides) view.
Other modes are not fit for the tiled rendering, and crash the viewer. Change-Id: I6fb17663203d9eb298bba2b9bd143fdd28ffb470
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/unomodel.hxx3
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx5
2 files changed, 8 insertions, 0 deletions
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index f62d2f7368ed..043d7427ea23 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -240,6 +240,9 @@ public:
virtual OUString getPartName( int nPart ) SAL_OVERRIDE;
virtual void setPartMode( LibreOfficeKitPartMode ePartMode ) SAL_OVERRIDE;
+ /// @see ITiledRenderable::initializeForTiledRendering().
+ virtual void initializeForTiledRendering() SAL_OVERRIDE;
+
// XComponent
/** This dispose implementation releases the resources held by the
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e92f32802a79..431e4c69078e 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2347,6 +2347,11 @@ Size SdXImpressDocument::getDocumentSize()
return Size(convertMm100ToTwip(aSize.getWidth()), convertMm100ToTwip(aSize.getHeight()));
}
+void SdXImpressDocument::initializeForTiledRendering()
+{
+ // tiled rendering works only when we are in the 'Normal' view, switch to that
+ mpDocShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_VIEWSHELL0, SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
+}
uno::Reference< i18n::XForbiddenCharacters > SdXImpressDocument::getForbiddenCharsTable()
{