[Libreoffice-commits] .: Branch 'libreoffice-3-5-0' - sw/source

Petr Mladek pmladek at kemper.freedesktop.org
Tue Jan 31 09:28:22 PST 2012


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

New commits:
commit 1b8de4e286b8ba385b7ef361a508b2f3bb25e878
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
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>
    Signed-off-by: Michael Meeks <michael.meeks at suse.com>
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 074a54a..dced1b7 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 );
 


More information about the Libreoffice-commits mailing list