openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soyol aron <>
Subject fix the bug for inverted arrow key behaver in left to right vertical text
Date Fri, 21 Nov 2014 08:27:47 GMT
Hi all

The behavior of arrow key (left and right) is incorrect when typing left to
right vertical text (Mongolian). if press left key the caret will move to
right line, and if press right key the caret will move to left line.

I know that the source code controlling behavior of arrow keys is in file


and the function is

void SwEditWin::KeyInput(const KeyEvent &rKEvt)

For fix this issue I think the code should be change to below

            if( ( bVertText && ( !bTblCrsr || bVertTable ) ) ||
                ( bTblCrsr && bVertTable ) )
*bool bIsTblr;//how to detect **text direction**??*
                // Attempt to integrate cursor travelling for mongolian
layout does not work.
                // Thus, back to previous mapping of cursor keys to
direction keys.
                if( KEY_UP == nKey ) nKey = KEY_LEFT;
                else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT;
//by aron
                else if( KEY_LEFT == nKey )
nKey = *bIsTblr*? KEY_UP:KEY_DOWN;
                else if( KEY_RIGHT == nKey )
nKey = *bIsTblr *? KEY_DOWN:KEY_UP;

But I don't know how to detect the text direction at here.
Best regards

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message