[Libreoffice-commits] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Tue Jan 31 06:41:03 PST 2012


 sw/source/core/layout/paintfrm.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 9babbf346c4d6f76e8b3a243a00e73a173c16ba6
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Tue Jan 31 15:39:54 2012 +0100

    fdo#44836: Hide all the page breaks of the pages before the first visible one

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index e7d16a3..8aee0ec 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 );
 


More information about the Libreoffice-commits mailing list