diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-11 09:53:50 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-12 07:12:44 +0000 |
commit | b415494bf0468b74318b61f114e2ff4ae68c00ee (patch) | |
tree | 432f9397ecf4c410e4e9767f433c60e4dc0b0087 /sw/source/uibase/app/docstyle.cxx | |
parent | 875984617cfd6c773eb93f339929eb3fabd3e97b (diff) |
clang-tidy modernize-loop-convert in sw
Change-Id: I1f4a0ad6658bd3154c48940296aa8edc1ea1612c
Reviewed-on: https://gerrit.libreoffice.org/24876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase/app/docstyle.cxx')
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index a4a0a557621c..dcbfba26e97e 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -2956,43 +2956,43 @@ void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList, { SwDoc& rDoc = static_cast<SwDocStyleSheetPool*>(pBasePool)->GetDoc(); bool bUsed = false; - for ( size_t i=0; i < rList.size(); ++i ) + for (const auto & i : rList) { bool bHidden = false; - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rList[i], (SwGetPoolIdFromName)nSection); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(i, (SwGetPoolIdFromName)nSection); switch ( nSection ) { case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( nId ); - SwFormat* pFormat = rDoc.FindTextFormatCollByName( rList[i] ); + SwFormat* pFormat = rDoc.FindTextFormatCollByName( i ); bHidden = pFormat && pFormat->IsHidden( ); } break; case nsSwGetPoolIdFromName::GET_POOLID_CHRFMT: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFormatUsed( nId ); - SwFormat* pFormat = rDoc.FindCharFormatByName( rList[i] ); + SwFormat* pFormat = rDoc.FindCharFormatByName( i ); bHidden = pFormat && pFormat->IsHidden( ); } break; case nsSwGetPoolIdFromName::GET_POOLID_FRMFMT: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFormatUsed( nId ); - SwFormat* pFormat = rDoc.FindFrameFormatByName( rList[i] ); + SwFormat* pFormat = rDoc.FindFrameFormatByName( i ); bHidden = pFormat && pFormat->IsHidden( ); } break; case nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolPageDescUsed( nId ); - SwPageDesc* pPgDesc = rDoc.FindPageDesc(rList[i]); + SwPageDesc* pPgDesc = rDoc.FindPageDesc(i); bHidden = pPgDesc && pPgDesc->IsHidden( ); } break; case nsSwGetPoolIdFromName::GET_POOLID_NUMRULE: { - SwNumRule* pRule = rDoc.FindNumRulePtr( rList[i] ); + SwNumRule* pRule = rDoc.FindNumRulePtr( i ); bUsed = pRule && SwDoc::IsUsed( *pRule ); bHidden = pRule && pRule->IsHidden( ); } @@ -3003,7 +3003,7 @@ void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList, bool bMatchHidden = ( bTestHidden && ( bHidden || !bOnlyHidden ) ) || ( !bTestHidden && ( !bHidden || bUsed ) ); if ( ( !bTestUsed && bMatchHidden ) || ( bTestUsed && bUsed ) ) - aLst.Append( cType, rList[i] ); + aLst.Append( cType, i ); } } |