[Libreoffice-commits] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Tue Feb 14 05:38:31 PST 2012


 sw/source/ui/docvw/PageBreakWin.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9baee86cbdec44c657d06f355bdba0537fb12a1a
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Tue Feb 14 14:19:52 2012 +0100

    fdo#45748: Don't use empty pages fo computing the page break position

diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx
index 0439bc3..f92101c 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() );


More information about the Libreoffice-commits mailing list