vcl/source/window/menu.cxx                        |    4 +--
 winaccessibility/source/UAccCOM/AccActionBase.cxx |   28 +---------------------
 2 files changed, 4 insertions(+), 28 deletions(-)

New commits:
commit b80be50268f534e215d36d69b93d3f51d9410ace
Author: Niklas Johansson <[email protected]>
Date:   Thu Oct 1 14:22:21 2015 +0200

    Allow non ASCII chars as accelerator keys
    
    Non ASCII characters like åäö can be used as accelerator keys (Alt+<x>).
    This already works however at the moment it is not exposed properly
    to accessibility tools such as screen readers. After this patch at least
    NVDA gets information about accelerator keys that are non ascii. On
    Linux we need to adapt code in vcl/unx/atk/a11y/atkaction.cxx.
    
    There is also vcl/source/window/dlgctrl.cxx#Window::GetActivationKey
    should probably have similar treatment and I guess that it is related
    to accelerator keys in dialogs but I need to confirm that.
    I'm a bit unsure how to best do that so I'll save it for later.
    
    Change-Id: I1f1509a26d781011d217670266bd10b2107811d5
    Reviewed-on: https://gerrit.libreoffice.org/19078
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 2505afa..34804c1 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -862,8 +862,8 @@ KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const
                 nCode = KEY_A + (cAccel-'A');
             else if( cAccel >= '0' && cAccel <= '9' )
                 nCode = KEY_0 + (cAccel-'0');
-            if(nCode )
-                aRet = KeyEvent( cAccel, KeyCode( nCode, KEY_MOD2 ) );
+
+            aRet = KeyEvent( cAccel, KeyCode( nCode, KEY_MOD2 ) );
         }
 
     }
diff --git a/winaccessibility/source/UAccCOM/AccActionBase.cxx 
b/winaccessibility/source/UAccCOM/AccActionBase.cxx
index fabdc40..71ffb9b 100644
--- a/winaccessibility/source/UAccCOM/AccActionBase.cxx
+++ b/winaccessibility/source/UAccCOM/AccActionBase.cxx
@@ -285,32 +285,8 @@ void CAccActionBase::GetkeyBindingStrByXkeyBinding( const 
Sequence< KeyStroke >
     {
         KeyStroke stroke = keySet[iIndex];
         OLECHAR wString[64] = {NULL};
-        if(iIndex>0)
-            wcscat( wString, OLESTR("  ") );
-        if((stroke.Modifiers & MODIFIER_SHIFT) == MODIFIER_SHIFT)
-            wcscat( wString, OLESTR("Shift+") );
-        if((stroke.Modifiers & MODIFIER_CTRL) == MODIFIER_CTRL)
-            wcscat( wString, OLESTR("Ctrl+") );
-        if((stroke.Modifiers & MODIFIER_ALT) == MODIFIER_ALT)
-            wcscat( wString, OLESTR("Alt+") );
-        if(stroke.KeyCode)
-        {
-            OLECHAR* pChar = getOLECHARFromKeyCode(stroke.KeyCode);
-            if(pChar != NULL)
-                wcscat( wString, pChar );
-            else if (stroke.KeyCode <= 255)
-            {
-                OLECHAR pChar[4] = {NULL};
-                swprintf( pChar, L"%c", stroke.KeyCode);
-                wcscat( wString, pChar);
-            }
-            else
-            {
-                OLECHAR pChar[4] = {NULL};
-                swprintf( pChar, L"%d", stroke.KeyCode);
-                wcscat( wString, pChar);
-            }
-        }
+        wcscat(wString, OLESTR("\n"));
+        wcscat(wString, &stroke.KeyChar);
 
         wcscat( pString, wString);
     }
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to