summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/paintfrm.cxx
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-04 17:31:52 +0100
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-04 17:34:28 +0100
commit8005d9db022c83fdfd64f6bb203e489dad13a664 (patch)
treeb98fe130c790103bdaf92b305b17d23a65372505 /sw/source/core/layout/paintfrm.cxx
parent9bb87161bbb4721af6810c89df3088a5f77bbead (diff)
Page Break: fix remaining indicator in some cases
When creating a new page without using a page break, before a page break, there was a remaining indicator. These are now checked and removed to avoid such cases.
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rwxr-xr-xsw/source/core/layout/paintfrm.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 387d8a38b099..55a2b7191c98 100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3341,15 +3341,16 @@ void SwPageFrm::PaintBreak( ) const
if ( pFirstFrm && pFirstFrm->IsTabFrm() )
pFlowFrm = static_cast< const SwTabFrm* >( pFirstFrm );
- if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) )
+ SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell );
+ if ( pWrtSh )
{
- SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell );
- if ( pWrtSh )
- {
- SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
- SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
+ SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
+ SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
+
+ if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) )
rMngr.SetPageBreakControl( this );
- }
+ else
+ rMngr.RemoveControlsByType( PageBreak, this );
}
}
SwLayoutFrm::PaintBreak( );