summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/simplemail/smplmail.component2
-rw-r--r--shell/source/win32/simplemail/smplmailsuppl.cxx6
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: */