diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-09-30 03:15:57 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-10-05 18:51:27 -0500 |
commit | 1a41f88a04d8cb43fc1bd5d050ab5214f761f1a7 (patch) | |
tree | 38040445dbccfd2c4e7aa117fef3f2b162dcbb14 | |
parent | 7df7c4cf09df6ef4baba843991c65670bf942974 (diff) |
accfixes2: menu items can have the roles RADIO_MENU_ITEM or CHECK_MENU_ITEM,
instead of MENU_ITEM only
-rw-r--r-- | accessibility/source/standard/vclxaccessiblemenuitem.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index 592821a762f0..79bff3ae10b5 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -197,7 +197,24 @@ sal_Int16 VCLXAccessibleMenuItem::getAccessibleRole( ) throw (RuntimeException) { OExternalLockGuard aGuard( this ); - return AccessibleRole::MENU_ITEM; + // IA2 CWS. MT: We had the aditional roles in UAA for ever, but never used them anywhere. + // Looks reasonable, but need to verify in Orca and VoiceOver. + sal_Int16 nRole = AccessibleRole::MENU_ITEM; + if ( m_pParent ) + { + sal_uInt16 nItemId = m_pParent->GetItemId( m_nItemPos ); + MenuItemBits nItemBits = m_pParent->GetItemBits(nItemId); + if( nItemBits & MIB_RADIOCHECK) + { + nRole = AccessibleRole::RADIO_MENU_ITEM; + } + else if( nItemBits & MIB_CHECKABLE) + { + nRole = AccessibleRole::CHECK_MENU_ITEM; + } + } + return nRole; + } // ----------------------------------------------------------------------------- |