#94607# insert modfications to generate module information

This commit is contained in:
Juergen Schmidt
2001-11-26 11:20:59 +00:00
parent 85415031ef
commit 64535a5e74
3 changed files with 35 additions and 12 deletions

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: dependency.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 15:29:08 $
* last change: $Author: jsc $ $Date: 2001-11-26 12:19:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -306,7 +306,7 @@ static sal_Bool checkReferenceDependencies(TypeManager& typeMgr, TypeDependency&
return sal_True;
}
sal_Bool checkTypeDependencies(TypeManager& typeMgr, TypeDependency& dependencies, const OString& type)
sal_Bool checkTypeDependencies(TypeManager& typeMgr, TypeDependency& dependencies, const OString& type, sal_Bool bDepend)
{
if (!typeMgr.isValidType(type))
return sal_False;
@@ -324,6 +324,12 @@ sal_Bool checkTypeDependencies(TypeManager& typeMgr, TypeDependency& dependencie
return sal_False;
}
if ( bDepend && reader.getTypeClass() == RT_TYPE_MODULE)
{
checkFieldDependencies(typeMgr, dependencies, reader, type);
return sal_True;
}
OString superType(reader.getSuperTypeName());
if (superType.getLength() > 0)
{
@@ -335,13 +341,27 @@ sal_Bool checkTypeDependencies(TypeManager& typeMgr, TypeDependency& dependencie
{
dependencies.insert(type, "com/sun/star/uno/RuntimeException", TYPEUSE_EXCEPTION);
dependencies.insert(type, "com/sun/star/uno/TypeClass", TYPEUSE_NORMAL);
checkTypeDependencies(typeMgr, dependencies, "com/sun/star/uno/RuntimeException");
checkTypeDependencies(typeMgr, dependencies, "com/sun/star/uno/RuntimeException", bDepend);
}
checkFieldDependencies(typeMgr, dependencies, reader, type);
checkMethodDependencies(typeMgr, dependencies, reader, type);
checkReferenceDependencies(typeMgr, dependencies, reader, type);
// make the scope modules as dependencies
sal_Int32 nPos = type.lastIndexOf( '/' );
OString aScope( type.copy( 0, nPos ) );
OStringBuffer tmpBuf(aScope.getLength());
nPos = 0;
do
{
tmpBuf.append(aScope.getToken(0, '/', nPos));
dependencies.insert(type, tmpBuf.getStr(), TYPEUSE_SCOPE);
tmpBuf.append('/');
} while( nPos != -1 );
return sal_True;
}

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: rdbtype.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: jsc $ $Date: 2001-08-17 13:09:50 $
* last change: $Author: jsc $ $Date: 2001-11-26 12:20:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -129,7 +129,8 @@ sal_Bool produceDependedTypes(const OString& typeName,
typeDependencies,
pOptions,
o, regKey,
filterTypes))
filterTypes,
sal_True))
{
fprintf(stderr, "%s ERROR: %s\n",
pOptions->getProgramName().getStr(),
@@ -153,7 +154,8 @@ sal_Bool produceType(const OString& typeName,
RdbOptions* pOptions,
FileStream& o,
RegistryKey& regKey,
StringSet& filterTypes)
StringSet& filterTypes,
sal_Bool bDepend)
throw( CannotDumpException )
{
if (typeDependencies.isGenerated(typeName) )
@@ -164,7 +166,7 @@ sal_Bool produceType(const OString& typeName,
if (!typeKey.isValid())
return sal_False;
*/
if( !checkTypeDependencies(typeMgr, typeDependencies, typeName))
if( !checkTypeDependencies(typeMgr, typeDependencies, typeName, bDepend))
return sal_False;
if ( !checkFilterTypes(typeName) )

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: rdbtype.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 15:29:08 $
* last change: $Author: jsc $ $Date: 2001-11-26 12:20:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,7 +83,8 @@ sal_Bool produceType(const ::rtl::OString& typeName,
RdbOptions* pOptions,
FileStream& o,
RegistryKey& regKey,
StringSet& filterTypes)
StringSet& filterTypes,
sal_Bool bDepend = sal_False)
throw( CannotDumpException );
#endif // _RDBMAKER_RDBTYPE_HXX_