summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-18 11:31:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-19 20:04:18 +0100
commit2167edad3b1f79e304a072b4d74eb1705cfe66b4 (patch)
treef0bf8e5f2d58997bcc577d25460aa4871a4c075b /framework/source
parentcc1690b9752b3fef3d541de0d26b7c7681615767 (diff)
use single-use attribute for ModuleUIConfigurationManagerSupplier
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I146c0da83e59557ec563ec33851d2418c15aa065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112689 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uiconfiguration/moduleuicfgsupplier.cxx19
1 files changed, 1 insertions, 18 deletions
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index 31d61d8d0ad5..f28c2afedddf 100644
--- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
+++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
@@ -171,22 +171,6 @@ Reference< XUIConfigurationManager > SAL_CALL ModuleUIConfigurationManagerSuppli
return pIter->second;
}
-struct Instance {
- explicit Instance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(
- new ModuleUIConfigurationManagerSupplier(context)))
- {
- }
-
- css::uno::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 *
@@ -194,8 +178,7 @@ com_sun_star_comp_framework_ModuleUIConfigurationManagerSupplier_get_implementat
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 ModuleUIConfigurationManagerSupplier(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */