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

Khaled Hosny khaledhosny at eglug.org
Thu Sep 1 12:52:49 UTC 2016


 sw/source/uibase/docvw/edtwin.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 67192b3cfa54be7b0b60d450783ac2ac4c38bbc6
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Thu Sep 1 13:20:41 2016 +0200

    tdf#101361: Fix cursor key movement in RTL text
    
    Revert "tdf#32531 Fix for key movement in table cell of different
    directionality"
    
    This reverts commit a215cec969f7401b08cabb686c5b2b1d803399d0.
    
    This seems like the wrong fix for the original issue, as it breaks how
    “visual” cursor movement works in RTL text.

diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index e493e71..942a01d 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1476,6 +1476,13 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
                 else if( KEY_LEFT == nKey ) nKey = KEY_DOWN;
                 else if( KEY_RIGHT == nKey ) nKey = KEY_UP;
             }
+
+            if ( rSh.IsInRightToLeftText() )
+            {
+                if( KEY_LEFT == nKey ) nKey = KEY_RIGHT;
+                else if( KEY_RIGHT == nKey ) nKey = KEY_LEFT;
+            }
+
             aKeyEvent = KeyEvent( rKEvt.GetCharCode(),
                                   vcl::KeyCode( nKey, rKEvt.GetKeyCode().GetModifier() ),
                                   rKEvt.GetRepeat() );


More information about the Libreoffice-commits mailing list