summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-31 15:39:54 +0100
committerPetr Mladek <pmladek@suse.cz>2012-01-31 18:27:19 +0100
commit1b8de4e286b8ba385b7ef361a508b2f3bb25e878 (patch)
tree326962b2147bf44cab4586691f46e8654811694b
parentFix fdo#42543: Don't paint a frame around the list of edit boxes. (diff)
downloadcore-1b8de4e286b8ba385b7ef361a508b2f3bb25e878.tar.gz
core-1b8de4e286b8ba385b7ef361a508b2f3bb25e878.zip
fdo#44836: Hide all the page breaks of the pages before the first visible one
Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Michael Meeks <michael.meeks@suse.com> Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rwxr-xr-xsw/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 074a54aad479..dced1b7b2c4c 100755
--- 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 );