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/doc/DocumentContentOperationsManager.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/doc/DocumentContentOperationsManager.cxx')
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 4e9177ca6899..eab114b71ee7 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -701,10 +701,10 @@ namespace RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode(); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON )); - for( size_t n = 0; n < rArr.size(); ++n ) + for(SaveRedline & rSvRedLine : rArr) { - rArr[ n ].SetPos( rPos ); - pDoc->getIDocumentRedlineAccess().AppendRedline( rArr[ n ].pRedl, true ); + rSvRedLine.SetPos( rPos ); + pDoc->getIDocumentRedlineAccess().AppendRedline( rSvRedLine.pRedl, true ); } pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); @@ -798,10 +798,10 @@ namespace RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode(); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON )); - for( size_t n = 0; n < rArr.size(); ++n ) + for(SaveRedline & rSvRedLine : rArr) { - rArr[ n ].SetPos( nInsPos ); - pDoc->getIDocumentRedlineAccess().AppendRedline( rArr[ n ].pRedl, true ); + rSvRedLine.SetPos( nInsPos ); + pDoc->getIDocumentRedlineAccess().AppendRedline( rSvRedLine.pRedl, true ); } pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); @@ -2260,9 +2260,8 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod if( !aSavRedlInsPosArr.empty() ) { SwNode* pNewNd = &aIdx.GetNode(); - for( size_t n = 0; n < aSavRedlInsPosArr.size(); ++n ) + for(SwRangeRedline* pTmp : aSavRedlInsPosArr) { - SwRangeRedline* pTmp = aSavRedlInsPosArr[ n ]; if( m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().Contains( pTmp ) ) { SwPosition* pEnd = pTmp->End(); |