summaryrefslogtreecommitdiff
path: root/scripting/source/vbaevents/eventhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/source/vbaevents/eventhelper.cxx')
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx89
1 files changed, 44 insertions, 45 deletions
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index babe1cb35cb4..fe942f4f909e 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -70,16 +70,12 @@
#include <comphelper/anytostring.hxx>
#include <com/sun/star/script/XScriptListener.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase.hxx>
#include <comphelper/evtmethodhelper.hxx>
#include <list>
#include <unordered_map>
-#include <service.hxx>
-
#define ASYNC 0
// primitive support for asynchronous handling of
@@ -461,7 +457,7 @@ ScriptEventHelper::createEvents( const OUString& sCodeName )
}
-typedef ::cppu::WeakImplHelper1< container::XNameContainer > NameContainer_BASE;
+typedef ::cppu::WeakImplHelper< container::XNameContainer > NameContainer_BASE;
class ReadOnlyEventsNameContainer : public NameContainer_BASE
{
@@ -549,7 +545,7 @@ ReadOnlyEventsNameContainer::hasByName( const OUString& aName ) throw (RuntimeEx
return sal_True;
}
-typedef ::cppu::WeakImplHelper1< XScriptEventsSupplier > EventsSupplier_BASE;
+typedef ::cppu::WeakImplHelper< XScriptEventsSupplier > EventsSupplier_BASE;
class ReadOnlyEventsSupplier : public EventsSupplier_BASE
{
@@ -563,7 +559,7 @@ private:
Reference< container::XNameContainer > m_xNameContainer;
};
-typedef ::cppu::WeakImplHelper3< XScriptListener, util::XCloseListener, lang::XInitialization > EventListener_BASE;
+typedef ::cppu::WeakImplHelper< XScriptListener, util::XCloseListener, lang::XInitialization, css::lang::XServiceInfo > EventListener_BASE;
#define EVENTLSTNR_PROPERTY_ID_MODEL 1
#define EVENTLSTNR_PROPERTY_MODEL OUString( "Model" )
@@ -622,6 +618,25 @@ public:
setShellFromModel();
}
+ OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ {
+ return OUString( "ooo.vba.EventListener" );
+ }
+
+ sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ {
+ return cppu::supportsService(this, ServiceName);
+ }
+
+ css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ {
+ const OUString strName( getImplementationName() );
+ return Sequence< OUString >( &strName, 1 );
+ }
+
protected:
// OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper( ) SAL_OVERRIDE;
@@ -1017,7 +1032,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce
}
}
-typedef ::cppu::WeakImplHelper1< XVBAToOOEventDescGen > VBAToOOEventDescGen_BASE;
+typedef ::cppu::WeakImplHelper< XVBAToOOEventDescGen, css::lang::XServiceInfo > VBAToOOEventDescGen_BASE;
class VBAToOOEventDescGen : public VBAToOOEventDescGen_BASE
@@ -1028,6 +1043,26 @@ public:
// XVBAToOOEventDescGen
virtual Sequence< ScriptEventDescriptor > SAL_CALL getEventDescriptions( const OUString& sCtrlServiceName, const OUString& sCodeName ) throw (RuntimeException, std::exception) SAL_OVERRIDE;
virtual Reference< XScriptEventsSupplier > SAL_CALL getEventSupplier( const Reference< XInterface >& xControl, const OUString& sCodeName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
+ OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ {
+ return OUString( "ooo.vba.VBAToOOEventDesc" );
+ }
+
+ sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ {
+ return cppu::supportsService(this, ServiceName);
+ }
+
+ css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ {
+ const OUString strName( getImplementationName() );
+ return Sequence< OUString >( &strName, 1 );
+ }
+
private:
Reference< XComponentContext > m_xContext;
@@ -1052,42 +1087,6 @@ VBAToOOEventDescGen::getEventSupplier( const Reference< XInterface >& xControl,
return xSupplier;
}
-// Component related
-
-namespace evtlstner
-{
- OUString SAL_CALL getImplementationName()
- {
- return OUString( "ooo.vba.EventListener" );
- }
-
- uno::Reference< XInterface > SAL_CALL create(
- Reference< XComponentContext > const & xContext )
- {
- return static_cast< lang::XTypeProvider * >( new EventListener( xContext ) );
- }
-
- Sequence< OUString > SAL_CALL getSupportedServiceNames()
- {
- const OUString strName( ::evtlstner::getImplementationName() );
- return Sequence< OUString >( &strName, 1 );
- }
-}
-namespace ooevtdescgen
-{
- OUString SAL_CALL getImplementationName()
- {
- return OUString( "ooo.vba.VBAToOOEventDesc" );
- }
-
- Sequence< OUString > SAL_CALL getSupportedServiceNames()
- {
- const OUString strName( ::ooevtdescgen::getImplementationName() );
- return Sequence< OUString >( &strName, 1 );
- }
-}
-
-
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
ooo_vba_EventListener_get_implementation(::com::sun::star::uno::XComponentContext* context,
::com::sun::star::uno::Sequence<css::uno::Any> const &)