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-20 20:19:08 +0000
commitc13226bcc5b298dacfe32340711bdfd4d15d8b3b (patch)
tree87d88bc57c261c775288b77c4d577f0d91054868 /sc
parent24ecf7a5fa9404f7e3125894d3fa001a0069a0c6 (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>
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 10de038f6ee9..6aa11395b554 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))