From 00d62d03dffd41a923c5920941770d37f52fb6e0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 2 Oct 2020 14:22:04 +0200 Subject: Use the new single-instance="true" attribute in package Change-Id: I3effdd2500de6accaa075cfc80bdd2654dc13801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103849 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- package/source/xstor/xfactory.cxx | 5 ++--- package/source/xstor/xstor.component | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'package') diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index f398e5f2b909..89e94dc4e3d3 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "xfactory.hxx" @@ -287,9 +288,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* package_OStorageFactory_get_implementation( css::uno::XComponentContext* context, css::uno::Sequence const&) { - static rtl::Reference g_Instance(new OStorageFactory(context)); - g_Instance->acquire(); - return static_cast(g_Instance.get()); + return cppu::acquire(static_cast(new OStorageFactory(context))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/package/source/xstor/xstor.component b/package/source/xstor/xstor.component index 550501f269f6..ff6de82b654f 100644 --- a/package/source/xstor/xstor.component +++ b/package/source/xstor/xstor.component @@ -20,7 +20,7 @@ + constructor="package_OStorageFactory_get_implementation" single-instance="true"> -- cgit v1.2.3