summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/UnoNamespaceMap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw/UnoNamespaceMap.cxx')
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index 066c1df4e02c..183164370308 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
@@ -226,18 +227,7 @@ Sequence< OUString > SAL_CALL NamespaceMap::getElementNames() throw (RuntimeExce
while( aIter.next( aPrefix, aURL ) )
aPrefixSet.insert( aPrefix );
- Sequence< OUString > aSeq( aPrefixSet.size() );
- OUString* pPrefixes = aSeq.getArray();
-
- std::set< OUString >::iterator aPrefixIter( aPrefixSet.begin() );
- const std::set< OUString >::iterator aEnd( aPrefixSet.end() );
-
- while( aPrefixIter != aEnd )
- {
- *pPrefixes++ = *aPrefixIter++;
- }
-
- return aSeq;
+ return comphelper::containerToSequence<OUString>(aPrefixSet);
}
sal_Bool SAL_CALL NamespaceMap::hasByName( const OUString& aName ) throw (RuntimeException, std::exception)