diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-20 08:19:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-02 08:13:15 +0200 |
commit | b6b26421a1029b18b48b69dbdac4bb70fb622604 (patch) | |
tree | 97b9ab25fef28063a3de4e3a67544d2ea13a70e0 /vbahelper/source | |
parent | d66ffef8558785f19908c8e526211b8225fa9125 (diff) |
split Point/Size/Rectangle into AbsoluteScreenPixel* types
to attempt to make it obvious in code what kind of coordinate
system we are dealing with.
The idea is that by doing this, the compile-time type checking
will flush out inconsistencies between different code.
I started with vcl::Window::OutputToAbsoluteScreenPixel
and worked outwards from there.
Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vbahelper/source')
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 6fe0928686ef..20fa519dc0d6 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -892,7 +892,7 @@ double UserFormGeometryHelper::implGetSize( bool bHeight, bool bOuter ) const { if( const vcl::Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ) ) { - tools::Rectangle aOuterRect = pWindow->GetWindowExtentsAbsolute(); + AbsoluteScreenPixelRectangle aOuterRect = pWindow->GetWindowExtentsAbsolute(); aSizePixel = awt::Size( aOuterRect.getOpenWidth(), aOuterRect.getOpenHeight() ); } } @@ -916,7 +916,7 @@ void UserFormGeometryHelper::implSetSize( double fSize, bool bHeight, bool bOute { if( const vcl::Window* pWindow = VCLUnoHelper::GetWindow( mxWindow ) ) { - tools::Rectangle aOuterRect = pWindow->GetWindowExtentsAbsolute(); + AbsoluteScreenPixelRectangle aOuterRect = pWindow->GetWindowExtentsAbsolute(); if( !aOuterRect.IsEmpty() ) { awt::Rectangle aInnerRect = mxWindow->getPosSize(); |