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/core/layout/paintfrm.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/core/layout/paintfrm.cxx')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b9ab3aa3c7e5..66966758119d 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4613,9 +4613,8 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, pOut->SetDrawMode( nOldDrawMode ); - for ( size_t i = 0; i < aRegion.size(); ++i ) + for (SwRect & rOut : aRegion) { - SwRect &rOut = aRegion[i]; aOut = rOut; if ( rRect.IsOver( aOut ) && aOut.Height() > 0 && aOut.Width() > 0 ) { @@ -6766,9 +6765,8 @@ void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage, else if ( pLow->GetDrawObjs() ) { const SwSortedObjs& rObjs = *(pLow->GetDrawObjs()); - for ( size_t i = 0; i < rObjs.size(); ++i ) + for (SwAnchoredObject* pAnchoredObj : rObjs) { - const SwAnchoredObject* pAnchoredObj = rObjs[i]; if ( pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( pAnchoredObj->GetDrawObj()->GetLayer() ) && dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) @@ -7248,9 +7246,8 @@ void SwPageFrame::RefreshExtraData( const SwRect &rRect ) const SwLayoutFrame::RefreshExtraData( aRect ); if ( bLineInFly && GetSortedObjs() ) - for ( size_t i = 0; i < GetSortedObjs()->size(); ++i ) + for (SwAnchoredObject* pAnchoredObj : *GetSortedObjs()) { - const SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i]; if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); @@ -7283,9 +7280,8 @@ void SwLayoutFrame::RefreshExtraData( const SwRect &rRect ) const static_cast<const SwTextFrame*>(pCnt)->PaintExtraData( rRect ); } if ( bLineInFly && pCnt->GetDrawObjs() ) - for ( size_t i = 0; i < pCnt->GetDrawObjs()->size(); ++i ) + for (SwAnchoredObject* pAnchoredObj : *pCnt->GetDrawObjs()) { - const SwAnchoredObject* pAnchoredObj = (*pCnt->GetDrawObjs())[i]; if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr ) { const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj); |