From f96926c1c22a1bceea42f4ebd5ec610d48833c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= Date: Fri, 21 Feb 2014 00:10:57 +0100 Subject: [PATCH] vbaobj: One more ctor feature for ScVbaGlobals. Change-Id: I741d1e0af1d6f631b321b76172b988262c0f709f --- sc/source/ui/vba/service.cxx | 6 +----- sc/source/ui/vba/vbaglobals.cxx | 13 +++++-------- sc/util/vbaobj.component | 3 ++- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx index 31e28d3a32c0..76dbc359e736 100644 --- a/sc/source/ui/vba/service.cxx +++ b/sc/source/ui/vba/service.cxx @@ -46,10 +46,6 @@ namespace window { extern sdecl::ServiceDecl const serviceDecl; } -namespace globals -{ -extern sdecl::ServiceDecl const serviceDecl; -} namespace hyperlink { extern sdecl::ServiceDecl const serviceDecl; @@ -66,7 +62,7 @@ extern "C" registry::XRegistryKey * pRegistryKey ) { void* pRet = component_getFactoryHelper( - pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ); + pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ); return pRet; } } diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx index 919da33f88e0..334338c5d37a 100644 --- a/sc/source/ui/vba/vbaglobals.cxx +++ b/sc/source/ui/vba/vbaglobals.cxx @@ -16,7 +16,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include #include "vbaglobals.hxx" #include @@ -288,14 +287,12 @@ ScVbaGlobals::getServiceNames() return aServiceNames; } -namespace globals +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +ScVbaGlobals_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence const &arguments) { -namespace sdecl = comphelper::service_decl; -sdecl::vba_service_class_ > serviceImpl; -extern sdecl::ServiceDecl const serviceDecl( - serviceImpl, - "ScVbaGlobals", - "ooo.vba.excel.Globals" ); + return cppu::acquire(new ScVbaGlobals(arguments, context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/util/vbaobj.component b/sc/util/vbaobj.component index 07769a36547e..4e250aafe41f 100644 --- a/sc/util/vbaobj.component +++ b/sc/util/vbaobj.component @@ -26,7 +26,8 @@ constructor="ScVbaEventsHelper_get_implementation"> - +