From 26fbcd216e21f2c5ce38263eb1eb893697815212 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 2 Oct 2020 14:14:53 +0200 Subject: [PATCH] Use the new single-instance="true" attribute in vcl Change-Id: I8ad9bf5631c2ae2e5a38eb8a422fa601d9f08c1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103842 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/vclplug_win.component | 2 +- vcl/win/dtrans/ftransl.cxx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/vcl/vclplug_win.component b/vcl/vclplug_win.component index d6dc9f24e93f..0187827d54a4 100644 --- a/vcl/vclplug_win.component +++ b/vcl/vclplug_win.component @@ -20,7 +20,7 @@ + constructor="dtrans_CDataFormatTranslatorUNO_get_implementation" single-instance="true"> #include #include -#include +#include #include "ImplHelper.hxx" #include @@ -540,8 +540,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* dtrans_CDataFormatTranslatorUNO_get_implementation( css::uno::XComponentContext* context, css::uno::Sequence const&) { - static rtl::Reference g_Instance(new CDataFormatTranslatorUNO(context)); - g_Instance->acquire(); - return static_cast(g_Instance.get()); + return cppu::acquire(static_cast(new CDataFormatTranslatorUNO(context))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */