diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-19 15:19:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-07-20 08:15:29 +0200 |
commit | 0e8b7dd7a013dffe080148baac926a698f36ad85 (patch) | |
tree | 940962b117c06943784aa94f1116bf748a2d057c /toolkit | |
parent | 669d6ed4fa2e7a01c372a6e27dd5468ec8eb3077 (diff) |
split GetWindowExtentsRelative asunder
sometimes it returns a relative position, sometimes an absolute
position.
Rather have two different methods with names that match what
they return.
Change-Id: Ie1e73c6be1c797fd59934c96866d1fef1f972b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/controls/table/tablecontrol.hxx | 3 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/table/tablecontrol.cxx | 9 |
3 files changed, 12 insertions, 6 deletions
diff --git a/toolkit/inc/controls/table/tablecontrol.hxx b/toolkit/inc/controls/table/tablecontrol.hxx index 960d33dca326..aae87ed4cba0 100644 --- a/toolkit/inc/controls/table/tablecontrol.hxx +++ b/toolkit/inc/controls/table/tablecontrol.hxx @@ -127,7 +127,8 @@ namespace svt::table // IAccessibleTable - virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const override; + virtual tools::Rectangle GetWindowExtentsAbsolute() const override; + virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window& rRelativeWindow) const override; virtual void GrabFocus() override; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 2c9565fec9a7..19ba5c4fbfc2 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -708,12 +708,12 @@ awt::Rectangle VCLXAccessibleComponent::implGetBounds() VclPtr<vcl::Window> pWindow = GetWindow(); if ( pWindow ) { - tools::Rectangle aRect = pWindow->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = pWindow->GetWindowExtentsAbsolute(); aBounds = AWTRectangle( aRect ); vcl::Window* pParent = pWindow->GetAccessibleParentWindow(); if ( pParent ) { - tools::Rectangle aParentRect = pParent->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aParentRect = pParent->GetWindowExtentsAbsolute(); awt::Point aParentScreenLoc = AWTPoint( aParentRect.TopLeft() ); aBounds.X -= aParentScreenLoc.X; aBounds.Y -= aParentScreenLoc.Y; @@ -730,7 +730,7 @@ awt::Point VCLXAccessibleComponent::getLocationOnScreen( ) awt::Point aPos; if ( GetWindow() ) { - tools::Rectangle aRect = GetWindow()->GetWindowExtentsRelative( nullptr ); + tools::Rectangle aRect = GetWindow()->GetWindowExtentsAbsolute(); aPos.X = aRect.Left(); aPos.Y = aRect.Top(); } diff --git a/toolkit/source/controls/table/tablecontrol.cxx b/toolkit/source/controls/table/tablecontrol.cxx index 1281e7e9b436..92ec7535f04c 100644 --- a/toolkit/source/controls/table/tablecontrol.cxx +++ b/toolkit/source/controls/table/tablecontrol.cxx @@ -479,9 +479,14 @@ namespace svt::table m_pImpl->commitTableEvent( i_eventID, i_newValue, i_oldValue ); } - tools::Rectangle TableControl::GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const + tools::Rectangle TableControl::GetWindowExtentsAbsolute() const { - return Control::GetWindowExtentsRelative( pRelativeWindow ); + return Control::GetWindowExtentsAbsolute(); + } + + tools::Rectangle TableControl::GetWindowExtentsRelative(const vcl::Window& rRelativeWindow) const + { + return Control::GetWindowExtentsRelative( rRelativeWindow ); } void TableControl::GrabFocus() |