diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-02-18 12:38:16 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-02-18 20:04:39 +0100 |
commit | dc6eb44e625c541be1db5911d53b3b0cc30a2b1f (patch) | |
tree | 7eb130924271c717d4cf9af5717dd3addd680724 | |
parent | Update git submodules (diff) | |
download | core-dc6eb44e625c541be1db5911d53b3b0cc30a2b1f.tar.gz core-dc6eb44e625c541be1db5911d53b3b0cc30a2b1f.zip |
qt a11y: Map CARET_CHANGED event to Qt equivalent
The previous handling of mapping that to
QAccessible::TableSummaryChanged looks rather arbitrary.
Change-Id: I066cee4bd90a49a47dd29252c11f8f74edccb637
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130141
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | vcl/qt5/QtAccessibleEventListener.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 1ceb6f6de0e1..5a8e84144210 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -60,6 +60,14 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::ActiveDescendantChanged)); return; + case AccessibleEventId::CARET_CHANGED: + { + sal_Int32 nNewCursorPos = 0; + aEvent.NewValue >>= nNewCursorPos; + QAccessible::updateAccessibility( + new QAccessibleTextCursorEvent(pQAccessibleInterface, nNewCursorPos)); + return; + } case AccessibleEventId::CHILD: { QAccessible::Event event = QAccessible::InvalidEvent; @@ -109,7 +117,6 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible new QAccessibleEvent(pQAccessibleInterface, QAccessible::TableRowHeaderChanged)); return; case AccessibleEventId::TABLE_SUMMARY_CHANGED: - case AccessibleEventId::CARET_CHANGED: QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::TableSummaryChanged)); return; |