Kaydet (Commit) 20f33eb7 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

svidl: Remove nested method support

No diff in workdir/SdiTarget.

Change-Id: I53e974c8ccafbbc3675f67b87a0e1b8ff19b6790
üst e588678f
......@@ -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;
......
......@@ -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();
}
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment