sd: fix incorrect visible center calculation
Don't call PixelToLogic twice. Thanks Ashod for noticing.
Change-Id: Id280dad7e310ceaf8678f900e6e70214848dd925
Reviewed-on: https://gerrit.libreoffice.org/51529
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 2d17fbe..aa7cdc5 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -685,14 +685,8 @@ double Window::GetVisibleHeight()
Point Window::GetVisibleCenter()
{
Size aWinSize = PixelToLogic(GetOutputSizePixel());
if ( aWinSize.Height() > maViewSize.Height() )
aWinSize.setHeight( maViewSize.Height() );
if ( aWinSize.Width() > maViewSize.Width() )
aWinSize.setWidth( maViewSize.Width() );
Point aPos;
aPos = ::tools::Rectangle(aPos, aWinSize).Center();
aPos = ::tools::Rectangle(aPos, GetOutputSizePixel()).Center();
// For LOK
bool bMapModeWasEnabled(IsMapModeEnabled());