diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-19 13:43:23 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-20 08:14:13 +0000 |
commit | fe3fd05966a668c1cdf53e8221b8614e9a07de65 (patch) | |
tree | 4c6c105b78d0cb9c45431c2fecd2583d6a2aa85c /scripting | |
parent | 1d5c39192e81f950289dbdd7991a0e8a67c0aabc (diff) |
add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them
Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec
Reviewed-on: https://gerrit.libreoffice.org/20055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index d201f836306d..66b4f912b86b 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -520,13 +520,7 @@ ReadOnlyEventsNameContainer::getByName( const OUString& aName ) throw (container Sequence< OUString > SAL_CALL ReadOnlyEventsNameContainer::getElementNames( ) throw (RuntimeException, std::exception) { - Sequence< OUString > names(m_hEvents.size()); - OUString* pDest = names.getArray(); - EventSupplierHash::const_iterator it = m_hEvents.begin(); - EventSupplierHash::const_iterator it_end = m_hEvents.end(); - for ( sal_Int32 index = 0; it != it_end; ++index, ++pDest, ++it ) - *pDest = it->first; - return names; + return comphelper::mapKeysToSequence(m_hEvents); } sal_Bool SAL_CALL |