diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx index 4099c1bc64fb..48dac12a3a95 100644 --- a/eventattacher/source/eventattacher.cxx +++ b/eventattacher/source/eventattacher.cxx @@ -40,7 +40,6 @@ #include #include #include -#include namespace com::sun::star::lang { class XMultiServiceFactory; } @@ -843,9 +842,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* eventattacher_EventAttacher( css::uno::XComponentContext* context, css::uno::Sequence const& ) { - static rtl::Reference instance(new comp_EventAttacher::EventAttacherImpl(context)); - instance->acquire(); - return static_cast(instance.get()); + return cppu::acquire(static_cast(new comp_EventAttacher::EventAttacherImpl(context))); } diff --git a/eventattacher/source/evtatt.component b/eventattacher/source/evtatt.component index 40389217c039..8d51ca1dee7a 100644 --- a/eventattacher/source/evtatt.component +++ b/eventattacher/source/evtatt.component @@ -20,7 +20,7 @@ + constructor="eventattacher_EventAttacher" single-instance="true">