summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-07-02 11:00:01 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-07-02 12:41:21 +0200
commit1a8132515babca53b1f1a464236e05f780cbfef3 (patch)
treebcdfb9369bbd85ed6482c5d2d2d33c97ced3af09 /vcl
parent64f4777d175026de6594eae48ec59fa3d5bb272c (diff)
tdf#149816 qt a11y: Report position in screen coordinates
`QAccessibleInterface::rect()` is supposed to report the geometry in screen coordinates [1]. `XAccessibleComponent::getLocationOnScreen` returns the position in screen coordinates, so use that instead of `XAccessibleComponent::getLocation`, which returns the position relative to the parent. With this in place, Accerciser correctly highlights the area of the item curently selected in its treeview of the LO a11y hierarchy. [1] https://doc.qt.io/qt-6/qaccessibleinterface.html#rect Change-Id: Iefb1e8792cd3ee720feafc81744e5e6ed6a949c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136781 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qt5/QtAccessibleWidget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx
index 3461ec1ae38c..5e66459ce054 100644
--- a/vcl/qt5/QtAccessibleWidget.cxx
+++ b/vcl/qt5/QtAccessibleWidget.cxx
@@ -264,7 +264,7 @@ QRect QtAccessibleWidget::rect() const
return QRect();
Reference<XAccessibleComponent> xAccessibleComponent(xAc, UNO_QUERY);
- awt::Point aPoint = xAccessibleComponent->getLocation();
+ awt::Point aPoint = xAccessibleComponent->getLocationOnScreen();
awt::Size aSize = xAccessibleComponent->getSize();
return QRect(aPoint.X, aPoint.Y, aSize.Width, aSize.Height);