summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/unomodel.hxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx15
2 files changed, 14 insertions, 3 deletions
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 3b00f1cb8d90..a2fe9415afa4 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -285,7 +285,7 @@ public:
virtual void setPaintTextEdit(bool bPaint) override { mbPaintTextEdit = bPaint; }
/// @see vcl::ITiledRenderable::getViewRenderState().
- OString getViewRenderState() override;
+ OString getViewRenderState(SfxViewShell* pViewShell = nullptr) override;
// XComponent
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 438d2a81faa0..6fc250ec8895 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2325,10 +2325,21 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice,
comphelper::LibreOfficeKit::setTiledPainting(false);
}
-OString SdXImpressDocument::getViewRenderState()
+OString SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell)
{
OStringBuffer aState;
- DrawViewShell* pView = GetViewShell();
+ DrawViewShell* pView = nullptr;
+
+ if (pViewShell)
+ {
+ ViewShellBase* pShellBase = dynamic_cast<ViewShellBase*>(pViewShell);
+ pView = dynamic_cast<DrawViewShell*>(pShellBase->GetMainViewShell().get());
+ }
+ else
+ {
+ pView = GetViewShell();
+ }
+
if (pView)
{
const SdViewOptions& pVOpt = pView->GetViewOptions();