diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-21 15:26:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-22 07:44:07 +0100 |
commit | a3bc9dc51104d01ec203b8e2d5767dd055a42b58 (patch) | |
tree | c91162db37e16ab64ede3686ecc4a3fa473d28ea /idl | |
parent | 494b3e69fd4bef0af19627cf31da98da376019d0 (diff) |
loplugin:flatten in filter..include
Change-Id: I74c1ea8b9b490eaa9508a885758224063e39051b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127235
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idl')
-rw-r--r-- | idl/source/objects/slot.cxx | 47 |
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, |