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 /dtrans | |
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 'dtrans')
-rw-r--r-- | dtrans/source/generic/clipboardmanager.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index ad8d9e333e39..2a5af784742a 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -20,6 +20,7 @@ #include <clipboardmanager.hxx> #include <com/sun/star/lang/DisposedException.hpp> #include <cppuhelper/supportsservice.hxx> +#include <comphelper/sequence.hxx> using namespace com::sun::star::container; using namespace com::sun::star::datatransfer; @@ -137,14 +138,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames() if (rBHelper.bInDispose) return Sequence< OUString > (); - Sequence< OUString > aRet(m_aClipboardMap.size()); - ClipboardMap::iterator iter = m_aClipboardMap.begin(); - ClipboardMap::iterator imax = m_aClipboardMap.end(); - - for (sal_Int32 n = 0; iter != imax; ++iter) - aRet[n++] = iter->first; - - return aRet; + return comphelper::mapKeysToSequence(m_aClipboardMap); } void SAL_CALL ClipboardManager::dispose() |