From 8c46185bf28f61e674186694e4944c1f8b3a9c00 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Sun, 23 Apr 2017 14:55:52 +0200 Subject: Handle keyinput properly in case of BottomToTop vertical text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2b0f7cee9a4a7d7ad154c705f84a8b995b4f23a1 Reviewed-on: https://gerrit.libreoffice.org/36830 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- editeng/source/editeng/impedit2.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'editeng') diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 5103333281f8..9e4072636e9a 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -756,8 +756,10 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE EditPaM aOldPaM( aPaM ); TextDirectionality eTextDirection = TextDirectionality::LeftToRight_TopToBottom; - if ( IsVertical() ) + if (IsVertical() && IsTopToBottom()) eTextDirection = TextDirectionality::TopToBottom_RightToLeft; + else if (IsVertical() && !IsTopToBottom()) + eTextDirection = TextDirectionality::BottomToTop_LeftToRight; else if ( IsRightToLeft( GetEditDoc().GetPos( aPaM.GetNode() ) ) ) eTextDirection = TextDirectionality::RightToLeft_TopToBottom; -- cgit