diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-16 11:49:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-16 11:59:05 +0200 |
commit | aa8c854590e76a437521596c566ce1327efffb6e (patch) | |
tree | 44aadf19082c437242664a4ec0e2c0160f4ffe20 /idl | |
parent | 314cb543fe69d2a08fa40084512f40062437bed1 (diff) |
tighten up the attribute parsing, and drop some unused slots
Change-Id: I6f2ff99c919851b21ce120c40286c133bf65c778
Diffstat (limited to 'idl')
-rw-r--r-- | idl/inc/parser.hxx | 2 | ||||
-rw-r--r-- | idl/source/prj/parser.cxx | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/idl/inc/parser.hxx b/idl/inc/parser.hxx index 78a62af53ca1..8059cfdd9dd5 100644 --- a/idl/inc/parser.hxx +++ b/idl/inc/parser.hxx @@ -45,7 +45,7 @@ public: void ReadInterfaceOrShell( SvMetaModule& rModule, MetaTypeType aMetaTypeType ); void ReadInterfaceOrShellEntry( SvMetaClass& rClass ); bool ReadInterfaceOrShellSlot( SvMetaSlot& rSlot ); - bool ReadInterfaceOrShellAttribute( SvMetaAttribute& rAttr ); + bool ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr ); void ReadItem(); void ReadStruct(); void ReadEnum(); diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index 777359859b50..9d77a3682c5a 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -338,7 +338,7 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass) else { xAttr = new SvMetaAttribute( pType ); - bOk = ReadInterfaceOrShellAttribute(*xAttr); + bOk = ReadInterfaceOrShellMethodOrAttribute(*xAttr); } if( bOk ) bOk = xAttr->Test( rInStm ); @@ -392,20 +392,21 @@ bool SvIdlParser::ReadInterfaceOrShellSlot(SvMetaSlot& rSlot) return bOk; } -bool SvIdlParser::ReadInterfaceOrShellAttribute( SvMetaAttribute& rAttr ) +bool SvIdlParser::ReadInterfaceOrShellMethodOrAttribute( SvMetaAttribute& rAttr ) { sal_uInt32 nTokPos = rInStm.Tell(); bool bOk = false; rAttr.SetName( ReadIdentifier() ); - rAttr.aSlotId.ReadSvIdl( rBase, rInStm ); + rAttr.aSlotId.setString( ReadIdentifier() ); + sal_uLong n; + if( !rBase.FindId( rAttr.aSlotId.getString(), &n ) ) + throw SvParseException( rInStm, "no value for identifier <" + rAttr.aSlotId.getString() + "> " ); + rAttr.aSlotId.SetValue(n); bOk = true; SvToken& rTok = rInStm.GetToken(); if( rTok.IsChar() && rTok.GetChar() == '(' ) { - tools::SvRef<SvMetaType> xT(new SvMetaType() ); - xT->SetRef(rAttr.GetType() ); - rAttr.aType = xT; bOk = rAttr.aType->ReadMethodArgs( rBase, rInStm ); } if( bOk && rInStm.ReadIf( '[' ) ) |