Re: fix the bug for inverted arrow key behavior in left to right vertical text

2014-11-25 Thread Aronsoyol Qi
Thank you very much

2014-11-21 18:03 GMT+09:00 Miklos Vajna :

> Hi,
>
> On Fri, Nov 21, 2014 at 05:50:14PM +0900, Aronsoyol Qi <
> aronsoyol...@gmail.com> wrote:
> > But I don't know how to detect the text direction (*bIsTblr *) at here.
> Can
> > anybody help me?
>
> See here for an example on how to detect the vertical, left to right
> direction:
>
>
> http://opengrok.libreoffice.org/xref/core/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx#829
>
> If you have a layout frame, then pFrm->IsVertical() && pFrm->IsVertLR()
> is your case.
>
> Regards,
>
> Miklos
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: fix the bug for inverted arrow key behavior in left to right vertical text

2014-11-21 Thread Miklos Vajna
Hi,

On Fri, Nov 21, 2014 at 05:50:14PM +0900, Aronsoyol Qi  
wrote:
> But I don't know how to detect the text direction (*bIsTblr *) at here. Can
> anybody help me?

See here for an example on how to detect the vertical, left to right
direction:

http://opengrok.libreoffice.org/xref/core/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx#829

If you have a layout frame, then pFrm->IsVertical() && pFrm->IsVertLR()
is your case.

Regards,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


fix the bug for inverted arrow key behavior in left to right vertical text

2014-11-21 Thread Aronsoyol Qi
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 have reported this bug already at here
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=82795

I found that the source code contrlling the behavior of arrow keys is in
this file
sw\source\core\uibase\docvw\edtwin.cxx
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;
 //
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 (*bIsTblr *) at here. Can
anybody help me?
Best regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice