summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2018-03-19 11:50:26 +0530
committerpranavk <pranavk@collabora.co.uk>2018-03-19 08:17:30 +0100
commitbe8883bcb250bdbfbb77a76b244d97a30a97d77a (patch)
treefd96158c44bc43035dde4658cea3221955cb5e8a
parentb2147abdf6dd82096fb4441e97090ed00a21e985 (diff)
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>
-rw-r--r--sd/source/ui/view/sdwindow.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 2d17fbe5ec3b..aa7cdc59de09 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());