summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-12-18 08:48:12 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-12-20 09:27:27 +0100
commitf098ba6579fb1992c0db86b19b22eb8532ab1ba6 (patch)
tree4b57b31df524dba674e9c04b21004443ded0c666 /vcl
parentd125fc2a2178b100253ea089b7ad30acafccfb57 (diff)
tdf#123864 a11y: Handle new CHECKABLE state in misc places
Add reporting/handling of the CHECKABLE a11y state added in commit d6c6472bbe1c90b733a4d69c4c8528f4de3750d3 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Nov 13 15:53:44 2023 +0100 tdf#123864 a11y: Add new AccessibleStateType::CHECKABLE in various places where it seems pretty straightforward. `VCLXAccessibleMenuItem` is a bit more complex and will be handled separately. Change-Id: I212b8439609d34410413959973163aa7d809cbf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160901 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161036
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/a11y/atspi2/atspi2.cxx1
-rw-r--r--vcl/qt5/QtAccessibleEventListener.cxx3
-rw-r--r--vcl/source/treelist/treelistbox.cxx2
3 files changed, 6 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
index 7ef2efeca0ef..e24bf8078613 100644
--- a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
+++ b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
@@ -151,6 +151,7 @@ static AtspiStateType mapAtspiState(sal_Int64 nState)
MAP_DIRECT(ACTIVE);
MAP_DIRECT(ARMED);
MAP_DIRECT(BUSY);
+ MAP_DIRECT(CHECKABLE);
MAP_DIRECT(CHECKED);
MAP_DIRECT(EDITABLE);
MAP_DIRECT(ENABLED);
diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx
index c5d64d4650ed..d6a404e6947e 100644
--- a/vcl/qt5/QtAccessibleEventListener.cxx
+++ b/vcl/qt5/QtAccessibleEventListener.cxx
@@ -64,6 +64,9 @@ void QtAccessibleEventListener::HandleStateChangedEvent(
case AccessibleStateType::BUSY:
aState.busy = true;
break;
+ case AccessibleStateType::CHECKABLE:
+ aState.checkable = true;
+ break;
case AccessibleStateType::CHECKED:
aState.checked = true;
break;
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index b97abc33333b..6dd915e23996 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -3465,6 +3465,8 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, sal_In
rStateSet |= AccessibleStateType::EXPANDED;
}
+ if (nTreeFlags & SvTreeFlags::CHKBTN)
+ rStateSet |= AccessibleStateType::CHECKABLE;
if ( GetCheckButtonState( pEntry ) == SvButtonState::Checked )
rStateSet |= AccessibleStateType::CHECKED;
if ( IsEntryVisible( pEntry ) )