summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr/eventhandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/propctrlr/eventhandler.cxx')
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx33
1 files changed, 2 insertions, 31 deletions
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index c009a95b5c2f..5c3fdba085c3 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -63,6 +63,7 @@
/** === end UNO includes === **/
#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/evtmethodhelper.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/implbase1.hxx>
#include <rtl/ref.hxx>
@@ -171,36 +172,6 @@ namespace pcr
namespace
{
//....................................................................
- Sequence< ::rtl::OUString > lcl_getListenerMethodsForType( const Type& type )
- {
- typelib_InterfaceTypeDescription *pType=0;
- type.getDescription( (typelib_TypeDescription**)&pType);
-
- if ( !pType )
- return Sequence< ::rtl::OUString>();
-
- Sequence< ::rtl::OUString > aNames( pType->nMembers );
- ::rtl::OUString* pNames = aNames.getArray();
- for ( sal_Int32 i = 0; i < pType->nMembers; ++i, ++pNames)
- {
- // the decription reference
- typelib_TypeDescriptionReference* pMemberDescriptionReference = pType->ppMembers[i];
- // the description for the reference
- typelib_TypeDescription* pMemberDescription = NULL;
- typelib_typedescriptionreference_getDescription( &pMemberDescription, pMemberDescriptionReference );
- if ( pMemberDescription )
- {
- typelib_InterfaceMemberTypeDescription* pRealMemberDescription =
- reinterpret_cast<typelib_InterfaceMemberTypeDescription*>(pMemberDescription);
- *pNames = pRealMemberDescription->pMemberName;
- }
- }
-
- typelib_typedescription_release( (typelib_TypeDescription*)pType );
- return aNames;
- }
-
- //....................................................................
#define DESCRIBE_EVENT( asciinamespace, asciilistener, asciimethod, id_postfix ) \
s_aKnownEvents.insert( EventMap::value_type( \
::rtl::OUString::createFromAscii( asciimethod ), \
@@ -832,7 +803,7 @@ namespace pcr
continue;
// loop through all methods
- Sequence< ::rtl::OUString > aMethods( lcl_getListenerMethodsForType( *pListeners ) );
+ Sequence< ::rtl::OUString > aMethods( comphelper::getEventMethodsForType( *pListeners ) );
const ::rtl::OUString* pMethods = aMethods.getConstArray();
sal_uInt32 methodCount = aMethods.getLength();