diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-04-30 03:09:14 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-05-01 01:28:02 +0300 |
commit | 20f33eb7c5ebf2611008f6173da870bd0d1693fc (patch) | |
tree | 0354e46857ff5759161785f683d962f3f6aeb9c2 /idl | |
parent | e588678f91652cc6f10b5f21716ba05676461467 (diff) |
svidl: Remove nested method support
No diff in workdir/SdiTarget.
Change-Id: I53e974c8ccafbbc3675f67b87a0e1b8ff19b6790
Diffstat (limited to 'idl')
-rw-r--r-- | idl/inc/slot.hxx | 3 | ||||
-rw-r--r-- | idl/source/objects/slot.cxx | 62 | ||||
-rw-r--r-- | idl/source/prj/parser.cxx | 20 |
3 files changed, 6 insertions, 79 deletions
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 06e98097380f..4816332ef6cf 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -27,7 +27,6 @@ class SvMetaSlot : public SvMetaAttribute { public: tools::SvRef<SvMetaType> aSlotType; - tools::SvRef<SvMetaSlot> aMethod; SvIdentifier aGroupId; SvIdentifier aExecMethod; SvIdentifier aStateMethod; @@ -59,7 +58,6 @@ public: size_t nStart, SvIdlDataBase & rBase, SvStream & rOutStm ); - OString GetMangleName() const; bool IsVariable() const; bool IsMethod() const; @@ -86,7 +84,6 @@ public: SvMetaSlot(); SvMetaSlot( SvMetaType * pType ); - SvMetaAttribute * GetMethod() const; SvMetaType * GetSlotType() const; const OString& GetGroupId() const; const OString& GetExecMethod() const; diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index ff0760d7addc..018b57cf202c 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -77,17 +77,8 @@ bool SvMetaSlot::IsVariable() const bool SvMetaSlot::IsMethod() const { - bool b = GetType()->GetMetaTypeType() == MetaTypeType::Method; - b |= nullptr != GetMethod(); - return b; -} - -OString SvMetaSlot::GetMangleName() const -{ - SvMetaAttribute * pMeth = GetMethod(); - if( pMeth ) - return pMeth->GetName(); - return GetName(); + SvMetaType * pType = GetType(); + return pType->GetMetaTypeType() == MetaTypeType::Method; } /************************************************************************* @@ -102,11 +93,6 @@ SvMetaType * SvMetaSlot::GetSlotType() const if( aSlotType.is() || !GetRef() ) return aSlotType.get(); return static_cast<SvMetaSlot *>(GetRef())->GetSlotType(); } -SvMetaAttribute * SvMetaSlot::GetMethod() const -{ - if( aMethod.is() || !GetRef() ) return aMethod.get(); - return static_cast<SvMetaSlot *>(GetRef())->GetMethod(); -} const OString& SvMetaSlot::GetGroupId() const { if( !aGroupId.getString().isEmpty() || !GetRef() ) return aGroupId.getString(); @@ -273,26 +259,6 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, rInStm.Seek( nTokPos ); } - if( !aMethod.is() ) - { - SvToken& rTok = rInStm.GetToken(); - if( rTok.IsIdentifier() ) - { - aMethod = new SvMetaSlot(); - sal_uInt32 nTokPos = rInStm.Tell(); - if( aMethod->ReadSvIdl( rBase, rInStm ) ) - { - if( aMethod->IsMethod() ) - { - aMethod->SetSlotId( GetSlotId() ); - if( aMethod->Test( rInStm ) ) - return; - } - rInStm.Seek( nTokPos ); - } - aMethod.clear(); - } - } } } @@ -646,12 +612,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, if( IsMethod() ) { - SvMetaAttribute * pMethod = GetMethod(); - SvMetaType * pType; - if( pMethod ) - pType = pMethod->GetType(); - else - pType = GetType(); + SvMetaType * pType = GetType(); sal_uLong nSCount = pType->GetAttrCount(); rOutStm .WriteOString( OString::number(nSCount) ) @@ -671,7 +632,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, { rOutStm.WriteCharPtr( ",\"" ); - rOutStm.WriteOString( GetMangleName() ); + rOutStm.WriteOString( GetName() ); rOutStm.WriteCharPtr( "\"" ); } @@ -683,14 +644,9 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO if ( !GetExport() && !GetHidden() ) return 0; - SvMetaAttribute * pMethod = GetMethod(); if( IsMethod() ) { - SvMetaType * pType; - if( pMethod ) - pType = pMethod->GetType(); - else - pType = GetType(); + SvMetaType * pType = GetType(); if( !SvIdlDataBase::FindType( pType, rBase.aUsedTypes ) ) rBase.aUsedTypes.push_back( pType ); @@ -729,13 +685,7 @@ sal_uInt16 SvMetaSlot::WriteSlotMap( const OString& rShellName, sal_uInt16 nCoun sal_uInt16 nSCount = 0; if( IsMethod() ) { - SvMetaType * pType; - SvMetaAttribute * pMethod = GetMethod(); - if( pMethod ) - pType = pMethod->GetType(); - else - pType = GetType(); - + SvMetaType * pType = GetType(); nSCount = (sal_uInt16)pType->GetAttrCount(); } diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index d7d134723cf4..da8e574c17a6 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -445,26 +445,6 @@ void SvIdlParser::ReadSlotAttribute( SvMetaSlot& rSlot ) rInStm.Seek( nTokPos ); } - if( !rSlot.aMethod.is() ) - { - SvToken& rTok = rInStm.GetToken(); - if( rTok.IsIdentifier() ) - { - rSlot.aMethod = new SvMetaSlot(); - sal_uInt32 nTokPos = rInStm.Tell(); - if( rSlot.aMethod->ReadSvIdl( rBase, rInStm ) ) - { - if( rSlot.aMethod->IsMethod() ) - { - rSlot.aMethod->SetSlotId( rSlot.GetSlotId() ); - if( rSlot.aMethod->Test( rInStm ) ) - return; - } - rInStm.Seek( nTokPos ); - } - rSlot.aMethod.clear(); - } - } } void SvIdlParser::ReadInterfaceOrShellMethod( SvMetaAttribute& rAttr ) |