diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-03-29 06:48:30 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-03-29 06:48:30 +0100 |
commit | 1679aa60d0c06fe3b461a5d593aaeca9d8748925 (patch) | |
tree | 3224d69e50cb39e12b2228e0cd2c8b5ffd2d4f3e /sdext | |
parent | 6550f88834d31ddb678da74d074d1142cc8d030c (diff) |
Prefer prefix ++/-- operators for non-primitive types
+ use const_iterator for end iterator
Change-Id: I8ad8db97e35ec4fad7c02c669be981f73c9165ca
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/fileopendialog.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx index 28c0ba53be97..3e30d216adc4 100644 --- a/sdext/source/minimizer/fileopendialog.cxx +++ b/sdext/source/minimizer/fileopendialog.cxx @@ -122,10 +122,7 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext OUString( "com.sun.star.document.TypeDetection" ), rxContext ), UNO_QUERY_THROW ); Sequence< OUString > aTypeList( xFilters->getElementNames() ); -// mxFilePicker->setDefaultName( ); - - std::vector< FilterEntry >::iterator aIter( aFilterEntryList.begin() ); - while( aIter != aFilterEntryList.end() ) + for( std::vector< FilterEntry >::const_iterator aIter(aFilterEntryList.begin()), aEnd(aFilterEntryList.end()); aIter != aEnd; ++aIter ) { Sequence< PropertyValue > aTypeProperties; try @@ -152,7 +149,6 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext catch ( const Exception& ) { } - aIter++; } } FileOpenDialog::~FileOpenDialog() @@ -176,15 +172,13 @@ void FileOpenDialog::setDefaultName( const rtl::OUString& rDefaultName ) rtl::OUString aFilterName; Reference< XFilterManager > xFilterManager( mxFilePicker, UNO_QUERY_THROW ); rtl::OUString aUIName( xFilterManager->getCurrentFilter() ); - std::vector< FilterEntry >::const_iterator aIter( aFilterEntryList.begin() ); - while( aIter != aFilterEntryList.end() ) + for( std::vector< FilterEntry >::const_iterator aIter(aFilterEntryList.begin()), aEnd(aFilterEntryList.end()); aIter != aEnd; ++aIter ) { if ( aIter->maUIName == aUIName ) { aFilterName = aIter->maName; break; } - aIter++; } return aFilterName; }; |