diff options
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/fsstor/fsfactory.cxx | 6 | ||||
-rw-r--r-- | svl/source/fsstor/fsstorage.component | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index 2b596f1a7cc4..98ec1feb8c65 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -24,7 +24,7 @@ #include <com/sun/star/io/IOException.hpp> #include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> - +#include <cppuhelper/weak.hxx> #include <ucbhelper/content.hxx> #include <unotools/tempfile.hxx> @@ -155,9 +155,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* svl_FSStorageFactory_get_implementation( css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&) { - static rtl::Reference<FSStorageFactory> g_Instance(new FSStorageFactory(context)); - g_Instance->acquire(); - return static_cast<cppu::OWeakObject*>(g_Instance.get()); + return cppu::acquire(static_cast<cppu::OWeakObject*>(new FSStorageFactory(context))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/fsstor/fsstorage.component b/svl/source/fsstor/fsstorage.component index 915850bab86d..7d20474b36ac 100644 --- a/svl/source/fsstor/fsstorage.component +++ b/svl/source/fsstor/fsstorage.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.embed.FileSystemStorageFactory" - constructor="svl_FSStorageFactory_get_implementation"> + constructor="svl_FSStorageFactory_get_implementation" single-instance="true"> <service name="com.sun.star.comp.embed.FileSystemStorageFactory"/> <service name="com.sun.star.embed.FileSystemStorageFactory"/> </implementation> |