summaryrefslogtreecommitdiff
path: root/cppu/source/typelib
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 11:16:57 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 11:16:57 +0000
commit3795f22b252e416e661aa36c600484e2ed6781c4 (patch)
tree307bb396a7b6891c1e19b3e08e2b8f3c4682fd41 /cppu/source/typelib
parent39f79b1aafe284e7a076c4d7aec3720b8aeb4e9a (diff)
INTEGRATION: CWS sb10 (1.9.72); FILE MERGED
2003/12/10 08:52:18 sb 1.9.72.1: #114000# Adapted to multiple-inheritance interface types.
Diffstat (limited to 'cppu/source/typelib')
-rw-r--r--cppu/source/typelib/static_types.cxx39
1 files changed, 32 insertions, 7 deletions
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index f212165eaf73..e1505890390c 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: static_types.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: dbo $ $Date: 2002-08-21 09:19:20 $
+ * last change: $Author: hr $ $Date: 2004-02-03 12:16:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,6 +64,8 @@
#include <stdarg.h>
#endif
+#include <algorithm>
+
#include <osl/mutex.hxx>
#include <osl/interlck.h>
#include <rtl/ustring.hxx>
@@ -491,6 +493,18 @@ void SAL_CALL typelib_static_interface_type_init(
typelib_TypeDescriptionReference * pBaseType )
SAL_THROW_EXTERN_C()
{
+ typelib_static_mi_interface_type_init(
+ ppRef, pTypeName, pBaseType == 0 ? 0 : 1, &pBaseType);
+}
+
+//##################################################################################################
+void SAL_CALL typelib_static_mi_interface_type_init(
+ typelib_TypeDescriptionReference ** ppRef,
+ const sal_Char * pTypeName,
+ sal_Int32 nBaseTypes,
+ typelib_TypeDescriptionReference ** ppBaseTypes )
+ SAL_THROW_EXTERN_C()
+{
if (! *ppRef)
{
MutexGuard aGuard( typelib_getStaticInitMutex() );
@@ -504,18 +518,29 @@ void SAL_CALL typelib_static_interface_type_init(
::typelib_typedescription_newEmpty(
(typelib_TypeDescription **)&pIface, typelib_TypeClass_INTERFACE, aTypeName.pData );
- if (pBaseType)
+ pIface->nBaseTypes = std::max< sal_Int32 >(nBaseTypes, 1);
+ pIface->ppBaseTypes = new typelib_InterfaceTypeDescription *[
+ pIface->nBaseTypes];
+ if (nBaseTypes > 0)
{
- ::typelib_typedescriptionreference_getDescription(
- (typelib_TypeDescription **)&pIface->pBaseTypeDescription, pBaseType );
+ for (sal_Int32 i = 0; i < nBaseTypes; ++i) {
+ pIface->ppBaseTypes[i] = 0;
+ ::typelib_typedescriptionreference_getDescription(
+ (typelib_TypeDescription **)&pIface->ppBaseTypes[i], ppBaseTypes[i] );
+ OSL_ASSERT( pIface->ppBaseTypes[i] );
+ }
}
else
{
+ pIface->ppBaseTypes[0] = 0;
::typelib_typedescriptionreference_getDescription(
- (typelib_TypeDescription **)&pIface->pBaseTypeDescription,
+ (typelib_TypeDescription **)&pIface->ppBaseTypes[0],
* ::typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE ) );
+ OSL_ASSERT( pIface->ppBaseTypes[0] );
}
- OSL_ASSERT( pIface->pBaseTypeDescription );
+ pIface->pBaseTypeDescription = pIface->ppBaseTypes[0];
+ typelib_typedescription_acquire(
+ &pIface->pBaseTypeDescription->aBase);
typelib_TypeDescription * pReg = (typelib_TypeDescription *)pIface;
pReg->pWeakRef = (typelib_TypeDescriptionReference *)pReg;