diff options
author | Jan Holesovsky <kendy@collabora.com> | 2018-11-22 12:34:06 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-12-07 11:52:33 +0100 |
commit | d02fdce7852a08e09b1e72903c08e79b8747a1c3 (patch) | |
tree | 74df2bebd01f055c7c6e8dfa4ccfee7d249b177a /sd | |
parent | 4c8756127917020e83e2ea83ee5118e30309bda9 (diff) |
lok sd: Insert the new shapes in the center of the slide.
Change-Id: I134f86dc0c49ddf26e7a3cfe790c49ab200de9e9
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0d89b22eb3bd..33384160e7fa 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -613,6 +613,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) ); |