1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_EXTENSIONS_SOURCE_OLE_WINDATA_HXX
20 #define INCLUDED_EXTENSIONS_SOURCE_OLE_WINDATA_HXX
22 #pragma warning (push,1)
23 #pragma warning (disable:4668)
24 #pragma warning (disable:4548)
29 #include "osl/diagnose.h"
36 VARDESC
* operator = (const VarDesc
*);
37 VarDesc(const VarDesc
&);
40 CComPtr
< ITypeInfo
> m_pTypeInfo
;
43 VarDesc(ITypeInfo
* pTypeInfo
) :
45 m_pTypeInfo(pTypeInfo
)
47 OSL_ASSERT(pTypeInfo
);
51 if (m_pVarDesc
!= NULL
)
53 m_pTypeInfo
->ReleaseVarDesc(m_pVarDesc
);
73 //Wrapper for FUNCDESC structure
76 FUNCDESC
* operator = (const FuncDesc
&);
77 FuncDesc(const FuncDesc
&);
78 CComPtr
<ITypeInfo
> m_pTypeInfo
;
79 FUNCDESC
* m_pFuncDesc
;
83 FuncDesc(ITypeInfo
* pTypeInfo
) :
85 m_pTypeInfo(pTypeInfo
)
87 OSL_ASSERT(pTypeInfo
);
94 FUNCDESC
* operator -> ()
99 FUNCDESC
** operator & ()
101 return & m_pFuncDesc
;
104 operator FUNCDESC
* ()
109 FUNCDESC
* operator = (FUNCDESC
* pDesc
)
117 FUNCDESC
* pDesc
= m_pFuncDesc
;
122 void ReleaseFUNCDESC()
124 if (m_pFuncDesc
!= NULL
)
126 m_pTypeInfo
->ReleaseFuncDesc(m_pFuncDesc
);
131 //Wrapper for EXCEPINFO structure
132 class ExcepInfo
: public EXCEPINFO
134 EXCEPINFO
* operator = (const ExcepInfo
& );
135 ExcepInfo(const ExcepInfo
&);
139 memset(this, 0, sizeof(ExcepInfo
));
143 if (bstrSource
!= NULL
)
144 ::SysFreeString(bstrSource
);
145 if (bstrDescription
!= NULL
)
146 ::SysFreeString(bstrDescription
);
147 if (bstrHelpFile
!= NULL
)
148 ::SysFreeString(bstrHelpFile
);
152 //Wrapper for TYPEATTR
155 TYPEATTR
* operator = (const TypeAttr
&);
156 TypeAttr(const TypeAttr
&);
158 CComPtr
< ITypeInfo
> m_pTypeInfo
;
159 TYPEATTR
* m_pTypeAttr
;
161 TypeAttr(ITypeInfo
* pTypeInfo
) :
163 m_pTypeInfo( pTypeInfo
)
165 OSL_ASSERT(pTypeInfo
);
169 if (m_pTypeAttr
!= NULL
)
171 m_pTypeInfo
->ReleaseTypeAttr(m_pTypeAttr
);
175 TYPEATTR
** operator&() throw()
180 TYPEATTR
* operator->() throw()
192 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */