diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-09 15:44:23 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-09 16:14:33 +0200 |
commit | 36bc405d72f1d1898437dfa25d8cb4bdfba63e06 (patch) | |
tree | 2679cc78c4e596284cc8725d3b60f4aec1c630b9 /sc/source/ui/vba/vbarange.cxx | |
parent | 1150a1a8eb1759160b9d88e99d95e5ad082f40be (diff) |
fix column navigation with CTRL + direction, fdo#45020
Change-Id: I422b1b85e539d4e2819b93deaf8543410b44b9bd
Diffstat (limited to 'sc/source/ui/vba/vbarange.cxx')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 3bc6e4f80009..7caa0e84a919 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3705,21 +3705,20 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException) ScDocShell* pDocShell = getScDocShell(); ScDocument* pDoc = pDocShell->GetDocument(); - SCsCOL nMoveX = 0; - SCsROW nMoveY = 0; + ScMoveDirection eDirection; switch ( Direction ) { case excel::XlDirection::xlDown: - nMoveY = 1; + eDirection = SC_MOVE_DOWN; break; case excel::XlDirection::xlUp: - nMoveY = -1; + eDirection = SC_MOVE_UP; break; case excel::XlDirection::xlToLeft: - nMoveX = -1; + eDirection = SC_MOVE_LEFT; break; case excel::XlDirection::xlToRight: - nMoveX = 1; + eDirection = SC_MOVE_RIGHT; break; default: throw uno::RuntimeException( ::rtl::OUString( "Invalid Direction" ), uno::Reference< uno::XInterface >() ); @@ -3727,7 +3726,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException) if ( pDoc ) { - pDoc->FindAreaPos( nNewX, nNewY, nTab, nMoveX, nMoveY ); + pDoc->FindAreaPos( nNewX, nNewY, nTab, eDirection ); } ScRange aNewRange( (SCCOL)nNewX, (SCROW)nNewY, nTab, (SCCOL)nNewX, (SCROW)nNewY, nTab ); |