summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-09-01 13:20:41 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-09-02 13:00:22 +0000
commit438a76a9a261b9ada7b2758a66cd935d1760da39 (patch)
treed7a1fb6e756542160b3ac81a3b381b5b282e149d
parentexclude also single quoted strings from function name suggestion (diff)
downloadcore-438a76a9a261b9ada7b2758a66cd935d1760da39.tar.gz
core-438a76a9a261b9ada7b2758a66cd935d1760da39.zip
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. (cherry picked from commit 67192b3cfa54be7b0b60d450783ac2ac4c38bbc6) Change-Id: Ifa90f361f90d04b06fa012164995769627298ecb Reviewed-on: https://gerrit.libreoffice.org/28597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index a9b4c0d38fa2..913fbad754bf 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() );