summaryrefslogtreecommitdiff
path: root/connectivity
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 /connectivity
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 'connectivity')
-rw-r--r--connectivity/source/commontools/DriversConfig.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index ef7c03ab30b5..f7b544105b01 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -19,6 +19,7 @@
#include <connectivity/DriversConfig.hxx>
#include <tools/wldcrd.hxx>
#include <svtools/miscopt.hxx>
+#include <comphelper/sequence.hxx>
using namespace connectivity;
using namespace utl;
@@ -241,15 +242,7 @@ const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const OUString
uno::Sequence< OUString > DriversConfig::getURLs() const
{
const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB);
- uno::Sequence< OUString > aRet(rDrivers.size());
- OUString* pIter = aRet.getArray();
- TInstalledDrivers::const_iterator aIter = rDrivers.begin();
- TInstalledDrivers::const_iterator aEnd = rDrivers.end();
- for(;aIter != aEnd;++aIter,++pIter)
- {
- *pIter = aIter->first;
- }
- return aRet;
+ return comphelper::mapKeysToSequence(rDrivers);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */