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 ...@@ -27,7 +27,6 @@ class SvMetaSlot : public SvMetaAttribute
{ {
public: public:
tools::SvRef<SvMetaType> aSlotType; tools::SvRef<SvMetaType> aSlotType;
tools::SvRef<SvMetaSlot> aMethod;
SvIdentifier aGroupId; SvIdentifier aGroupId;
SvIdentifier aExecMethod; SvIdentifier aExecMethod;
SvIdentifier aStateMethod; SvIdentifier aStateMethod;
...@@ -59,7 +58,6 @@ public: ...@@ -59,7 +58,6 @@ public:
size_t nStart, size_t nStart,
SvIdlDataBase & rBase, SvStream & rOutStm ); SvIdlDataBase & rBase, SvStream & rOutStm );
OString GetMangleName() const;
bool IsVariable() const; bool IsVariable() const;
bool IsMethod() const; bool IsMethod() const;
...@@ -86,7 +84,6 @@ public: ...@@ -86,7 +84,6 @@ public:
SvMetaSlot(); SvMetaSlot();
SvMetaSlot( SvMetaType * pType ); SvMetaSlot( SvMetaType * pType );
SvMetaAttribute * GetMethod() const;
SvMetaType * GetSlotType() const; SvMetaType * GetSlotType() const;
const OString& GetGroupId() const; const OString& GetGroupId() const;
const OString& GetExecMethod() const; const OString& GetExecMethod() const;
......
...@@ -77,17 +77,8 @@ bool SvMetaSlot::IsVariable() const ...@@ -77,17 +77,8 @@ bool SvMetaSlot::IsVariable() const
bool SvMetaSlot::IsMethod() const bool SvMetaSlot::IsMethod() const
{ {
bool b = GetType()->GetMetaTypeType() == MetaTypeType::Method; SvMetaType * pType = GetType();
b |= nullptr != GetMethod(); return pType->GetMetaTypeType() == MetaTypeType::Method;
return b;
}
OString SvMetaSlot::GetMangleName() const
{
SvMetaAttribute * pMeth = GetMethod();
if( pMeth )
return pMeth->GetName();
return GetName();
} }
/************************************************************************* /*************************************************************************
...@@ -102,11 +93,6 @@ SvMetaType * SvMetaSlot::GetSlotType() const ...@@ -102,11 +93,6 @@ SvMetaType * SvMetaSlot::GetSlotType() const
if( aSlotType.is() || !GetRef() ) return aSlotType.get(); if( aSlotType.is() || !GetRef() ) return aSlotType.get();
return static_cast<SvMetaSlot *>(GetRef())->GetSlotType(); 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 const OString& SvMetaSlot::GetGroupId() const
{ {
if( !aGroupId.getString().isEmpty() || !GetRef() ) return aGroupId.getString(); if( !aGroupId.getString().isEmpty() || !GetRef() ) return aGroupId.getString();
...@@ -273,26 +259,6 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, ...@@ -273,26 +259,6 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
rInStm.Seek( nTokPos ); 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, ...@@ -646,12 +612,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
if( IsMethod() ) if( IsMethod() )
{ {
SvMetaAttribute * pMethod = GetMethod(); SvMetaType * pType = GetType();
SvMetaType * pType;
if( pMethod )
pType = pMethod->GetType();
else
pType = GetType();
sal_uLong nSCount = pType->GetAttrCount(); sal_uLong nSCount = pType->GetAttrCount();
rOutStm rOutStm
.WriteOString( OString::number(nSCount) ) .WriteOString( OString::number(nSCount) )
...@@ -671,7 +632,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, ...@@ -671,7 +632,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
{ {
rOutStm.WriteCharPtr( ",\"" ); rOutStm.WriteCharPtr( ",\"" );
rOutStm.WriteOString( GetMangleName() ); rOutStm.WriteOString( GetName() );
rOutStm.WriteCharPtr( "\"" ); rOutStm.WriteCharPtr( "\"" );
} }
...@@ -683,14 +644,9 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO ...@@ -683,14 +644,9 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO
if ( !GetExport() && !GetHidden() ) if ( !GetExport() && !GetHidden() )
return 0; return 0;
SvMetaAttribute * pMethod = GetMethod();
if( IsMethod() ) if( IsMethod() )
{ {
SvMetaType * pType; SvMetaType * pType = GetType();
if( pMethod )
pType = pMethod->GetType();
else
pType = GetType();
if( !SvIdlDataBase::FindType( pType, rBase.aUsedTypes ) ) if( !SvIdlDataBase::FindType( pType, rBase.aUsedTypes ) )
rBase.aUsedTypes.push_back( pType ); rBase.aUsedTypes.push_back( pType );
...@@ -729,13 +685,7 @@ sal_uInt16 SvMetaSlot::WriteSlotMap( const OString& rShellName, sal_uInt16 nCoun ...@@ -729,13 +685,7 @@ sal_uInt16 SvMetaSlot::WriteSlotMap( const OString& rShellName, sal_uInt16 nCoun
sal_uInt16 nSCount = 0; sal_uInt16 nSCount = 0;
if( IsMethod() ) if( IsMethod() )
{ {
SvMetaType * pType; SvMetaType * pType = GetType();
SvMetaAttribute * pMethod = GetMethod();
if( pMethod )
pType = pMethod->GetType();
else
pType = GetType();
nSCount = (sal_uInt16)pType->GetAttrCount(); nSCount = (sal_uInt16)pType->GetAttrCount();
} }
......
...@@ -445,26 +445,6 @@ void SvIdlParser::ReadSlotAttribute( SvMetaSlot& rSlot ) ...@@ -445,26 +445,6 @@ void SvIdlParser::ReadSlotAttribute( SvMetaSlot& rSlot )
rInStm.Seek( nTokPos ); 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 ) 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