1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
34 #endif // _MSC_VER > 1000
38 #define _WIN32_WINNT 0x0400
42 #if OSL_DEBUG_LEVEL > 0
43 //#define _ATL_DEBUG_INTERFACES
46 #pragma warning (push,1)
47 #pragma warning (disable:4917)
48 #pragma warning (disable:4005)
49 #pragma warning (disable:4548)
51 #include <tools/prewin.h>
53 #if (_MSC_VER >= 1200) || defined(__MINGW32__)
56 #include <tools/postwin.h>
58 #include <tools/presys.h>
60 #include <tools/postsys.h>
63 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
64 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
65 #include <com/sun/star/script/XInvocation.hpp>
66 #include <com/sun/star/registry/XRegistryKey.hpp>
67 #include <com/sun/star/bridge/XBridgeSupplier2.hpp>
68 #include <com/sun/star/bridge/ModelDependent.hpp>
69 #include <com/sun/star/reflection/InvocationTargetException.hpp>
70 #include <com/sun/star/uno/Exception.hpp>
71 #include <com/sun/star/beans/UnknownPropertyException.hpp>
72 #include <cppuhelper/implbase2.hxx>
73 #include <cppuhelper/implbase1.hxx>
74 #include <cppuhelper/typeprovider.hxx>
75 #include <cppuhelper/factory.hxx>
76 #include <sal/types.h>
77 #include <typelib/typeclass.h>
78 #include <osl/diagnose.h>
79 #include <osl/mutex.hxx>
80 #include <com/sun/star/uno/Reference.h>
81 #include <rtl/process.h>
84 #define UNO_2_OLE_EXCEPTIONCODE 1001
85 #define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
86 using namespace com::sun::star::uno
;
87 using namespace com::sun::star::lang
;
88 using namespace com::sun::star::script
;
89 using namespace com::sun::star::registry
;
90 using namespace com::sun::star::reflection
;
91 using namespace com::sun::star::beans
;
101 const VARTYPE
getVarType( const Any
& val
);
102 /* creates a Type object for a given type name.
104 The function returns false if the name does not represent
107 bool getType( BSTR name
, Type
& type
);
108 void o2u_attachCurrentThread();
110 struct equalOUString_Impl
112 bool operator()(const OUString
& s1
, const OUString
& s2
) const
118 struct hashOUString_Impl
120 size_t operator()(const OUString
& rName
) const
122 return rName
.hashCode();
127 class BridgeRuntimeError
130 BridgeRuntimeError(const OUString
& sMessage
)
138 Mutex
* getBridgeMutex();
144 #endif // _OLE2UNO_HXX