LibreOffice Module extensions (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
InterfaceOleWrapper Class Reference

#include <unoobjw.hxx>

Inheritance diagram for InterfaceOleWrapper:
[legend]
Collaboration diagram for InterfaceOleWrapper:
[legend]

Public Member Functions

 InterfaceOleWrapper (Reference< XMultiServiceFactory > const &xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass)
 
 ~InterfaceOleWrapper () override
 
STDMETHOD() QueryInterface (REFIID riid, void **ppvObj) override
 
 STDMETHOD_ (ULONG, AddRef)() override
 
 STDMETHOD_ (ULONG, Release)() override
 
STDMETHOD() GetTypeInfoCount (UINT *pctinfo) override
 
STDMETHOD() GetTypeInfo (UINT itinfo, LCID lcid, ITypeInfo **pptinfo) override
 
STDMETHOD() GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid) override
 
STDMETHOD() Invoke (DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, UINT *puArgErr) override
 
virtual HRESULT STDMETHODCALLTYPE GetDispID (BSTR bstrName, DWORD grfdex, DISPID __RPC_FAR *pid) override
 
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 DeleteMemberByName (BSTR bstr, DWORD grfdex) override
 
virtual HRESULT STDMETHODCALLTYPE DeleteMemberByDispID (DISPID id) override
 
virtual HRESULT STDMETHODCALLTYPE GetMemberProperties (DISPID id, DWORD grfdexFetch, DWORD __RPC_FAR *pgrfdex) override
 
virtual HRESULT STDMETHODCALLTYPE GetMemberName (DISPID id, BSTR __RPC_FAR *pbstrName) override
 
virtual HRESULT STDMETHODCALLTYPE GetNextDispID (DWORD grfdex, DISPID id, DISPID __RPC_FAR *pid) override
 
virtual HRESULT STDMETHODCALLTYPE GetNameSpaceParent (IUnknown __RPC_FAR *__RPC_FAR *ppunk) override
 
virtual HRESULT STDMETHODCALLTYPE GetClassInfo (ITypeInfo **ppTI) override
 
virtual HRESULT STDMETHODCALLTYPE EnumConnectionPoints (IEnumConnectionPoints **ppEnum) override
 
virtual HRESULT STDMETHODCALLTYPE FindConnectionPoint (REFIID riid, IConnectionPoint **ppCP) override
 
virtual Any SAL_CALL createBridge (const Any &modelDepObject, const Sequence< sal_Int8 > &ProcessId, sal_Int16 sourceModelType, sal_Int16 destModelType) override
 
virtual void SAL_CALL initialize (const Sequence< Any > &aArguments) override
 
STDMETHOD() getWrapperXInterface (Reference< XInterface > *pXInt) override
 
STDMETHOD() getOriginalUnoObject (Reference< XInterface > *pXInt) override
 
STDMETHOD() getOriginalUnoStruct (Any *pStruct) override
 
virtual Reference< XInterfacecreateUnoWrapperInstance () override
 
virtual Reference< XInterfacecreateComWrapperInstance () override
 
const OUString & getImplementationName () const
 
- Public Member Functions inherited from UnoConversionUtilities< InterfaceOleWrapper >
 UnoConversionUtilities (const Reference< XMultiServiceFactory > &smgr)
 
 UnoConversionUtilities (const Reference< XMultiServiceFactory > &xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass)
 
virtual ~UnoConversionUtilities ()
 
void anyToVariant (VARIANT *pVariant, const Any &rAny)
 converts only into oleautomation types, that is there is no VT_I1, VT_UI2, VT_UI4 a sal_Unicode character is converted into a BSTR. More...
 
void anyToVariant (VARIANT *pVariant, const Any &rAny, VARTYPE type)
 
SAFEARRAY * createUnoSequenceWrapper (const Any &rSeq)
 
SAFEARRAY * createUnoSequenceWrapper (const Any &rSeq, VARTYPE elemtype)
 
void createUnoObjectWrapper (const Any &rObj, VARIANT *pVar)
 
void variantToAny (const VARIANT *pVariant, Any &rAny, bool bReduceValueRange=true)
 
void variantToAny (const VARIANTARG *pArg, Any &rAny, const Type &ptype, bool bReduceValueRange=true)
 This method converts variants arguments in calls from COM -> UNO. More...
 
Any createOleObjectWrapper (VARIANT *pVar, const Type &aType=Type())
 
