[Libreoffice-commits] core.git: sw/source

Noel Grandin noel at peralex.com
Fri Jun 10 07:39:20 UTC 2016


 sw/source/core/layout/frmtool.cxx  |    2 +-
 sw/source/core/layout/laycache.cxx |   12 ++++++------
 sw/source/core/layout/layhelp.hxx  |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 557652cd8de557e2742a29cca8b1818a458e25eb
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Jun 9 15:56:50 2016 +0200

    remove bBreakAfter& param from SwLayHelper constructor
    
    the constructor is only called from one spot, which does not
    care about the output value of bBreakAfter
    
    Change-Id: I184091d3862265f0718b52c2cd82cad861274c1c
    Reviewed-on: https://gerrit.libreoffice.org/26110
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 70c1409..224520c 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1258,7 +1258,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
         // Attention: the SwLayHelper class uses references to the content-,
         // page-, layout-frame etc. and may change them!
         pPageMaker = new SwLayHelper( pDoc, pFrame, pPrv, pPage, pLay,
-                pActualSection, bBreakAfter, nIndex, 0 == nEndIndex );
+                pActualSection, nIndex, 0 == nEndIndex );
         if( bStartPercent )
         {
             const sal_uLong nPageCount = pPageMaker->CalcPageCount();
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 44d4fd5..ed71dd1 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -461,14 +461,14 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
  * a guess, but a guess with statistical background.
  */
 SwLayHelper::SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* &rpPg,
-                          SwLayoutFrame* &rpL, SwActualSection* &rpA, bool &rB,
+                          SwLayoutFrame* &rpL, SwActualSection* &rpA,
                           sal_uLong nNodeIndex, bool bCache )
     : rpFrame( rpF )
     , rpPrv( rpP )
     , rpPage( rpPg )
     , rpLay( rpL )
     , rpActualSection( rpA )
-    , rbBreakAfter(rB)
+    , mbBreakAfter(false)
     , pDoc(pD)
     , nMaxParaPerPage( 25 )
     , nParagraphCnt( bCache ? 0 : USHRT_MAX )
@@ -588,8 +588,8 @@ bool SwLayHelper::CheckInsertPage()
                               nullptr :
                               rDesc.GetPageDesc();
 
-    bool bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter;
-    rbBreakAfter = rBrk.GetBreak() == SVX_BREAK_PAGE_AFTER ||
+    bool bBrk = nParagraphCnt > nMaxParaPerPage || mbBreakAfter;
+    mbBreakAfter = rBrk.GetBreak() == SVX_BREAK_PAGE_AFTER ||
                    rBrk.GetBreak() == SVX_BREAK_PAGE_BOTH;
     if ( !bBrk )
         bBrk = rBrk.GetBreak() == SVX_BREAK_PAGE_BEFORE ||
@@ -734,7 +734,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
                 sal_uInt16 nType = SW_LAYCACHE_IO_REC_PAGES;
                 if( bLongTab )
                 {
-                    rbBreakAfter = true;
+                    mbBreakAfter = true;
                     nOfst = static_cast<sal_Int32>(nRowCount + nMaxRowPerPage);
                 }
                 else
@@ -747,7 +747,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
                     {
                         nType = pImpl->GetBreakType( nIndex );
                         nOfst = pImpl->GetBreakOfst( nIndex++ );
-                        rbBreakAfter = true;
+                        mbBreakAfter = true;
                     }
                 }
 
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 546d49f..57c747b 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -103,7 +103,7 @@ class SwLayHelper
     SwPageFrame* &rpPage;
     SwLayoutFrame* &rpLay;
     SwActualSection* &rpActualSection;
-    bool &rbBreakAfter;
+    bool mbBreakAfter;
     SwDoc* pDoc;
     SwLayCacheImpl* pImpl;
     sal_uLong nMaxParaPerPage;
@@ -115,7 +115,7 @@ class SwLayHelper
     void CheckFlyCache_( SwPageFrame* pPage );
 public:
     SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* &rpPg,
-            SwLayoutFrame* &rpL, SwActualSection* &rpA, bool &rBrk,
+            SwLayoutFrame* &rpL, SwActualSection* &rpA,
             sal_uLong nNodeIndex, bool bCache );
     ~SwLayHelper();
     sal_uLong CalcPageCount();


More information about the Libreoffice-commits mailing list