tdf#98896: GetWidth/GetHeight vs getWidth/getHeight strikes back!
Regression from commit d04ee940a04922f6fc511882cff956a03b39583b
Before commit 73f89b5d36dbae26072a1e749f10dfd6ffb6dd6e, the code to
calculate full-screen rectangle only had one mode, and used
Rectangle::Width+1/Rectangle::Height+1, with a comment "difference
between java/awt convention and vcl".
Commit 73f89b5d36dbae26072a1e749f10dfd6ffb6dd6e added another calc
mode, and used Rectangle::GetWidth()/Rectangle::GetHeight(), which
compensate for the +1 themselves.
Then, in commit 6b5059c7b7129c3b9f00d784b6fa5248a24a6d4b, the original
mode was changed to Rectangle::GetWidth()+1/Rectangle::GetHeight()+1,
which was incorrect (resulting in an extra +1 for that code path).
And last, in commit d04ee940a04922f6fc511882cff956a03b39583b, both
the original mode, and the new mode were changed from GetWidth()/
GetHeight() to getWidth()/getHeight(), which fixed the original
mode, but broke second mode (the +1 wasn't added there, so it got
lost).
This change stangardises both modes to use the GetWidth()/GetHeight()
pair. Yay for more functions differing by case and meaning!
Change-Id: Id64684d01a55849d18557d06c59e91b5cb93385d
Reviewed-on: https://gerrit.libreoffice.org/67941
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index c6d4d90..4fcb494 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -762,8 +762,8 @@
tools::Rectangle aRect = Application::GetScreenPosSizePixel( pFrame->mnDisplay );
nScreenX = aRect.Left();
nScreenY = aRect.Top();
nScreenDX = aRect.getWidth()+1; // difference between java/awt convention and vcl
nScreenDY = aRect.getHeight()+1; // difference between java/awt convention and vcl
nScreenDX = aRect.GetWidth();
nScreenDY = aRect.GetHeight();
}
else
{
@@ -774,8 +774,8 @@
}
nScreenX = aCombined.Left();
nScreenY = aCombined.Top();
nScreenDX = aCombined.getWidth();
nScreenDY = aCombined.getHeight();
nScreenDX = aCombined.GetWidth();
nScreenDY = aCombined.GetHeight();
}
}
catch( Exception& )