diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-02-14 14:19:52 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-02-14 14:39:00 +0100 |
commit | 9baee86cbdec44c657d06f355bdba0537fb12a1a (patch) | |
tree | 5a614b21737a3708aeeb9ffbdf69dcef92f7126b /sw | |
parent | 161c3f179f71eda2a32dabaf68ff6fb3ba487062 (diff) |
fdo#45748: Don't use empty pages fo computing the page break position
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/docvw/PageBreakWin.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 0439bc3da0ee..f92101cc4c72 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -333,9 +333,13 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) } const SwPageFrm* pPageFrm = GetPageFrame(); - const SwFrm* pPrevPage = pPageFrm->GetPrev(); - while ( pPrevPage && ( pPrevPage->Frm().Top( ) == pPageFrm->Frm().Top( ) ) ) + const SwFrm* pPrevPage = pPageFrm; + do + { pPrevPage = pPrevPage->GetPrev(); + } + while ( pPrevPage && ( ( pPrevPage->Frm().Top( ) == pPageFrm->Frm().Top( ) ) + || static_cast< const SwPageFrm* >( pPrevPage )->IsEmptyPage( ) ) ); Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrm->GetBoundRect().SVRect() ); Rectangle aFrmRect = GetEditWin()->LogicToPixel( pPageFrm->Frm().SVRect() ); |