diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-10-02 14:19:32 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-10-02 20:41:23 +0200 |
commit | ed3eda5d752b988411616c8cd96953ae6a2fe20f (patch) | |
tree | 7ed0f2da44492b8e5f980d798bab41c5520ea27d /shell | |
parent | ad64650bda81ba59ebd27acaf67dc0b444ac0573 (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/win32/simplemail/smplmail.component | 2 | ||||
-rw-r--r-- | shell/source/win32/simplemail/smplmailsuppl.cxx | 6 |
2 files changed, 3 insertions, 5 deletions
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 @@ <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.sys.shell.SimpleSystemMail" - constructor="shell_CSmplMailSuppl_get_implementation"> + constructor="shell_CSmplMailSuppl_get_implementation" single-instance="true"> <service name="com.sun.star.system.SimpleSystemMail"/> </implementation> </component> 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 <cppuhelper/supportsservice.hxx> +#include <cppuhelper/weak.hxx> #include <com/sun/star/uno/XComponentContext.hpp> -#include <rtl/ref.hxx> #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<css::uno::Any> const&) { - static rtl::Reference<CSmplMailSuppl> g_Instance(new CSmplMailSuppl()); - g_Instance->acquire(); - return static_cast<cppu::OWeakObject*>(g_Instance.get()); + return cppu::acquire(static_cast<cppu::OWeakObject*>(new CSmplMailSuppl())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |