diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-09 15:56:50 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-10 07:38:53 +0000 |
commit | 557652cd8de557e2742a29cca8b1818a458e25eb (patch) | |
tree | 3c4d1478b078c819bf204411d66fc237a83b62bd | |
parent | 99200d7cc2a952f92074934c647db076aae5e48b (diff) |
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@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/laycache.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/layout/layhelp.hxx | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 70c1409a0dc0..224520c66831 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 44d4fd5a42cc..ed71dd17c0ce 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 546d49f62915..57c747b4c0d1 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(); |