vcl/qt5/Qt5AccessibleWidget.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit ddbc111555607e62b94b74aacadd6a964b9fe4a5 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Jul 19 17:13:04 2021 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Jul 19 20:07:27 2021 +0200 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.wegh...@posteo.de> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits