1 |
From e4decda5e2cf3f6cd2a7a41b23fb68ccf91e3f23 Mon Sep 17 00:00:00 2001 |
2 |
From: Kohei Yoshida <kyoshida@novell.com> |
3 |
Date: Sat, 12 Feb 2011 01:32:12 -0500 |
4 |
Subject: [PATCH] Get correct current position when shift-page up and down. (fdo#34026) |
5 |
|
6 |
When expanding a selection, we need to use the block end position |
7 |
as the "current" position instead of the current cursor position, as |
8 |
the cursor no longer moves during block selection. |
9 |
--- |
10 |
sc/source/ui/view/tabview2.cxx | 18 +++++++++++++++++- |
11 |
1 files changed, 17 insertions(+), 1 deletions(-) |
12 |
|
13 |
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx |
14 |
index 3bc9a82..73207ff 100644 |
15 |
--- a/sc/source/ui/view/tabview2.cxx |
16 |
+++ b/sc/source/ui/view/tabview2.cxx |
17 |
@@ -371,7 +371,23 @@ void ScTabView::GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPage |
18 |
{ |
19 |
SCCOL nCurX; |
20 |
SCROW nCurY; |
21 |
- aViewData.GetMoveCursor( nCurX,nCurY ); |
22 |
+ if (aViewData.IsRefMode()) |
23 |
+ { |
24 |
+ nCurX = aViewData.GetRefEndX(); |
25 |
+ nCurY = aViewData.GetRefEndY(); |
26 |
+ } |
27 |
+ else if (IsBlockMode()) |
28 |
+ { |
29 |
+ // block end position. |
30 |
+ nCurX = nBlockEndX; |
31 |
+ nCurY = nBlockEndY; |
32 |
+ } |
33 |
+ else |
34 |
+ { |
35 |
+ // cursor position |
36 |
+ nCurX = aViewData.GetCurX(); |
37 |
+ nCurY = aViewData.GetCurY(); |
38 |
+ } |
39 |
|
40 |
ScSplitPos eWhich = aViewData.GetActivePart(); |
41 |
ScHSplitPos eWhichX = WhichH( eWhich ); |
42 |
-- |
43 |
1.7.4 |
44 |
|