diff options
Diffstat (limited to 'svx/source/form/fmshimp.cxx')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 38df41896f13..79def586af27 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fmshimp.cxx,v $ - * $Revision: 1.94 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -91,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> @@ -362,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) { @@ -463,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) { |