diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-20 23:42:49 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-21 07:52:24 +0100 |
commit | 6dd1da1045bb49944fbd288703ac88c3cb71158e (patch) | |
tree | 83f7f0bc28e0ef54e9eab80bd34cedb2f803ab01 /sc | |
parent | dbfc495a9ace0865d764dad7404633a12cda2873 (diff) |
vbaobj: Constructor feature for two implementations.
This was done only to avoid symbol vbaeventshelper::serviceDecl which
is duplicated in sw.
Change-Id: I3cbeeee9d64765685223bbc53ced551876a717ae
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/vba/service.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaeventshelper.cxx | 17 | ||||
-rw-r--r-- | sc/source/ui/vba/vbatextframe.cxx | 12 | ||||
-rw-r--r-- | sc/util/vbaobj.component | 6 |
4 files changed, 14 insertions, 33 deletions
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx index 8c2c222dbd32..31e28d3a32c0 100644 --- a/sc/source/ui/vba/service.cxx +++ b/sc/source/ui/vba/service.cxx @@ -58,14 +58,6 @@ namespace application { extern sdecl::ServiceDecl const serviceDecl; } -namespace vbaeventshelper -{ -extern sdecl::ServiceDecl const serviceDecl; -} -namespace textframe -{ -extern sdecl::ServiceDecl const serviceDecl; -} extern "C" { @@ -73,12 +65,8 @@ extern "C" const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { - OSL_TRACE("In vbaobj_component_getFactory for %s", pImplName ); void* pRet = component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ); - if( !pRet ) - pRet = component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, vbaeventshelper::serviceDecl, textframe::serviceDecl ); - OSL_TRACE("Ret is 0x%x", pRet); return pRet; } } diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 31d4bed700fe..f22a6c029d9f 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -35,7 +35,6 @@ #include <cppuhelper/implbase4.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <unotools/eventcfg.hxx> -#include <vbahelper/helperdecl.hxx> #include <vcl/svapp.hxx> #include <vcl/window.hxx> @@ -898,18 +897,12 @@ uno::Any ScVbaEventsHelper::createWindow( const uno::Sequence< uno::Any >& rArgs return uno::Any( xWindow ); } -// ============================================================================ - -namespace vbaeventshelper +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +ScVbaEventsHelper_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &arguments) { -namespace sdecl = comphelper::service_decl; -sdecl::class_<ScVbaEventsHelper, sdecl::with_args<true> > serviceImpl; -extern sdecl::ServiceDecl const serviceDecl( - serviceImpl, - "ScVbaEventsHelper", - "com.sun.star.script.vba.VBASpreadsheetEventProcessor" ); + return cppu::acquire(new ScVbaEventsHelper(arguments, context)); } -// ============================================================================ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx index 0f2e6eb75307..3024dfba24a5 100644 --- a/sc/source/ui/vba/vbatextframe.cxx +++ b/sc/source/ui/vba/vbatextframe.cxx @@ -58,14 +58,12 @@ ScVbaTextFrame::getServiceNames() return aServiceNames; } -namespace textframe +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +ScVbaTextFrame_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &arguments) { -namespace sdecl = comphelper::service_decl; -sdecl::vba_service_class_<ScVbaTextFrame, sdecl::with_args<true> > serviceImpl; -extern sdecl::ServiceDecl const serviceDecl( - serviceImpl, - "ScVbaTextFrame", - "ooo.vba.excel.TextFrame" ); + return cppu::acquire(new ScVbaTextFrame(arguments, context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/util/vbaobj.component b/sc/util/vbaobj.component index 861cb6e5a15d..07769a36547e 100644 --- a/sc/util/vbaobj.component +++ b/sc/util/vbaobj.component @@ -22,7 +22,8 @@ <implementation name="ScVbaApplication"> <service name="ooo.vba.excel.Application"/> </implementation> - <implementation name="ScVbaEventsHelper"> + <implementation name="ScVbaEventsHelper" + constructor="ScVbaEventsHelper_get_implementation"> <service name="com.sun.star.script.vba.VBASpreadsheetEventProcessor"/> </implementation> <implementation name="ScVbaGlobals"> @@ -31,7 +32,8 @@ <implementation name="ScVbaHyperlink"> <service name="ooo.vba.excel.Hyperlink"/> </implementation> - <implementation name="ScVbaTextFrame"> + <implementation name="ScVbaTextFrame" + constructor="ScVbaTextFrame_get_implementation"> <service name="ooo.vba.excel.TextFrame"/> </implementation> <implementation name="ScVbaWindow"> |