[Libreoffice-commits] core.git: accessibility/source

Niklas Johansson sleeping.pillow at gmail.com
Wed Jan 7 07:17:33 PST 2015


 accessibility/source/standard/accessiblemenuitemcomponent.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit d22a27010c4bd55973165a5fc373027f7c251db8
Author: Niklas Johansson <sleeping.pillow at gmail.com>
Date:   Wed Dec 17 23:05:15 2014 +0100

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
index 73674c7..6b4bc4c 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;


More information about the Libreoffice-commits mailing list