diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-10-02 14:26:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-10-02 20:43:58 +0200 |
commit | a2b256df787e76c90c110f363cf7a3b84b54947f (patch) | |
tree | 4aeccba6761290e133f99681aaa5eac44dd0dd8e /embeddedobj/source/general | |
parent | cf7638fd051773efcc78ea9610030354d4d15665 (diff) |
Use the new single-instance="true" attribute in embeddedobj
Change-Id: Icead3bb5715a08bc2a2dfbb16c074d1b19e316a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103855
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embeddedobj/source/general')
-rw-r--r-- | embeddedobj/source/general/xcreator.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 9e9bb0934603..a54295895190 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -28,9 +28,9 @@ #include <com/sun/star/lang/XComponent.hpp> #include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/weak.hxx> #include <comphelper/documentconstants.hxx> #include <officecfg/Office/Common.hxx> -#include <rtl/ref.hxx> #include <xcreator.hxx> #include <dummyobject.hxx> @@ -410,9 +410,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* embeddedobj_UNOEmbeddedObjectCreator_get_implementation( css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&) { - static rtl::Reference<UNOEmbeddedObjectCreator> g_Instance(new UNOEmbeddedObjectCreator(context)); - g_Instance->acquire(); - return static_cast<cppu::OWeakObject*>(g_Instance.get()); + return cppu::acquire(static_cast<cppu::OWeakObject*>(new UNOEmbeddedObjectCreator(context))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |