summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/view/drviewse.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 520e29bfb47a..233e627208fe 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -615,6 +615,12 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
// calc position and size
::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel()));
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // aVisArea is nonsensical in the LOK case, use the slide size
+ aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize());
+ }
+
Point aPagePos = aVisArea.Center();
aPagePos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
aPagePos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );