summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-18 11:27:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-19 20:04:25 +0100
commitccef00e160439f1836ab27cd13cbe6aa8f9e5146 (patch)
treeb21a40b280e4476486b8f73f965c70dd9c3a070f /framework/source
parent2167edad3b1f79e304a072b4d74eb1705cfe66b4 (diff)
use single-use attribute for WindowStateConfiguration
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I2a6a3b1e989d48f4eebf19e9922df22124d25d2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx19
1 files changed, 1 insertions, 18 deletions
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index ba8d0c15a43e..31b08076e953 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -1383,22 +1383,6 @@ sal_Bool SAL_CALL WindowStateConfiguration::hasElements()
return true;
}
-struct Instance {
- explicit Instance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(
- new WindowStateConfiguration(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 *
@@ -1406,8 +1390,7 @@ com_sun_star_comp_framework_WindowStateConfiguration_get_implementation(
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 WindowStateConfiguration(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */