summaryrefslogtreecommitdiff
path: root/idl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-16 09:16:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-16 09:59:30 +0200
commit4aaa4ceee75de7a0fbb552039d39567ab10c6d4b (patch)
tree66496fd94be045be5bb83e49ffdb52bb52b118e2 /idl/source
parent7f71e99e3f35e7b94aa426f588276d05bf86bf09 (diff)
Remove more unused idl parts
Change-Id: Id78de487b36a1c939dc3a4a5b38ab0b77999478c
Diffstat (limited to 'idl/source')
-rw-r--r--idl/source/objects/basobj.cxx108
-rw-r--r--idl/source/objects/bastype.cxx38
-rw-r--r--idl/source/objects/module.cxx38
-rw-r--r--idl/source/objects/object.cxx18
-rw-r--r--idl/source/objects/slot.cxx24
-rw-r--r--idl/source/objects/types.cxx506
6 files changed, 0 insertions, 732 deletions
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 38dcd296a34d..465bd8cb35b7 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -93,11 +93,6 @@ bool SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & )
return false;
}
-void SvMetaObject::Write( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */,
- WriteType, WriteAttribute )
-{
-}
-
TYPEINIT1( SvMetaName, SvMetaObject );
SvMetaName::SvMetaName()
{
@@ -164,23 +159,6 @@ bool SvMetaName::Test( SvIdlDataBase &, SvTokenStream & )
return true;
}
-void SvMetaName::WriteDescription( SvStream & rOutStm )
-{
- rOutStm.WriteCharPtr( "<DESCRIPTION>" ) << endl;
-
- OString aDesc( GetDescription().getString() );
- sal_Int32 nPos = aDesc.indexOf('\n');
- while ( nPos != -1 )
- {
- rOutStm.WriteCharPtr( aDesc.copy( 0, nPos ).getStr() ) << endl;
- aDesc = aDesc.copy(nPos+1);
- nPos = aDesc.indexOf('\n');
- }
-
- rOutStm.WriteCharPtr( aDesc.getStr() ) << endl;
- rOutStm.WriteCharPtr( "</DESCRIPTION>" ) << endl;
-}
-
bool SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
@@ -211,67 +189,6 @@ bool SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
return bOk;
}
-void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- sal_uLong nBeginPos = rOutStm.Tell();
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '[' ) << endl;
- sal_uLong nOldPos = rOutStm.Tell();
- WriteAttributes( rBase, rOutStm, nTab +1, nT, nA );
-
- // write no empty brackets
- sal_uLong nPos = rOutStm.Tell();
- rOutStm.Seek( nOldPos );
- bool bOnlySpace = true;
- while( bOnlySpace && rOutStm.Tell() < nPos )
- {
- char c;
- rOutStm.ReadChar( c );
- if( !isspace( c ) )
- bOnlySpace = false;
- }
- if( bOnlySpace )
- // nothing written
- rOutStm.Seek( nBeginPos );
- else
- {
- rOutStm.Seek( nPos );
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( ']' ) << endl;
- }
-}
-
-void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType, WriteAttribute )
-{
- if( GetHelpText().IsSet() || GetHelpContext().IsSet() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "// class SvMetaName" ) << endl;
- }
- if( GetHelpText().IsSet() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "helpstring(\"" ).WriteCharPtr( GetHelpText().getString().getStr() ).WriteCharPtr( "\")," ) << endl;
- }
- if( GetHelpContext().IsSet() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "helpcontext(" )
- .WriteCharPtr( OString::number(GetHelpContext().GetValue()).getStr() )
- .WriteCharPtr( ")," ) << endl;
- }
-}
-
-void SvMetaName::WriteContext( SvIdlDataBase &, SvStream &,
- sal_uInt16,
- WriteType, WriteAttribute )
-{
-}
-
TYPEINIT1( SvMetaReference, SvMetaName );
SvMetaReference::SvMetaReference()
@@ -322,29 +239,4 @@ bool SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
return SvMetaReference::ReadSvIdl( rBase, rInStm );
}
-void SvMetaExtern::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- SvMetaReference::Write( rBase, rOutStm, nTab, nT, nA );
-}
-
-void SvMetaExtern::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- SvMetaReference::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
-
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "// class SvMetaExtern" ) << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "uuid(" ).WriteCharPtr( OUStringToOString(GetUUId().GetHexName(), RTL_TEXTENCODING_UTF8).getStr() ).WriteCharPtr( ")," ) << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "version(" )
- .WriteCharPtr( OString::number(aVersion.GetMajorVersion()).getStr() )
- .WriteChar( '.' )
- .WriteCharPtr( OString::number(aVersion.GetMinorVersion()).getStr() )
- .WriteCharPtr( ")," ) << endl;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index a42e7ca7d813..a8a3a0a64e37 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -56,16 +56,6 @@ static bool ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm,
return false;
}
-sal_uInt32 SvUINT32::Read( SvStream & rStm )
-{
- return SvPersistStream::ReadCompressed( rStm );
-}
-
-void SvUINT32::Write( SvStream & rStm, sal_uInt32 nVal )
-{
- SvPersistStream::WriteCompressed( rStm, nVal );
-}
-
SvStream& WriteSvBOOL(SvStream & rStm, const SvBOOL & rb )
{
sal_uInt8 n = rb.nVal;
@@ -194,19 +184,6 @@ bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm
return false;
}
-SvStream& WriteSvIdentifier(SvStream & rStm, const SvIdentifier & r )
-{
- write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, r.getString());
- return rStm;
-}
-
-SvStream& operator >> (SvStream & rStm, SvIdentifier & r )
-{
- r.setString(read_uInt16_lenPrefixed_uInt8s_ToOString(rStm));
- return rStm;
-}
-
-
bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
SvStringHashEntry * pName,
SvTokenStream & rInStm )
@@ -257,21 +234,6 @@ bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
return false;
}
-SvStream& WriteSvNumberIdentifier(SvStream & rStm, const SvNumberIdentifier & r )
-{
- WriteSvIdentifier( rStm, (SvIdentifier &)r );
- SvPersistStream::WriteCompressed( rStm, r.nValue );
- return rStm;
-}
-
-SvStream& operator >> (SvStream & rStm, SvNumberIdentifier & r )
-{
- rStm >> (SvIdentifier &)r;
- r.nValue = SvPersistStream::ReadCompressed( rStm );
- return rStm;
-}
-
-
bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 836d70f57035..9d0ee8ba1ce9 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -250,42 +250,4 @@ void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
}
}
-void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
- if( !aHelpFileName.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "// class SvMetaModule" ) << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "helpfile(\"" ).WriteCharPtr( aHelpFileName.getString().getStr() ).WriteCharPtr( "\");" ) << endl;
- }
-}
-
-void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- switch ( nT )
- {
- case WRITE_C_SOURCE:
- case WRITE_C_HEADER:
- {
- for( sal_uLong n = 0; n < aClassList.size(); n++ )
- {
- SvMetaClass * pClass = aClassList[n];
- if( !pClass->IsShell() )
- pClass->Write( rBase, rOutStm, nTab, nT, nA );
- }
- }
- break;
-
- default:
- break;
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 15ad67d40686..6af559ca757b 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -233,24 +233,6 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
return true;
}
-void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream &,
- sal_uInt16,
- WriteType nT, WriteAttribute )
-{
- rBase.aIFaceName = GetName().getString();
- switch( nT )
- {
- case WRITE_C_SOURCE:
- case WRITE_C_HEADER:
- {
- OSL_FAIL( "Not supported anymore!" );
- break;
- }
- default:
- break;
- }
-}
-
sal_uInt16 SvMetaClass::WriteSlotParamArray( SvIdlDataBase & rBase,
SvSlotElementList & rSlotList,
SvStream & rOutStm )
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 84afe2dc7ca0..023a92622118 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -485,30 +485,6 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
return bOk;
}
-void SvMetaSlot::Write( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- // no attribute for Automation
- if( !GetAutomation() || !GetExport() )
- return;
-
- if( !(nA & WA_VARIABLE) )
- {
- SvMetaAttributeRef xM = GetMethod();
- if( xM.Is() )
- {
- xM->SetSlotId( GetSlotId() );
- xM->SetDescription( GetDescription().getString() );
- xM->Write( rBase, rOutStm, nTab, nT, nA );
- return;
- }
- }
-
- SvMetaAttribute::Write( rBase, rOutStm, nTab, nT, nA );
-}
-
-
void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix,
SvIdlDataBase& rBase)
{
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index af230a24912a..3f8ab37b28a2 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -204,45 +204,6 @@ void SvMetaAttribute::ReadAttributesSvIdl( SvIdlDataBase & rBase,
}
}
-void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT )
-{
- SvMetaType * pType = GetType();
- DBG_ASSERT( pType, "no type for attribute" );
- SvMetaType * pBaseType = pType->GetBaseType();
- DBG_ASSERT( pBaseType, "no base type for attribute" );
-
- if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- {
- if( pBaseType->GetType() == TYPE_STRUCT )
- {
- const SvMetaAttributeMemberList & rList = pBaseType->GetAttrList();
- sal_uLong nCount = rList.size();
- for( sal_uLong i = 0; i < nCount; i++ )
- {
- rList[i]->WriteParam( rBase, rOutStm, nTab, nT );
- if( i+1<nCount )
- {
- rOutStm.WriteChar( ',' );
- }
- }
- }
- else
- {
- WriteTab( rOutStm, nTab );
- pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
-
- if( !GetName().getString().isEmpty() )
- {
- rOutStm.WriteChar( ' ' );
- rOutStm.WriteCharPtr( GetName().getString().getStr() );
- }
- }
- }
-}
-
sal_uLong SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, bool bVar ) const
{
const SvNumberIdentifier & rId = GetSlotId();
@@ -261,195 +222,6 @@ sal_uLong SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, bool bVar ) con
return n;
}
-void SvMetaAttribute::WriteAttributes( SvIdlDataBase &, SvStream &,
- sal_uInt16,
- WriteType, WriteAttribute )
-{
-}
-
-void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm,
- bool bSet )
-{
- rOutStm << endl;
- SvMetaType * pType = GetType();
- SvMetaType * pBaseType = pType->GetBaseType();
-
- // for Set the return is always void
- bool bVoid = bSet;
- if( pBaseType->GetType() == TYPE_METHOD )
- bVoid = pBaseType->GetReturnType()->GetBaseType()->GetName().getString() == "void";
-
- // emit methods/functions body
- rOutStm.WriteChar( '{' ) << endl;
- WriteTab( rOutStm, 1 );
-
- if( !bVoid )
- {
- if ( pBaseType->GetCName() == "double" )
- {
- rOutStm.WriteCharPtr( "return *(double*)" );
- }
- else
- {
- rOutStm.WriteCharPtr( "return (" );
- pType->WriteTypePrefix( rBase, rOutStm, 2, WRITE_C_SOURCE );
- rOutStm.WriteCharPtr( ") " );
- }
- }
- rOutStm.WriteCharPtr( "pODKCallFunction( " )
- .WriteCharPtr( OString::number(MakeSlotValue(rBase, IsVariable())).getStr() );
- rOutStm.WriteChar( ',' ) << endl;
- WriteTab( rOutStm, 3 );
- rOutStm.WriteCharPtr( " h" ).WriteCharPtr( rBase.aIFaceName.getStr() ).WriteCharPtr( " , " );
-
- OString aParserStr;
- if( pBaseType->GetType() == TYPE_METHOD || bSet )
- aParserStr = pBaseType->GetParserString();
- if( !aParserStr.isEmpty() )
- {
- rOutStm.WriteChar( '\"' );
- rOutStm.WriteCharPtr( aParserStr.getStr() );
- rOutStm.WriteCharPtr( "\", " );
- }
- else
- rOutStm.WriteCharPtr( "NULL, " );
-
- if( pBaseType->GetType() == TYPE_METHOD && !bVoid )
- {
- rOutStm.WriteCharPtr( "'" );
- rOutStm.WriteChar( pBaseType->GetReturnType()->GetBaseType()->GetParserChar() );
- rOutStm.WriteCharPtr( "'" );
- }
- else if ( !bSet )
- {
- rOutStm.WriteCharPtr( "'" );
- rOutStm.WriteChar( pBaseType->GetParserChar() );
- rOutStm.WriteCharPtr( "'" );
- }
- else
- rOutStm.WriteChar( '0' );
-
- if( !aParserStr.isEmpty() )
- {
- rOutStm.WriteCharPtr( ", " );
- if( IsMethod() )
- pBaseType->WriteParamNames( rBase, rOutStm, OString() );
- else if( bSet )
- pBaseType->WriteParamNames( rBase, rOutStm, GetName().getString() );
- }
-
- rOutStm.WriteCharPtr( " );" ) << endl;
- rOutStm.WriteChar( '}' ) << endl;
-}
-
-void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- const SvMetaAttributeMemberList & rList = GetType()->GetBaseType()->GetAttrList();
- sal_uLong nCount = rList.size();
-
- SvNumberIdentifier slotId = rBase.aStructSlotId;
- if ( !GetSlotId().getString().isEmpty() )
- rBase.aStructSlotId = GetSlotId();
-
- // offial hack interface by MM: special controls get passed with the WriteAttribute
- if ( GetReadonly() )
- nA |= WA_READONLY;
-
- for( sal_uLong i = 0; i < nCount; i++ )
- {
- SvMetaAttribute *pAttr = rList[i];
- pAttr->Write( rBase, rOutStm, nTab, nT, nA );
- }
-
- rBase.aStructSlotId = slotId;
-}
-
-void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- // no attributes for automation
- if ( !GetAutomation() || !GetExport() )
- return;
-
- bool bVariable;
- if( nA & WA_VARIABLE )
- bVariable = true;
- else if( nA & WA_METHOD )
- bVariable = false;
- else
- bVariable = IsVariable();
-
- SvMetaType * pType = GetType();
- DBG_ASSERT( pType, "no type for attribute" );
- SvMetaType * pBaseType = pType->GetBaseType();
- DBG_ASSERT( pBaseType, "no base type for attribute" );
- int nBType = pBaseType->GetType();
-
- if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- {
- if( !bVariable && IsMethod() )
- {
- OString name = rBase.aIFaceName + GetName().getString();
- const char * pName = name.getStr();
- WriteTab( rOutStm, nTab );
- pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- rOutStm.WriteChar( ' ' ).WriteCharPtr( pName );
- pType->WriteMethodArgs( rBase, rOutStm, nTab, nT );
- if( nT == WRITE_C_HEADER )
- rOutStm.WriteChar( ';' ) << endl << endl;
- else
- WriteCSource( rBase, rOutStm, false );
- }
- else if ( bVariable && IsVariable() )
- {
- if( nBType == TYPE_STRUCT )
- {
- // for assistance emit the name of the property as acomment
- rOutStm.WriteCharPtr( "/* " ).WriteCharPtr( GetName().getString().getStr() ).WriteCharPtr( " */" ) << endl;
-
- WriteRecursiv_Impl( rBase, rOutStm, nTab, nT, nA );
- }
- else
- {
- OString name = GetName().getString();
-
- bool bReadonly = GetReadonly() || ( nA & WA_READONLY );
- if ( !bReadonly && !IsMethod() )
- {
- // allocation
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "void " );
- rOutStm.WriteCharPtr( rBase.aIFaceName.getStr() )
- .WriteCharPtr( "Set" ).WriteCharPtr( name.getStr() ).WriteCharPtr( "( " ).WriteCharPtr( C_PREF )
- .WriteCharPtr( "Object h" ).WriteCharPtr( rBase.aIFaceName.getStr() ).WriteCharPtr( ", " ) << endl;
- WriteTab( rOutStm, nTab+1 );
- pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- rOutStm.WriteChar( ' ' ).WriteCharPtr( name.getStr() ).WriteCharPtr( " )" );
- if( nT == WRITE_C_HEADER )
- rOutStm.WriteChar( ';' ) << endl << endl;
- else
- WriteCSource( rBase, rOutStm, true );
- }
-
- // access
- WriteTab( rOutStm, nTab );
- pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- rOutStm.WriteChar( ' ' );
- rOutStm.WriteCharPtr( rBase.aIFaceName.getStr() )
- .WriteCharPtr( "Get" ).WriteCharPtr( name.getStr() ).WriteCharPtr( "( " ).WriteCharPtr( C_PREF )
- .WriteCharPtr( "Object h" ).WriteCharPtr( rBase.aIFaceName.getStr() ).WriteCharPtr( " )" );
- if( nT == WRITE_C_HEADER )
- rOutStm.WriteChar( ';' ) << endl << endl;
- else
- WriteCSource( rBase, rOutStm, false );
- }
- }
- }
-}
-
sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray )
{
SvMetaType * pType = GetType();
@@ -776,103 +548,6 @@ bool SvMetaType::ReadSvIdl( SvIdlDataBase & rBase,
return false;
}
-void SvMetaType::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- if( GetAttrCount() )
- {
- SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
- while( it != pAttrList->end() )
- {
- SvMetaAttribute * pAttr = *it;
- pAttr->Write( rBase, rOutStm, nTab, nT, nA );
- if( GetType() == TYPE_METHOD )
- rOutStm.WriteChar( ',' ) << endl;
- else
- rOutStm.WriteChar( ';' ) << endl;
- ++it;
- }
- }
-}
-
-void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- if( nT == WRITE_C_HEADER && nType != TYPE_ENUM )
- // write only enum
- return;
-
- OString name = GetName().getString();
- if( nT == WRITE_C_HEADER )
- {
- switch( nType )
- {
- case TYPE_CLASS:
- {
- }
- break;
- case TYPE_STRUCT:
- case TYPE_UNION:
- case TYPE_ENUM:
- {
- WriteStars( rOutStm );
- if( nType == TYPE_STRUCT || nType == TYPE_UNION )
- nA = WA_STRUCT;
-
- if( nT == WRITE_C_HEADER)
- {
- if ( nT == WRITE_C_HEADER )
- {
- OString aStr = name.toAsciiUpperCase();
- rOutStm.WriteCharPtr( "#ifndef " ).WriteCharPtr( C_PREF ).WriteCharPtr( aStr.getStr() ).WriteCharPtr( "_DEF " ) << endl;
- rOutStm.WriteCharPtr( "#define " ).WriteCharPtr( C_PREF ).WriteCharPtr( aStr.getStr() ).WriteCharPtr( "_DEF " ) << endl;
- }
-
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "typedef" ) << endl;
- }
- WriteTab( rOutStm, nTab );
- if( nType == TYPE_STRUCT )
- rOutStm.WriteCharPtr( "struct" );
- else if( nType == TYPE_UNION )
- rOutStm.WriteCharPtr( "union" );
- else
- rOutStm.WriteCharPtr( "enum" );
- if( nT != WRITE_C_HEADER)
- rOutStm.WriteChar( ' ' ).WriteCharPtr( name.getStr() );
-
- rOutStm << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '{' ) << endl;
- WriteContext( rBase, rOutStm, nTab +1, nT, nA );
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '}' );
- if( nT == WRITE_C_HEADER )
- {
- rOutStm.WriteChar( ' ' ).WriteCharPtr( C_PREF ).WriteCharPtr( name.getStr() );
- }
- rOutStm.WriteChar( ';' ) << endl;
-
- if ( nT == WRITE_C_HEADER )
- rOutStm.WriteCharPtr( "#endif" );
- rOutStm << endl;
- }
- break;
- case TYPE_POINTER:
- case TYPE_BASE:
- {
- }
- break;
- case TYPE_METHOD:
- {
- }
- break;
- }
- }
-}
-
bool SvMetaType::ReadNamesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -901,13 +576,6 @@ void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase,
}
}
-void SvMetaType::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- SvMetaExtern::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
-}
-
sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
{
sal_uLong nC = 0;
@@ -1013,110 +681,6 @@ bool SvMetaType::ReadMethodArgs( SvIdlDataBase & rBase,
return false;
}
-void SvMetaType::WriteMethodArgs
-(
- SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab, WriteType nT
-)
-{
- rOutStm.WriteChar( '(' );
- if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- {
- rOutStm.WriteChar( ' ' ).WriteCharPtr( C_PREF ).WriteCharPtr( "Object h" ).WriteCharPtr( rBase.aIFaceName.getStr() );
- if( GetAttrCount() )
- rOutStm.WriteChar( ',' );
- else
- rOutStm.WriteChar( ' ' );
- }
-
- if( GetAttrCount() )
- {
- rOutStm << endl;
- SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
- while( it != pAttrList->end() )
- {
- SvMetaAttribute* pAttr = *it;
- switch( nT )
- {
- case WRITE_C_HEADER:
- case WRITE_C_SOURCE:
- {
- pAttr->WriteParam( rBase, rOutStm, nTab +1, nT );
- }
- break;
-
- default:
- {
- DBG_ASSERT( false, "WriteType not implemented" );
- }
- }
- ++it;
- if( it != pAttrList->end() )
- rOutStm.WriteChar( ',' ) << endl;
- }
- if( nT != WRITE_C_HEADER && nT != WRITE_C_SOURCE )
- {
- rOutStm << endl;
- WriteTab( rOutStm, nTab +1 );
- }
- rOutStm.WriteChar( ' ' );
- }
- rOutStm.WriteChar( ')' );
-}
-
-void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab, WriteType nT )
-{
- switch( nT )
- {
- case WRITE_C_HEADER:
- case WRITE_C_SOURCE:
- {
-
- SvMetaType * pBaseType = GetBaseType();
- DBG_ASSERT( pBaseType, "no base type for attribute" );
-
- if( pBaseType->GetType() == TYPE_METHOD )
- pBaseType->GetReturnType()->WriteTypePrefix(
- rBase, rOutStm, nTab, nT );
- else if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- {
- if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm.WriteCharPtr( C_PREF ).WriteCharPtr( pBaseType->GetName().getString().getStr() )
- .WriteCharPtr( " *" );
- else
- {
- if ( pBaseType->GetType() == TYPE_ENUM )
- rOutStm.WriteCharPtr( C_PREF );
- rOutStm.WriteCharPtr( pBaseType->GetCName().getStr() );
- }
- }
- else
- {
- if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm.WriteCharPtr( pBaseType->GetName().getString().getStr() ).WriteCharPtr( " *" );
- else
- rOutStm.WriteCharPtr( pBaseType->GetName().getString().getStr() );
- }
- }
- break;
-
- default:
- {
- DBG_ASSERT( false, "WriteType not implemented" );
- }
- }
-}
-
-void SvMetaType::WriteTheType( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab, WriteType nT )
-{
- WriteTypePrefix( rBase, rOutStm, nTab, nT );
- if( GetType() == TYPE_METHOD )
- WriteMethodArgs( rBase, rOutStm, nTab +2, nT );
-}
-
OString SvMetaType::GetParserString() const
{
SvMetaType * pBT = GetBaseType();
@@ -1141,35 +705,6 @@ OString SvMetaType::GetParserString() const
return aPStr;
}
-void SvMetaType::WriteParamNames( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- const OString& rChief )
-{
- SvMetaType * pBT = GetBaseType();
- if( pBT != this )
- pBT->WriteParamNames( rBase, rOutStm, rChief );
- else
- {
- int type = GetType();
-
- if( TYPE_METHOD == type || TYPE_STRUCT == type )
- {
- sal_uLong nAttrCount = GetAttrCount();
- // write the single attributes
- for( sal_uLong n = 0; n < nAttrCount; n++ )
- {
- SvMetaAttribute * pA = (*pAttrList)[n];
- OString aStr = pA->GetName().getString();
- pA->GetType()->WriteParamNames( rBase, rOutStm, aStr );
- if( n +1 < nAttrCount )
- rOutStm.WriteCharPtr( ", " );
- }
- }
- else
- rOutStm.WriteCharPtr( rChief.getStr() );
- }
-}
-
TYPEINIT1( SvMetaTypeString, SvMetaType );
SvMetaTypeString::SvMetaTypeString()
: SvMetaType( "String", "SbxSTRING", "BSTR", 's', "char *", "String", "$" )
@@ -1189,15 +724,6 @@ bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
return true;
}
-void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16,
- WriteType nT, WriteAttribute )
-{
- if ( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- rOutStm.WriteCharPtr( C_PREF ).WriteCharPtr( GetName().getString().getStr() );
- else
- rOutStm.WriteCharPtr( GetName().getString().getStr() );
-}
-
TYPEINIT1( SvMetaTypeEnum, SvMetaType );
SvMetaTypeEnum::SvMetaTypeEnum()
{
@@ -1258,38 +784,6 @@ bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase,
return false;
}
-void SvMetaTypeEnum::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- SvMetaType::Write( rBase, rOutStm, nTab, nT, nA );
-}
-
-void SvMetaTypeEnum::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
-{
- WriteTab( rOutStm, nTab +1 );
- for( sal_uLong n = 0; n < aEnumValueList.size(); n++ )
- {
- aEnumValueList[n]->Write( rBase, rOutStm, nTab +1, nT, nA );
-
- if( n + 1 != aEnumValueList.size() )
- {
- if( 2 == n % 3 )
- {
- rOutStm.WriteChar( ',' ) << endl;
- WriteTab( rOutStm, nTab +1 );
- }
- else
- rOutStm.WriteCharPtr( ",\t" );
- }
- else
- rOutStm << endl;
- }
- rOutStm << endl;
-}
-
TYPEINIT1( SvMetaTypevoid, SvMetaType );
SvMetaTypevoid::SvMetaTypevoid()
: SvMetaType( "void", "SbxVOID", "void", 'v', "void", "", "" )