diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-07-10 15:05:22 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-07-11 06:44:48 +0200 |
commit | 2fdee9fd60bc4bb61f773fa1f766e84f4ee0dae3 (patch) | |
tree | 4a541f076f822fc11d26001a16174976b2853da3 /accessibility/source/extended/AccessibleBrowseBox.cxx | |
parent | f111fbf5d508c8215615f037d7e1c1f563812a13 (diff) |
Unify/Port to use VCLUnoHelper for AWT <-> VCL conversions
Following
Change-Id: Id48f81deb05aee2026509037f7d14575735e5be0
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Jul 10 14:49:03 2024 +0200
VCLUnoHelper: Align AWT <-> VCL helpers with convert.hxx impl
, port all uses of the helper functions defined in
`include/toolkit/helper/convert.hxx` to use the
`VCLUnoHelper` equivalents instead, to unify usage
and avoid duplication.
Drop `include/toolkit/helper/convert.hxx` now that
it's unused.
Change-Id: I22695a93e40e47bb2b14d191a2e0a4eb7c856895
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170317
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'accessibility/source/extended/AccessibleBrowseBox.cxx')
-rw-r--r-- | accessibility/source/extended/AccessibleBrowseBox.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index 705df2536cfe..debdf15e2443 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -23,7 +23,6 @@ #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <utility> #include <vcl/accessibletableprovider.hxx> -#include <toolkit/helper/convert.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <sal/types.h> @@ -137,21 +136,21 @@ AccessibleBrowseBox::getAccessibleAtPoint( const awt::Point& rPoint ) css::uno::Reference< css::accessibility::XAccessible > xChild; sal_Int32 nIndex = 0; - if( mpBrowseBox->ConvertPointToControlIndex( nIndex, VCLPoint( rPoint ) ) ) + if (mpBrowseBox->ConvertPointToControlIndex(nIndex, VCLUnoHelper::ConvertToVCLPoint(rPoint))) xChild = mpBrowseBox->CreateAccessibleControl( nIndex ); else { // try whether point is in one of the fixed children // (table, header bars, corner control) - Point aPoint( VCLPoint( rPoint ) ); + Point aPoint(VCLUnoHelper::ConvertToVCLPoint(rPoint)); for( nIndex = 0; (nIndex < vcl::BBINDEX_FIRSTCONTROL) && !xChild.is(); ++nIndex ) { css::uno::Reference< css::accessibility::XAccessible > xCurrChild( implGetFixedChild( nIndex ) ); css::uno::Reference< css::accessibility::XAccessibleComponent > xCurrChildComp( xCurrChild, uno::UNO_QUERY ); - if( xCurrChildComp.is() && - VCLRectangle( xCurrChildComp->getBounds() ).Contains( aPoint ) ) + if (xCurrChildComp.is() + && VCLUnoHelper::ConvertToVCLRect(xCurrChildComp->getBounds()).Contains(aPoint)) xChild = xCurrChild; } } |