summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC├ędric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-02-14 14:19:52 +0100
committerTor Lillqvist <tlillqvist@suse.com>2012-02-14 15:52:18 +0200
commit66cf06ebdd4eeb95e801de114af06b49119fc7fe (patch)
tree6c1410893842ce99fbae3b5003dbd3205affa7ee
parentefae3866d2f3ff23f403d81f58e719a69bf070e9 (diff)
fdo#45748: Don't use empty pages fo computing the page break position
(cherry picked from commit 9baee86cbdec44c657d06f355bdba0537fb12a1a) Signed-off-by: Tor Lillqvist <tlillqvist@suse.com>
-rw-r--r--sw/source/ui/docvw/PageBreakWin.cxx8
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() );