Kaydet (Commit) be8883bc authored tarafından Pranav Kant's avatar Pranav Kant Kaydeden (comit) pranavk

sd: fix incorrect visible center calculation

Don't call PixelToLogic twice. Thanks Ashod for noticing.

Change-Id: Id280dad7e310ceaf8678f900e6e70214848dd925
Reviewed-on: https://gerrit.libreoffice.org/51529Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarpranavk <pranavk@collabora.co.uk>
üst b2147abd
...@@ -685,14 +685,8 @@ double Window::GetVisibleHeight() ...@@ -685,14 +685,8 @@ double Window::GetVisibleHeight()
Point Window::GetVisibleCenter() 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; Point aPos;
aPos = ::tools::Rectangle(aPos, aWinSize).Center(); aPos = ::tools::Rectangle(aPos, GetOutputSizePixel()).Center();
// For LOK // For LOK
bool bMapModeWasEnabled(IsMapModeEnabled()); bool bMapModeWasEnabled(IsMapModeEnabled());
......
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