summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2022-06-29 00:06:03 +1000
committerTomaž Vajngerl <quikee@gmail.com>2022-07-11 11:06:53 +0200
commit934985becc567114c3f38a72322056a628aad7c9 (patch)
tree54530473a4d3a0a5876aff68b3727d51fa4dc88d /vbahelper
parenta19e01812b60580c656cf31619e212803e2ca0fa (diff)
tools: rename getHeight/Width() to GetOpenHeight/Width()
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index e2fa8e085a67..a6e7ac1da2aa 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -884,7 +884,7 @@ double UserFormGeometryHelper::implGetSize( bool bHeight, bool bOuter ) const
if( const vcl::Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ) )
{
tools::Rectangle aOuterRect = pWindow->GetWindowExtentsRelative( nullptr );
- aSizePixel = awt::Size( aOuterRect.getWidth(), aOuterRect.getHeight() );
+ aSizePixel = awt::Size( aOuterRect.getOpenWidth(), aOuterRect.getOpenHeight() );
}
}
@@ -911,8 +911,8 @@ void UserFormGeometryHelper::implSetSize( double fSize, bool bHeight, bool bOute
if( !aOuterRect.IsEmpty() )
{
awt::Rectangle aInnerRect = mxWindow->getPosSize();
- sal_Int32 nDecorWidth = aOuterRect.getWidth() - aInnerRect.Width;
- sal_Int32 nDecorHeight = aOuterRect.getHeight() - aInnerRect.Height;
+ sal_Int32 nDecorWidth = aOuterRect.getOpenWidth() - aInnerRect.Width;
+ sal_Int32 nDecorHeight = aOuterRect.getOpenHeight() - aInnerRect.Height;
aSizePixel.Width = ::std::max< sal_Int32 >( aSizePixel.Width - nDecorWidth, 1 );
aSizePixel.Height = ::std::max< sal_Int32 >( aSizePixel.Height - nDecorHeight, 1 );
}