diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-20 13:29:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-20 13:52:18 +0200 |
commit | 2675fde1aace586300741207d0dfbf3d7deae867 (patch) | |
tree | 2abc8ff84289f85186edc65d5352ce835de18863 /sw/source/core/docnode | |
parent | b8e48824bf5b71599c0b8604c444d653fad57e5a (diff) |
loplugin: defaultparams
Change-Id: I36c7086117112d35df98c05030c965c21d9330ac
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 18 |
5 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 22f4a5f34941..e4a760efa6bf 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -1264,12 +1264,12 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c pNewSect->SetCondition( GetSection().GetCondition() ); pNewSect->SetLinkFileName( GetSection().GetLinkFileName() ); if( !pNewSect->IsHiddenFlag() && GetSection().IsHidden() ) - pNewSect->SetHidden( true ); + pNewSect->SetHidden(); if( !pNewSect->IsProtectFlag() && GetSection().IsProtect() ) - pNewSect->SetProtect( true ); + pNewSect->SetProtect(); // edit in readonly sections if( !pNewSect->IsEditInReadonlyFlag() && GetSection().IsEditInReadonly() ) - pNewSect->SetEditInReadonly( true ); + pNewSect->SetEditInReadonly(); SwNodeRange aRg( *this, +1, *EndOfSectionNode() ); // Where am I? rNds._Copy( aRg, aInsPos, false ); @@ -1400,7 +1400,7 @@ OUString SwDoc::GetUniqueSectionName( const OUString* pChkStr ) const for( auto pFormat : *mpSectionFormatTable ) { - const SwSectionNode *const pSectNd = pFormat->GetSectionNode( false ); + const SwSectionNode *const pSectNd = pFormat->GetSectionNode(); if( pSectNd != nullptr ) { const OUString rNm = pSectNd->GetSection().GetSectionName(); diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 2ec5f3dc12e8..70b56363b4a0 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -168,7 +168,7 @@ lcl_SetDfltBoxAttr(SwTableBox& rBox, DfltBoxAttrList_t & rBoxFormatArr, if( pAutoFormat ) pAutoFormat->UpdateToSet( nId, (SfxItemSet&)pNewTableBoxFormat->GetAttrSet(), SwTableAutoFormat::UPDATE_BOX, - pDoc->GetNumberFormatter( true ) ); + pDoc->GetNumberFormatter() ); else ::lcl_SetDfltBoxAttr( *pNewTableBoxFormat, nId ); @@ -201,7 +201,7 @@ static SwTableBoxFormat *lcl_CreateAFormatBoxFormat( SwDoc &rDoc, std::vector<Sw SwTableBoxFormat* pBoxFormat = rDoc.MakeTableBoxFormat(); rAutoFormat.UpdateToSet( nId, (SfxItemSet&)pBoxFormat->GetAttrSet(), SwTableAutoFormat::UPDATE_BOX, - rDoc.GetNumberFormatter( true ) ); + rDoc.GetNumberFormatter( ) ); if( USHRT_MAX != nCols ) pBoxFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 )); @@ -1875,7 +1875,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor ) pDelBox = pLn->GetTabBoxes().back(); } SwTableBox* pNextBox = pDelLine->FindNextBox( pTableNd->GetTable(), - pDelBox, true ); + pDelBox ); while( pNextBox && pNextBox->GetFrameFormat()->GetProtect().IsContentProtected() ) pNextBox = pNextBox->FindNextBox( pTableNd->GetTable(), pNextBox ); @@ -1887,7 +1887,7 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor ) while( !pDelBox->GetSttNd() ) pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0]; pNextBox = pDelLine->FindPreviousBox( pTableNd->GetTable(), - pDelBox, true ); + pDelBox ); while( pNextBox && pNextBox->GetFrameFormat()->GetProtect().IsContentProtected() ) pNextBox = pNextBox->FindPreviousBox( pTableNd->GetTable(), pNextBox ); @@ -2693,8 +2693,8 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , OSL_ENSURE( rFill.Count(), "Deleting from empty vector. Fasten your seatbelts!" ); // #i60818# There may be only one entry in rFill. Make // code robust by checking count of rFill. - if ( rFill.Count() ) rFill.Remove( 0, 1 ); - if ( rFill.Count() ) rFill.Remove( rFill.Count() - 1 , 1 ); + if ( rFill.Count() ) rFill.Remove( 0 ); + if ( rFill.Count() ) rFill.Remove( rFill.Count() - 1 ); rFill.SetLastRowAllowedToChange( !pTab->HasFollowFlowLine() ); } @@ -3688,7 +3688,7 @@ static bool lcl_SetAFormatBox( _FndBox & rBox, _SetAFormatTabPara *pSetPara ) SwTableAutoFormat::UPDATE_CHAR, 0 ); pSetPara->rTableFormat.UpdateToSet( nPos, aBoxSet, SwTableAutoFormat::UPDATE_BOX, - pDoc->GetNumberFormatter( true ) ); + pDoc->GetNumberFormatter() ); if( aCharSet.Count() ) { sal_uLong nSttNd = pSetBox->GetSttIdx()+1; @@ -3876,7 +3876,7 @@ bool SwDoc::GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGe SwTableAutoFormat::UPDATE_CHAR, 0 ); rGet.UpdateFromSet( nPos, pFBox->GetFrameFormat()->GetAttrSet(), SwTableAutoFormat::UPDATE_BOX, - GetNumberFormatter( true ) ); + GetNumberFormatter() ); } } diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index b8382bbf319b..75537b5920a5 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1668,7 +1668,7 @@ bool SwContentNode::GetAttr( SfxItemSet& rSet, bool bInParent ) const const SwAttrSet& rAttrSet = GetSwAttrSet(); if( bInParent ) - return rSet.Set( rAttrSet, true ); + return rSet.Set( rAttrSet ); rSet.Put( rAttrSet ); return rSet.Count() != 0; diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 71704fc0db07..7cf97fcfa04b 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -915,7 +915,7 @@ void SwNodes::SectionDown(SwNodeRange *pRange, SwStartNodeType eSttNdTyp ) SwNodeIndex aTmpIdx( *pAktNode->StartOfSectionNode() ); if( pAktNode->GetEndNode() ) - DelNodes( pRange->aStart, 1 ); // prevent empty section + DelNodes( pRange->aStart ); // prevent empty section else { // insert a new StartNode @@ -929,7 +929,7 @@ void SwNodes::SectionDown(SwNodeRange *pRange, SwStartNodeType eSttNdTyp ) // For other nodes, insert a new end node. --pRange->aEnd; if( pRange->aEnd.GetNode().GetStartNode() ) - DelNodes( pRange->aEnd, 1 ); + DelNodes( pRange->aEnd ); else { ++pRange->aEnd; @@ -988,10 +988,10 @@ void SwNodes::SectionUp(SwNodeRange *pRange) } return ; } - DelNodes( pRange->aStart, 1 ); + DelNodes( pRange->aStart ); } else if( aIdx == pRange->aStart.GetIndex()-1 ) // before StartNode - DelNodes( aIdx, 1 ); + DelNodes( aIdx ); else new SwEndNode( pRange->aStart, *aIdx.GetNode().GetStartNode() ); @@ -1000,7 +1000,7 @@ void SwNodes::SectionUp(SwNodeRange *pRange) // For other nodes, insert a new end node. SwNodeIndex aTmpIdx( pRange->aEnd ); if( pRange->aEnd.GetNode().IsEndNode() ) - DelNodes( pRange->aEnd, 1 ); + DelNodes( pRange->aEnd ); else { new SwStartNode( pRange->aEnd ); @@ -1767,7 +1767,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, SwStartNode* pSttNd = aRg.aStart.GetNode().GetStartNode(); _CopyNodes( SwNodeRange( *pSttNd, + 1, *pSttNd->EndOfSectionNode() ), - aInsPos, bNewFrms, false ); + aInsPos, bNewFrms ); // insert a DummyNode for the box-EndNode? if( bTableInsDummyNode ) diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 52ec387a4d14..360eded8a934 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -207,7 +207,7 @@ SwSection::SwSection( { if( pParentSect->IsHiddenFlag() ) { - SetHidden( true ); + SetHidden(); } m_Data.SetProtectFlag( pParentSect->IsProtectFlag() ); @@ -524,7 +524,7 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) if( bUpdateFootnote ) { - SwSectionNode* pSectNd = GetFormat()->GetSectionNode( false ); + SwSectionNode* pSectNd = GetFormat()->GetSectionNode(); if( pSectNd ) pSectNd->GetDoc()->GetFootnoteIdxs().UpdateFootnote(SwNodeIndex( *pSectNd )); } @@ -1185,7 +1185,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) ::sfx2::SvBaseLink::UpdateResult SwIntrnlSectRefLink::DataChanged( const OUString& rMimeType, const uno::Any & rValue ) { - SwSectionNode* pSectNd = rSectFormat.GetSectionNode( false ); + SwSectionNode* pSectNd = rSectFormat.GetSectionNode(); SwDoc* pDoc = rSectFormat.GetDoc(); SotClipboardFormatId nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType ); @@ -1290,7 +1290,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( nRet ) { - rSection.SetConnectFlag(true); + rSection.SetConnectFlag(); SwNodeIndex aSave( pPam->GetPoint()->nNode, -1 ); SwNodeRange* pCpyRg = 0; @@ -1378,7 +1378,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) pPam->SetMark(); // Rewire both SwPositions pDoc->CorrAbs( aSave, *pPam->GetPoint(), 0, true ); - pDoc->GetNodes().Delete( aSave, 1 ); + pDoc->GetNodes().Delete( aSave ); } delete pCpyRg; } @@ -1423,7 +1423,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( !IsError( aTmpReader.Read( *pRead ) )) { - rSection.SetConnectFlag(true); + rSection.SetConnectFlag(); } if( pESh ) @@ -1483,7 +1483,7 @@ void SwIntrnlSectRefLink::Closed() pDoc->UpdateSection( n, aSectionData ); // Make all Links within the Section visible again - SwSectionNode* pSectNd = rSectFormat.GetSectionNode( false ); + SwSectionNode* pSectNd = rSectFormat.GetSectionNode(); if( pSectNd ) SwSection::MakeChildLinksVisible( *pSectNd ); @@ -1591,13 +1591,13 @@ void SwSection::BreakLink() const SwNode* SwIntrnlSectRefLink::GetAnchor() const { - return rSectFormat.GetSectionNode( false ); + return rSectFormat.GetSectionNode(); } bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 , sal_Int32 ) const { - SwStartNode* pSttNd = rSectFormat.GetSectionNode( false ); + SwStartNode* pSttNd = rSectFormat.GetSectionNode(); return pSttNd && nSttNd < pSttNd->GetIndex() && pSttNd->EndOfSectionIndex() < nEndNd; |