From 9baee86cbdec44c657d06f355bdba0537fb12a1a Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Tue, 14 Feb 2012 14:19:52 +0100 Subject: fdo#45748: Don't use empty pages fo computing the page break position --- sw/source/ui/docvw/PageBreakWin.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sw') 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() ); -- cgit