bool convertValueObject (const VARIANTARG *var, Any &any)
 
void dispatchExObject2Sequence (const VARIANTARG *pvar, Any &anySeq, const Type &type)
 
Sequence< AnycreateOleArrayWrapperOfDim (SAFEARRAY *pArray, unsigned int dimCount, unsigned int actDim, LONG *index, VARTYPE type, const Type &unotype)
 
Sequence< AnycreateOleArrayWrapper (SAFEARRAY *pArray, VARTYPE type, const Type &unotype=Type())
 
VARTYPE mapTypeClassToVartype (TypeClass type)
 
Reference< XSingleServiceFactory > getInvocationFactory (const Any &anyObject)
 
virtual Reference< XInterfacecreateUnoWrapperInstance ()=0
 
virtual Reference< XInterfacecreateComWrapperInstance ()=0
 
Sequence< TypegetImplementedInterfaces (IUnknown *pUnk)
 

Protected Member Functions

virtual HRESULT doInvoke (DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, unsigned int *puArgErr, OUString &name, Sequence< Any > &params)
 
virtual HRESULT doGetProperty (DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, OUString &name)
 
virtual HRESULT doSetProperty (DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, unsigned int *puArgErr, OUString &name, Sequence< Any > const &params)
 
virtual HRESULT InvokeGeneral (DISPID dispidMember, unsigned short wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo, unsigned int *puArgErr, bool &bHandled)
 
void convertDispparamsArgs (DISPID id, unsigned short wFlags, DISPPARAMS *pdispparams, Sequence< Any > &rSeq)
 
bool getInvocationInfoForCall (DISPID id, InvocationInfo &info)
 
- Protected Member Functions inherited from UnoConversionUtilities< InterfaceOleWrapper >
Reference< XInterfacecreateAdapter (const Sequence< Type > &types, const Reference< XInterface > &receiver)
 
void getElementCountAndTypeOfSequence (const Any &rSeq, sal_Int32 dim, Sequence< sal_Int32 > &seqElementCounts, TypeDescription &typeDesc)
 
Reference< XTypeConverter > getTypeConverter ()
 

Protected Attributes

Reference< XInvocation > m_xInvocation
 
Reference< XExactName > m_xExactName
 
Reference< XInterfacem_xOrigin
 
NameToIdMap m_nameToDispIdMap
 
std::vector< MemberInfom_MemberInfos
 
VARTYPE m_defaultValueType
 
OUString m_sImplementationName
 
- Protected Attributes inherited from UnoConversionUtilities< InterfaceOleWrapper >
const sal_uInt8 m_nUnoWrapperClass
 
const sal_uInt8 m_nComWrapperClass
 
Reference< XMultiServiceFactory > m_smgr
 
Reference< XMultiServiceFactory > m_smgrRemote
 
Reference< XSingleServiceFactory > m_xInvocationFactoryLocal
 
Reference< XSingleServiceFactory > m_xInvocationFactoryRemote
 

Additional Inherited Members

- Static Public Member Functions inherited from UnoConversionUtilities< InterfaceOleWrapper >
static bool isJScriptArray (const VARIANT *pvar)
 
- Static Protected Member Functions inherited from UnoConversionUtilities< InterfaceOleWrapper >
static bool incrementMultidimensionalIndex (sal_Int32 dimensions, const sal_Int32 *parDimensionLength, sal_Int32 *parMultidimensionalIndex)
 
static size_t getOleElementSize (VARTYPE type)
 
static Type getElementTypeOfSequence (const Type &seqType)
 

Detailed Description

Definition at line 77 of file unoobjw.hxx.

Constructor & Destructor Documentation

◆ InterfaceOleWrapper()

InterfaceOleWrapper::InterfaceOleWrapper ( Reference< XMultiServiceFactory > const &  xFactory,
sal_uInt8  unoWrapperClass,
sal_uInt8  comWrapperClass 
)

Definition at line 126 of file unoobjw.cxx.

References xFactory.

Referenced by createUnoWrapperInstance().

◆ ~InterfaceOleWrapper()

InterfaceOleWrapper::~InterfaceOleWrapper ( )
override

Definition at line 133 of file unoobjw.cxx.

References getBridgeMutex(), m_xOrigin, and UnoObjToWrapperMap.

Member Function Documentation

◆ convertDispparamsArgs()

void InterfaceOleWrapper::convertDispparamsArgs ( DISPID  id,
unsigned short  wFlags,
DISPPARAMS *  pdispparams,
Sequence< Any > &  rSeq 
)
protected

