From 799eab3b3499be5846e13e6360cc01741a241f89 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 23 Feb 2016 08:43:39 +0200 Subject: methods in .SDI files don't use attributes so simplify the parser and drop the square brackets Change-Id: I3bab5f5b14e57d0cd1ed1a383fe21968f97b243a --- idl/source/prj/parser.cxx | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'idl/source') diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index f9e2f0f8c53e..dc3340a214b8 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -397,31 +397,25 @@ void SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr throw SvParseException( rInStm, "no value for identifier <" + rAttr.aSlotId.getString() + "> " ); rAttr.aSlotId.SetValue(n); - if( ReadIf( '(' ) ) + Read( '(' ); + // read method arguments + tools::SvRef xT(new SvMetaType() ); + xT->SetRef(rAttr.GetType() ); + rAttr.aType = xT; + sal_uInt32 nBeginPos = 0; // can not happen with Tell + while( nBeginPos != rInStm.Tell() ) { - // read method arguments - tools::SvRef 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 xAttr( new SvMetaAttribute() ); + if( xAttr->ReadSvIdl( rBase, rInStm ) ) { - nBeginPos = rInStm.Tell(); - tools::SvRef xAttr( new SvMetaAttribute() ); - if( xAttr->ReadSvIdl( rBase, rInStm ) ) - { - if( xAttr->Test( rInStm ) ) - rAttr.aType->GetAttrList().push_back( xAttr ); - } - ReadIfDelimiter(); + if( xAttr->Test( rInStm ) ) + rAttr.aType->GetAttrList().push_back( xAttr ); } - Read( ')' ); - rAttr.aType->SetType( MetaTypeType::Method ); - } - if( ReadIf( '[' ) ) - { - Read( ']' ); + ReadIfDelimiter(); } + Read( ')' ); + rAttr.aType->SetType( MetaTypeType::Method ); } SvMetaClass * SvIdlParser::ReadKnownClass() -- cgit