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: windata.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 AUTOMATION_BRIDGE_WINDATA_HXX
31 #define AUTOMATION_BRIDGE_WINDATA_HXX
33 #pragma warning (push,1)
34 #pragma warning (disable:4668)
35 #pragma warning (disable:4548)
40 #include "osl/diagnose.h"
47 VARDESC
* operator = (const VarDesc
*);
48 VarDesc(const VarDesc
&);
51 CComPtr
< ITypeInfo
> m_pTypeInfo
;
54 VarDesc(ITypeInfo
* pTypeInfo
) :
56 m_pTypeInfo(pTypeInfo
)
58 OSL_ASSERT(pTypeInfo
);
62 if (m_pVarDesc
!= NULL
)
64 m_pTypeInfo
->ReleaseVarDesc(m_pVarDesc
);
84 //Wrapper for FUNCDESC structure
87 FUNCDESC
* operator = (const FuncDesc
&);
88 FuncDesc(const FuncDesc
&);
89 CComPtr
<ITypeInfo
> m_pTypeInfo
;
90 FUNCDESC
* m_pFuncDesc
;
94 FuncDesc(ITypeInfo
* pTypeInfo
) :
96 m_pTypeInfo(pTypeInfo
)
98 OSL_ASSERT(pTypeInfo
);
105 FUNCDESC
* operator -> ()
110 FUNCDESC
** operator & ()
112 return & m_pFuncDesc
;
115 operator FUNCDESC
* ()
120 FUNCDESC
* operator = (FUNCDESC
* pDesc
)
128 FUNCDESC
* pDesc
= m_pFuncDesc
;
133 void ReleaseFUNCDESC()
135 if (m_pFuncDesc
!= NULL
)
137 m_pTypeInfo
->ReleaseFuncDesc(m_pFuncDesc
);
142 //Wrapper for EXCEPINFO structure
143 class ExcepInfo
: public EXCEPINFO
145 EXCEPINFO
* operator = (const ExcepInfo
& );
146 ExcepInfo(const ExcepInfo
&);
150 memset(this, 0, sizeof(ExcepInfo
));
154 if (bstrSource
!= NULL
)
155 ::SysFreeString(bstrSource
);
156 if (bstrDescription
!= NULL
)
157 ::SysFreeString(bstrDescription
);
158 if (bstrHelpFile
!= NULL
)
159 ::SysFreeString(bstrHelpFile
);
163 //Wrapper for TYPEATTR
166 TYPEATTR
* operator = (const TypeAttr
&);
167 TypeAttr(const TypeAttr
&);
169 CComPtr
< ITypeInfo
> m_pTypeInfo
;
170 TYPEATTR
* m_pTypeAttr
;
172 TypeAttr(ITypeInfo
* pTypeInfo
) :
174 m_pTypeInfo( pTypeInfo
)
176 OSL_ASSERT(pTypeInfo
);
180 if (m_pTypeAttr
!= NULL
)
182 m_pTypeInfo
->ReleaseTypeAttr(m_pTypeAttr
);
186 TYPEATTR
** operator&() throw()
191 TYPEATTR
* operator->() throw()