[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Sun Oct 9 14:09:57 PDT 2011
sw/source/ui/docvw/PageBreakWin.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 8647c6fbf73aa0fd5f0ad8f34afa0a6bc41d9576
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Sun Oct 9 23:03:27 2011 +0200
Page Break: don't let the indicator being hidden due to the zoom level
diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx
index 96ea560..2caa8cc 100644
--- a/sw/source/ui/docvw/PageBreakWin.cxx
+++ b/sw/source/ui/docvw/PageBreakWin.cxx
@@ -317,19 +317,22 @@ void SwPageBreakWin::UpdatePosition( )
if ( aFrmRect.Top() == aPrevFrmRect.Top() )
nYLineOffset = ( aBoundRect.Top() + aFrmRect.Top() ) / 2;
+ Rectangle aVisArea = GetEditWin()->LogicToPixel( GetEditWin()->GetView().GetVisArea() );
+
Size aBtnSize( BUTTON_WIDTH + ARROW_WIDTH, BUTTON_HEIGHT );
- Point aBtnPos( aFrmRect.Left() - aBtnSize.Width() + ARROW_WIDTH / 2,
+ long nLeft = std::max( aFrmRect.Left() - aBtnSize.Width(), aVisArea.Left() );
+ Point aBtnPos( nLeft + ARROW_WIDTH / 2,
nYLineOffset - aBtnSize.Height() / 2 );
SetPosSizePixel( aBtnPos, aBtnSize );
// Update the line position
- Point aLinePos( aFrmRect.Left() + ARROW_WIDTH / 2, nYLineOffset );
+ Point aLinePos( nLeft + ARROW_WIDTH / 2, nYLineOffset );
unsigned long nSidebarWidth = 0;
const SwPostItMgr* pPostItMngr = GetEditWin()->GetView().GetWrtShell().GetPostItMgr();
if ( pPostItMngr && pPostItMngr->HasNotes() && pPostItMngr->ShowNotes() )
nSidebarWidth = pPostItMngr->GetSidebarBorderWidth( true ) + pPostItMngr->GetSidebarWidth( true );
- Size aLineSize( aFrmRect.GetWidth() + nSidebarWidth - ARROW_WIDTH / 2, 1 );
+ Size aLineSize( aFrmRect.Right() + nSidebarWidth - nLeft, 1 );
m_pLine->SetPosSizePixel( aLinePos, aLineSize );
}
More information about the Libreoffice-commits
mailing list