summaryrefslogtreecommitdiffstats
path: root/framework/source
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-18 11:20:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-20 16:50:15 +0100
commit918dc4c2050ff0e1e95d0dfc2c8db3a376161f16 (patch)
tree6ad3e6df4552a8ddc26427a213cf3f2b73fab889 /framework/source
parenttdf#140182 DOCX table import: fix extra page break (diff)
downloadcore-918dc4c2050ff0e1e95d0dfc2c8db3a376161f16.tar.gz
core-918dc4c2050ff0e1e95d0dfc2c8db3a376161f16.zip
use single-use attribute for StatusBarControllerFactory
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: Ifec5f54633508aa66492599caf80ed2bf3d7cbe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112683 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uifactory/uicontrollerfactory.cxx21
1 files changed, 1 insertions, 20 deletions
diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
index 493d1d5522d0..4b5d36948bc3 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -315,24 +315,6 @@ StatusbarControllerFactory::StatusbarControllerFactory( const Reference< XCompon
{
}
-struct StatusbarControllerFactoryInstance {
- explicit StatusbarControllerFactoryInstance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(
- new StatusbarControllerFactory(context)))
- {
- }
-
- css::uno::Reference<css::uno::XInterface> instance;
-};
-
-struct StatusbarControllerFactorySingleton:
- public rtl::StaticWithArg<
- StatusbarControllerFactoryInstance,
- css::uno::Reference<css::uno::XComponentContext>,
- StatusbarControllerFactorySingleton>
-{};
-
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
@@ -356,8 +338,7 @@ com_sun_star_comp_framework_StatusBarControllerFactory_get_implementation(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(static_cast<cppu::OWeakObject *>(
- StatusbarControllerFactorySingleton::get(context).instance.get()));
+ return cppu::acquire(new StatusbarControllerFactory(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */