diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-08 13:13:59 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-09 10:07:45 +0200 |
commit | c09b3e32372537be739182b02ae83a96386d1e1c (patch) | |
tree | 04e93ba798e8c36363792f2ba903b0f9c4ba21ea /sw/source/core/docnode/ndsect.cxx | |
parent | af74913da2b63857a248ac8fc4fa438b7a8663ec (diff) |
loplugin:constantparam in sw
Change-Id: I8fa1af4a34770b71f6f4bb28b3313edf4875322b
Diffstat (limited to 'sw/source/core/docnode/ndsect.cxx')
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 419d0fb37e62..b65f244f20c0 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -190,7 +190,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, GetIDocumentUndoRedo().DoUndo(false); } - SwSectionFormat* const pFormat = MakeSectionFormat( nullptr ); + SwSectionFormat* const pFormat = MakeSectionFormat(); if ( pAttr ) { pFormat->SetFormatAttr( *pAttr ); @@ -506,10 +506,9 @@ SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) return nullptr; } -SwSectionFormat* SwDoc::MakeSectionFormat( SwSectionFormat *pDerivedFrom ) +SwSectionFormat* SwDoc::MakeSectionFormat() { - SwSectionFormat* pNew = new SwSectionFormat( - pDerivedFrom == nullptr ? mpDfltFrameFormat : pDerivedFrom, this ); + SwSectionFormat* pNew = new SwSectionFormat( mpDfltFrameFormat, this ); mpSectionFormatTable->push_back( pNew ); return pNew; } @@ -1096,7 +1095,7 @@ void SwSectionNode::MakeFrames(const SwNodeIndex & rIdx ) { pViewShell->InvalidateAccessibleParaFlowRelation( dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), - dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt()) ); } } pNew = pSct; @@ -1122,7 +1121,7 @@ void SwSectionNode::MakeFrames(const SwNodeIndex & rIdx ) { pViewShell->InvalidateAccessibleParaFlowRelation( dynamic_cast<SwTextFrame*>(pNew->FindNextCnt( true )), - dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt( true )) ); + dynamic_cast<SwTextFrame*>(pNew->FindPrevCnt()) ); } } if ( bInitNewSect ) @@ -1196,7 +1195,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c const SwNodes& rNds = GetNodes(); // Copy the SectionFrameFormat - SwSectionFormat* pSectFormat = pDoc->MakeSectionFormat( nullptr ); + SwSectionFormat* pSectFormat = pDoc->MakeSectionFormat(); pSectFormat->CopyAttrs( *GetSection().GetFormat() ); std::unique_ptr<SwTOXBase> pTOXBase; |