summaryrefslogtreecommitdiffstats
path: root/comphelper
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/officeinstdir/officeinstallationdirectories.cxx22
-rw-r--r--comphelper/util/comphelp.component3
2 files changed, 4 insertions, 21 deletions
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index 1bee23622d42..385f61680e1c 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -236,32 +236,14 @@ void OfficeInstallationDirectories::initDirs()
}
-namespace {
-
-struct Instance {
- explicit Instance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(
- new comphelper::OfficeInstallationDirectories(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_util_OfficeInstallationDirectories(
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::OfficeInstallationDirectories(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component
index 10bc0cfe0ccd..1e4e0c8fbf8e 100644
--- a/comphelper/util/comphelp.component
+++ b/comphelper/util/comphelp.component
@@ -58,7 +58,8 @@
<singleton name="com.sun.star.task.OfficeRestartManager"/>
</implementation>
<implementation name="com.sun.star.comp.util.OfficeInstallationDirectories"
- constructor="com_sun_star_comp_util_OfficeInstallationDirectories">
+ constructor="com_sun_star_comp_util_OfficeInstallationDirectories"
+ single-instance="true">
<service name="com.sun.star.util.OfficeInstallationDirectories"/>
<singleton name="com.sun.star.util.theOfficeInstallationDirectories"/>
</implementation>