diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-31 12:17:55 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-31 13:25:28 +0200 |
commit | 0d06d1d16775fde3b0b34f3374907e07cbba763d (patch) | |
tree | bd74c0df75afe158c8ae9a67dd1c41d2cd2239eb /oox/source/ole/axbinaryreader.cxx | |
parent | 67c04cecc86f4a2e11da3b1fd982940a526cb6cb (diff) |
Use for-range loops in oox (part2)
Change-Id: I7cbeb67a1adcdb9b0003e22b61789a882fc336c9
Reviewed-on: https://gerrit.libreoffice.org/52182
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'oox/source/ole/axbinaryreader.cxx')
-rw-r--r-- | oox/source/ole/axbinaryreader.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx index 14ed7f382d9d..e478677f9aeb 100644 --- a/oox/source/ole/axbinaryreader.cxx +++ b/oox/source/ole/axbinaryreader.cxx @@ -249,9 +249,11 @@ bool AxBinaryPropertyReader::finalizeImport() maInStrm.align( 4 ); if( ensureValid( mnPropFlags == 0 ) && !maLargeProps.empty() ) { - for( ComplexPropVector::iterator aIt = maLargeProps.begin(), aEnd = maLargeProps.end(); ensureValid() && (aIt != aEnd); ++aIt ) + for (auto const& largeProp : maLargeProps) { - ensureValid( (*aIt)->readProperty( maInStrm ) ); + if (!ensureValid()) + break; + ensureValid( largeProp->readProperty( maInStrm ) ); maInStrm.align( 4 ); } } @@ -259,8 +261,14 @@ bool AxBinaryPropertyReader::finalizeImport() // read stream properties (no stream alignment between properties!) if( ensureValid() && !maStreamProps.empty() ) - for( ComplexPropVector::iterator aIt = maStreamProps.begin(), aEnd = maStreamProps.end(); ensureValid() && (aIt != aEnd); ++aIt ) - ensureValid( (*aIt)->readProperty( maInStrm ) ); + { + for (auto const& streamProp : maStreamProps) + { + if (!ensureValid()) + break; + ensureValid( streamProp->readProperty( maInStrm ) ); + } + } return mbValid; } |