diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-06-03 14:10:04 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-06-03 14:10:04 +0000 |
commit | d43f5ed82f040ef1b1cfe41d36c3559d83bb8d64 (patch) | |
tree | a565cf9cee26ba13e8a5133b2469b9121f7058e7 /idlc | |
parent | 08f9efa054b50c7b22f26cef891bf7bd79dd6f3a (diff) |
INTEGRATION: CWS sb18 (1.6.4); FILE MERGED
2004/05/19 08:56:07 sb 1.6.4.5: #i21150# Check that an unpublished entity is not used in the declaration of a published entity.
2004/05/18 15:36:50 sb 1.6.4.4: #i21150# Added new feature: published.
2004/04/26 12:17:42 sb 1.6.4.3: #i21150# Forbid polymorphic struct type templates with base types.
2004/04/21 15:55:11 sb 1.6.4.2: #i21150# Cleaned up nomenclature of polymorphic struct types.
2004/04/08 14:37:16 sb 1.6.4.1: #i21150# Fixed UNOIDL typedef support; initial support for polymorphic struct types.
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/errorhandler.cxx | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx index 29b97a0adefa..fcb532687e36 100644 --- a/idlc/source/errorhandler.cxx +++ b/idlc/source/errorhandler.cxx @@ -2,9 +2,9 @@ * * $RCSfile: errorhandler.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2004-03-30 16:46:43 $ + * last change: $Author: obo $ $Date: 2004-06-03 15:10:04 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -176,6 +176,26 @@ static sal_Char* errorCodeToMessage(ErrorCode eCode) return "a rest parameter may not be used on an interface method"; case EIDL_READONLY_ATTRIBUTE_SET_EXCEPTIONS: return "a readonly attribute may not have a setter raises clause"; + case EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS: + return + "the number of given type arguments does not match the expected" + " number of type parameters"; + case EIDL_INSTANTIATED_STRUCT_TYPE_TYPEDEF: + return + "an instantiated polymorphic struct type cannot be used in a" + " typedef"; + case EIDL_IDENTICAL_TYPE_PARAMETERS: + return "two type parameters have the same name"; + case EIDL_STRUCT_TYPE_TEMPLATE_WITH_BASE: + return "a polymorphic struct type template may not have a base type"; + case EIDL_PUBLISHED_FORWARD: + return + "a published forward declaration of an interface type cannot be" + " followed by an unpublished declaration of that type"; + case EIDL_PUBLISHED_USES_UNPUBLISHED: + return + "an unpublished entity cannot be used in the declaration of a" + " published entity: "; } return "unknown errror"; } @@ -726,3 +746,12 @@ void ErrorHandler::enumValLookupFailure(AstUnion* pUnion, AstEnum* pEnum, const pEnum->getLocalName().getStr(), name.getStr()); idlc()->incErrorCount(); } + +bool ErrorHandler::checkPublished(AstDeclaration const * decl) { + if (idlc()->isPublished() && !decl->isPublished()) { + error1(EIDL_PUBLISHED_USES_UNPUBLISHED, decl); + return false; + } else { + return true; + } +} |