diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-03-30 17:25:59 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-03-30 17:25:59 +0100 |
commit | 89789bfd53ec69db9a33dd23deb438c0cdab9874 (patch) | |
tree | 9e3540562b8c9549e87ee2c91d8c81e8c2c4dd98 /svx/source/xml | |
parent | a1b24ca0ef565eb3b3f8d152754a7ebc00112cec (diff) |
Simplify iterators stuff
Change-Id: I6cd97ea5056596122a8ae6cb0c5cd6525ce6b302
Diffstat (limited to 'svx/source/xml')
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 3b7ced224a39..5a79ec753eab 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -594,16 +594,13 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s ::rtl::OUString aPictureStorageName, aPictureStreamName; if( ( maURLSet.find( aURLString ) != maURLSet.end() ) ) { - URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() ); - while( aIter != aEnd ) + for (URLPairVector::const_iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() ); aIter != aEnd ; ++aIter) { if( aURLString == (*aIter).first ) { maGrfURLs[ nInsertPos ].second = (*aIter).second; - aIter = aEnd; + break; } - else - aIter++; } } else if( ImplGetStreamNames( aURLString, aPictureStorageName, aPictureStreamName ) ) @@ -700,12 +697,11 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s aURLEntry += rRequestedFileName; aURLEntry += aExtension; - URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() ); - while( aIter != aEnd ) + URLPairVector::const_iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() ); + for ( ; aIter != aEnd; ++aIter ) { if( aURLEntry == (*aIter).second ) break; - aIter++; } if ( aIter == aEnd ) aStreamName = rRequestedFileName; |