diff options
Diffstat (limited to 'idlc/source/idlc.cxx')
-rw-r--r-- | idlc/source/idlc.cxx | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx index d1b3b9587d5b..7fcc8e8abcf2 100644 --- a/idlc/source/idlc.cxx +++ b/idlc/source/idlc.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope) { if (pScope == NULL) return NULL; - switch( pScope->getScopeNodeType() ) + switch( pScope->getScopeNodeType() ) { case NT_service: case NT_singleton: @@ -79,13 +79,13 @@ AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope) default: return NULL; } -} +} AstScope* SAL_CALL declAsScope(AstDeclaration* pDecl) { if (pDecl == NULL) return NULL; - switch(pDecl->getNodeType()) + switch(pDecl->getNodeType()) { case NT_interface: return (AstInterface*)(pDecl); @@ -110,7 +110,7 @@ AstScope* SAL_CALL declAsScope(AstDeclaration* pDecl) default: return NULL; } -} +} static void SAL_CALL predefineXInterface(AstModule* pRoot) { @@ -122,7 +122,7 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot) pParentScope = pModule; pModule = new AstModule(OString("sun"), pParentScope); pModule->setPredefined(true); - pParentScope->addDeclaration(pModule); + pParentScope->addDeclaration(pModule); pParentScope = pModule; pModule = new AstModule(OString("star"), pParentScope); pModule->setPredefined(true); @@ -153,7 +153,7 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot) pOp = new AstOperation(1, (AstType*)(pRoot->lookupPrimitiveType(ET_void)), OString("acquire"), pInterface); pInterface->addMember(pOp); - + // define XInterface::release pOp = new AstOperation(1, (AstType*)(pRoot->lookupPrimitiveType(ET_void)), OString("release"), pInterface); @@ -167,7 +167,7 @@ static void SAL_CALL initializePredefinedTypes(AstModule* pRoot) { pPredefined = new AstBaseType(ET_long, OString("long"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_ulong, OString("unsigned long"), pRoot); pRoot->addDeclaration(pPredefined); @@ -176,37 +176,37 @@ static void SAL_CALL initializePredefinedTypes(AstModule* pRoot) pPredefined = new AstBaseType(ET_uhyper, OString("unsigned hyper"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_short, OString("short"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_ushort, OString("unsigned short"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_float, OString("float"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_double, OString("double"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_char, OString("char"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_byte, OString("byte"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_any, OString("any"), pRoot); pRoot->addDeclaration(pPredefined); pPredefined = new AstBaseType(ET_string, OString("string"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_type, OString("type"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_boolean, OString("boolean"), pRoot); pRoot->addDeclaration(pPredefined); - + pPredefined = new AstBaseType(ET_void, OString("void"), pRoot); pRoot->addDeclaration(pPredefined); } @@ -227,9 +227,9 @@ Idlc::Idlc(Options* pOptions) m_pScopes = new AstStack(); // init root object after construction m_pRoot = NULL; - m_pErrorHandler = new ErrorHandler(); + m_pErrorHandler = new ErrorHandler(); m_bGenerateDoc = m_pOptions->isValid("-C"); -} +} Idlc::~Idlc() { @@ -239,13 +239,13 @@ Idlc::~Idlc() delete m_pScopes; if (m_pErrorHandler) delete m_pErrorHandler; -} +} void Idlc::init() { if ( m_pRoot ) delete m_pRoot; - + m_pRoot = new AstModule(NT_root, OString(), NULL); // push the root node on the stack @@ -253,7 +253,7 @@ void Idlc::init() initializePredefinedTypes(m_pRoot); predefineXInterface(m_pRoot); } - + void Idlc::reset() { m_bIsDocValid = sal_False; @@ -269,31 +269,31 @@ void Idlc::reset() m_mainFileName = OString(); m_realFileName = OString(); m_documentation = OString(); - + m_pScopes->clear(); if ( m_pRoot) delete m_pRoot; m_pRoot = new AstModule(NT_root, OString(), NULL); - + // push the root node on the stack m_pScopes->push(m_pRoot); - initializePredefinedTypes(m_pRoot); + initializePredefinedTypes(m_pRoot); } sal_Bool Idlc::isDocValid() -{ +{ if ( m_bGenerateDoc ) - return m_bIsDocValid; + return m_bIsDocValid; return sal_False;; } - + static Idlc* pStaticIdlc = NULL; Idlc* SAL_CALL idlc() { return pStaticIdlc; -} +} Idlc* SAL_CALL setIdlc(Options* pOptions) { @@ -304,7 +304,7 @@ Idlc* SAL_CALL setIdlc(Options* pOptions) pStaticIdlc = new Idlc(pOptions); pStaticIdlc->init(); return pStaticIdlc; -} +} AstDeclaration const * resolveTypedefs(AstDeclaration const * type) { if (type != 0) { |