summaryrefslogtreecommitdiff
path: root/idlc/source/fehelper.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-06-03 14:10:19 +0000
committerOliver Bolte <obo@openoffice.org>2004-06-03 14:10:19 +0000
commitc95fdf355a3057405430009af95620ba8640c511 (patch)
treea3a8cf4c6d0f69bdf566afac8645081d0f601985 /idlc/source/fehelper.cxx
parentd43f5ed82f040ef1b1cfe41d36c3559d83bb8d64 (diff)
INTEGRATION: CWS sb18 (1.5.4); FILE MERGED
2004/05/19 08:56:08 sb 1.5.4.3: #i21150# Check that an unpublished entity is not used in the declaration of a published entity. 2004/04/14 08:52:30 sb 1.5.4.2: #i21150# Added support for polymorphic struct types. 2004/04/08 14:37:17 sb 1.5.4.1: #i21150# Fixed UNOIDL typedef support; initial support for polymorphic struct types.
Diffstat (limited to 'idlc/source/fehelper.cxx')
-rw-r--r--idlc/source/fehelper.cxx29
1 files changed, 22 insertions, 7 deletions
diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx
index 29f40d64587c..9277a5fa3280 100644
--- a/idlc/source/fehelper.cxx
+++ b/idlc/source/fehelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fehelper.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 16:46:55 $
+ * last change: $Author: obo $ $Date: 2004-06-03 15:10:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,6 +67,7 @@
#ifndef _IDLC_ASTARRAY_HXX_
#include <idlc/astarray.hxx>
#endif
+#include "idlc/idlc.hxx"
using namespace ::rtl;
@@ -99,6 +100,10 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
AstArray* pArray;
AstType* pType;
+ if ( pDecl == 0 )
+ {
+ return NULL;
+ }
if ( !pDecl->isType() )
{
idlc()->error()->noTypeError(pDecl);
@@ -131,11 +136,16 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
return NULL; // return through this statement should not happen
}
-FeInheritanceHeader::FeInheritanceHeader(NodeType nodeType, ::rtl::OString* pName, ::rtl::OString* pInherits)
+FeInheritanceHeader::FeInheritanceHeader(
+ NodeType nodeType, ::rtl::OString* pName, ::rtl::OString* pInherits,
+ std::vector< rtl::OString > * typeParameters)
: m_nodeType(nodeType)
, m_pName(pName)
, m_pInherits(NULL)
{
+ if (typeParameters != 0) {
+ m_typeParameters = *typeParameters;
+ }
initializeInherits(pInherits);
}
@@ -147,11 +157,16 @@ void FeInheritanceHeader::initializeInherits(::rtl::OString* pInherits)
AstDeclaration* pDecl = pScope->lookupByName(*pInherits);
if ( pDecl )
{
- if ( pDecl->getNodeType() == getNodeType()
- && (pDecl->getNodeType() != NT_interface
- || static_cast< AstInterface* >(pDecl)->isDefined()) )
+ AstDeclaration const * resolved = resolveTypedefs(pDecl);
+ if ( resolved->getNodeType() == getNodeType()
+ && (resolved->getNodeType() != NT_interface
+ || static_cast< AstInterface const * >(
+ resolved)->isDefined()) )
{
- m_pInherits = pDecl;
+ if ( idlc()->error()->checkPublished( pDecl ) )
+ {
+ m_pInherits = pDecl;
+ }
}
else
{