[Libreoffice-commits] core.git: svx/source
Julien Nabet
serval2412 at yahoo.fr
Sat Mar 30 09:28:16 PDT 2013
svx/source/xml/xmlgrhlp.cxx | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
New commits:
commit 89789bfd53ec69db9a33dd23deb438c0cdab9874
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Mar 30 17:25:59 2013 +0100
Simplify iterators stuff
Change-Id: I6cd97ea5056596122a8ae6cb0c5cd6525ce6b302
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 3b7ced2..5a79ec7 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;
More information about the Libreoffice-commits
mailing list