diff --git a/extensions/source/ole/ole2uno.hxx b/extensions/source/ole/ole2uno.hxx index 5eeb8ea29d68..a625f7b41dfd 100644 --- a/extensions/source/ole/ole2uno.hxx +++ b/extensions/source/ole/ole2uno.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ole2uno.hxx,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 12:50:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,25 +77,10 @@ //#define _ATL_DEBUG_INTERFACES #endif -//#include -//You may derive a class from CComModule and use it if you want to override -//something, but do not change the name of _Module - #include -//#include -//#include -//#include -//#include -//#include -//#include #include -//#include -//#include -//extern CComModule _Module; -//#include #if _MSC_VER >= 1200 #include -//#include #endif #include @@ -110,63 +95,12 @@ #ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_ #include #endif -#ifndef _COM_SUN_STAR_SCRIPT_XTYPECONVERTER_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_FINISHENGINEEVENT_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTREASON_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XENGINELISTENER_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XDEBUGGING_HPP__ -#include -#endif #ifndef _COM_SUN_STAR_SCRIPT_XINVOCATION_HPP_ #include #endif -#ifndef _COM_SUN_STAR_SCRIPT_CONTEXTINFORMATION_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_FINISHREASON_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XENGINE_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTENGINEEVENT_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XLIBRARYACCESS_HXX_ -#include -#endif -#ifndef _COM_SUN_STAR_REGISTRY_INVALIDVALUEEXCEPTION_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_REGISTRY_REGISTRYKEYTYPE_HPP_ -#include -#endif #ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP_ #include #endif -#ifndef _COM_SUN_STAR_REGISTRY_REGISTRYVALUETYPE_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_REGISTRY_INVALIDREGISTRYEXCEPTION_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_LOADER_XIMPLEMENTATIONLOADER_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_LOADER_CANNOTACTIVATEFACTORYEXCEPTION_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_BRIDGE_XBRIDGESUPPLIER_HPP_ -#include -#endif #ifndef _COM_SUN_STAR_BRIDGE_XBRIDGESUPPLIER2_HPP_ #include #endif @@ -182,9 +116,6 @@ #ifndef _COM_SUN_STAR_BEANS_UNKNOWNPROPERTYEXCEPTION_HPP_ #include #endif -#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ -#include -#endif #ifndef _CPPUHELPER_IMPLBASE2_HXX_ #include #endif @@ -206,14 +137,6 @@ #include #endif -#ifndef _UNO_DISPATCHER_H_ -#include -#endif - -#ifndef _UNO_MAPPING_H_ -#include -#endif - #ifndef _OSL_DIAGNOSE_H_ #include #endif @@ -319,78 +242,9 @@ sal_Bool convertSelfToIDispatch( T& unoInterface, IDispatch** ppDisp) } return *ppDisp ? sal_True : sal_False; } -// ---------------------------------------------------------------------- -// see the overloaded getCppuType function in this file -//class IUnknownWrapper: public XInterface -//{ -//public: -// -// virtual Any invokeWithDispId(DISPID dispID, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam) throw ( IllegalArgumentException, CannotConvertException, InvocationTargetException, Exception ) = 0; -// virtual void setValueWithDispId(DISPID dispID, const Any& Value) throw( UnknownPropertyException, CannotConvertException, InvocationTargetException, Exception) = 0; -// virtual Any getValueWithDispId(DISPID dispID) throw( UnknownPropertyException, Exception) = 0; -//}; -//----------------------------------------------------------------------- -/* ref class to hold IUnknown pointer -*/ -template class OleRef -{ -public: - - typedef OleRef self; - - OleRef() - : m_pUnknown(NULL) - {} - - OleRef(const self& copy) - : m_pUnknown(copy.m_pUnknown) - { - if (m_pUnknown) m_pUnknown->AddRef(); - } - - OleRef(UnknownClass* pUnknown) - : m_pUnknown(pUnknown) - { - if (m_pUnknown) m_pUnknown->AddRef(); - } - - ~OleRef() - { - if (m_pUnknown) m_pUnknown->Release(); - } - - self& operator = (const self& copy) - { - if (m_pUnknown) m_pUnknown->Release(); - m_pUnknown = copy.m_pUnknown; - if (m_pUnknown) m_pUnknown->AddRef(); - - return *this; - } - - self& operator = (UnknownClass* pUnknown) - { - if (m_pUnknown) m_pUnknown->Release(); - m_pUnknown = pUnknown; - if (m_pUnknown) m_pUnknown->AddRef(); - return *this; - } - - UnknownClass* get() { return m_pUnknown; } - - UnknownClass* operator->() { return m_pUnknown; } - - const UnknownClass* operator->() const { return m_pUnknown; } - - Boolean is() { return (m_pUnknown != NULL); } - -protected: - - UnknownClass* m_pUnknown; -}; inline sal_Bool operator == (const Uik & uik1, const Uik & uik2) {