summaryrefslogtreecommitdiff
path: root/comphelper/source/eventattachermgr/eventattachermgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/eventattachermgr/eventattachermgr.cxx')
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 12101471bc97..d782b744fc42 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -21,6 +21,7 @@
#include <osl/diagnose.h>
#include <comphelper/eventattachermgr.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
#include <com/sun/star/beans/theIntrospection.hpp>
#include <com/sun/star/io/XObjectInputStream.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
@@ -573,16 +574,7 @@ Sequence< ScriptEventDescriptor > SAL_CALL ImplEventAttacherManager::getScriptEv
{
Guard< Mutex > aGuard( aLock );
::std::deque<AttacherIndex_Impl>::iterator aIt = implCheckIndex( nIndex );
-
- Sequence< ScriptEventDescriptor > aSeq( aIt->aEventList.size() );
- ScriptEventDescriptor * pArray = aSeq.getArray();
-
- sal_Int32 i = 0;
- for( const auto& rEvt : aIt->aEventList )
- {
- pArray[i++] = rEvt;
- }
- return aSeq;
+ return comphelper::containerToSequence<ScriptEventDescriptor>(aIt->aEventList);
}