Kaydet (Commit) 5a0fd87d authored tarafından Caolán McNamara's avatar Caolán McNamara

remove WriteSrc, WriteCxx and WriteHxx

I can't see that WriteSrc, WriteCxx WriteHxx are anything other than unused
archaic remnants of the past.
üst 9cd7d08b
......@@ -89,9 +89,6 @@ public:
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 );
virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
};
SV_DECL_IMPL_REF(SvMetaObject)
SV_DECL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
......
......@@ -97,11 +97,6 @@ public:
virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
Table* pTable );
virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table *pIdTable );
virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
};
SV_DECL_IMPL_REF(SvMetaModule)
SV_DECL_IMPL_PERSIST_LIST(SvMetaModule,SvMetaModule *)
......
......@@ -141,10 +141,6 @@ public:
virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
Table* pTable );
virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pTable );
virtual void WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
virtual void WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
};
SV_IMPL_REF(SvMetaClass)
SV_IMPL_PERSIST_LIST(SvMetaClass,SvMetaClass *)
......
......@@ -261,8 +261,6 @@ public:
SvStream & rOutStm );
virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pIdTable );
virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pIdTable );
virtual void WriteCSV( SvIdlDataBase&, SvStream& );
};
SV_DECL_IMPL_REF(SvMetaSlot)
......
......@@ -119,8 +119,6 @@ public:
SvIdlDataBase& );
virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pIdTable );
virtual void WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pIdTable );
virtual void WriteCSV( SvIdlDataBase&, SvStream& );
void FillIDTable(Table *pIDTable);
rtl::OString Compare( SvMetaAttribute *pAttr );
......
......@@ -119,14 +119,6 @@ void SvMetaObject::Write( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */,
{
}
void SvMetaObject::WriteCxx( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ )
{
}
void SvMetaObject::WriteHxx( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ )
{
}
SV_IMPL_META_FACTORY1( SvMetaName, SvMetaObject );
SvMetaName::SvMetaName()
{
......
......@@ -507,35 +507,4 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
}
}
void SvMetaModule::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pTable )
{
if( !aSlotIdFile.getString().isEmpty() )
rOutStm << "//#include <" << aSlotIdFile.getString().getStr() << '>' << endl;
for( sal_uLong n = 0; n < aClassList.Count(); n++ )
{
aClassList.GetObject( n )->WriteSrc( rBase, rOutStm, pTable );
}
}
void SvMetaModule::WriteHxx( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab )
{
for( sal_uLong n = 0; n < aClassList.Count(); n++ )
{
SvMetaClass * pClass = aClassList.GetObject( n );
pClass->WriteHxx( rBase, rOutStm, nTab );
}
}
void SvMetaModule::WriteCxx( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab )
{
for( sal_uLong n = 0; n < aClassList.Count(); n++ )
{
SvMetaClass * pClass = aClassList.GetObject( n );
pClass->WriteCxx( rBase, rOutStm, nTab );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -661,91 +661,4 @@ void SvMetaClass::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
}
}
void SvMetaClass::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pTable )
{
for( sal_uLong n=0; n<aAttrList.Count(); n++ )
{
SvMetaAttribute * pAttr = aAttrList.GetObject( n );
pAttr->WriteSrc( rBase, rOutStm, pTable );
}
}
void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
{
rtl::OString aSuperName(RTL_CONSTASCII_STRINGPARAM("SvDispatch"));
if( GetSuperClass() )
aSuperName = GetSuperClass()->GetName().getString();
const char * pSup = aSuperName.getStr();
rOutStm
<< "class " << GetSvName().getStr()
<< ": public " << pSup << endl
<< '{' << endl
<< "protected:" << endl
<< "\tvirtual SvGlobalName GetTypeName() const;" << endl
<< "\tvirtual sal_Bool FillTypeLibInfo( SvGlobalName *, sal_uInt16 * pMajor," << endl
<< "\t sal_uInt16 * pMinor ) const;" << endl
<< "\tvirtual sal_Bool FillTypeLibInfo( ByteString * pName, sal_uInt16 * pMajor," << endl;
rOutStm
<< "\t sal_uInt16 * pMinor ) const;" << endl
<< "\tvirtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) = 0;" << endl
<< "public:" << endl
<< "\t static SvGlobalName ClassName()" << endl
<< "\t { return SvGlobalName( " << rtl::OUStringToOString(GetUUId().GetctorName(), RTL_TEXTENCODING_UTF8).getStr() << " ); }" << endl
<< "};" << endl;
}
void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
{
rtl::OString aSuperName(RTL_CONSTASCII_STRINGPARAM("SvDispatch"));
if( GetSuperClass() )
aSuperName = GetSuperClass()->GetName().getString();
const char * pSup = aSuperName.getStr();
rtl::OString name = GetSvName();
// GetTypeName
rOutStm << "SvGlobalName " << name.getStr() << "::GetTypeName() const" << endl
<< '{' << endl
<< "\treturn ClassName();" << endl
<< '}' << endl;
SvMetaModule * pMod = GetModule();
// FillTypeLibInfo
rOutStm << "sal_Bool " << name.getStr() << "::FillTypeLibInfo( SvGlobalName * pGN," << endl
<< "\t sal_uInt16 * pMajor," << endl
<< "\t sal_uInt16 * pMinor ) const" << endl
<< '{' << endl
<< "\tSvGlobalName aN( " << rtl::OUStringToOString(pMod->GetUUId().GetctorName(), RTL_TEXTENCODING_UTF8).getStr() << " );" << endl;
rOutStm << "\t*pGN = aN;" << endl
<< "\t*pMajor = "
<< rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMajorVersion())).getStr()
<< ';' << endl
<< "\t*pMinor = "
<< rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMinorVersion())).getStr()
<< ';' << endl
<< "\treturn sal_True;" << endl
<< '}' << endl;
// FillTypeLibInfo
rOutStm << "sal_Bool " << name.getStr() << "::FillTypeLibInfo( ByteString * pName,"
<< "\t sal_uInt16 * pMajor," << endl
<< "\t sal_uInt16 * pMinor ) const" << endl;
rOutStm << '{' << endl
<< "\t*pName = \"" << pMod->GetTypeLibFileName().getStr() << "\";" << endl
<< "\t*pMajor = "
<< rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMajorVersion())).getStr()
<< ';' << endl
<< "\t*pMinor = "
<< rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMinorVersion())).getStr()
<< ';' << endl
<< "\treturn sal_True;" << endl
<< '}' << endl;
rOutStm << "void " << name.getStr() << "::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )" << endl
<< '{' << endl
<< "\t" << pSup << "::Notify( rBC, rHint );" << endl
<< '}' << endl;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -1495,83 +1495,6 @@ sal_uInt16 SvMetaSlot::WriteSlotMap( const rtl::OString& rShellName, sal_uInt16
return nSCount;
}
void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pTable )
{
if (!GetToolBoxConfig() && !GetAccelConfig() && !GetMenuConfig() && !GetStatusBarConfig() )
return;
sal_uLong nSId = GetSlotId().GetValue();
if( !pTable->IsKeyValid( nSId ) )
{
pTable->Insert( nSId, this );
rOutStm << "SfxSlotInfo "
<< rtl::OString::valueOf(static_cast<sal_Int32>(nSId)).getStr()
<< endl << '{' << endl;
WriteTab( rOutStm, 1 );
rtl::OString aStr = GetConfigName().getString();
if( aStr.isEmpty() )
aStr = GetName().getString();
rOutStm << "SlotName = \"" << aStr.getStr() << "\";" << endl;
aStr = GetHelpText().getString();
if( !aStr.isEmpty() )
{
WriteTab( rOutStm, 1 );
rOutStm << "HelpText = \"" << aStr.getStr() << "\";" << endl;
}
rOutStm << "};" << endl;
}
SvMetaTypeEnum * pEnum = PTR_CAST( SvMetaTypeEnum, GetType() );
if( GetPseudoSlots() && pEnum )
{
for( sal_uLong n = 0; n < pEnum->Count(); n++ )
{
rtl::OString aValName = pEnum->GetObject( n )->GetName().getString();
rtl::OStringBuffer aBuf;
if( !GetPseudoPrefix().isEmpty() )
aBuf.append(GetPseudoPrefix());
else
aBuf.append(GetSlotId().getString());
aBuf.append('_');
aBuf.append(aValName.copy(pEnum->GetPrefix().getLength()));
rtl::OString aSId = aBuf.makeStringAndClear();
sal_uLong nSId2;
sal_Bool bIdOk = sal_False;
if( rBase.FindId( aSId, &nSId2 ) )
{
aSId = rtl::OString::valueOf(static_cast<sal_Int32>(nSId2));
bIdOk = sal_True;
}
// if id not found, write always
if( !bIdOk || !pTable->IsKeyValid( nSId2 ) )
{
pTable->Insert( nSId2, this );
rOutStm << "SfxSlotInfo " << aSId.getStr()
<< endl << '{' << endl;
WriteTab( rOutStm, 1 );
rOutStm << "SlotName = \"" << aValName.getStr() << "\";" << endl;
rtl::OString aStr = GetHelpText().getString();
if (!aStr.isEmpty())
{
WriteTab( rOutStm, 1 );
rOutStm << "HelpText = \"" << aStr.getStr() << "\";" << endl;
}
rOutStm << "};" << endl;
}
}
}
}
void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
Table * pTable )
{
......
......@@ -740,10 +740,6 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const rtl::OString&, SvIdlData
{
}
void SvMetaAttribute::WriteSrc( SvIdlDataBase &, SvStream &, Table * )
{
}
void SvMetaAttribute::WriteHelpId( SvIdlDataBase &, SvStream &, Table * )
{
}
......
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