summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-07-10 15:05:22 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-07-11 06:44:48 +0200
commit2fdee9fd60bc4bb61f773fa1f766e84f4ee0dae3 (patch)
tree4a541f076f822fc11d26001a16174976b2853da3 /basctl
parentf111fbf5d508c8215615f037d7e1c1f563812a13 (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 'basctl')
-rw-r--r--basctl/source/accessibility/accessibledialogcontrolshape.cxx3
-rw-r--r--basctl/source/accessibility/accessibledialogwindow.cxx9
2 files changed, 6 insertions, 6 deletions
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
index 4abd4076d26a..22e9403bfed2 100644
--- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx
+++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx
@@ -30,7 +30,6 @@
#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <toolkit/awt/vclxfont.hxx>
-#include <toolkit/helper/convert.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <comphelper/accessiblecontexthelper.hxx>
#include <comphelper/diagnose_ex.hxx>
@@ -147,7 +146,7 @@ awt::Rectangle AccessibleDialogControlShape::GetBounds() const
// clip the shape's bounding box with the bounding box of its parent
tools::Rectangle aParentRect( Point( 0, 0 ), m_pDialogWindow->GetSizePixel() );
aRect = aRect.GetIntersection( aParentRect );
- aBounds = AWTRectangle( aRect );
+ aBounds = VCLUnoHelper::ConvertToAWTRect(aRect);
}
}
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx
index e9b4513294fb..def3a8fdede0 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -36,7 +36,7 @@
#include <tools/debug.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <toolkit/awt/vclxfont.hxx>
-#include <toolkit/helper/convert.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <i18nlangtag/languagetag.hxx>
@@ -409,7 +409,8 @@ awt::Rectangle AccessibleDialogWindow::implGetBounds()
{
awt::Rectangle aBounds;
if ( m_pDialogWindow )
- aBounds = AWTRectangle( tools::Rectangle( m_pDialogWindow->GetPosPixel(), m_pDialogWindow->GetSizePixel() ) );
+ aBounds = VCLUnoHelper::ConvertToAWTRect(
+ tools::Rectangle(m_pDialogWindow->GetPosPixel(), m_pDialogWindow->GetSizePixel()));
return aBounds;
}
@@ -685,8 +686,8 @@ Reference< XAccessible > AccessibleDialogWindow::getAccessibleAtPoint( const awt
Reference< XAccessibleComponent > xComp( xAcc->getAccessibleContext(), UNO_QUERY );
if ( xComp.is() )
{
- tools::Rectangle aRect = VCLRectangle( xComp->getBounds() );
- Point aPos = VCLPoint( rPoint );
+ tools::Rectangle aRect = VCLUnoHelper::ConvertToVCLRect(xComp->getBounds());
+ Point aPos = VCLUnoHelper::ConvertToVCLPoint(rPoint);
if ( aRect.Contains( aPos ) )
{
xChild = xAcc;