summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-06-03 14:10:36 +0000
committerOliver Bolte <obo@openoffice.org>2004-06-03 14:10:36 +0000
commitb18d6a4bfe46e6c1c014e7fd72f3b10d1a419b6d (patch)
tree3abe607642c4e1deed0324a9b7622ef68fe3a6d9 /idlc
parenta847b68b5c002fd60c9ed116c5faccd74c88e706 (diff)
INTEGRATION: CWS sb18 (1.4.4); FILE MERGED
2004/04/08 14:37:17 sb 1.4.4.1: #i21150# Fixed UNOIDL typedef support; initial support for polymorphic struct types.
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/idlc.cxx48
1 files changed, 15 insertions, 33 deletions
diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx
index 58dc0389e..176896554 100644
--- a/idlc/source/idlc.cxx
+++ b/idlc/source/idlc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: idlc.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 16:47:07 $
+ * last change: $Author: obo $ $Date: 2004-06-03 15:10:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,6 +99,8 @@
#include "idlc/asttype.hxx"
#include "idlc/asttypedef.hxx"
+#include "osl/diagnose.h"
+
using namespace ::rtl;
AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope)
@@ -301,37 +303,17 @@ Idlc* SAL_CALL setIdlc(Options* pOptions)
return pStaticIdlc;
}
-sal_Bool SAL_CALL canBeRedefined(AstDeclaration *pDecl)
-{
- switch (pDecl->getNodeType())
- {
- case NT_module:
- case NT_constants:
- case NT_interface:
- case NT_const:
- case NT_exception:
- case NT_parameter:
- case NT_enum_val:
- case NT_array:
- case NT_sequence:
- case NT_union:
- case NT_struct:
- case NT_enum:
- case NT_typedef:
-// return sal_True;
- case NT_union_branch:
- case NT_member:
- case NT_attribute:
- case NT_operation:
- case NT_predefined:
- default:
- return sal_False;
- }
-}
-
-AstType const * resolveTypedefs(AstType const * type) {
- while (type->getNodeType() == NT_typedef) {
- type = static_cast< AstTypeDef const * >(type)->getBaseType();
+AstDeclaration const * resolveTypedefs(AstDeclaration const * type) {
+ if (type != 0) {
+ while (type->getNodeType() == NT_typedef) {
+ type = static_cast< AstTypeDef const * >(type)->getBaseType();
+ }
}
return type;
}
+
+AstInterface const * resolveInterfaceTypedefs(AstType const * type) {
+ AstDeclaration const * decl = resolveTypedefs(type);
+ OSL_ASSERT(decl->getNodeType() == NT_interface);
+ return static_cast< AstInterface const * >(decl);
+}