diff options
author | Joachim Lingner <jl@openoffice.org> | 2000-10-12 12:09:12 +0000 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2000-10-12 12:09:12 +0000 |
commit | 19840d6f75f09bd096ca66bd8fd93127e0154d2e (patch) | |
tree | 93679db46f77c4a55d5234445e47102e271bf3e5 /extensions | |
parent | 083368eca0168959b88dc30a8c2e1aa14ee33200 (diff) |
unused code removed
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/ole/unoobjw.cxx | 764 | ||||
-rw-r--r-- | extensions/source/ole/unoobjw.hxx | 189 |
2 files changed, 6 insertions, 947 deletions
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index c4b64082ee93..34047c90daa2 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoobjw.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:16:40 $ + * last change: $Author: jl $ $Date: 2000-10-12 13:09:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,66 +92,10 @@ #ifndef _COM_SUN_STAR_REFLECTION_PARAMINFO_HPP_ #include <com/sun/star/reflection/ParamInfo.hpp> #endif -#ifndef _COM_SUN_STAR_REFLECTION_XIDLARRAY_H_ -#include <com/sun/star/reflection/XIdlArray.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_FIELDACCESSMODE_HPP_ -#include <com/sun/star/reflection/FieldAccessMode.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_XIDLCLASS_HPP_ -#include <com/sun/star/reflection/XIdlClass.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_XIDLFIELD_HPP_ -#include <com/sun/star/reflection/XIdlField.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_PARAMMODE_HPP_ -#include <com/sun/star/reflection/ParamMode.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_METHODMODE_HPP_ -#include <com/sun/star/reflection/MethodMode.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_XIDLMEMBER_HPP_ -#include <com/sun/star/reflection/XIdlMember.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_XIDLREFLECTION_HPP_ -#include <com/sun/star/reflection/XIdlReflection.hpp> -#endif -#ifndef _COM_SUN_STAR_REFLECTION_XIDLMETHOD_HPP_ -#include <com/sun/star/reflection/XIdlMethod.hpp> -#endif + #ifndef _COM_SUN_STAR_BEANS_XEXACTNAME_HPP_ #include <com/sun/star/beans/XExactName.hpp> #endif -#ifndef _COM_SUN_STAR_SCRIPT_XEVENTATTACHER_HPP_ -#include <com/sun/star/script/XEventAttacher.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XEVENTATTACHERMANAGER_HPP_ -#include <com/sun/star/script/XEventAttacherManager.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENT_HPP_ -#include <com/sun/star/script/ScriptEvent.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XSCRIPTLISTENER_HPP_ -#include <com/sun/star/script/XScriptListener.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_SCRIPTEVENTDESCRIPTOR_HPP_ -#include <com/sun/star/script/ScriptEventDescriptor.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_ -#include <com/sun/star/lang/XEventListener.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_EVENTOBJECT_HPP_ -#include <com/sun/star/lang/EventObject.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XALLLISTENERADAPTERSERVICE_HPP_ -#include <com/sun/star/script/XAllListenerAdapterService.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XALLLISTENER_HPP_ -#include <com/sun/star/script/XAllListener.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_ALLEVENTOBJECT_HPP_ -#include <com/sun/star/script/AllEventObject.hpp> -#endif #ifndef _COM_SUN_STAR_CONTAINER_NOSUCHELEMENTEXCEPTION_HPP_ #include <com/sun/star/container/NoSuchElementException.hpp> #endif @@ -203,8 +147,6 @@ namespace ole_adapter { static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource); static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource); -//static const VARTYPE getVarType( const Any& val); -//static sal_Bool convertValueObject( const VARIANTARG *var, Any& any, sal_Bool& bHandled); static HRESULT mapCannotConvertException( CannotConvertException e, unsigned int * puArgErr); @@ -1316,706 +1258,6 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetNameSpaceParent( return ret; } -//STDMETHODIMP InterfaceOleWrapper_Impl::EnumConnectionPoints(IEnumConnectionPoints __RPC_FAR *__RPC_FAR *ppEnum) -//{ -// HRESULT ret = ResultFromScode(CONNECT_E_NOCONNECTION); -// -// (*ppEnum) = new EnumConnectionPoints_Impl(&m_rConnectionPoint, 1); -// -// return ret; -//} -// -//STDMETHODIMP InterfaceOleWrapper_Impl::FindConnectionPoint( -// /* [in] */ REFIID riid, -// /* [out] */ IConnectionPoint __RPC_FAR *__RPC_FAR *ppCP) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// if (!m_rConnectionPoint.is()) -// { -// OGuard guard(globalWrapperMutex); -// -// if ((!m_rConnectionPoint.is()) && m_xOrigin.is() && m_xEventAttacher.is()) -// { -// ConnectionPoint_Impl* pConnectionPoint = new ConnectionPoint_Impl(m_xInvocation, m_xOrigin, m_xEventAttacher, this); -// -// m_rConnectionPoint = pConnectionPoint; -// } -// } -// -// *ppCP = m_rConnectionPoint.get(); -// -// (*ppCP)->AddRef(); -// -// return ret; -//} - -/***************************************************************************** - - class implementation: ConnectionPoint_Impl - -*****************************************************************************/ - - -//ConnectionPoint_Impl::ConnectionPoint_Impl(const Reference<XInvocation>& xInv, -// const Reference<XInterface>& xOrigin, -// const Reference<XEventAttacher>& xEventAttacher, -// IConnectionPointContainer* pContainer) -// : m_xInvocation(xInv) -// , m_xOrigin(xOrigin) -// , m_xEventAttacher(xEventAttacher) -// , m_rContainer(pContainer) -// , m_nextCookie(1) -//{ -//} -// -//ConnectionPoint_Impl::~ConnectionPoint_Impl() -//{ -//} -// -//STDMETHODIMP ConnectionPoint_Impl::QueryInterface(REFIID riid, LPVOID FAR * ppv) -//{ -// if(IsEqualIID(riid, IID_IUnknown)) -// { -// AddRef(); -// *ppv = (IUnknown*) (IConnectionPoint*) this; -// return NOERROR; -// } -// else if (IsEqualIID(riid, IID_IConnectionPoint)) -// { -// AddRef(); -// *ppv = (IConnectionPoint*) this; -// return NOERROR; -// } -// -// *ppv = NULL; -// -// return ResultFromScode(E_NOINTERFACE); -//} -// -//STDMETHODIMP_(ULONG) ConnectionPoint_Impl::AddRef() -//{ -// return m_refCount.acquire(); -//} -// -//STDMETHODIMP_(ULONG) ConnectionPoint_Impl::Release() -//{ -// -// ULONG n = m_refCount.release(); -// -// if (n == 0) -// { -// delete this; -// } -// -// return n; -//} -// -//STDMETHODIMP ConnectionPoint_Impl::GetConnectionInterface( IID __RPC_FAR *piid) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// *piid = IID_IDispatch; -// -// return ret; -//} -// -//STDMETHODIMP ConnectionPoint_Impl::GetConnectionPointContainer(IConnectionPointContainer __RPC_FAR *__RPC_FAR *ppCPC) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// *ppCPC = m_rContainer.get(); -// -// (*ppCPC)->AddRef(); -// -// return ret; -//} -// -//void ConnectionPoint_Impl::registerListener() -//{ -// Reference<XIntrospectionAccess> xAccess = m_xInvocation->getIntrospection(); -// -// if (xAccess.is()) -// { -// Sequence< Type > listeners = xAccess->getSupportedListeners(); -// Reference<XAllListener> xListener = this; -// -// for (sal_uInt32 i = 0; i < listeners.getLength(); i++) -// { -// GenListenerData data; - - // data.listenerType = OUString::createFromAscii( - // listeners.getConstArray()[i].getTypeName()); -// data.listenerType = listeners.getConstArray()[i].getTypeName(); -// -// try -// { -// data.xGenListener = m_xEventAttacher->attachListener(m_xOrigin, -// xListener, -// data.helper, -// data.listenerType, -// data.addListenerParam); -// -// m_xGenListenerList.push_back(data); -// } -// catch(IllegalArgumentException e) -// {e; -// } -// catch(IntrospectionException e) -// {e; -// } -// catch(CannotCreateAdapterException e) -// {e; -// } -// catch(ServiceNotRegisteredException e) -// {e; -// } -// } -// } -//} -// -//void ConnectionPoint_Impl::unregisterListener() -//{ -// Reference<XIntrospectionAccess> xAccess = m_xInvocation->getIntrospection(); -// -// if (xAccess.is()) -// { -// GenListenerDataList::iterator iter = m_xGenListenerList.begin(); -// -// while (iter != m_xGenListenerList.end()) -// { -// try -// { -// m_xEventAttacher->removeListener(m_xOrigin, -// (*iter).listenerType, -// (*iter).addListenerParam, -// (*iter).xGenListener); -// } -// catch(IllegalArgumentException e) -// {e; -// } -// catch(IntrospectionException e) -// {e; -// } -// -// iter++; -// } -// } -// -// m_xGenListenerList = GenListenerDataList(); -//} -// -//STDMETHODIMP ConnectionPoint_Impl::Advise(IUnknown __RPC_FAR *pUnkSink, DWORD __RPC_FAR *pdwCookie) -//{ -// HRESULT ret = ResultFromScode(CONNECT_E_CANNOTCONNECT); -// -// OGuard guard(globalWrapperMutex); -// -// IDispatch* pDispatch = NULL; -// -// if (pUnkSink->QueryInterface(IID_IDispatch, (void**) &pDispatch) == NOERROR) -// { -// *pdwCookie = m_nextCookie++; -// -// if (m_connection.size() == 0) -// { -// registerListener(); -// } -// -// m_connection.insert(ConnectionMap::value_type(*pdwCookie, OleRef<IDispatch>(pDispatch))); -// -// pDispatch->Release(); -// -// ret = ResultFromScode(S_OK); -// } -// -// return ret; -//} -// -//STDMETHODIMP ConnectionPoint_Impl::Unadvise(DWORD dwCookie) -//{ -// HRESULT ret = ResultFromScode(CONNECT_E_NOCONNECTION); -// -// OGuard guard(globalWrapperMutex); -// -// ConnectionMap::iterator iter = m_connection.find(dwCookie); -// -// if (iter != m_connection.end()) -// { -// m_connection.erase(iter); -// ret = ResultFromScode(S_OK); -// } -// -// if (m_connection.size() == 0) -// { -// unregisterListener(); -// } -// -// return ret; -//} -// -//STDMETHODIMP ConnectionPoint_Impl::EnumConnections(IEnumConnections __RPC_FAR *__RPC_FAR *ppEnum) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// OGuard guard(globalWrapperMutex); -// -// CONNECTDATA* pConnection = NULL; -// UINT32 n = m_connection.size(); -// -// if (n > 0) -// { -// pConnection = new CONNECTDATA[n]; -// -// ConnectionMap::iterator iter = m_connection.begin(); -// UINT32 i = 0; -// -// while (iter != m_connection.end()) -// { -// (*iter).second->QueryInterface(IID_IUnknown, (void**)&(pConnection[i].pUnk)); -// pConnection[i].dwCookie = (*iter).first; -// -// i++; -// iter++; -// } -// -// *ppEnum = new EnumConnections_Impl(pConnection, n); -// -// for (i = 0; i < n; i++) -// { -// pConnection[i].pUnk->Release(); -// } -// -// delete[] pConnection; -// } -// else -// { -// *ppEnum = new EnumConnections_Impl(NULL, 0); -// } -// -// (*ppEnum)->AddRef(); -// -// return ret; -//} -// -// -// -// -//void SAL_CALL ConnectionPoint_Impl::disposing(const EventObject& Source) throw( RuntimeException) -//{ -//} -// -//void SAL_CALL ConnectionPoint_Impl::firing(const AllEventObject& Event) throw( RuntimeException) -//{ -// IEnumConnections* pEnum = NULL; -// -// EnumConnections(&pEnum); -// -// CONNECTDATA connection = {NULL, 0}; -// ULONG fetched = NULL; -// -// while (pEnum->Next(1, &connection, &fetched) == NOERROR) -// { -// IDispatch* pDispatch = NULL; -// -// if (connection.pUnk->QueryInterface(IID_IDispatch, (void**) &pDispatch) == NOERROR) -// { -// // getting dispid of event sink -// unsigned int flags = 0; -// HRESULT result; -// DISPID dispId; -// OLECHAR* oleNames[1]; -// -// oleNames[0] = (OLECHAR*)Event.MethodName.getStr(); -// -// result = pDispatch ->GetIDsOfNames(IID_NULL, -// oleNames, -// 1, -// LOCALE_SYSTEM_DEFAULT, -// &dispId); -// -// if (result == NOERROR) -// { -// DISPPARAMS dispparams; -// VARIANT varResult; -// EXCEPINFO excepinfo; -// unsigned int uArgErr; -// -// VariantInit(&varResult); -// -// // converting UNO parameters to OLE variants -// dispparams.rgdispidNamedArgs = NULL; -// dispparams.cArgs = Event.Arguments.getLength(); -// dispparams.cNamedArgs = 0; -// -// if (dispparams.cArgs == 0) -// { -// dispparams.rgvarg = NULL; -// } -// else -// { -// dispparams.rgvarg = (VARIANTARG*)malloc(sizeof(VARIANTARG) * dispparams.cArgs); -// -// for (UINT32 i = 0; i < dispparams.cArgs; i++) -// { -// o2u_anyToVariant(&(dispparams.rgvarg[i]), -// Event.Arguments.getConstArray()[dispparams.cArgs - (i + 1)]); -// } -// } -// -// // invoking OLE method -// result = pDispatch ->Invoke(dispId, -// IID_NULL, -// LOCALE_SYSTEM_DEFAULT, -// DISPATCH_METHOD, -// &dispparams, -// &varResult, -// &excepinfo, -// &uArgErr); -// -// -// // freeing allocated OLE parameters -// if (dispparams.cArgs > 0) -// { -// for (UINT32 i = 0; i < dispparams.cArgs; i++) -// { -// VariantClear(&(dispparams.rgvarg[i])); -// } -// free(dispparams.rgvarg); -// } -// -// VariantClear(&varResult); -// } -// -// // getting dispid of event sink -// oleNames[0] = L"EventRaised"; -// -// result = pDispatch ->GetIDsOfNames(IID_NULL, -// oleNames, -// 1, -// LOCALE_SYSTEM_DEFAULT, -// &dispId); -// -// if (result == NOERROR) -// { -// DISPPARAMS dispparams; -// VARIANT varResult; -// EXCEPINFO excepinfo; -// unsigned int uArgErr; -// -// VariantInit(&varResult); -// -// // converting UNO parameters to OLE variants -// dispparams.rgdispidNamedArgs = NULL; -// dispparams.cArgs = Event.Arguments.getLength() + 1; -// dispparams.cNamedArgs = 0; -// -// if (dispparams.cArgs == 0) -// { -// dispparams.rgvarg = NULL; -// } -// else -// { -// dispparams.rgvarg = (VARIANTARG*)malloc(sizeof(VARIANTARG) * dispparams.cArgs); -// -// for (UINT32 i = 0; i < (dispparams.cArgs - 1); i++) -// { -// o2u_anyToVariant(&(dispparams.rgvarg[i]), -// Event.Arguments.getConstArray()[dispparams.cArgs - (i + 2)]); -// } -// Any methodName( &Event.MethodName, getCppuType( &Event.MethodName)); -// -// o2u_anyToVariant(&(dispparams.rgvarg[i]), methodName); -// } -// -// // invoking OLE method -// result = pDispatch ->Invoke(dispId, -// IID_NULL, -// LOCALE_SYSTEM_DEFAULT, -// DISPATCH_METHOD, -// &dispparams, -// &varResult, -// &excepinfo, -// &uArgErr); -// -// -// // freeing allocated OLE parameters -// if (dispparams.cArgs > 0) -// { -// for (UINT32 i = 0; i < dispparams.cArgs; i++) -// { -// VariantClear(&(dispparams.rgvarg[i])); -// } -// free(dispparams.rgvarg); -// } -// -// VariantClear(&varResult); -// } -// -// pDispatch->Release(); -// } -// -// connection.pUnk->Release(); -// } -// -// pEnum->Release(); -//} - -//Any SAL_CALL ConnectionPoint_Impl::approveFiring(const AllEventObject& Event) throw( InvocationTargetException, RuntimeException) -//{ -// Any ret; -// -// return ret; -//} - -/***************************************************************************** - - class implementation: EnumConnections_Impl - -*****************************************************************************/ - - -//EnumConnections_Impl::EnumConnections_Impl(CONNECTDATA* pConnection, ULONG numOfConn) -//{ -// m_index = 0; -// m_numOfConn = numOfConn; -// -// if (m_numOfConn) -// { -// m_pConnection = new CONNECTDATA[m_numOfConn]; -// -// for (ULONG i = 0; i < m_numOfConn; i++) -// { -// m_pConnection[i] = pConnection[i]; -// m_pConnection[i].pUnk->AddRef(); -// } -// } -//} -// -//EnumConnections_Impl::~EnumConnections_Impl() -//{ -// for (ULONG i = 0; i < m_numOfConn; i++) -// { -// m_pConnection[i].pUnk->Release(); -// } -// -// if (m_numOfConn) -// { -// delete[] m_pConnection; -// } -//} -// -//STDMETHODIMP EnumConnections_Impl::QueryInterface(REFIID riid, LPVOID FAR * ppv) -//{ -// if(IsEqualIID(riid, IID_IUnknown)) -// { -// AddRef(); -// *ppv = (IUnknown*) (IEnumConnections *) this; -// return NOERROR; -// } -// else if (IsEqualIID(riid, IID_IEnumConnections )) -// { -// AddRef(); -// *ppv = (IEnumConnections *) this; -// return NOERROR; -// } -// -// *ppv = NULL; -// -// return ResultFromScode(E_NOINTERFACE); -//} -// -//STDMETHODIMP_(ULONG) EnumConnections_Impl::AddRef() -//{ -// return m_refCount.acquire(); -//} -// -//STDMETHODIMP_(ULONG) EnumConnections_Impl::Release() -//{ -// -// ULONG n = m_refCount.release(); -// -// if (n == 0) -// { -// delete this; -// } -// -// return n; -//} -// -//STDMETHODIMP EnumConnections_Impl::Next( -// /* [in] */ ULONG cConnections, -// /* [out] */ CONNECTDATA __RPC_FAR *rgcd, -// /* [out] */ ULONG __RPC_FAR *lpcFetched) -//{ -// HRESULT ret = ResultFromScode(S_FALSE); -// -// *lpcFetched = VOS_MIN(cConnections, m_numOfConn - m_index); -// -// for (ULONG i = 0; i < (*lpcFetched); i++) -// { -// rgcd[i] = m_pConnection[m_index + i]; -// rgcd[i].pUnk->AddRef(); -// } -// -// m_index += (*lpcFetched); -// -// if ((*lpcFetched) == cConnections) -// ret = ResultFromScode(S_OK); -// -// return ret; -//} -// -// -//STDMETHODIMP EnumConnections_Impl::Skip( -// /* [in] */ ULONG cConnections) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// m_index = VOS_MIN(m_index + cConnections, m_numOfConn); -// -// return ret; -//} -// -//STDMETHODIMP EnumConnections_Impl::Reset( void) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// m_index = 0; -// -// return ret; -//} -// -//STDMETHODIMP EnumConnections_Impl::Clone( -// /* [out] */ IEnumConnections __RPC_FAR *__RPC_FAR *ppEnum) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// *ppEnum = new EnumConnections_Impl(m_pConnection, m_numOfConn); -// -// return ret; -//} - -/***************************************************************************** - - class implementation: EnumConnectionPoints_Impl - -*****************************************************************************/ - -//EnumConnectionPoints_Impl::EnumConnectionPoints_Impl(OleRef<IConnectionPoint>* pPoints, -// ULONG numOfPoints) -//{ -// m_index = 0; -// m_numOfPoints = numOfPoints; -// -// if (m_numOfPoints) -// { -// m_pPoints = new OleRef<IConnectionPoint>[m_numOfPoints]; -// -// for (ULONG i = 0; i < m_numOfPoints; i++) -// { -// m_pPoints[i] = pPoints[i]; -// } -// } -//} -// -//EnumConnectionPoints_Impl::~EnumConnectionPoints_Impl() -//{ -// if (m_numOfPoints) -// { -// delete[] m_pPoints; -// } -//} -// -//STDMETHODIMP EnumConnectionPoints_Impl::QueryInterface(REFIID riid, LPVOID FAR * ppv) -//{ -// if(IsEqualIID(riid, IID_IUnknown)) -// { -// AddRef(); -// *ppv = (IUnknown*) (IEnumConnectionPoints*) this; -// return NOERROR; -// } -// else if (IsEqualIID(riid, IID_IEnumConnectionPoints)) -// { -// AddRef(); -// *ppv = (IEnumConnectionPoints*) this; -// return NOERROR; -// } -// -// *ppv = NULL; -// -// return ResultFromScode(E_NOINTERFACE); -//} -// -//STDMETHODIMP_(ULONG) EnumConnectionPoints_Impl::AddRef() -//{ -// return m_refCount.acquire(); -//} -// -//STDMETHODIMP_(ULONG) EnumConnectionPoints_Impl::Release() -//{ -// -// ULONG n = m_refCount.release(); -// -// if (n == 0) -// { -// delete this; -// } -// -// return n; -//} -// -//STDMETHODIMP EnumConnectionPoints_Impl::Next( -// /* [in] */ ULONG cPoints, -// /* [out] */ IConnectionPoint __RPC_FAR *__RPC_FAR *rgpcn, -// /* [out] */ ULONG __RPC_FAR *lpcFetched) -//{ -// HRESULT ret = ResultFromScode(S_FALSE); -// -// *lpcFetched = VOS_MIN(cPoints, m_numOfPoints - m_index); -// -// for (ULONG i = 0; i < (*lpcFetched); i++) -// { -// rgpcn[i] = m_pPoints[m_index + i].get(); -// rgpcn[i]->AddRef(); -// } -// -// m_index += (*lpcFetched); -// -// if ((*lpcFetched) == cPoints) -// ret = ResultFromScode(S_OK); -// -// return ret; -//} -// -//STDMETHODIMP EnumConnectionPoints_Impl::Skip( -// /* [in] */ ULONG cPoints) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// m_index = VOS_MIN(m_index + cPoints, m_numOfPoints); -// -// return ret; -//} -// -//STDMETHODIMP EnumConnectionPoints_Impl::Reset( void) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// m_index = 0; -// -// return ret; -//} -// -//STDMETHODIMP EnumConnectionPoints_Impl::Clone( -// /* [out] */ IEnumConnectionPoints __RPC_FAR *__RPC_FAR *ppEnum) -//{ -// HRESULT ret = ResultFromScode(S_OK); -// -// *ppEnum = new EnumConnectionPoints_Impl(m_pPoints, m_numOfPoints); -// -// return ret; -//} /************************************************************************* diff --git a/extensions/source/ole/unoobjw.hxx b/extensions/source/ole/unoobjw.hxx index cd8d6ee929b9..97ada6990817 100644 --- a/extensions/source/ole/unoobjw.hxx +++ b/extensions/source/ole/unoobjw.hxx @@ -2,9 +2,9 @@ * * $RCSfile: unoobjw.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:16:41 $ + * last change: $Author: jl $ $Date: 2000-10-12 13:07:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,12 +62,11 @@ #ifndef _UNOOBJW_HXX #define _UNOOBJW_HXX -#include <com/sun/star/script/XAllListener.hpp> -#include <com/sun/star/script/XEventAttacher.hpp> #include <com/sun/star/bridge/XBridgeSupplier2.hpp> #include <com/sun/star/beans/XExactName.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <vos/refernce.hxx> + #include <tools/presys.h> #include "stdafx.h" #include "comifaces.hxx" @@ -101,31 +100,7 @@ struct equal_to_IUnknown_Impl } }; -typedef hash_map -< - IUnknown*, - Reference<XInterface>, - hash_IUnknown_Impl, - equal_to_IUnknown_Impl -> WrapperMap; - -typedef hash_map -< - DWORD, - OleRef<IDispatch>, - hash<DWORD>, - equal_to<DWORD> -> ConnectionMap; -struct GenListenerData -{ - Any helper; - OUString listenerType; - OUString addListenerParam; - Reference<XEventListener> xGenListener; -}; - -typedef vector<GenListenerData> GenListenerDataList; struct MemberInfo { @@ -157,152 +132,6 @@ typedef hash_map DISPID, MemberInfo > IdToMemberInfoMap; -/***************************************************************************** - - class declaration: EnumConnections_Impl - -*****************************************************************************/ - -//class EnumConnections_Impl : public IEnumConnections -//{ -//public: -// -// EnumConnections_Impl(CONNECTDATA* pConnection, ULONG numOfConn); -// ~EnumConnections_Impl(); -// -// /* IUnknown methods */ -// STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj); -// STDMETHOD_(ULONG, AddRef)(); -// STDMETHOD_(ULONG, Release)(); -// -// /* IEnumConnections */ -// virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next( -// /* [in] */ ULONG cConnections, -// /* [out] */ CONNECTDATA __RPC_FAR *rgcd, -// /* [out] */ ULONG __RPC_FAR *lpcFetched); -// -// virtual HRESULT STDMETHODCALLTYPE Skip( -// /* [in] */ ULONG cConnections); -// -// virtual HRESULT STDMETHODCALLTYPE Reset(void); -// -// virtual HRESULT STDMETHODCALLTYPE Clone( -// /* [out] */ IEnumConnections __RPC_FAR *__RPC_FAR *ppEnum); -// -//protected: -// -// vos::ORefCount m_refCount; -// CONNECTDATA* m_pConnection; -// ULONG m_numOfConn; -// ULONG m_index; -//}; - - -/***************************************************************************** - - class declaration: ConnectionPoint_Impl - -*****************************************************************************/ - - -//class ConnectionPoint_Impl : public IConnectionPoint -// , public WeakImplHelper1<XAllListener> -//{ -//public: -// -// ConnectionPoint_Impl(const Reference<XInvocation>& xInv, -// const Reference<XInterface>& xOrigin, -// const Reference<XEventAttacher>& xEventAttacher, -// IConnectionPointContainer* pContainer); -// -// ~ConnectionPoint_Impl(); -// -// /* IUnknown methods */ -// STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj); -// STDMETHOD_(ULONG, AddRef)(); -// STDMETHOD_(ULONG, Release)(); -// -// /* IConnectionPoint */ -// virtual HRESULT STDMETHODCALLTYPE GetConnectionInterface( -// /* [out] */ IID __RPC_FAR *piid); -// -// virtual HRESULT STDMETHODCALLTYPE GetConnectionPointContainer( -// /* [out] */ IConnectionPointContainer __RPC_FAR *__RPC_FAR *ppCPC); -// -// virtual HRESULT STDMETHODCALLTYPE Advise( -// /* [in] */ IUnknown __RPC_FAR *pUnkSink, -// /* [out] */ DWORD __RPC_FAR *pdwCookie); -// -// virtual HRESULT STDMETHODCALLTYPE Unadvise( -// /* [in] */ DWORD dwCookie); -// -// virtual HRESULT STDMETHODCALLTYPE EnumConnections( -// /* [out] */ IEnumConnections __RPC_FAR *__RPC_FAR *ppEnum); -// -// -// -// /* XEventListener */ -// virtual void SAL_CALL disposing( const EventObject& Source ) throw(RuntimeException); -// -// /* XAllListener */ -// virtual void SAL_CALL firing( const AllEventObject& iaEvent ) throw(RuntimeException); -// virtual Any SAL_CALL approveFiring( const AllEventObject& aEvent ) throw(InvocationTargetException, RuntimeException); -// -// -//protected: -// -// void registerListener(); -// void unregisterListener(); -// -// vos::ORefCount m_refCount; -// Reference<XInvocation> m_xInvocation; -// Reference<XInterface> m_xOrigin; -// OleRef<IConnectionPointContainer> m_rContainer; -// ConnectionMap m_connection; -// DWORD m_nextCookie; -// Reference<XEventAttacher> m_xEventAttacher; -// GenListenerDataList m_xGenListenerList; -//}; - -/***************************************************************************** - - class declaration: EnumConnectionPoints_Impl - -*****************************************************************************/ - -//class EnumConnectionPoints_Impl : public IEnumConnectionPoints -//{ -//public: -// -// EnumConnectionPoints_Impl(OleRef<IConnectionPoint>* pPoints, ULONG numOfPoints); -// ~EnumConnectionPoints_Impl(); -// -// /* IUnknown methods */ -// STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj); -// STDMETHOD_(ULONG, AddRef)(); -// STDMETHOD_(ULONG, Release)(); -// -// /* IEnumConnectionPoints */ -// virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next( -// /* [in] */ ULONG cConnections, -// /* [out] */ IConnectionPoint __RPC_FAR *__RPC_FAR *rgpcn, -// /* [out] */ ULONG __RPC_FAR *lpcFetched); -// -// virtual HRESULT STDMETHODCALLTYPE Skip( -// /* [in] */ ULONG cConnections); -// -// virtual HRESULT STDMETHODCALLTYPE Reset(void); -// -// virtual HRESULT STDMETHODCALLTYPE Clone( -// /* [out] */ IEnumConnectionPoints __RPC_FAR *__RPC_FAR *ppEnum); -// -//protected: -// -// vos::ORefCount m_refCount; -// OleRef<IConnectionPoint>* m_pPoints; -// ULONG m_numOfPoints; -// ULONG m_index; -//}; /***************************************************************************** @@ -312,7 +141,6 @@ typedef hash_map class InterfaceOleWrapper_Impl : public WeakImplHelper2<XBridgeSupplier2, XInitialization>, public IDispatchEx, -// public IConnectionPointContainer, public UnoConversionUtilities<InterfaceOleWrapper_Impl>, public IUnoObjectWrapper { @@ -376,14 +204,6 @@ public: virtual HRESULT STDMETHODCALLTYPE GetNameSpaceParent( /* [out] */ IUnknown __RPC_FAR *__RPC_FAR *ppunk); - /* IConnectionPointContainer */ -// virtual HRESULT STDMETHODCALLTYPE EnumConnectionPoints( -// /* [out] */ IEnumConnectionPoints __RPC_FAR *__RPC_FAR *ppEnum); -// -// virtual HRESULT STDMETHODCALLTYPE FindConnectionPoint( -// /* [in] */ REFIID riid, -// /* [out] */ IConnectionPoint __RPC_FAR *__RPC_FAR *ppCP); - //XInterface ---------------------------------------------------------- void SAL_CALL InterfaceOleWrapper_Impl::acquire( ) throw(); void SAL_CALL InterfaceOleWrapper_Impl::release( ) throw(); @@ -404,7 +224,6 @@ public: STDMETHOD( getOriginalUnoStruct)( Any * pStruct); // UnoConversionUtility -// virtual Reference< XSingleServiceFactory > getInvocationFactory(); virtual Reference< XInterface > createUnoWrapperInstance(); virtual Reference< XInterface > createComWrapperInstance(); @@ -430,10 +249,8 @@ protected: Reference<XInvocation> m_xInvocation; Reference<XExactName> m_xExactName; Reference<XInterface> m_xOrigin; - Reference<XEventAttacher> m_xEventAttacher; NameToIdMap m_nameToDispIdMap; vector<MemberInfo> m_MemberInfos; - OleRef<IConnectionPoint> m_rConnectionPoint; // This member is used to determine the default value // denoted by DISPID_VALUE (0). For proper results in JavaScript // we have to return the default value when we write an object |