diff options
Diffstat (limited to 'svx/source/form/fmshimp.cxx')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 38d99e4feccc..79def586af27 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -88,6 +88,7 @@ /** === end UNO includes === **/ #include <comphelper/extract.hxx> +#include <comphelper/evtmethodhelper.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/property.hxx> #include <comphelper/stl_types.hxx> @@ -359,35 +360,6 @@ namespace } //.......................................................................... - Sequence< ::rtl::OUString> getEventMethods(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; - } - - //.......................................................................... void TransferEventScripts(const Reference< XControlModel>& xModel, const Reference< XControl>& xControl, const Sequence< ScriptEventDescriptor>& rTransferIfAvailable) { @@ -460,7 +432,8 @@ namespace continue; // now check the methods - Sequence< ::rtl::OUString> aMethodsNames = getEventMethods(*pCurrentListeners); + Sequence< ::rtl::OUString> aMethodsNames = ::comphelper::getEventMethodsForType(*pCurrentListeners); + const ::rtl::OUString* pMethodsNames = aMethodsNames.getConstArray(); for (k=0; k<aMethodsNames.getLength(); ++k, ++pMethodsNames) { |