diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-10-02 14:24:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-10-02 20:44:25 +0200 |
commit | f4bf7804d5aeb35a9b0c6517997cf079ff770e9e (patch) | |
tree | e9128a939e57aa462985addc17c9da48c5f7dc9b /filter/source/config | |
parent | a2b256df787e76c90c110f363cf7a3b84b54947f (diff) |
Use the new single-instance="true" attribute in filter
Change-Id: Id9a77324a30dec155e77616378690c47cb86536b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103853
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter/source/config')
-rw-r--r-- | filter/source/config/cache/configflush.cxx | 6 | ||||
-rw-r--r-- | filter/source/config/cache/filterconfig1.component | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/filter/source/config/cache/configflush.cxx b/filter/source/config/cache/configflush.cxx index e0c4ca58f641..f3f114b90ca2 100644 --- a/filter/source/config/cache/configflush.cxx +++ b/filter/source/config/cache/configflush.cxx @@ -19,8 +19,8 @@ #include "configflush.hxx" #include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/weak.hxx> #include <com/sun/star/uno/XComponentContext.hpp> -#include <rtl/ref.hxx> namespace filter::config{ @@ -107,9 +107,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* filter_ConfigFlush_get_implementation( css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&) { - static rtl::Reference<filter::config::ConfigFlush> g_Instance(new filter::config::ConfigFlush()); - g_Instance->acquire(); - return static_cast<cppu::OWeakObject*>(g_Instance.get()); + return cppu::acquire(static_cast<cppu::OWeakObject*>(new filter::config::ConfigFlush())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/filter/source/config/cache/filterconfig1.component b/filter/source/config/cache/filterconfig1.component index 9597348890ee..711c0e38f781 100644 --- a/filter/source/config/cache/filterconfig1.component +++ b/filter/source/config/cache/filterconfig1.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.comp.filter.config.ConfigFlush" - constructor="filter_ConfigFlush_get_implementation"> + constructor="filter_ConfigFlush_get_implementation" single-instance="true"> <service name="com.sun.star.document.FilterConfigRefresh"/> </implementation> <implementation name="com.sun.star.comp.filter.config.ContentHandlerFactory" |