summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-19 13:43:23 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-20 08:14:13 +0000
commitfe3fd05966a668c1cdf53e8221b8614e9a07de65 (patch)
tree4c6c105b78d0cb9c45431c2fecd2583d6a2aa85c /extensions
parent1d5c39192e81f950289dbdd7991a0e8a67c0aabc (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 'extensions')
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx6
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx5
2 files changed, 3 insertions, 8 deletions
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index bfdc3d5cf286..eea512450eed 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -53,6 +53,7 @@
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/evtmethodhelper.hxx>
+#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -773,10 +774,7 @@ namespace pcr
PropertyAttribute::BOUND );
}
- StlSyntaxSequence< Property > aReturn( aOrderedProperties.size() );
- ::std::transform( aOrderedProperties.begin(), aOrderedProperties.end(), aReturn.begin(),
- ::o3tl::select2nd< std::map< EventId, Property >::value_type >() );
- return aReturn;
+ return comphelper::mapValuesToSequence( aOrderedProperties );
}
Sequence< OUString > SAL_CALL EventHandler::getSupersededProperties( ) throw (RuntimeException, std::exception)
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index f76b07c3bf92..edd4f081c81c 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -528,10 +528,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
impl_ensurePropertyMap();
- Sequence< Property > aReturn( m_aProperties.size() );
- ::std::transform( m_aProperties.begin(), m_aProperties.end(),
- aReturn.getArray(), ::o3tl::select2nd< PropertyMap::value_type >() );
- return aReturn;
+ return comphelper::mapValuesToSequence( m_aProperties );
}
Sequence< OUString > SAL_CALL GenericPropertyHandler::getSupersededProperties( ) throw (RuntimeException, std::exception)