Kaydet (Commit) 6dd1da10 authored tarafından Matúš Kukan's avatar Matúš Kukan

vbaobj: Constructor feature for two implementations.

This was done only to avoid symbol vbaeventshelper::serviceDecl which
is duplicated in sw.

Change-Id: I3cbeeee9d64765685223bbc53ced551876a717ae
üst dbfc495a
...@@ -58,14 +58,6 @@ namespace application ...@@ -58,14 +58,6 @@ namespace application
{ {
extern sdecl::ServiceDecl const serviceDecl; extern sdecl::ServiceDecl const serviceDecl;
} }
namespace vbaeventshelper
{
extern sdecl::ServiceDecl const serviceDecl;
}
namespace textframe
{
extern sdecl::ServiceDecl const serviceDecl;
}
extern "C" extern "C"
{ {
...@@ -73,12 +65,8 @@ extern "C" ...@@ -73,12 +65,8 @@ extern "C"
const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey ) registry::XRegistryKey * pRegistryKey )
{ {
OSL_TRACE("In vbaobj_component_getFactory for %s", pImplName );
void* pRet = component_getFactoryHelper( 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, 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; return pRet;
} }
} }
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <cppuhelper/implbase4.hxx> #include <cppuhelper/implbase4.hxx>
#include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/vclunohelper.hxx>
#include <unotools/eventcfg.hxx> #include <unotools/eventcfg.hxx>
#include <vbahelper/helperdecl.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/window.hxx> #include <vcl/window.hxx>
...@@ -898,18 +897,12 @@ uno::Any ScVbaEventsHelper::createWindow( const uno::Sequence< uno::Any >& rArgs ...@@ -898,18 +897,12 @@ uno::Any ScVbaEventsHelper::createWindow( const uno::Sequence< uno::Any >& rArgs
return uno::Any( xWindow ); return uno::Any( xWindow );
} }
// ============================================================================ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
ScVbaEventsHelper_get_implementation(
namespace vbaeventshelper css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &arguments)
{ {
namespace sdecl = comphelper::service_decl; return cppu::acquire(new ScVbaEventsHelper(arguments, context));
sdecl::class_<ScVbaEventsHelper, sdecl::with_args<true> > serviceImpl;
extern sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaEventsHelper",
"com.sun.star.script.vba.VBASpreadsheetEventProcessor" );
} }
// ============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -58,14 +58,12 @@ ScVbaTextFrame::getServiceNames() ...@@ -58,14 +58,12 @@ ScVbaTextFrame::getServiceNames()
return aServiceNames; 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; return cppu::acquire(new ScVbaTextFrame(arguments, context));
sdecl::vba_service_class_<ScVbaTextFrame, sdecl::with_args<true> > serviceImpl;
extern sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaTextFrame",
"ooo.vba.excel.TextFrame" );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
<implementation name="ScVbaApplication"> <implementation name="ScVbaApplication">
<service name="ooo.vba.excel.Application"/> <service name="ooo.vba.excel.Application"/>
</implementation> </implementation>
<implementation name="ScVbaEventsHelper"> <implementation name="ScVbaEventsHelper"
constructor="ScVbaEventsHelper_get_implementation">
<service name="com.sun.star.script.vba.VBASpreadsheetEventProcessor"/> <service name="com.sun.star.script.vba.VBASpreadsheetEventProcessor"/>
</implementation> </implementation>
<implementation name="ScVbaGlobals"> <implementation name="ScVbaGlobals">
...@@ -31,7 +32,8 @@ ...@@ -31,7 +32,8 @@
<implementation name="ScVbaHyperlink"> <implementation name="ScVbaHyperlink">
<service name="ooo.vba.excel.Hyperlink"/> <service name="ooo.vba.excel.Hyperlink"/>
</implementation> </implementation>
<implementation name="ScVbaTextFrame"> <implementation name="ScVbaTextFrame"
constructor="ScVbaTextFrame_get_implementation">
<service name="ooo.vba.excel.TextFrame"/> <service name="ooo.vba.excel.TextFrame"/>
</implementation> </implementation>
<implementation name="ScVbaWindow"> <implementation name="ScVbaWindow">
......
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