diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-05-31 19:30:46 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-05-31 23:35:54 +0200 |
commit | 1b554d3ada47063496b8cf4a28239da26a6537ae (patch) | |
tree | ef4e7d79aa311e92f4df3dfe31168a5b12c29daf /sw | |
parent | 3a2549197b0d90a1cd94a13fe0514fec5d5e0fa6 (diff) |
Use auto and range-based for loops
Change-Id: Idbef553cf734eb9eb194912e60f7811d35ce6c84
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/html/htmlctxt.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index e3673e5c2359..8772b6827175 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -143,7 +143,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) // alle noch offenen Attribute beenden und hinter der Tabelle // neu aufspannen _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; ++pHTMLAttributes) + for (auto nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; ++pHTMLAttributes) { _HTMLAttr *pAttr = *pHTMLAttributes; while( pAttr ) @@ -380,14 +380,14 @@ void SwHTMLParser::EndContext( _HTMLAttrContext *pContext ) void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext ) { _HTMLAttrs &rAttrs = pContext->GetAttrs(); - for( sal_uInt16 i=0; i<rAttrs.size(); i++ ) + for( auto pAttr : rAttrs ) { // einfaches Loeschen reicht hier nicht, weil das // Attribut auch aus seiner Liste ausgetragen werden // muss. Theoretisch koennt man natuerlich auch die Liste // und die Attribute getrennt loeschen, aber wenn man // dann was falsch gemacht hat, sieht es uebel aus. - DeleteAttr( rAttrs[i] ); + DeleteAttr( pAttr ); } OSL_ENSURE( !pContext->GetSpansSection(), |