diff options
-rw-r--r-- | idl/inc/lex.hxx | 8 | ||||
-rw-r--r-- | idl/inc/types.hxx | 3 | ||||
-rw-r--r-- | idl/source/prj/parser.cxx | 24 |
3 files changed, 23 insertions, 12 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx index 7780a36a49ec..f513e9ec68fb 100644 --- a/idl/inc/lex.hxx +++ b/idl/inc/lex.hxx @@ -166,7 +166,7 @@ public: return *(*pRetToken).get(); } - SvToken& GetToken_NextAll() + SvToken& GetToken_Next() { std::vector<std::unique_ptr<SvToken> >::iterator pRetToken = pCurToken++; @@ -178,12 +178,6 @@ public: return *(*pRetToken).get(); } - SvToken& GetToken_Next() - { - // comments get removed initially - return GetToken_NextAll(); - } - SvToken& GetToken() const { return *(*pCurToken).get(); } bool ReadIf( char cChar ) diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index ec7a0de281ee..167e902947de 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -62,7 +62,6 @@ class SvMetaType : public SvMetaReference SvStream & rOutStm ); protected: bool ReadNamesSvIdl( SvTokenStream & rInStm ); - virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ); public: @@ -71,6 +70,8 @@ public: virtual ~SvMetaType(); + virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; + SvRefMemberList<SvMetaAttribute *>& GetAttrList() { return aAttrList; } sal_uLong GetAttrCount() const { return aAttrList.size(); } diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index 9d77a3682c5a..d1793c89de2b 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -404,11 +404,27 @@ bool SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr rAttr.aSlotId.SetValue(n); bOk = true; - SvToken& rTok = rInStm.GetToken(); - if( rTok.IsChar() && rTok.GetChar() == '(' ) + if( rInStm.ReadIf( '(' ) ) { - bOk = rAttr.aType->ReadMethodArgs( rBase, rInStm ); - } + // read method arguments + tools::SvRef<SvMetaType> xT(new SvMetaType() ); + xT->SetRef(rAttr.GetType() ); + rAttr.aType = xT; + sal_uInt32 nBeginPos = 0; // can not happen with Tell + while( nBeginPos != rInStm.Tell() ) + { + nBeginPos = rInStm.Tell(); + tools::SvRef<SvMetaAttribute> xAttr( new SvMetaAttribute() ); + if( xAttr->ReadSvIdl( rBase, rInStm ) ) + { + if( xAttr->Test( rInStm ) ) + rAttr.aType->GetAttrList().push_back( xAttr ); + } + rInStm.ReadIfDelimiter(); + } + ReadChar( ')' ); + rAttr.aType->SetType( MetaTypeType::Method ); + } if( bOk && rInStm.ReadIf( '[' ) ) { ReadChar( ']' ); |