Kaydet (Commit) d02fdce7 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

lok sd: Insert the new shapes in the center of the slide.

Change-Id: I134f86dc0c49ddf26e7a3cfe790c49ab200de9e9
üst 4c875612
......@@ -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) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment