Kaydet (Commit) 6f7b0a1f authored tarafından Chris Sherlock's avatar Chris Sherlock Kaydeden (comit) Stephan Bergmann

scripting: use constructor syntax in vbaevents.component

Change-Id: Ie27ec9ca92137e9f8666d2080fd1bc028417e337
Signed-off-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 73c347ef
......@@ -38,7 +38,6 @@ $(eval $(call gb_Library_use_libraries,vbaevents,\
$(eval $(call gb_Library_add_exception_objects,vbaevents,\
scripting/source/vbaevents/eventhelper \
scripting/source/vbaevents/service \
))
# vim: set noet sw=4 ts=4:
......@@ -1080,12 +1080,6 @@ namespace ooevtdescgen
return OUString( "ooo.vba.VBAToOOEventDesc" );
}
uno::Reference< XInterface > SAL_CALL create(
Reference< XComponentContext > const & xContext )
{
return static_cast< lang::XTypeProvider * >( new VBAToOOEventDescGen( xContext ) );
}
Sequence< OUString > SAL_CALL getSupportedServiceNames()
{
const OUString strName( ::ooevtdescgen::getImplementationName() );
......@@ -1093,4 +1087,21 @@ namespace ooevtdescgen
}
}
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
ooo_vba_EventListener_get_implementation(::com::sun::star::uno::XComponentContext* context,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new EventListener(context));
}
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
ooo_vba_VBAToOOEventDesc_get_implementation(::com::sun::star::uno::XComponentContext* context,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new VBAToOOEventDescGen(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "cppuhelper/implementationentry.hxx"
#include <osl/diagnose.h>
#include <service.hxx>
// component exports
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
const ::cppu::ImplementationEntry s_component_entries [] =
{
{
::evtlstner::create, ::evtlstner::getImplementationName,
::evtlstner::getSupportedServiceNames,
::cppu::createSingleComponentFactory,
0, 0
},
{
::ooevtdescgen::create, ::ooevtdescgen::getImplementationName,
::ooevtdescgen::getSupportedServiceNames,
::cppu::createSingleComponentFactory,
0, 0
},
{ 0, 0, 0, 0, 0, 0 }
};
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * SAL_CALL vbaevents_component_getFactory(
const sal_Char * pImplName, void * pServiceManager,
void * pRegistryKey )
{
OSL_TRACE("In component_getFactory");
return ::cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, s_component_entries );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -27,9 +27,6 @@ namespace evtlstner
// component operations
css::uno::Reference< css::uno::XInterface > SAL_CALL create(
css::uno::Reference< css::uno::XComponentContext > const & xContext );
OUString SAL_CALL getImplementationName();
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames();
......@@ -41,9 +38,6 @@ namespace ooevtdescgen
// component operations
css::uno::Reference< css::uno::XInterface > SAL_CALL create(
css::uno::Reference< css::uno::XComponentContext > const & xContext );
OUString SAL_CALL getImplementationName();
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames();
......
......@@ -19,10 +19,12 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="vbaevents" xmlns="http://openoffice.org/2010/uno-components">
<implementation name="ooo.vba.EventListener">
<implementation name="ooo.vba.EventListener"
constructor="ooo_vba_EventListener_get_implementation">
<service name="ooo.vba.EventListener"/>
</implementation>
<implementation name="ooo.vba.VBAToOOEventDesc">
<implementation name="ooo.vba.VBAToOOEventDesc"
constructor="ooo_vba_VBAToOOEventDesc_get_implementation">
<service name="ooo.vba.VBAToOOEventDesc"/>
</implementation>
</component>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment