summaryrefslogtreecommitdiff
path: root/accessibility/source
diff options
context:
space:
mode:
authorNiklas Johansson <sleeping.pillow@gmail.com>2014-12-17 23:05:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-07 15:17:06 +0000
commitd22a27010c4bd55973165a5fc373027f7c251db8 (patch)
tree306db1ea416d65cfc3f80d5b7c1fd88ff151bdfe /accessibility/source
parent1000d7499b1fbaa05e2aeca02c24fc3dfbfd2ddc (diff)
Accessibility: Expose keyboard short-cuts of menu entries
On Windows the keyboard short-cuts of menu items like "Open Ctrl+O" is not exposed to accessibility tools on Windows. On Mac and Linux it is. If I understand Microsoft's notes correctly, it is expected that the short-cut gets appended to the accessibleName. This is what Acrobat Reader, Internet Explorer, Firefox is doing. And with this patch LibreOffice as well. For info from Microsoft on the matter see: http://msdn.microsoft.com/en-us/library/windows/desktop/dd318482%28v=vs.85%29.aspx Change-Id: I4ed7c4c45998063bb50744b44c792351070489d7 Reviewed-on: https://gerrit.libreoffice.org/13516 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'accessibility/source')
-rw-r--r--accessibility/source/standard/accessiblemenuitemcomponent.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
index 73674c7195f9..6b4bc4c838f5 100644
--- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx
+++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
@@ -202,6 +202,10 @@ OUString OAccessibleMenuItemComponent::GetAccessibleName()
if ( sName.isEmpty() )
sName = m_pParent->GetItemText( nItemId );
sName = OutputDevice::GetNonMnemonicString( sName );
+#if defined WNT
+ if ( m_pParent->GetAccelKey( nItemId ).GetName().getLength() )
+ sName = sName + "\t" + m_pParent->GetAccelKey(nItemId).GetName();
+#endif
}
return sName;