summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/implementationregistration/implreg.cxx15
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx10
2 files changed, 4 insertions, 21 deletions
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 008991d91046..d15e4ee0d9b4 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -27,6 +27,7 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
#include <uno/mapping.hxx>
#include <osl/thread.h>
@@ -1633,19 +1634,7 @@ Sequence< OUString > ImplementationRegistration::getImplementations(
if (!implNames.empty())
{
- std::list<OUString>::const_iterator iter = implNames.begin();
-
- Sequence<OUString> seqImpl(implNames.size());
- OUString *pImplNames = seqImpl.getArray();
-
- sal_Int32 index = 0;
- while (iter != implNames.end())
- {
- pImplNames[index] = *iter;
- index++;
- ++iter;
- }
-
+ Sequence<OUString> seqImpl(comphelper::containerToSequence<OUString>(implNames));
xImpl->closeKey();
return seqImpl;
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 73c9ec1ab526..1fdf14f19a31 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -33,6 +33,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -860,14 +861,7 @@ Sequence< OUString > OServiceManager::getUniqueAvailableServiceNames(
aNameSet.insert( (*aIt++).first );
*/
- Sequence< OUString > aNames( aNameSet.size() );
- OUString * pArray = aNames.getArray();
- sal_Int32 i = 0;
- HashSet_OWString::iterator next = aNameSet.begin();
- while( next != aNameSet.end() )
- pArray[i++] = (*next++);
-
- return aNames;
+ return comphelper::containerToSequence<OUString>(aNameSet);
}
// XMultiComponentFactory