diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 23 | ||||
-rw-r--r-- | sfx2/util/sfx.component | 1 |
2 files changed, 23 insertions, 1 deletions
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 6bd93b18e088..f8f0e2a42ab1 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -600,6 +600,8 @@ void SAL_CALL ShutdownIcon::disposing() { m_xContext.clear(); m_xDesktop.clear(); + + deInitSystray(); } @@ -903,12 +905,31 @@ void SAL_CALL ShutdownIcon::setFastPropertyValue( ::sal_Int32 return aValue; } +namespace { + +struct Instance { + explicit Instance( + css::uno::Reference<css::uno::XComponentContext> const & context): + instance(static_cast<cppu::OWeakObject *>(new ShutdownIcon(context))) + {} + + rtl::Reference<css::uno::XInterface> instance; +}; + +struct Singleton: + public rtl::StaticWithArg< + Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton> +{}; + +} + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_desktop_QuickstartWrapper_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - return cppu::acquire(new ShutdownIcon(context)); + return cppu::acquire(static_cast<cppu::OWeakObject *>( + Singleton::get(context).instance.get())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component index 203acc89bee1..91002da21f2a 100644 --- a/sfx2/util/sfx.component +++ b/sfx2/util/sfx.component @@ -35,6 +35,7 @@ <implementation name="com.sun.star.comp.desktop.QuickstartWrapper" constructor="com_sun_star_comp_desktop_QuickstartWrapper_get_implementation"> <service name="com.sun.star.office.Quickstart"/> + <singleton name="com.sun.star.office.theQuickstart"/> </implementation> <implementation name="com.sun.star.comp.document.OwnSubFilter" constructor="com_sun_star_comp_document_OwnSubFilter_get_implementation"> |