diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-05-31 20:41:44 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-05-31 23:35:54 +0200 |
commit | 0b8ae8aa7867e63f12517e4a575a700bd07f6d7d (patch) | |
tree | 6fbeaf8e8d6cdb2e5421135c37b2b5d0d5203073 /sw/source/filter/html/swhtml.cxx | |
parent | 1b554d3ada47063496b8cf4a28239da26a6537ae (diff) |
Use size_t, auto and range-based for loops
Change-Id: I7f3672928b3d1ee937c7c6c2684b1396425b9fe6
Diffstat (limited to 'sw/source/filter/html/swhtml.cxx')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 4ab6dee8fda1..f5f501e23d91 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -4085,7 +4085,7 @@ void SwHTMLParser::EndHeading() // Kontext zu dem Token suchen und vom Stack holen _HTMLAttrContext *pCntxt = 0; - sal_uInt16 nPos = aContexts.size(); + auto nPos = aContexts.size(); while( !pCntxt && nPos>nContextStMin ) { switch( aContexts[--nPos]->GetToken() ) @@ -4283,7 +4283,7 @@ void SwHTMLParser::NewDefList() nDefListDeep++; bool bInDD = false, bNotInDD = false; - sal_uInt16 nPos = aContexts.size(); + auto nPos = aContexts.size(); while( !bInDD && !bNotInDD && nPos>nContextStMin ) { sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken(); @@ -4377,7 +4377,7 @@ void SwHTMLParser::NewDefListItem( int nToken ) { // festellen, ob das DD/DT in einer DL vorkommt bool bInDefList = false, bNotInDefList = false; - sal_uInt16 nPos = aContexts.size(); + auto nPos = aContexts.size(); while( !bInDefList && !bNotInDefList && nPos>nContextStMin ) { sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken(); @@ -4418,7 +4418,7 @@ void SwHTMLParser::EndDefListItem( int nToken, bool bSetColl, // Kontext zu dem Token suchen und vom Stack holen nToken &= ~1; _HTMLAttrContext *pCntxt = 0; - sal_uInt16 nPos = aContexts.size(); + auto nPos = aContexts.size(); while( !pCntxt && nPos>nContextStMin ) { sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken(); @@ -4547,9 +4547,8 @@ void SwHTMLParser::SetTextCollAttrs( _HTMLAttrContext *pContext ) sal_uInt16 nLeftMargin = 0, nRightMargin = 0; // die Einzuege und short nFirstLineIndent = 0; // Abstaende - sal_uInt16 i; - for( i = nContextStAttrMin; i < aContexts.size(); i++ ) + for( auto i = nContextStAttrMin; i < aContexts.size(); ++i ) { const _HTMLAttrContext *pCntxt = aContexts[i]; @@ -4716,8 +4715,8 @@ void SwHTMLParser::SetTextCollAttrs( _HTMLAttrContext *pContext ) // bisherige harte Attributierung des Absatzes entfernen if( !aParaAttrs.empty() ) { - for( i=0; i<aParaAttrs.size(); i++ ) - aParaAttrs[i]->Invalidate(); + for( auto pParaAttr : aParaAttrs ) + pParaAttr->Invalidate(); aParaAttrs.clear(); } |