summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock@collabora.com>2015-03-05 20:20:46 +1100
committerStephan Bergmann <sbergman@redhat.com>2015-03-12 10:48:03 +0100
commit6f7b0a1fad61e14ac82d14fad2280344169c51ad (patch)
tree2af1b2a9aade58a0490c7182cf1a023c61f9a643 /scripting
parent73c347efb30c87b9480699f6cbbbaf5c896c4a22 (diff)
scripting: use constructor syntax in vbaevents.component
Change-Id: Ie27ec9ca92137e9f8666d2080fd1bc028417e337 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/Library_vbaevents.mk1
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx23
-rw-r--r--scripting/source/vbaevents/service.cxx59
-rw-r--r--scripting/source/vbaevents/service.hxx6
-rw-r--r--scripting/source/vbaevents/vbaevents.component6
5 files changed, 21 insertions, 74 deletions
diff --git a/scripting/Library_vbaevents.mk b/scripting/Library_vbaevents.mk
index acf7af520483..482ffbb88917 100644
--- a/scripting/Library_vbaevents.mk
+++ b/scripting/Library_vbaevents.mk
@@ -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:
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index a9e970dc964d..babe1cb35cb4 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -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: */
diff --git a/scripting/source/vbaevents/service.cxx b/scripting/source/vbaevents/service.cxx
deleted file mode 100644
index d6f21e234a18..000000000000
--- a/scripting/source/vbaevents/service.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- 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: */
diff --git a/scripting/source/vbaevents/service.hxx b/scripting/source/vbaevents/service.hxx
index 4c8357c90426..cff03cb6d1e5 100644
--- a/scripting/source/vbaevents/service.hxx
+++ b/scripting/source/vbaevents/service.hxx
@@ -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();
diff --git a/scripting/source/vbaevents/vbaevents.component b/scripting/source/vbaevents/vbaevents.component
index 15b3eb67a12a..cf39be08c8af 100644
--- a/scripting/source/vbaevents/vbaevents.component
+++ b/scripting/source/vbaevents/vbaevents.component
@@ -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>