From 0b21b8b146fc4b982c7c9bbb866b9ff18a29332a Mon Sep 17 00:00:00 2001 From: Noel Power Date: Wed, 6 Oct 2010 10:16:27 +0100 Subject: initial commit for vba blob ( not including container_control stuff ) --- scripting/source/basprov/basscript.hxx | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'scripting/source/basprov/basscript.hxx') diff --git a/scripting/source/basprov/basscript.hxx b/scripting/source/basprov/basscript.hxx index 4a3d6f1ab61d..177ceeacdea8 100644 --- a/scripting/source/basprov/basscript.hxx +++ b/scripting/source/basprov/basscript.hxx @@ -28,12 +28,14 @@ #ifndef SCRIPTING_BASSCRIPT_HXX #define SCRIPTING_BASSCRIPT_HXX +#include "bcholder.hxx" #include #include #include +#include +#include #include - class BasicManager; //......................................................................... @@ -49,7 +51,11 @@ namespace basprov ::com::sun::star::script::provider::XScript > BasicScriptImpl_BASE; - class BasicScriptImpl : public BasicScriptImpl_BASE + class BasicScriptImpl : public BasicScriptImpl_BASE, + public ::scripting_helper::OMutexHolder, + public ::scripting_helper::OBroadcastHelperHolder, + public ::comphelper::OPropertyContainer, + public ::comphelper::OPropertyArrayUsageHelper< BasicScriptImpl > { private: SbMethodRef m_xMethod; @@ -57,6 +63,16 @@ namespace basprov BasicManager* m_documentBasicManager; ::com::sun::star::uno::Reference< ::com::sun::star::document::XScriptInvocationContext > m_xDocumentScriptContext; + // hack, OPropertyContainer doesn't allow you to define a property of unknown + // type ( I guess because an Any can't contain an Any... I've always wondered why? + // as its not unusual to do that in corba ) + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_caller; + protected: + // OPropertySetHelper + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper( ); + + // OPropertyArrayUsageHelper + virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; public: BasicScriptImpl( @@ -71,6 +87,12 @@ namespace basprov ); virtual ~BasicScriptImpl(); + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + // XScript virtual ::com::sun::star::uno::Any SAL_CALL invoke( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, @@ -80,6 +102,9 @@ namespace basprov ::com::sun::star::script::provider::ScriptFrameworkErrorException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException ); + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) + throw (::com::sun::star::uno::RuntimeException); }; //......................................................................... -- cgit