Kaydet (Commit) 0f8f733e authored tarafından Noel Grandin's avatar Noel Grandin

move parsing of method ags into SvIdlParser

Change-Id: I2fb969529c0670ae93c3cba69bf207d2c87887dc
üst 291a10ec
......@@ -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 )
......
......@@ -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(); }
......
......@@ -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( ']' );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment