summaryrefslogtreecommitdiff
path: root/rdbmaker
diff options
context:
space:
mode:
authorJuergen Schmidt <jsc@openoffice.org>2001-11-26 11:20:59 +0000
committerJuergen Schmidt <jsc@openoffice.org>2001-11-26 11:20:59 +0000
commit64535a5e74012deaa6faba3a2d7e84bcc283ed4b (patch)
tree611cbb304922761da92a306ba51d73435fc88333 /rdbmaker
parent85415031efe91aeee7a5d29f112274575f2789bb (diff)
#94607# insert modfications to generate module information
Diffstat (limited to 'rdbmaker')
-rw-r--r--rdbmaker/source/codemaker/dependency.cxx28
-rw-r--r--rdbmaker/source/rdbmaker/rdbtype.cxx12
-rw-r--r--rdbmaker/source/rdbmaker/rdbtype.hxx7
3 files changed, 35 insertions, 12 deletions
diff --git a/rdbmaker/source/codemaker/dependency.cxx b/rdbmaker/source/codemaker/dependency.cxx
index 2bba05227f01..f74aeca95276 100644
--- a/rdbmaker/source/codemaker/dependency.cxx
+++ b/rdbmaker/source/codemaker/dependency.cxx
@@ -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;
}
diff --git a/rdbmaker/source/rdbmaker/rdbtype.cxx b/rdbmaker/source/rdbmaker/rdbtype.cxx
index 337e08642780..0964af15aac1 100644
--- a/rdbmaker/source/rdbmaker/rdbtype.cxx
+++ b/rdbmaker/source/rdbmaker/rdbtype.cxx
@@ -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) )
diff --git a/rdbmaker/source/rdbmaker/rdbtype.hxx b/rdbmaker/source/rdbmaker/rdbtype.hxx
index 54f957a96108..ddacff2530b8 100644
--- a/rdbmaker/source/rdbmaker/rdbtype.hxx
+++ b/rdbmaker/source/rdbmaker/rdbtype.hxx
@@ -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_