diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-06 19:25:01 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-07 06:30:31 +0100 |
commit | 9751a273747a2a6ba80c8b2e6012d788eee7c461 (patch) | |
tree | 8c22066aea5baffa7427e6374f447a6f5dd0421a /sfx2/source/dialog/filedlghelper.cxx | |
parent | f0c171a1dd2698f5bec14f5cf00136477032c202 (diff) |
Use for-range loops in sfx2 (part1)
Change-Id: I1a06e105ca9f1151afca236c83e3e0c9d2679c6f
Reviewed-on: https://gerrit.libreoffice.org/49318
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/dialog/filedlghelper.cxx')
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 1ae72bddd3dc..12efb69e5645 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1319,8 +1319,8 @@ void lcl_saveLastURLs(std::vector<OUString>& rpURLList, ::std::vector< OUString >& lLastURLs ) { lLastURLs.clear(); - for(std::vector<OUString>::iterator i = rpURLList.begin(); i != rpURLList.end(); ++i) - lLastURLs.push_back(*i); + for (auto const& url : rpURLList) + lLastURLs.push_back(url); } void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterface >& xPicker, std::vector<OUString>& rpURLList, const std::shared_ptr<const SfxFilter>& pFilter) @@ -2225,11 +2225,11 @@ void FileDialogHelper_Impl::addFilterPair( const OUString& rFilter, OUString FileDialogHelper_Impl::getFilterName( const OUString& rFilterWithExtension ) const { OUString sRet; - for( ::std::vector< css::beans::StringPair >::const_iterator pIter = maFilters.begin(); pIter != maFilters.end(); ++pIter ) + for (auto const& filter : maFilters) { - if ( (*pIter).Second == rFilterWithExtension ) + if (filter.Second == rFilterWithExtension) { - sRet = (*pIter).First; + sRet = filter.First; break; } } @@ -2239,11 +2239,11 @@ OUString FileDialogHelper_Impl::getFilterName( const OUString& rFilterWithExtens OUString FileDialogHelper_Impl::getFilterWithExtension( const OUString& rFilter ) const { OUString sRet; - for( ::std::vector< css::beans::StringPair >::const_iterator pIter = maFilters.begin(); pIter != maFilters.end(); ++pIter ) + for (auto const& filter : maFilters) { - if ( (*pIter).First == rFilter ) + if ( filter.First == rFilter ) { - sRet = (*pIter).Second; + sRet = filter.Second; break; } } |