From f5637ae74ad6bb517255510a8ae786fd2a3cf977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= Date: Mon, 10 Jul 2017 20:04:52 +0200 Subject: [PATCH] tdf#109050: Moving table object with ALT+Arrow keys does not work properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ALT+up/down behaves differently inside a table: cursor is moved to the left/right neighbouring cell instead of up/down. However when the whole table is selected a different behavior is expected: moving the table as an object. Change-Id: I82c7a3cc7d215b21f19fbf08dcdb7318a7e75289 Reviewed-on: https://gerrit.libreoffice.org/39810 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- svx/source/table/tablecontroller.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 3e49ca7b07b4..96db2db82e80 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1567,15 +1567,19 @@ SvxTableController::TblAction SvxTableController::getKeyboardAction(const KeyEve if( !bMod1 && bMod2 ) { - if( (nCode == awt::Key::UP) || (nCode == awt::Key::NUM8) ) + if(bTextEdit || mbCellSelectionMode) { - nAction = TblAction::GotoLeftCell; + if( (nCode == awt::Key::UP) || (nCode == awt::Key::NUM8) ) + { + nAction = TblAction::GotoLeftCell; + break; + } + else if( (nCode == awt::Key::DOWN) || (nCode == awt::Key::NUM2) ) + { + nAction = TblAction::GotoRightCell; + break; + } } - else if( (nCode == awt::Key::DOWN) || (nCode == awt::Key::NUM2) ) - { - nAction = TblAction::GotoRightCell; - } - break; } bool bTextMove = false;