summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2011-10-09 23:03:27 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2011-10-09 23:08:06 +0200
commit8647c6fbf73aa0fd5f0ad8f34afa0a6bc41d9576 (patch)
treece3d30d04a792c351613eac4a6d57e04b696ebcd /sw
parent42b8e37570356beaded307fa744046a2ff40c0de (diff)
Page Break: don't let the indicator being hidden due to the zoom level
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/docvw/PageBreakWin.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx
index 96ea560dc2c7..2caa8cc2a266 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 );
}