diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-21 19:52:24 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-21 20:05:23 +0400 |
commit | 46fd2a3bf2a53c64c040590afe450505fcb13c10 (patch) | |
tree | ab1b25e36b949cdec94a98a4eb5ca72ed1b2efce | |
parent | a4aa96be3a9e24099a45850cadd5074d2db9a199 (diff) |
use a for loop
-rw-r--r-- | editeng/source/editeng/eertfpar.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/rtf/rtfnum.cxx | 9 |
2 files changed, 6 insertions, 10 deletions
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 4e7254fa1932..8322cd9d1326 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -434,16 +434,13 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) SvxRTFStyleType* EditRTFParser::FindStyleSheet( const XubString& rName ) { - SvxRTFStyleTbl aTable = GetStyleTbl(); - SvxRTFStyleTbl::iterator it = aTable.begin(); - while ( it != aTable.end() ) + SvxRTFStyleTbl& rTable = GetStyleTbl(); + for ( SvxRTFStyleTbl::iterator it = rTable.begin(); it != rTable.end(); ++it ) { SvxRTFStyleType* pS = it->second; if ( pS->sName == rName ) return pS; - ++it; } - return NULL; } diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index f6eb0c015a52..dbd051c6d226 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -594,8 +594,9 @@ void SwRTFParser::ReadListOverrideTable() std::map<sal_Int32,SwTxtFmtColl*>::const_iterator iterColl; sal_uInt16 nRulePos( USHRT_MAX ); const SwNumRule *pNumRule = 0; - SvxRTFStyleTbl::iterator it = GetStyleTbl().begin(); - do { + for (SvxRTFStyleTbl::iterator it = GetStyleTbl().begin(); + it != GetStyleTbl().end(); ++it) + { SvxRTFStyleType* pStyle = it->second; if ( MAXLEVEL > pStyle->nOutlineNo ) { @@ -635,9 +636,7 @@ void SwRTFParser::ReadListOverrideTable() } pStyle->aAttrSet.ClearItem( FN_PARAM_NUM_LEVEL ); - - ++it; - } while( it != GetStyleTbl().end() ); + } } SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet |