diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-12-17 14:48:10 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-12-17 15:18:11 -0500 |
commit | f6ea27c111d1eff28649c567616c8add708ae4d0 (patch) | |
tree | 15c94d988b82c04853bc59f8741e6d429abc8d6a /sc/source/ui/view/tabview2.cxx | |
parent | 032f213e8bc3aa457e9c61f0e2e394a773d34f48 (diff) |
Use the current cursor position when expanding a selection.
When expanding a selection via shift-ctrl-<arrow key> use the
current cursor position to deteremine how much the current selection
should be expanded. The old way was to use the block end position
which is is diagonally opposite of the cursor position. (n#659795)
Diffstat (limited to 'sc/source/ui/view/tabview2.cxx')
-rw-r--r-- | sc/source/ui/view/tabview2.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 91e5cc3cc96a..2559c0881bf6 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -450,8 +450,12 @@ void ScTabView::GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode } else if (IsBlockMode()) { + // block end position. nNewX = nBlockEndX; nNewY = nBlockEndY; + // cursor position - diagonally opposite of the block end position. + nCurX = aViewData.GetCurX(); + nCurY = aViewData.GetCurY(); } else { @@ -467,16 +471,16 @@ void ScTabView::GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode SCsCOLROW i; if ( nMovX > 0 ) for ( i=0; i<nMovX; i++ ) - pDoc->FindAreaPos( nNewX, nNewY, nTab, 1, 0 ); + pDoc->FindAreaPos( nNewX, nCurY, nTab, 1, 0 ); if ( nMovX < 0 ) for ( i=0; i<-nMovX; i++ ) - pDoc->FindAreaPos( nNewX, nNewY, nTab, -1, 0 ); + pDoc->FindAreaPos( nNewX, nCurY, nTab, -1, 0 ); if ( nMovY > 0 ) for ( i=0; i<nMovY; i++ ) - pDoc->FindAreaPos( nNewX, nNewY, nTab, 0, 1 ); + pDoc->FindAreaPos( nCurX, nNewY, nTab, 0, 1 ); if ( nMovY < 0 ) for ( i=0; i<-nMovY; i++ ) - pDoc->FindAreaPos( nNewX, nNewY, nTab, 0, -1 ); + pDoc->FindAreaPos( nCurX, nNewY, nTab, 0, -1 ); if (eMode==SC_FOLLOW_JUMP) // unten/rechts nicht zuviel grau anzeigen { |