From 4eed799a79cffa08a9cae7e8980a0f4673441289 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Wed, 18 Aug 2010 17:20:31 +0200 Subject: mib19: #163305# do not fire sheet activation events, when a sheet gets inserted/deleted etc. and the active sheet just changes its index --- sc/source/ui/view/tabview3.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/ui/view/tabview3.cxx') diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 90bfe0c24e5c..93d1edd7fee5 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -1549,7 +1549,7 @@ void ScTabView::SelectNextTab( short nDir, BOOL bExtendSelection ) // SetTabNo - angezeigte Tabelle -void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection ) +void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSameTabButMoved ) { if ( !ValidTab(nTab) ) { @@ -1681,7 +1681,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection ) pGridWin[i]->UpdateEditViewPos(); } - TabChanged(); // DrawView + TabChanged( bSameTabButMoved ); // DrawView aViewData.GetViewShell()->WindowChanged(); // falls das aktive Fenster anders ist if ( !bUnoRefDialog ) -- cgit From 7319d6c51702d312e62a39d71805f44b2ac82ee3 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 20 Oct 2010 14:15:04 +0200 Subject: dr77: #i115067# don't calculate with negative positions in ScTabView::AlignToCursor --- sc/source/ui/view/tabview3.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sc/source/ui/view/tabview3.cxx') diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 90bfe0c24e5c..97d03c791597 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 ) -- cgit