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 ************************************************************************/
27 #ifndef UNO_TYPE_WRAPPER_HXX
28 #define UNO_TYPE_WRAPPER_HXX
30 #pragma warning (push,1)
31 #pragma warning (disable:4548)
33 #include <tools/presys.h>
36 #define _WIN32_WINNT 0x0400
38 #if OSL_DEBUG_LEVEL > 0
39 //#define _ATL_DEBUG_INTERFACES
42 extern CComModule _Module
;
44 #include <tools/postsys.h>
47 #pragma warning (disable:4505)
48 // disable "unreferenced local function has been removed" globally
50 #include "comifaces.hxx"
52 /* creates an UnoTypWrapper and sets the Name property to the value
53 specified by sTypeName.
54 Returns true if the object could be created and initialized.
56 bool createUnoTypeWrapper(BSTR sTypeName
, VARIANT
* pVariant
);
57 bool createUnoTypeWrapper(const rtl::OUString
& sTypeName
, VARIANT
* pVar
);
60 public CComObjectRootEx
<CComMultiThreadModel
>,
61 public IUnoTypeWrapper
,
66 virtual ~UnoTypeWrapper();
68 BEGIN_COM_MAP(UnoTypeWrapper
)
69 COM_INTERFACE_ENTRY(IDispatch
)
70 COM_INTERFACE_ENTRY(IUnoTypeWrapper
)
73 // IDispatch -------------------------------------------
74 STDMETHOD( GetTypeInfoCount
)(UINT
*pctinfo
);
76 STDMETHOD( GetTypeInfo
)( UINT iTInfo
,
80 STDMETHOD( GetIDsOfNames
)( REFIID riid
,
86 STDMETHOD( Invoke
)( DISPID dispIdMember
,
90 DISPPARAMS
*pDispParams
,
92 EXCEPINFO
*pExcepInfo
,
94 // IUnoTypeWrapper --------------------------------------
95 STDMETHOD(put_Name
)(BSTR val
);
96 STDMETHOD(get_Name
)(BSTR
* pVal
);