[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source

Tor Lillqvist tml at kemper.freedesktop.org
Tue Feb 14 05:57:51 PST 2012


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

New commits:
commit 66cf06ebdd4eeb95e801de114af06b49119fc7fe
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
    
    (cherry picked from commit 9baee86cbdec44c657d06f355bdba0537fb12a1a)
    
    Signed-off-by: Tor Lillqvist <tlillqvist at suse.com>

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