1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unotypewrapper.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef UNO_TYPE_WRAPPER_HXX
31 #define UNO_TYPE_WRAPPER_HXX
33 #pragma warning (push,1)
34 #pragma warning (disable:4548)
36 #include <tools/presys.h>
39 #define _WIN32_WINNT 0x0400
41 #if OSL_DEBUG_LEVEL > 0
42 //#define _ATL_DEBUG_INTERFACES
45 extern CComModule _Module
;
47 #include <tools/postsys.h>
50 #pragma warning (disable:4505)
51 // disable "unreferenced local function has been removed" globally
53 #include "comifaces.hxx"
55 /* creates an UnoTypWrapper and sets the Name property to the value
56 specified by sTypeName.
57 Returns true if the object could be created and initialized.
59 bool createUnoTypeWrapper(BSTR sTypeName
, VARIANT
* pVariant
);
60 bool createUnoTypeWrapper(const rtl::OUString
& sTypeName
, VARIANT
* pVar
);
63 public CComObjectRootEx
<CComMultiThreadModel
>,
64 public IUnoTypeWrapper
,
69 virtual ~UnoTypeWrapper();
71 BEGIN_COM_MAP(UnoTypeWrapper
)
72 COM_INTERFACE_ENTRY(IDispatch
)
73 COM_INTERFACE_ENTRY(IUnoTypeWrapper
)
76 // IDispatch -------------------------------------------
77 STDMETHOD( GetTypeInfoCount
)(UINT
*pctinfo
);
79 STDMETHOD( GetTypeInfo
)( UINT iTInfo
,
83 STDMETHOD( GetIDsOfNames
)( REFIID riid
,
89 STDMETHOD( Invoke
)( DISPID dispIdMember
,
93 DISPPARAMS
*pDispParams
,
95 EXCEPINFO
*pExcepInfo
,
97 // IUnoTypeWrapper --------------------------------------
98 STDMETHOD(put_Name
)(BSTR val
);
99 STDMETHOD(get_Name
)(BSTR
* pVal
);