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
{
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;
}
}
......
......@@ -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: */
......@@ -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: */
......@@ -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">
......
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