diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-12 09:45:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-12 09:46:23 +0100 |
commit | be3ee9c889f4240848a3f232f2b3009ea647fefc (patch) | |
tree | 32a46b1190957d19036052337329b2075c3a9aa0 /svtools/source/control | |
parent | 16cd97480d0681d37f86e89366e1f9964ec16ef8 (diff) |
callcatcher: update unused code list
Diffstat (limited to 'svtools/source/control')
-rw-r--r-- | svtools/source/control/scrwin.cxx | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index a60833b5a2fb..5363db7f7fc8 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -329,89 +329,6 @@ void ScrollableWindow::SetTotalSize( const Size& rNewSize ) //------------------------------------------------------------------- -sal_Bool ScrollableWindow::MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy ) -{ - Rectangle aTarget; - Rectangle aTotRect( Point(0, 0), PixelToLogic( aTotPixSz ) ); - - if ( bSloppy ) - { - aTarget = rTarget; - - // at maximum to right border - if ( aTarget.Right() > aTotRect.Right() ) - { - long nDelta = aTarget.Right() - aTotRect.Right(); - aTarget.Left() -= nDelta; - aTarget.Right() -= nDelta; - - // too wide? - if ( aTarget.Left() < aTotRect.Left() ) - aTarget.Left() = aTotRect.Left(); - } - - // at maximum to bottom border - if ( aTarget.Bottom() > aTotRect.Bottom() ) - { - long nDelta = aTarget.Bottom() - aTotRect.Bottom(); - aTarget.Top() -= nDelta; - aTarget.Bottom() -= nDelta; - - // too high? - if ( aTarget.Top() < aTotRect.Top() ) - aTarget.Top() = aTotRect.Top(); - } - - // at maximum to left border - if ( aTarget.Left() < aTotRect.Left() ) - { - long nDelta = aTarget.Left() - aTotRect.Left(); - aTarget.Right() -= nDelta; - aTarget.Left() -= nDelta; - - // too wide? - if ( aTarget.Right() > aTotRect.Right() ) - aTarget.Right() = aTotRect.Right(); - } - - // at maximum to top border - if ( aTarget.Top() < aTotRect.Top() ) - { - long nDelta = aTarget.Top() - aTotRect.Top(); - aTarget.Bottom() -= nDelta; - aTarget.Top() -= nDelta; - - // too high? - if ( aTarget.Bottom() > aTotRect.Bottom() ) - aTarget.Bottom() = aTotRect.Bottom(); - } - } - else - aTarget = rTarget.GetIntersection( aTotRect ); - - // is the area already visible? - Rectangle aVisArea( GetVisibleArea() ); - if ( aVisArea.IsInside(rTarget) ) - return sal_True; - - // is there somewhat to scroll? - if ( aVisArea.TopLeft() != aTarget.TopLeft() ) - { - Rectangle aBox( aTarget.GetUnion(aVisArea) ); - long nDeltaX = ( aBox.Right() - aVisArea.Right() ) + - ( aBox.Left() - aVisArea.Left() ); - long nDeltaY = ( aBox.Top() - aVisArea.Top() ) + - ( aBox.Bottom() - aVisArea.Bottom() ); - Scroll( nDeltaX, nDeltaY ); - } - - // determine if the target is completely visible - return aVisArea.GetWidth() >= aTarget.GetWidth() && - aVisArea.GetHeight() >= aTarget.GetHeight(); -} - -//------------------------------------------------------------------- - Rectangle ScrollableWindow::GetVisibleArea() const { Point aTopLeft( PixelToLogic( Point() ) ); |