summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/officerestartmanager.cxx20
-rw-r--r--comphelper/util/comphelp.component3
2 files changed, 3 insertions, 20 deletions
diff --git a/comphelper/source/misc/officerestartmanager.cxx b/comphelper/source/misc/officerestartmanager.cxx
index f56486858522..ad6e308d2819 100644
--- a/comphelper/source/misc/officerestartmanager.cxx
+++ b/comphelper/source/misc/officerestartmanager.cxx
@@ -146,31 +146,13 @@ uno::Sequence< OUString > SAL_CALL OOfficeRestartManager::getSupportedServiceNam
} // namespace comphelper
-namespace {
-
-struct Instance {
- explicit Instance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(new comphelper::OOfficeRestartManager(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 *
com_sun_star_comp_task_OfficeRestartManager(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(static_cast<cppu::OWeakObject *>(
- Singleton::get(context).instance.get()));
+ return cppu::acquire(new comphelper::OOfficeRestartManager(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component
index 705e870eb5e0..10bc0cfe0ccd 100644
--- a/comphelper/util/comphelp.component
+++ b/comphelper/util/comphelp.component
@@ -52,7 +52,8 @@
<service name="com.sun.star.embed.InstanceLocker"/>
</implementation>
<implementation name="com.sun.star.comp.task.OfficeRestartManager"
- constructor="com_sun_star_comp_task_OfficeRestartManager">
+ constructor="com_sun_star_comp_task_OfficeRestartManager"
+ single-instance="true">
<service name="com.sun.star.comp.task.OfficeRestartManager"/>
<singleton name="com.sun.star.task.OfficeRestartManager"/>
</implementation>