loplugin:flatten in idl

Change-Id: I7e8fe338a366d146c7951fe54f74cc5e42bde039
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91833
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2020-04-07 16:13:10 +02:00
parent f9151f4262
commit 8ee2063fa8
2 changed files with 30 additions and 31 deletions

View File

@@ -386,29 +386,28 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
} }
aMethodName = GetStateMethod(); aMethodName = GetStateMethod();
if (!aMethodName.isEmpty() && if (aMethodName.isEmpty() || aMethodName == "NoState")
aMethodName != "NoState") return;
{
bool bIn = false;
for ( size_t n=0; n < rList.size(); n++ )
{
if (rList[n] == aMethodName)
{
bIn = true;
break;
}
}
if ( !bIn ) bool bIn = false;
for ( size_t n=0; n < rList.size(); n++ )
{
if (rList[n] == aMethodName)
{ {
rList.push_back( aMethodName ); bIn = true;
rOutStm.WriteCharPtr( "SFX_STATE_STUB(" ) break;
.WriteOString( rShellName )
.WriteChar( ',' )
.WriteOString( aMethodName )
.WriteChar( ')' ) << endl;
} }
} }
if ( !bIn )
{
rList.push_back( aMethodName );
rOutStm.WriteCharPtr( "SFX_STATE_STUB(" )
.WriteOString( rShellName )
.WriteChar( ',' )
.WriteOString( aMethodName )
.WriteChar( ')' ) << endl;
}
} }
void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,

View File

@@ -431,20 +431,20 @@ void SvIdlParser::ReadInterfaceOrShellMethod( SvMetaAttribute& rAttr )
xT->SetRef(rAttr.GetType() ); xT->SetRef(rAttr.GetType() );
rAttr.aType = xT; rAttr.aType = xT;
rAttr.aType->SetType( MetaTypeType::Method ); rAttr.aType->SetType( MetaTypeType::Method );
if (!ReadIf(')')) if (ReadIf(')'))
return;
while (true)
{ {
while (true) tools::SvRef<SvMetaAttribute> xParamAttr( new SvMetaAttribute() );
{ xParamAttr->aType = ReadKnownType();
tools::SvRef<SvMetaAttribute> xParamAttr( new SvMetaAttribute() ); xParamAttr->SetName( ReadIdentifier() );
xParamAttr->aType = ReadKnownType(); ReadSlotId(xParamAttr->aSlotId);
xParamAttr->SetName( ReadIdentifier() ); rAttr.aType->GetAttrList().push_back( xParamAttr.get() );
ReadSlotId(xParamAttr->aSlotId); if (!ReadIfDelimiter())
rAttr.aType->GetAttrList().push_back( xParamAttr.get() ); break;
if (!ReadIfDelimiter())
break;
}
Read(')');
} }
Read(')');
} }
void SvIdlParser::ReadSlotId(SvIdentifier& rSlotId) void SvIdlParser::ReadSlotId(SvIdentifier& rSlotId)