summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-01-20 22:13:12 +0900
committerEike Rathke <erack@redhat.com>2016-01-26 20:29:02 +0000
commitc68b65ec5581bafc97155b9ac67f6b542044a171 (patch)
treef4c35fb6c775ce75459ba3de62bd81dbd5a1647d /sc
parent38b362c58abd0df654665956ffc751d40cfb67ab (diff)
tdf#97247 Keep focus on merged cell at top-left corner
... when typing either UP or LEFT key. Change-Id: I7bc0e7eb0cba322bcc26c35d0474ea558d3bdd6e Reviewed-on: https://gerrit.libreoffice.org/21599 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit c13226bcc5b298dacfe32340711bdfd4d15d8b3b) Reviewed-on: https://gerrit.libreoffice.org/21652 Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview3.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 8e6d1432f30a..7e18b889816d 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1067,6 +1067,17 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
nCurY = (nMovY != 0) ? nOldY+nMovY : (SCsROW) aViewData.GetOldCurY();
}
+ if (nMovX < 0 && nOldX == 0)
+ { // trying to go left from 1st column
+ if (nMovY == 0) // done, because no vertical move is requested
+ return;
+ }
+ if (nMovY < 0 && nOldY == 0)
+ { // trying to go up from 1st row
+ if (nMovX == 0) // done, because no horizontal move is requested
+ return;
+ }
+
aViewData.ResetOldCursor();
if (nMovX != 0 && ValidColRow(nCurX,nCurY))