summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabview3.cxx
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-21 17:18:37 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-21 17:18:37 +0100
commitd672102cc70fa4b24eed730e89e9e766cc10a525 (patch)
treeee6e081a403e1e23af6ec7850a34eb10fc7fc8fd /sc/source/ui/view/tabview3.cxx
parent9617758b4b0997f5981a1303684ba9c9a4dd148b (diff)
parent6f68642b7b2310b902264849a5ffc5dca6c15510 (diff)
removetooltypes01: Rebase to DEV300m98
Diffstat (limited to 'sc/source/ui/view/tabview3.cxx')
-rw-r--r--sc/source/ui/view/tabview3.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 3622042646e2..19289e4cf703 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -767,11 +767,13 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
{
nNewDeltaX = nDeltaX + nCurX - aViewData.GetCurX();
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
{
nNewDeltaY = nDeltaY + nCurY - aViewData.GetCurY();
+ if (nNewDeltaY < 0) nNewDeltaY = 0;
nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
@@ -780,7 +782,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nCurX < nNewDeltaX || nCurX >= nNewDeltaX+nSizeX )
{
nNewDeltaX = nCurX - (nSizeX / 2);
- if (nNewDeltaX < 0) nNewDeltaY = 0;
+ if (nNewDeltaX < 0) nNewDeltaX = 0;
nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nNewDeltaY || nCurY >= nNewDeltaY+nSizeY )