22#include <com/sun/star/bridge/XBridgeSupplier2.hpp>
23#include <com/sun/star/beans/XExactName.hpp>
24#include <com/sun/star/lang/XInitialization.hpp>
25#include <com/sun/star/script/InvocationInfo.hpp>
33#define JSCRIPT_VALUE_FUNC L"_GetValueObject"
34#define GET_STRUCT_FUNC L"_GetStruct"
35#define BRIDGE_VALUE_FUNC L"Bridge_GetValueObject"
36#define BRIDGE_GET_STRUCT_FUNC L"Bridge_GetStruct"
37#define BRIDGE_CREATE_TYPE_FUNC L"Bridge_CreateType"
39#define DISPID_JSCRIPT_VALUE_FUNC -10l
40#define DISPID_GET_STRUCT_FUNC -102
41#define DISPID_CREATE_TYPE_FUNC -103
56typedef std::unordered_map
62typedef std::unordered_map
68typedef std::unordered_map
79 public IProvideClassInfo,
80 public IConnectionPointContainer,
82 public IUnoObjectWrapper
95 STDMETHOD(
GetTypeInfo )( UINT itinfo, LCID lcid, ITypeInfo ** pptinfo )
override;
96 STDMETHOD(
GetIDsOfNames )( REFIID riid, LPOLESTR * rgszNames, UINT cNames,
97 LCID lcid, DISPID * rgdispid )
override;
98 STDMETHOD(
Invoke )( DISPID dispidMember, REFIID riid, LCID lcid,
WORD wFlags,
99 DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo,
100 UINT * puArgErr )
override;
103 virtual HRESULT STDMETHODCALLTYPE
GetDispID(
106 DISPID __RPC_FAR *pid)
override;
108 virtual HRESULT STDMETHODCALLTYPE
InvokeEx(
112 DISPPARAMS __RPC_FAR *pdp,
113 VARIANT __RPC_FAR *pvarRes,
114 EXCEPINFO __RPC_FAR *pei,
115 IServiceProvider __RPC_FAR *pspCaller)
override;
119 DWORD grfdex)
override;
127 DWORD __RPC_FAR *pgrfdex)
override;
131 BSTR __RPC_FAR *pbstrName)
override;
136 DISPID __RPC_FAR *pid)
override;
139 IUnknown __RPC_FAR *__RPC_FAR *ppunk)
override;
143 ITypeInfo **ppTI)
override;
147 IEnumConnectionPoints **ppEnum)
override;
150 IConnectionPoint **ppCP)
override;
155 sal_Int16 sourceModelType,
156 sal_Int16 destModelType)
override;
176 virtual HRESULT
doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarResult,
177 EXCEPINFO * pexcepinfo,
unsigned int * puArgErr, OUString & name,
Sequence<Any>& params);
179 virtual HRESULT
doGetProperty( DISPPARAMS * pdispparams, VARIANT * pvarResult,
180 EXCEPINFO * pexcepinfo, OUString & name );
182 virtual HRESULT
doSetProperty( DISPPARAMS * pdispparams, VARIANT * pvarResult,
183 EXCEPINFO * pexcepinfo,
unsigned int * puArgErr, OUString & name,
Sequence<Any> const & params);
185 virtual HRESULT
InvokeGeneral( DISPID dispidMember,
unsigned short wFlags,
186 DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo,
187 unsigned int * puArgErr,
bool& bHandled);
232 STDMETHOD(
GetIDsOfNames )( REFIID riid, LPOLESTR * rgszNames, UINT cNames,
233 LCID lcid, DISPID * rgdispid )
override;
234 STDMETHOD(
Invoke )( DISPID dispidMember, REFIID riid, LCID lcid,
WORD wFlags,
235 DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo,
236 UINT * puArgErr )
override;
245 static HRESULT
methodInvoke( DISPID dispidMember, DISPPARAMS * pdispparams, VARIANT * pvarResult,
246 EXCEPINFO * pexcepinfo,
unsigned int * puArgErr,
Sequence<Any> const & params);
STDMETHOD_(ULONG, AddRef)() override
NameToIdMap m_nameToDispIdMap
virtual HRESULT doSetProperty(DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, unsigned int *puArgErr, OUString &name, Sequence< Any > const ¶ms)
virtual HRESULT STDMETHODCALLTYPE FindConnectionPoint(REFIID riid, IConnectionPoint **ppCP) override
STDMETHOD_(ULONG, Release)() override
virtual Reference< XInterface > createComWrapperInstance() override
InterfaceOleWrapper(Reference< XMultiServiceFactory > const &xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass)
STDMETHOD() QueryInterface(REFIID riid, void **ppvObj) override
virtual Any SAL_CALL createBridge(const Any &modelDepObject, const Sequence< sal_Int8 > &ProcessId, sal_Int16 sourceModelType, sal_Int16 destModelType) override
virtual Reference< XInterface > createUnoWrapperInstance() override
STDMETHOD() GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid) override
virtual HRESULT InvokeGeneral(DISPID dispidMember, unsigned short wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, unsigned int *puArgErr, bool &bHandled)
virtual HRESULT STDMETHODCALLTYPE DeleteMemberByDispID(DISPID id) override
virtual HRESULT doGetProperty(DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, OUString &name)
const OUString & getImplementationName() const
STDMETHOD() getWrapperXInterface(Reference< XInterface > *pXInt) override
void convertDispparamsArgs(DISPID id, unsigned short wFlags, DISPPARAMS *pdispparams, Sequence< Any > &rSeq)
STDMETHOD() getOriginalUnoStruct(Any *pStruct) override
virtual HRESULT STDMETHODCALLTYPE GetMemberProperties(DISPID id, DWORD grfdexFetch, DWORD __RPC_FAR *pgrfdex) override
STDMETHOD() GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo **pptinfo) override
OUString m_sImplementationName
virtual HRESULT STDMETHODCALLTYPE GetNextDispID(DWORD grfdex, DISPID id, DISPID __RPC_FAR *pid) override
virtual HRESULT STDMETHODCALLTYPE GetMemberName(DISPID id, BSTR __RPC_FAR *pbstrName) override
virtual HRESULT doInvoke(DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, unsigned int *puArgErr, OUString &name, Sequence< Any > ¶ms)
virtual HRESULT STDMETHODCALLTYPE GetDispID(BSTR bstrName, DWORD grfdex, DISPID __RPC_FAR *pid) override
STDMETHOD() getOriginalUnoObject(Reference< XInterface > *pXInt) override
STDMETHOD() Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr) override
Reference< XInterface > m_xOrigin
STDMETHOD() GetTypeInfoCount(UINT *pctinfo) override
~InterfaceOleWrapper() override
virtual HRESULT STDMETHODCALLTYPE EnumConnectionPoints(IEnumConnectionPoints **ppEnum) override
Reference< XInvocation > m_xInvocation
virtual HRESULT STDMETHODCALLTYPE GetNameSpaceParent(IUnknown __RPC_FAR *__RPC_FAR *ppunk) override
bool getInvocationInfoForCall(DISPID id, InvocationInfo &info)
std::vector< MemberInfo > m_MemberInfos
VARTYPE m_defaultValueType
virtual HRESULT STDMETHODCALLTYPE InvokeEx(DISPID id, LCID lcid, WORD wFlags, DISPPARAMS __RPC_FAR *pdp, VARIANT __RPC_FAR *pvarRes, EXCEPINFO __RPC_FAR *pei, IServiceProvider __RPC_FAR *pspCaller) override
virtual HRESULT STDMETHODCALLTYPE GetClassInfo(ITypeInfo **ppTI) override
virtual void SAL_CALL initialize(const Sequence< Any > &aArguments) override
virtual HRESULT STDMETHODCALLTYPE DeleteMemberByName(BSTR bstr, DWORD grfdex) override
Reference< XExactName > m_xExactName
All methods are allowed to throw at least a BridgeRuntimeError.
UnoObjectWrapperRemoteOpt(Reference< XMultiServiceFactory > const &aFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass)
IdToMemberInfoMap m_idToMemberInfoMap
STDMETHOD() Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr) override
static HRESULT methodInvoke(DISPID dispidMember, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, unsigned int *puArgErr, Sequence< Any > const ¶ms)
~UnoObjectWrapperRemoteOpt() override
virtual Reference< XInterface > createUnoWrapperInstance() override
STDMETHOD() GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid) override
Reference< XSingleServiceFactory > xFactory
MemberInfo(WORD f, const OUString &n)
std::unordered_map< DISPID, MemberInfo > IdToMemberInfoMap
std::unordered_map< OUString, DISPID > NameToIdMap
std::unordered_map< OUString, bool > BadNameMap