summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 16:12:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 12:50:55 +0200
commit20571c472528c4f98fe3f55700d134915d32a49a (patch)
tree9b350824d845b8aaeb13d087ef74febb454b821b /forms
parentb401896a56149aa2871b65a330a6f601a9830ccd (diff)
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')
-rw-r--r--forms/source/component/ListBox.cxx7
-rw-r--r--forms/source/misc/InterfaceContainer.cxx6
2 files changed, 3 insertions, 10 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
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index c251c17d3587..2d7430ed6cfb 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -398,12 +398,8 @@ void OInterfaceContainer::transformEvents()
if ( aChildEvents.getLength() )
{
- // the "iterators" for the events for this child
- ScriptEventDescriptor* pChildEvents = aChildEvents.getArray();
- ScriptEventDescriptor* pChildEventsEnd = pChildEvents + aChildEvents.getLength();
-
// do the transformation
- ::std::for_each( pChildEvents, pChildEventsEnd, TransformEventTo52Format() );
+ ::std::for_each( aChildEvents.begin(), aChildEvents.end(), TransformEventTo52Format() );
// revoke the script events
m_xEventAttacher->revokeScriptEvents( i );