summaryrefslogtreecommitdiff
path: root/vbahelper/source/vbahelper/vbadocumentsbase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vbahelper/source/vbahelper/vbadocumentsbase.cxx')
-rw-r--r--vbahelper/source/vbahelper/vbadocumentsbase.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index c5a547735e2d..ae8098d8150f 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -21,6 +21,7 @@
#include <unotools/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
@@ -184,13 +185,7 @@ public:
virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException, std::exception) override
{
- uno::Sequence< OUString > names( namesToIndices.size() );
- OUString* pString = names.getArray();
- NameIndexHash::const_iterator it = namesToIndices.begin();
- NameIndexHash::const_iterator it_end = namesToIndices.end();
- for ( ; it != it_end; ++it, ++pString )
- *pString = it->first;
- return names;
+ return comphelper::mapKeysToSequence( namesToIndices );
}
virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (uno::RuntimeException, std::exception) override