◆ createBridge()

Any SAL_CALL InterfaceOleWrapper::createBridge ( const Any modelDepObject,
const Sequence< sal_Int8 > &  ProcessId,
sal_Int16  sourceModelType,
sal_Int16  destModelType 
)
overridevirtual

Definition at line 1484 of file unoobjw.cxx.

References Any, OLE, and UNO.

◆ createComWrapperInstance()

Reference< XInterface > InterfaceOleWrapper::createComWrapperInstance ( )
overridevirtual

◆ createUnoWrapperInstance()

Reference< XInterface > InterfaceOleWrapper::createUnoWrapperInstance ( )
overridevirtual

◆ DeleteMemberByDispID()

STDMETHODIMP InterfaceOleWrapper::DeleteMemberByDispID ( DISPID  id)
overridevirtual

Definition at line 2916 of file unoobjw.cxx.

◆ DeleteMemberByName()

STDMETHODIMP InterfaceOleWrapper::DeleteMemberByName ( BSTR  bstr,
DWORD  grfdex 
)
overridevirtual

Definition at line 2909 of file unoobjw.cxx.

◆ doGetProperty()

HRESULT InterfaceOleWrapper::doGetProperty ( DISPPARAMS *  pdispparams,
VARIANT *  pvarResult,
EXCEPINFO *  pexcepinfo,
OUString &  name 
)
protectedvirtual

◆ doInvoke()

HRESULT InterfaceOleWrapper::doInvoke ( DISPPARAMS *  pdispparams,
VARIANT *  pvarResult,
EXCEPINFO *  pexcepinfo,
unsigned int puArgErr,
OUString &  name,
Sequence< Any > &  params 
)
protectedvirtual

◆ doSetProperty()

HRESULT InterfaceOleWrapper::doSetProperty ( DISPPARAMS *  pdispparams,
VARIANT *  pvarResult,
EXCEPINFO *  pexcepinfo,
unsigned int puArgErr,
OUString &  name,
Sequence< Any > const &  params 
)
protectedvirtual

◆ EnumConnectionPoints()

HRESULT STDMETHODCALLTYPE InterfaceOleWrapper::EnumConnectionPoints ( IEnumConnectionPoints **  ppEnum)
overridevirtual

Definition at line 2988 of file unoobjw.cxx.

References SAL_INFO.

◆ FindConnectionPoint()

HRESULT STDMETHODCALLTYPE InterfaceOleWrapper::FindConnectionPoint ( REFIID  riid,
IConnectionPoint **  ppCP 
)
overridevirtual

◆ GetClassInfo()

HRESULT STDMETHODCALLTYPE InterfaceOleWrapper::GetClassInfo ( ITypeInfo **  ppTI)
overridevirtual

◆ GetDispID()

STDMETHODIMP InterfaceOleWrapper::GetDispID ( BSTR  bstrName,
DWORD  grfdex,
DISPID __RPC_FAR *  pid 
)
overridevirtual

Definition at line 2892 of file unoobjw.cxx.

◆ GetIDsOfNames()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::GetIDsOfNames ( REFIID  riid,
LPOLESTR *  rgszNames,
UINT  cNames,
LCID  lcid,
DISPID *  rgdispid 
)
override

◆ getImplementationName()

const OUString & InterfaceOleWrapper::getImplementationName ( ) const
inline

Definition at line 170 of file unoobjw.hxx.

References m_sImplementationName.

◆ getInvocationInfoForCall()

bool InterfaceOleWrapper::getInvocationInfoForCall ( DISPID  id,
InvocationInfo &  info 
)
protected

Definition at line 1428 of file unoobjw.cxx.

References m_nameToDispIdMap, and m_xInvocation.

Referenced by convertDispparamsArgs().

◆ GetMemberName()

STDMETHODIMP InterfaceOleWrapper::GetMemberName ( DISPID  id,
BSTR __RPC_FAR *  pbstrName 
)
overridevirtual

Definition at line 2929 of file unoobjw.cxx.

◆ GetMemberProperties()

STDMETHODIMP InterfaceOleWrapper::GetMemberProperties ( DISPID  id,
DWORD  grfdexFetch,
DWORD __RPC_FAR *  pgrfdex 
)
overridevirtual

Definition at line 2921 of file unoobjw.cxx.

◆ GetNameSpaceParent()

