From 20571c472528c4f98fe3f55700d134915d32a49a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Jul 2017 16:12:07 +0200 Subject: use more range-for on uno::Sequence Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- forms/source/component/ListBox.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'forms/source/component/ListBox.cxx') 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 -- cgit