summaryrefslogtreecommitdiff
path: root/idl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-16 11:49:07 +0200
committerNoel Grandin <noel@peralex.com>2016-02-16 11:59:05 +0200
commitaa8c854590e76a437521596c566ce1327efffb6e (patch)
tree44aadf19082c437242664a4ec0e2c0160f4ffe20 /idl/source
parent314cb543fe69d2a08fa40084512f40062437bed1 (diff)
tighten up the attribute parsing, and drop some unused slots
Change-Id: I6f2ff99c919851b21ce120c40286c133bf65c778
Diffstat (limited to 'idl/source')
-rw-r--r--idl/source/prj/parser.cxx13
1 files changed, 7 insertions, 6 deletions
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( '[' ) )