From 8c1f608c1400d314061f96d6d63b3357da5b2786 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 2 Oct 2020 14:17:58 +0200 Subject: Use the new single-instance="true" attribute in svl Change-Id: Iedd4348f3ea896dc613e0062a1a9cb5904c8bbb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103844 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- svl/source/fsstor/fsfactory.cxx | 6 ++---- svl/source/fsstor/fsstorage.component | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'svl/source') diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index 2b596f1a7cc4..98ec1feb8c65 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -24,7 +24,7 @@ #include #include #include - +#include #include #include @@ -155,9 +155,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* svl_FSStorageFactory_get_implementation( css::uno::XComponentContext* context, css::uno::Sequence const&) { - static rtl::Reference g_Instance(new FSStorageFactory(context)); - g_Instance->acquire(); - return static_cast(g_Instance.get()); + return cppu::acquire(static_cast(new FSStorageFactory(context))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/fsstor/fsstorage.component b/svl/source/fsstor/fsstorage.component index 915850bab86d..7d20474b36ac 100644 --- a/svl/source/fsstor/fsstorage.component +++ b/svl/source/fsstor/fsstorage.component @@ -20,7 +20,7 @@ + constructor="svl_FSStorageFactory_get_implementation" single-instance="true"> -- cgit