Use the new single-instance="true" attribute in package
Change-Id: I3effdd2500de6accaa075cfc80bdd2654dc13801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103849 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
df1fb2f78b
commit
00d62d03df
@ -32,6 +32,7 @@
|
|||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
#include <comphelper/storagehelper.hxx>
|
#include <comphelper/storagehelper.hxx>
|
||||||
#include <cppuhelper/supportsservice.hxx>
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
|
#include <cppuhelper/weak.hxx>
|
||||||
#include <osl/diagnose.h>
|
#include <osl/diagnose.h>
|
||||||
|
|
||||||
#include "xfactory.hxx"
|
#include "xfactory.hxx"
|
||||||
@ -287,9 +288,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
|||||||
package_OStorageFactory_get_implementation(
|
package_OStorageFactory_get_implementation(
|
||||||
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
|
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
|
||||||
{
|
{
|
||||||
static rtl::Reference<OStorageFactory> g_Instance(new OStorageFactory(context));
|
return cppu::acquire(static_cast<cppu::OWeakObject*>(new OStorageFactory(context)));
|
||||||
g_Instance->acquire();
|
|
||||||
return static_cast<cppu::OWeakObject*>(g_Instance.get());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
||||||
xmlns="http://openoffice.org/2010/uno-components">
|
xmlns="http://openoffice.org/2010/uno-components">
|
||||||
<implementation name="com.sun.star.comp.embed.StorageFactory"
|
<implementation name="com.sun.star.comp.embed.StorageFactory"
|
||||||
constructor="package_OStorageFactory_get_implementation">
|
constructor="package_OStorageFactory_get_implementation" single-instance="true">
|
||||||
<service name="com.sun.star.comp.embed.StorageFactory"/>
|
<service name="com.sun.star.comp.embed.StorageFactory"/>
|
||||||
<service name="com.sun.star.embed.StorageFactory"/>
|
<service name="com.sun.star.embed.StorageFactory"/>
|
||||||
</implementation>
|
</implementation>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user