summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-31 15:39:54 +0100
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-31 15:40:58 +0100
commit9babbf346c4d6f76e8b3a243a00e73a173c16ba6 (patch)
tree8b8cbd4b0a53454881a02cb3c3b7055b614b9df2
parent84370b807279cd8336c3e77278bae42b904324b4 (diff)
fdo#44836: Hide all the page breaks of the pages before the first visible one
-rw-r--r--sw/source/core/layout/paintfrm.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index e7d16a3969d5..8aee0ec69e6c 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2850,6 +2850,22 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
// #i68597#
const bool bGridPainting(pSh->GetWin() && pSh->Imp()->HasDrawView() && pSh->Imp()->GetDrawView()->IsGridVisible());
+ // Hide all page break controls before showing them again
+ SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell );
+ if ( pWrtSh )
+ {
+ SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
+ SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
+ const SwPageFrm* pHiddenPage = pPage;
+ while ( pHiddenPage->GetPrev() != NULL )
+ {
+ pHiddenPage = static_cast< const SwPageFrm* >( pHiddenPage->GetPrev() );
+ SwFrameControlPtr pControl = rMngr.GetControl( PageBreak, pHiddenPage );
+ if ( pControl.get() )
+ pControl->ShowAll( false );
+ }
+ }
+
// #i76669#
SwViewObjectContactRedirector aSwRedirector( *pSh );