summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
Diffstat (limited to 'idl')
-rw-r--r--idl/source/objects/slot.cxx35
-rw-r--r--idl/source/prj/parser.cxx24
2 files changed, 29 insertions, 30 deletions
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index e9b2d9986410..1793da697c5c 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -386,28 +386,27 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
}
aMethodName = GetStateMethod();
- if (!aMethodName.isEmpty() &&
- aMethodName != "NoState")
+ if (aMethodName.isEmpty() || aMethodName == "NoState")
+ return;
+
+ bool bIn = false;
+ for ( size_t n=0; n < rList.size(); n++ )
{
- bool bIn = false;
- for ( size_t n=0; n < rList.size(); n++ )
+ if (rList[n] == aMethodName)
{
- if (rList[n] == aMethodName)
- {
- bIn = true;
- break;
- }
+ bIn = true;
+ break;
}
+ }
- if ( !bIn )
- {
- rList.push_back( aMethodName );
- rOutStm.WriteCharPtr( "SFX_STATE_STUB(" )
- .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;
}
}
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx
index be948e8ec31f..dc5bb4f14444 100644
--- a/idl/source/prj/parser.cxx
+++ b/idl/source/prj/parser.cxx
@@ -431,20 +431,20 @@ void SvIdlParser::ReadInterfaceOrShellMethod( SvMetaAttribute& rAttr )
xT->SetRef(rAttr.GetType() );
rAttr.aType = xT;
rAttr.aType->SetType( MetaTypeType::Method );
- if (!ReadIf(')'))
+ if (ReadIf(')'))
+ return;
+
+ while (true)
{
- while (true)
- {
- tools::SvRef<SvMetaAttribute> xParamAttr( new SvMetaAttribute() );
- xParamAttr->aType = ReadKnownType();
- xParamAttr->SetName( ReadIdentifier() );
- ReadSlotId(xParamAttr->aSlotId);
- rAttr.aType->GetAttrList().push_back( xParamAttr.get() );
- if (!ReadIfDelimiter())
- break;
- }
- Read(')');
+ tools::SvRef<SvMetaAttribute> xParamAttr( new SvMetaAttribute() );
+ xParamAttr->aType = ReadKnownType();
+ xParamAttr->SetName( ReadIdentifier() );
+ ReadSlotId(xParamAttr->aSlotId);
+ rAttr.aType->GetAttrList().push_back( xParamAttr.get() );
+ if (!ReadIfDelimiter())
+ break;
}
+ Read(')');
}
void SvIdlParser::ReadSlotId(SvIdentifier& rSlotId)