STDMETHODIMP InterfaceOleWrapper::GetNameSpaceParent ( IUnknown __RPC_FAR *__RPC_FAR *  ppunk)
overridevirtual

Definition at line 2944 of file unoobjw.cxx.

◆ GetNextDispID()

STDMETHODIMP InterfaceOleWrapper::GetNextDispID ( DWORD  grfdex,
DISPID  id,
DISPID __RPC_FAR *  pid 
)
overridevirtual

Definition at line 2936 of file unoobjw.cxx.

◆ getOriginalUnoObject()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::getOriginalUnoObject ( Reference< XInterface > *  pXInt)
override

Definition at line 215 of file unoobjw.cxx.

References m_xOrigin.

◆ getOriginalUnoStruct()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::getOriginalUnoStruct ( Any pStruct)
override

Definition at line 220 of file unoobjw.cxx.

References any, Any, m_xInvocation, and m_xOrigin.

◆ GetTypeInfo()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::GetTypeInfo ( UINT  itinfo,
LCID  lcid,
ITypeInfo **  pptinfo 
)
override

◆ GetTypeInfoCount()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::GetTypeInfoCount ( UINT *  pctinfo)
override

Definition at line 241 of file unoobjw.cxx.

References SAL_INFO.

◆ getWrapperXInterface()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::getWrapperXInterface ( Reference< XInterface > *  pXInt)
override

Definition at line 210 of file unoobjw.cxx.

◆ initialize()

void SAL_CALL InterfaceOleWrapper::initialize ( const Sequence< Any > &  aArguments)
overridevirtual

◆ Invoke()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::Invoke ( DISPID  dispidMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdispparams,
VARIANT *  pvarResult,
EXCEPINFO *  pexcepinfo,
UINT *  puArgErr 
)
override

◆ InvokeEx()

STDMETHODIMP InterfaceOleWrapper::InvokeEx ( DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS __RPC_FAR *  pdp,
VARIANT __RPC_FAR *  pvarRes,
EXCEPINFO __RPC_FAR *  pei,
IServiceProvider __RPC_FAR *  pspCaller 
)
overridevirtual

Definition at line 2897 of file unoobjw.cxx.

◆ InvokeGeneral()

HRESULT InterfaceOleWrapper::InvokeGeneral ( DISPID  dispidMember,
unsigned short  wFlags,
DISPPARAMS *  pdispparams,
VARIANT *  pvarResult,
EXCEPINFO *  pexcepinfo,
unsigned int puArgErr,
bool &  bHandled 
)
protectedvirtual

◆ QueryInterface()

COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::QueryInterface ( REFIID  riid,
void **  ppvObj 
)
override

Definition at line 142 of file unoobjw.cxx.

References m_xOrigin, and SAL_INFO.

◆ STDMETHOD_() [1/2]

InterfaceOleWrapper::STDMETHOD_ ( ULONG  ,
AddRef   
)
override

◆ STDMETHOD_() [2/2]

InterfaceOleWrapper::STDMETHOD_ ( ULONG  ,
Release   
)
override

References Any.

Member Data Documentation

◆ m_defaultValueType

VARTYPE InterfaceOleWrapper::m_defaultValueType
protected

Definition at line 207 of file unoobjw.hxx.

Referenced by initialize(), and InvokeGeneral().

◆ m_MemberInfos

std::vector<MemberInfo> InterfaceOleWrapper::m_MemberInfos
protected

Definition at line 198 of file unoobjw.hxx.

Referenced by GetIDsOfNames(), and Invoke().

◆ m_nameToDispIdMap

NameToIdMap InterfaceOleWrapper::m_nameToDispIdMap
protected

◆ m_sImplementationName

OUString InterfaceOleWrapper::m_sImplementationName
protected

Definition at line 210 of file unoobjw.hxx.

Referenced by GetClassInfo(), getImplementationName(), GetTypeInfo(), and initialize().

◆ m_xExactName

Reference<XExactName> InterfaceOleWrapper::m_xExactName
protected

Definition at line 195 of file unoobjw.hxx.

Referenced by GetIDsOfNames(), initialize(), and UnoObjectWrapperRemoteOpt::Invoke().

◆ m_xInvocation

Reference<XInvocation> InterfaceOleWrapper::m_xInvocation
protected

◆ m_xOrigin

Reference<XInterface> InterfaceOleWrapper::m_xOrigin
protected

The documentation for this class was generated from the following files: