From 2fdee9fd60bc4bb61f773fa1f766e84f4ee0dae3 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 10 Jul 2024 15:05:22 +0200 Subject: Unify/Port to use VCLUnoHelper for AWT <-> VCL conversions Following Change-Id: Id48f81deb05aee2026509037f7d14575735e5be0 Author: Michael Weghorn 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 --- accessibility/source/extended/AccessibleBrowseBox.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'accessibility/source/extended/AccessibleBrowseBox.cxx') 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 #include #include -#include #include #include @@ -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; } } -- cgit