diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-07-19 17:13:04 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-07-19 20:07:27 +0200 |
commit | ddbc111555607e62b94b74aacadd6a964b9fe4a5 (patch) | |
tree | bc9be7d48a6bb755ef1a0b7524495d96f5a9f958 | |
parent | 1bfe0e67dd3e341c416ec49310668419d6afe1ad (diff) |
qt5 a11y: Set proper a11y states
Set the states actually set in the
'XAccessibleStateSet', rather than setting states
0 to n-1, with n being the number of states present
in the state set.
With this commit in place, Accerciser now e.g.
initially correctly shows the 'checked' attribute
for checkboxes only if they are actually checked.
(Better handling of updating states still needs
to be implemented separately.)
Change-Id: Idbc84f5754eae65cee471834c322b8ddfdb0bb29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119223
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | vcl/qt5/Qt5AccessibleWidget.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index 8b2b16727283..590c328e3098 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -654,9 +654,9 @@ QAccessible::State Qt5AccessibleWidget::state() const Sequence<sal_Int16> aStates = xStateSet->getStates(); - for (sal_Int32 n = 0; n < aStates.getLength(); n++) + for (const sal_Int16 nState : aStates) { - lcl_addState(&state, n); + lcl_addState(&state, nState); } return state; |