From ab925e1d8d927f3b26cbe2d60e5aa35e1c6f1076 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Mon, 21 Feb 2022 15:14:17 +0100 Subject: qt a11y: Handle VALUE_CHANGED event Change-Id: I34d813ced29a591b0a6652eeb1271a978980bba5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130359 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/qt5/QtAccessibleEventListener.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 08b97b69c347..3febce8a587e 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -172,9 +172,19 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::ForegroundChanged)); return; + case AccessibleEventId::VALUE_CHANGED: + { + QAccessibleValueInterface* pValueInterface = pQAccessibleInterface->valueInterface(); + if (pValueInterface) + { + const QVariant aValue = pValueInterface->currentValue(); + QAccessible::updateAccessibility( + new QAccessibleValueChangeEvent(pQAccessibleInterface, aValue)); + } + return; + } case AccessibleEventId::ROLE_CHANGED: case AccessibleEventId::INVALIDATE_ALL_CHILDREN: - case AccessibleEventId::VALUE_CHANGED: case AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED: case AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED: case AccessibleEventId::CONTROLLED_BY_RELATION_CHANGED: -- cgit