diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 16:12:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-11 12:50:55 +0200 |
commit | 20571c472528c4f98fe3f55700d134915d32a49a (patch) | |
tree | 9b350824d845b8aaeb13d087ef74febb454b821b /forms/source/component/ListBox.cxx | |
parent | Helper function to cast to FastAttributeList: (diff) | |
download | core-20571c472528c4f98fe3f55700d134915d32a49a.tar.gz core-20571c472528c4f98fe3f55700d134915d32a49a.zip |
use more range-for on uno::Sequence
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759
Reviewed-on: https://gerrit.libreoffice.org/39763
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms/source/component/ListBox.cxx')
-rw-r--r-- | forms/source/component/ListBox.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index a5e6d61125ca..dd53979ebbc1 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1425,18 +1425,15 @@ namespace frm ::std::set< sal_Int16 > aSelectionSet; // find the selection entries in our item list - const OUString* pSelectEntries = aSelectEntries.getArray(); - const OUString* pSelectEntriesEnd = pSelectEntries + aSelectEntries.getLength(); - while ( pSelectEntries != pSelectEntriesEnd ) + for ( OUString const & selectEntry : aSelectEntries ) { int idx = 0; for(const OUString& s : getStringItemList()) { - if (s==*pSelectEntries) + if (s==selectEntry) aSelectionSet.insert(idx); ++idx; } - ++pSelectEntries; } // copy the indexes to the sequence |