Use the new single-instance="true" attribute in vcl
Change-Id: I8ad9bf5631c2ae2e5a38eb8a422fa601d9f08c1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103842 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -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.datatransfer.DataFormatTranslator"
|
||||
constructor="dtrans_CDataFormatTranslatorUNO_get_implementation">
|
||||
constructor="dtrans_CDataFormatTranslatorUNO_get_implementation" single-instance="true">
|
||||
<service name="com.sun.star.datatransfer.DataFormatTranslator"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <com/sun/star/lang/IllegalArgumentException.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <rtl/ref.hxx>
|
||||
#include <cppuhelper/weak.hxx>
|
||||
#include "ImplHelper.hxx"
|
||||
|
||||
#include <shlobj.h>
|
||||
@@ -540,8 +540,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
dtrans_CDataFormatTranslatorUNO_get_implementation(
|
||||
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
|
||||
{
|
||||
static rtl::Reference<CDataFormatTranslatorUNO> g_Instance(new CDataFormatTranslatorUNO(context));
|
||||
g_Instance->acquire();
|
||||
return static_cast<cppu::OWeakObject*>(g_Instance.get());
|
||||
return cppu::acquire(static_cast<cppu::OWeakObject*>(new CDataFormatTranslatorUNO(context)));
|
||||
}
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
Reference in New Issue
Block a user