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>
This commit is contained in:
parent
cf7638fd05
commit
a2b256df78
@ -24,6 +24,7 @@
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/io/IOException.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/weak.hxx>
|
||||
#include <comphelper/documentconstants.hxx>
|
||||
|
||||
#include "xfactory.hxx"
|
||||
@ -367,9 +368,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
embeddedobj_OOoEmbeddedObjectFactory_get_implementation(
|
||||
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
|
||||
{
|
||||
static rtl::Reference<OOoEmbeddedObjectFactory> g_Instance(new OOoEmbeddedObjectFactory(context));
|
||||
g_Instance->acquire();
|
||||
return static_cast<cppu::OWeakObject*>(g_Instance.get());
|
||||
return cppu::acquire(static_cast<cppu::OWeakObject*>(new OOoEmbeddedObjectFactory(context)));
|
||||
}
|
||||
|
||||
|
||||
@ -413,8 +412,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
embeddedobj_OOoSpecialEmbeddedObjectFactory_get_implementation(
|
||||
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
|
||||
{
|
||||
static rtl::Reference<OOoSpecialEmbeddedObjectFactory> g_Instance(new OOoSpecialEmbeddedObjectFactory(context));
|
||||
g_Instance->acquire();
|
||||
return static_cast<cppu::OWeakObject*>(g_Instance.get());
|
||||
return cppu::acquire(static_cast<cppu::OWeakObject*>(new OOoSpecialEmbeddedObjectFactory(context)));
|
||||
}
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -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: */
|
||||
|
@ -20,7 +20,8 @@
|
||||
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.comp.embed.OLEEmbeddedObjectFactory"
|
||||
constructor="embeddedobj_OleEmbeddedObjectFactory_get_implementation">
|
||||
constructor="embeddedobj_OleEmbeddedObjectFactory_get_implementation"
|
||||
single-instance="true">
|
||||
<service name="com.sun.star.comp.embed.OLEEmbeddedObjectFactory"/>
|
||||
<service name="com.sun.star.embed.OLEEmbeddedObjectFactory"/>
|
||||
</implementation>
|
||||
|
@ -20,12 +20,14 @@
|
||||
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.comp.embed.MSOLEObjectSystemCreator"
|
||||
constructor="embeddedobj_MSOLEDialogObjectCreator_get_implementation">
|
||||
constructor="embeddedobj_MSOLEDialogObjectCreator_get_implementation"
|
||||
single-instance="true">
|
||||
<service name="com.sun.star.comp.embed.MSOLEObjectSystemCreator"/>
|
||||
<service name="com.sun.star.embed.MSOLEObjectSystemCreator"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.embed.OLEEmbeddedObjectFactory"
|
||||
constructor="embeddedobj_OleEmbeddedObjectFactory_get_implementation">
|
||||
constructor="embeddedobj_OleEmbeddedObjectFactory_get_implementation"
|
||||
single-instance="true">
|
||||
<service name="com.sun.star.comp.embed.OLEEmbeddedObjectFactory"/>
|
||||
<service name="com.sun.star.embed.OLEEmbeddedObjectFactory"/>
|
||||
</implementation>
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <comphelper/mimeconfighelper.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/weak.hxx>
|
||||
|
||||
#include "xdialogcreator.hxx"
|
||||
#include <oleembobj.hxx>
|
||||
@ -323,9 +324,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
embeddedobj_MSOLEDialogObjectCreator_get_implementation(
|
||||
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
|
||||
{
|
||||
static rtl::Reference<MSOLEDialogObjectCreator> g_Instance(new MSOLEDialogObjectCreator(context));
|
||||
g_Instance->acquire();
|
||||
return static_cast<cppu::OWeakObject*>(g_Instance.get());
|
||||
return cppu::acquire(static_cast<cppu::OWeakObject*>(new MSOLEDialogObjectCreator(context)));
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <oleembobj.hxx>
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/weak.hxx>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
@ -244,9 +245,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
embeddedobj_OleEmbeddedObjectFactory_get_implementation(
|
||||
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
|
||||
{
|
||||
static rtl::Reference<OleEmbeddedObjectFactory> g_Instance(new OleEmbeddedObjectFactory(context));
|
||||
g_Instance->acquire();
|
||||
return static_cast<cppu::OWeakObject*>(g_Instance.get());
|
||||
return cppu::acquire(static_cast<cppu::OWeakObject*>(new OleEmbeddedObjectFactory(context)));
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -20,17 +20,20 @@
|
||||
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.comp.embed.EmbeddedObjectCreator"
|
||||
constructor="embeddedobj_UNOEmbeddedObjectCreator_get_implementation">
|
||||
constructor="embeddedobj_UNOEmbeddedObjectCreator_get_implementation"
|
||||
single-instance="true">
|
||||
<service name="com.sun.star.comp.embed.EmbeddedObjectCreator"/>
|
||||
<service name="com.sun.star.embed.EmbeddedObjectCreator"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.embed.OOoEmbeddedObjectFactory"
|
||||
constructor="embeddedobj_OOoEmbeddedObjectFactory_get_implementation">
|
||||
constructor="embeddedobj_OOoEmbeddedObjectFactory_get_implementation"
|
||||
single-instance="true">
|
||||
<service name="com.sun.star.comp.embed.OOoEmbeddedObjectFactory"/>
|
||||
<service name="com.sun.star.embed.OOoEmbeddedObjectFactory"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"
|
||||
constructor="embeddedobj_OOoSpecialEmbeddedObjectFactory_get_implementation">
|
||||
constructor="embeddedobj_OOoSpecialEmbeddedObjectFactory_get_implementation"
|
||||
single-instance="true">
|
||||
<service name="com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"/>
|
||||
<service name="com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"/>
|
||||
</implementation>
|
||||
|
Loading…
x
Reference in New Issue
Block a user