summaryrefslogtreecommitdiff
path: root/idl/source/objects/slot.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'idl/source/objects/slot.cxx')
-rw-r--r--idl/source/objects/slot.cxx47
1 files changed, 23 insertions, 24 deletions
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index df4cebf9c8e0..6b4c65a1bcac 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -570,33 +570,32 @@ void SvMetaSlot::WriteSlot( std::string_view rShellName, sal_uInt16 nCount,
sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ) const
{
- if( IsMethod() )
- {
- SvMetaType * pType = GetType();
+ if( !IsMethod() )
+ return 0;
- if( !SvIdlDataBase::FindType( pType, rBase.aUsedTypes ) )
- rBase.aUsedTypes.push_back( pType );
+ SvMetaType * pType = GetType();
- const SvRefMemberList<SvMetaAttribute *>& rList =
- pType->GetAttrList();
- for( size_t n = 0; n < rList.size(); n++ )
- {
- SvMetaAttribute * pPar = rList[n];
- SvMetaType * pPType = pPar->GetType();
- WriteTab( rOutStm, 1 );
- rOutStm.WriteCharPtr("{ (const SfxType*) &a")
- // item type
- .WriteOString(pPType->GetName()).WriteCharPtr("_Impl, ")
- // parameter name
- .WriteCharPtr("\"").WriteOString(pPar->GetName()).WriteCharPtr("\", ")
- // slot id
- .WriteOString(pPar->GetSlotId().getString()).WriteCharPtr(" },") << endl;
- if( !SvIdlDataBase::FindType( pPType, rBase.aUsedTypes ) )
- rBase.aUsedTypes.push_back( pPType );
- }
- return static_cast<sal_uInt16>(rList.size());
+ if( !SvIdlDataBase::FindType( pType, rBase.aUsedTypes ) )
+ rBase.aUsedTypes.push_back( pType );
+
+ const SvRefMemberList<SvMetaAttribute *>& rList =
+ pType->GetAttrList();
+ for( size_t n = 0; n < rList.size(); n++ )
+ {
+ SvMetaAttribute * pPar = rList[n];
+ SvMetaType * pPType = pPar->GetType();
+ WriteTab( rOutStm, 1 );
+ rOutStm.WriteCharPtr("{ (const SfxType*) &a")
+ // item type
+ .WriteOString(pPType->GetName()).WriteCharPtr("_Impl, ")
+ // parameter name
+ .WriteCharPtr("\"").WriteOString(pPar->GetName()).WriteCharPtr("\", ")
+ // slot id
+ .WriteOString(pPar->GetSlotId().getString()).WriteCharPtr(" },") << endl;
+ if( !SvIdlDataBase::FindType( pPType, rBase.aUsedTypes ) )
+ rBase.aUsedTypes.push_back( pPType );
}
- return 0;
+ return static_cast<sal_uInt16>(rList.size());
}
sal_uInt16 SvMetaSlot::WriteSlotMap( std::string_view rShellName, sal_uInt16 nCount,