From ed3eda5d752b988411616c8cd96953ae6a2fe20f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 2 Oct 2020 14:19:32 +0200 Subject: Use the new single-instance="true" attribute in shell Change-Id: Ia8e454a65965cf99bafa795fe0bea4836ada2ee0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103846 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- shell/source/win32/simplemail/smplmail.component | 2 +- shell/source/win32/simplemail/smplmailsuppl.cxx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'shell') diff --git a/shell/source/win32/simplemail/smplmail.component b/shell/source/win32/simplemail/smplmail.component index 6b95bd8cdc5c..32446884ddc3 100644 --- a/shell/source/win32/simplemail/smplmail.component +++ b/shell/source/win32/simplemail/smplmail.component @@ -20,7 +20,7 @@ + constructor="shell_CSmplMailSuppl_get_implementation" single-instance="true"> diff --git a/shell/source/win32/simplemail/smplmailsuppl.cxx b/shell/source/win32/simplemail/smplmailsuppl.cxx index eba930b09107..8e6cdfcd2403 100644 --- a/shell/source/win32/simplemail/smplmailsuppl.cxx +++ b/shell/source/win32/simplemail/smplmailsuppl.cxx @@ -18,8 +18,8 @@ */ #include +#include #include -#include #include "smplmailsuppl.hxx" #include "smplmailclient.hxx" @@ -79,9 +79,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* shell_CSmplMailSuppl_get_implementation( css::uno::XComponentContext* , css::uno::Sequence const&) { - static rtl::Reference g_Instance(new CSmplMailSuppl()); - g_Instance->acquire(); - return static_cast(g_Instance.get()); + return cppu::acquire(static_cast(new CSmplMailSuppl())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3