vcl/qt5/QtAccessibleEventListener.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit dc6eb44e625c541be1db5911d53b3b0cc30a2b1f Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Feb 18 12:38:16 2022 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Feb 18 20:04:39 2022 +0100 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.wegh...@posteo.de> 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;