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 /ucb | |
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 'ucb')
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 18151f61e774..17f727b803ec 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -30,6 +30,7 @@ #include "comphelper/documentinfo.hxx" #include "comphelper/namedvaluecollection.hxx" +#include "comphelper/sequence.hxx" #include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/beans/XPropertySet.hpp" @@ -550,17 +551,7 @@ uno::Sequence< OUString > OfficeDocumentsManager::queryDocuments() { osl::MutexGuard aGuard( m_aMtx ); - uno::Sequence< OUString > aRet( m_aDocs.size() ); - sal_Int32 nPos = 0; - - DocumentList::const_iterator it = m_aDocs.begin(); - while ( it != m_aDocs.end() ) - { - aRet[ nPos ] = (*it).first; - ++it; - ++nPos; - } - return aRet; + return comphelper::mapKeysToSequence( m_aDocs ); } |