summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-16 12:40:11 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-22 22:00:39 +0000
commitd803483f6a5938b0d0708b8db74b30c511dd8e31 (patch)
tree6f75da8815e03744e6ff94f3502a93c896e07bf0 /idl
parentdd34ecba1048549d122a759cd5c7f743f5899d73 (diff)
convert more SvStream::operator<< calls
.. to more explicit SvStream::Write* calls This was done using another run of the clang rewriter, and then a lot of hand tweaking to fix all the places where the rewriter did not play nice with various macros. Change-Id: I7bcab93851c8dfb59cde6bc76290c6484d88fb18 Reviewed-on: https://gerrit.libreoffice.org/7494 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'idl')
-rw-r--r--idl/source/objects/basobj.cxx71
-rw-r--r--idl/source/objects/bastype.cxx36
-rw-r--r--idl/source/objects/module.cxx58
-rw-r--r--idl/source/objects/object.cxx73
-rw-r--r--idl/source/objects/slot.cxx348
-rw-r--r--idl/source/objects/types.cxx357
-rw-r--r--idl/source/prj/database.cxx28
7 files changed, 489 insertions, 482 deletions
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index c305b517c11c..8ca2ca85501e 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -44,15 +44,15 @@ void SvMetaObject::Save( SvPersistStream & )
void SvMetaObject::WriteTab( SvStream & rOutStm, sal_uInt16 nTab )
{
while( nTab-- )
- rOutStm << " ";
+ rOutStm.WriteCharPtr( " " );
}
void SvMetaObject::WriteStars( SvStream & rOutStm )
{
- rOutStm << '/';
+ rOutStm.WriteChar( '/' );
for( int i = 6; i > 0; i-- )
- rOutStm << "**********";
- rOutStm << '/' << endl;
+ rOutStm.WriteCharPtr( "**********" );
+ rOutStm.WriteChar( '/' ) << endl;
}
sal_Bool SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, sal_uLong nBegPos )
@@ -144,7 +144,7 @@ void SvMetaName::Save( SvPersistStream & rStm )
if( aConfigName.IsSet() ) nMask |= 0x08;
if( aDescription.IsSet() ) nMask |= 0x10;
- rStm << nMask;
+ rStm.WriteUChar( nMask );
if( nMask & 0x01 ) WriteSvString( rStm, aName );
if( nMask & 0x02 ) WriteSvNumberIdentifier( rStm, aHelpContext );
if( nMask & 0x04 ) WriteSvString( rStm, aHelpText );
@@ -219,18 +219,19 @@ void SvMetaName::WriteContextSvIdl( SvIdlDataBase &, SvStream &, sal_uInt16 )
void SvMetaName::WriteDescription( SvStream & rOutStm )
{
- rOutStm << "<DESCRIPTION>" << endl;
+ rOutStm.WriteCharPtr( "<DESCRIPTION>" ) << endl;
OString aDesc( GetDescription().getString() );
sal_Int32 nPos = aDesc.indexOf('\n');
while ( nPos != -1 )
{
- rOutStm << aDesc.copy( 0, nPos ).getStr() << endl;
+ rOutStm.WriteCharPtr( aDesc.copy( 0, nPos ).getStr() ) << endl;
aDesc = aDesc.copy(nPos+1);
nPos = aDesc.indexOf('\n');
}
- rOutStm << aDesc.getStr() << endl << "</DESCRIPTION>" << endl;
+ rOutStm.WriteCharPtr( aDesc.getStr() ) << endl;
+ rOutStm.WriteCharPtr( "</DESCRIPTION>" ) << endl;
}
void SvMetaName::WriteAttributesSvIdl( SvIdlDataBase & rBase,
@@ -240,25 +241,25 @@ void SvMetaName::WriteAttributesSvIdl( SvIdlDataBase & rBase,
if( aHelpContext.IsSet() || aHelpText.IsSet() || aConfigName.IsSet() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "// class SvMetaName" << endl;
+ rOutStm.WriteCharPtr( "// class SvMetaName" ) << endl;
}
if( aHelpContext.IsSet() )
{
WriteTab( rOutStm, nTab );
aHelpContext.WriteSvIdl( SvHash_HelpContext(), rOutStm, nTab );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( aHelpText.IsSet() )
{
WriteTab( rOutStm, nTab );
aHelpText.WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( aConfigName.IsSet() )
{
WriteTab( rOutStm, nTab );
aConfigName.WriteSvIdl( SvHash_ConfigName(), rOutStm, nTab );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
}
@@ -297,7 +298,7 @@ void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
{
sal_uLong nBeginPos = rOutStm.Tell();
WriteTab( rOutStm, nTab );
- rOutStm << '[' << endl;
+ rOutStm.WriteChar( '[' ) << endl;
sal_uLong nOldPos = rOutStm.Tell();
WriteAttributesSvIdl( rBase, rOutStm, nTab +1 );
@@ -308,13 +309,13 @@ void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
WriteTab( rOutStm, nTab );
- rOutStm << ']';
+ rOutStm.WriteChar( ']' );
nBeginPos = rOutStm.Tell();
rOutStm << endl;
}
WriteTab( rOutStm, nTab );
- rOutStm << '{' << endl;
+ rOutStm.WriteChar( '{' ) << endl;
nOldPos = rOutStm.Tell();
WriteContextSvIdl( rBase, rOutStm, nTab +1 );
@@ -325,7 +326,7 @@ void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
WriteTab( rOutStm, nTab );
- rOutStm << '}';
+ rOutStm.WriteChar( '}' );
}
}
@@ -335,7 +336,7 @@ void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
sal_uLong nBeginPos = rOutStm.Tell();
WriteTab( rOutStm, nTab );
- rOutStm << '[' << endl;
+ rOutStm.WriteChar( '[' ) << endl;
sal_uLong nOldPos = rOutStm.Tell();
WriteAttributes( rBase, rOutStm, nTab +1, nT, nA );
@@ -357,7 +358,7 @@ void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
rOutStm.Seek( nPos );
WriteTab( rOutStm, nTab );
- rOutStm << ']' << endl;
+ rOutStm.WriteChar( ']' ) << endl;
}
}
@@ -368,19 +369,19 @@ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm,
if( GetHelpText().IsSet() || GetHelpContext().IsSet() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "// class SvMetaName" << endl;
+ rOutStm.WriteCharPtr( "// class SvMetaName" ) << endl;
}
if( GetHelpText().IsSet() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "helpstring(\"" << GetHelpText().getString().getStr() << "\")," << endl;
+ rOutStm.WriteCharPtr( "helpstring(\"" ).WriteCharPtr( GetHelpText().getString().getStr() ).WriteCharPtr( "\")," ) << endl;
}
if( GetHelpContext().IsSet() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "helpcontext("
- << OString::number(GetHelpContext().GetValue()).getStr()
- << ")," << endl;
+ rOutStm.WriteCharPtr( "helpcontext(" )
+ .WriteCharPtr( OString::number(GetHelpContext().GetValue()).getStr() )
+ .WriteCharPtr( ")," ) << endl;
}
}
@@ -426,7 +427,7 @@ void SvMetaReference::Save( SvPersistStream & rStm )
nMask |= 0x01;
// write data
- rStm << nMask;
+ rStm.WriteUChar( nMask );
if( nMask & 0x01 ) WriteSvPersistBase( rStm, aRef );
}
@@ -471,7 +472,7 @@ void SvMetaExtern::Save( SvPersistStream & rStm )
if( bReadVersion ) nMask |= 0x10;
// write data
- rStm << nMask;
+ rStm.WriteUChar( nMask );
if( nMask & 0x01 ) WriteSvPersistBase( rStm, pModule );
if( nMask & 0x02 ) WriteSvGlobalName( rStm, aUUId );
if( nMask & 0x04 ) WriteSvVersion( rStm, aVersion );
@@ -512,19 +513,19 @@ void SvMetaExtern::WriteAttributesSvIdl( SvIdlDataBase & rBase,
if( bReadUUId || bReadVersion )
{
WriteTab( rOutStm, nTab );
- rOutStm << "// class SvMetaExtern" << endl;
+ rOutStm.WriteCharPtr( "// class SvMetaExtern" ) << endl;
if( bReadUUId )
{
WriteTab( rOutStm, nTab );
aUUId.WriteSvIdl( rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( bReadVersion )
{
WriteTab( rOutStm, nTab );
aVersion.WriteSvIdl( rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
}
}
@@ -556,15 +557,15 @@ void SvMetaExtern::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm,
SvMetaReference::WriteAttributes( rBase, rOutStm, nTab, nT, nA );
WriteTab( rOutStm, nTab );
- rOutStm << "// class SvMetaExtern" << endl;
+ rOutStm.WriteCharPtr( "// class SvMetaExtern" ) << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "uuid(" << OUStringToOString(GetUUId().GetHexName(), RTL_TEXTENCODING_UTF8).getStr() << ")," << endl;
+ rOutStm.WriteCharPtr( "uuid(" ).WriteCharPtr( OUStringToOString(GetUUId().GetHexName(), RTL_TEXTENCODING_UTF8).getStr() ).WriteCharPtr( ")," ) << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "version("
- << OString::number(aVersion.GetMajorVersion()).getStr()
- << '.'
- << OString::number(aVersion.GetMinorVersion()).getStr()
- << ")," << endl;
+ 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 bccb4e64567a..7f517e7f4632 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -71,7 +71,7 @@ SvStream& WriteSvBOOL(SvStream & rStm, const SvBOOL & rb )
sal_uInt8 n = rb.nVal;
if( rb.bSet )
n |= 0x02;
- rStm << n;
+ rStm.WriteUChar( n );
return rStm;
}
SvStream& operator >> (SvStream & rStm, SvBOOL & rb )
@@ -98,13 +98,13 @@ SvStream& WriteSvVersion(SvStream & rStm, const SvVersion & r )
int n = r.GetMajorVersion() << 4;
n |= r.GetMinorVersion();
- rStm << (sal_uInt8)n;
+ rStm.WriteUChar( (sal_uInt8)n );
}
else
{
- rStm << (sal_uInt8)0;
- rStm << r.GetMajorVersion();
- rStm << r.GetMinorVersion();
+ rStm.WriteUChar( (sal_uInt8)0 );
+ rStm.WriteUInt16( r.GetMajorVersion() );
+ rStm.WriteUInt16( r.GetMinorVersion() );
}
return rStm;
}
@@ -160,9 +160,9 @@ sal_Bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
sal_Bool SvBOOL::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm )
{
if( nVal )
- rOutStm << pName->GetName().getStr();
+ rOutStm.WriteCharPtr( pName->GetName().getStr() );
else
- rOutStm << pName->GetName().getStr() << "(FALSE)";
+ rOutStm.WriteCharPtr( pName->GetName().getStr() ).WriteCharPtr( "(FALSE)" );
return sal_True;
}
@@ -207,8 +207,8 @@ sal_Bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName,
SvStream & rOutStm,
sal_uInt16 /*nTab */ )
{
- rOutStm << pName->GetName().getStr() << '(';
- rOutStm << getString().getStr() << ')';
+ rOutStm.WriteCharPtr( pName->GetName().getStr() ).WriteChar( '(' );
+ rOutStm.WriteCharPtr( getString().getStr() ).WriteChar( ')' );
return sal_True;
}
@@ -320,8 +320,8 @@ sal_Bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm
sal_Bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
sal_uInt16 /*nTab */ )
{
- rOutStm << pName->GetName().getStr() << "(\"";
- rOutStm << m_aStr.getStr() << "\")";
+ rOutStm.WriteCharPtr( pName->GetName().getStr() ).WriteCharPtr( "(\"" );
+ rOutStm.WriteCharPtr( m_aStr.getStr() ).WriteCharPtr( "\")" );
return sal_True;
}
@@ -378,8 +378,8 @@ sal_Bool SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
sal_Bool SvUUId::WriteSvIdl( SvStream & rOutStm )
{
// write global id
- rOutStm << SvHash_uuid()->GetName().getStr() << "(\"";
- rOutStm << OUStringToOString(GetHexName(), RTL_TEXTENCODING_UTF8).getStr() << "\")";
+ rOutStm.WriteCharPtr( SvHash_uuid()->GetName().getStr() ).WriteCharPtr( "(\"" );
+ rOutStm.WriteCharPtr( OUStringToOString(GetHexName(), RTL_TEXTENCODING_UTF8).getStr() ).WriteCharPtr( "\")" );
return sal_True;
}
@@ -410,11 +410,11 @@ sal_Bool SvVersion::ReadSvIdl( SvTokenStream & rInStm )
sal_Bool SvVersion::WriteSvIdl( SvStream & rOutStm )
{
- rOutStm << SvHash_Version()->GetName().getStr() << '('
- << OString::number(nMajorVersion).getStr()
- << '.'
- << OString::number(nMinorVersion).getStr()
- << ')';
+ rOutStm.WriteCharPtr( SvHash_Version()->GetName().getStr() ).WriteChar( '(' )
+ .WriteCharPtr( OString::number(nMajorVersion).getStr() )
+ .WriteChar( '.' )
+ .WriteCharPtr( OString::number(nMinorVersion).getStr() )
+ .WriteChar( ')' );
return sal_True;
}
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 2bd822db0a2d..ac9aed0930f9 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -75,7 +75,7 @@ void SvMetaModule::Save( SvPersistStream & rStm )
{
SvMetaExtern::Save( rStm );
- rStm << (sal_uInt16)(MODULE_VER | IDL_WRITE_COMPILER); // Version
+ rStm.WriteUInt16( (sal_uInt16)(MODULE_VER | IDL_WRITE_COMPILER) ); // Version
WriteSvDeclPersistList( rStm, aClassList );
WriteSvDeclPersistList( rStm, aTypeList );
@@ -89,14 +89,14 @@ void SvMetaModule::Save( SvPersistStream & rStm )
// write compiler data
sal_uInt16 nCmpLen = 0;
sal_uLong nLenPos = rStm.Tell();
- rStm << nCmpLen;
+ rStm.WriteUInt16( nCmpLen );
WriteSvGlobalName( rStm, aBeginName );
WriteSvGlobalName( rStm, aEndName );
WriteSvGlobalName( rStm, aNextName );
// write length of compiler data
sal_uLong nPos = rStm.Tell();
rStm.Seek( nLenPos );
- rStm << (sal_uInt16)( nPos - nLenPos - sizeof( sal_uInt16 ) );
+ rStm.WriteUInt16( (sal_uInt16)( nPos - nLenPos - sizeof( sal_uInt16 ) ) );
rStm.Seek( nPos );
}
@@ -157,19 +157,19 @@ void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase,
{
WriteTab( rOutStm, nTab );
aHelpFileName.WriteSvIdl( SvHash_HelpFile(), rOutStm, nTab +1 );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aSlotIdFile.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aSlotIdFile.WriteSvIdl( SvHash_SlotIdFile(), rOutStm, nTab +1 );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aTypeLibFile.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aTypeLibFile.WriteSvIdl( SvHash_TypeLibFile(), rOutStm, nTab +1 );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
}
}
@@ -356,12 +356,13 @@ sal_Bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm
void SvMetaModule::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab )
{
- rOutStm << SvHash_module()->GetName().getStr() << endl
- << '\"';
+ rOutStm.WriteCharPtr( SvHash_module()->GetName().getStr() ) << endl;
+ rOutStm.WriteChar( '\"' );
rOutStm.WriteUniOrByteString( aBeginName.GetHexName(), rOutStm.GetStreamCharSet() );
- rOutStm << '\"' << endl << '\"';
+ rOutStm.WriteChar( '\"' ) << endl;
+ rOutStm.WriteChar( '\"' );
rOutStm.WriteUniOrByteString( aEndName.GetHexName(), rOutStm.GetStreamCharSet() );
- rOutStm << '\"' << endl;
+ rOutStm.WriteChar( '\"' ) << endl;
SvMetaExtern::WriteSvIdl( rBase, rOutStm, nTab );
}
@@ -393,9 +394,9 @@ void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase,
if( !aHelpFileName.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "// class SvMetaModule" << endl;
+ rOutStm.WriteCharPtr( "// class SvMetaModule" ) << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "helpfile(\"" << aHelpFileName.getString().getStr() << "\");" << endl;
+ rOutStm.WriteCharPtr( "helpfile(\"" ).WriteCharPtr( aHelpFileName.getString().getStr() ).WriteCharPtr( "\");" ) << endl;
}
}
@@ -410,16 +411,16 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( !aSlotIdFile.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
- rOutStm << "#include \"" << aSlotIdFile.getString().getStr() << '"' << endl << endl;
+ rOutStm.WriteCharPtr( "#include \"" ).WriteCharPtr( aSlotIdFile.getString().getStr() ).WriteChar( '"' ) << endl << endl;
}
SvMetaExtern::Write( rBase, rOutStm, nTab, nT, nA );
rOutStm << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "library " << GetName().getString().getStr() << endl;
+ rOutStm.WriteCharPtr( "library " ).WriteCharPtr( GetName().getString().getStr() ) << endl;
WriteTab( rOutStm, nTab );
- rOutStm << '{' << endl;
+ rOutStm.WriteChar( '{' ) << endl;
WriteTab( rOutStm, nTab );
- rOutStm << "importlib(\"STDOLE.TLB\");" << endl;
+ rOutStm.WriteCharPtr( "importlib(\"STDOLE.TLB\");" ) << endl;
for( sal_uLong n = 0; n < aClassList.size(); n++ )
{
@@ -434,49 +435,50 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
}
}
- rOutStm << '}' << endl;
+ rOutStm.WriteChar( '}' ) << endl;
}
break;
case WRITE_DOCU:
{
- rOutStm << "SvIDL interface documentation" << endl << endl;
- rOutStm << "<MODULE>" << endl << GetName().getString().getStr() << endl;
+ rOutStm.WriteCharPtr( "SvIDL interface documentation" ) << endl << endl;
+ rOutStm.WriteCharPtr( "<MODULE>" ) << endl;
+ rOutStm.WriteCharPtr( GetName().getString().getStr() ) << endl;
WriteDescription( rOutStm );
- rOutStm << "</MODULE>" << endl << endl;
+ rOutStm.WriteCharPtr( "</MODULE>" ) << endl << endl;
- rOutStm << "<CLASSES>" << endl;
+ rOutStm.WriteCharPtr( "<CLASSES>" ) << endl;
for( sal_uLong n = 0; n < aClassList.size(); n++ )
{
SvMetaClass * pClass = aClassList[n];
if( !pClass->IsShell() )
{
- rOutStm << pClass->GetName().getString().getStr();
+ rOutStm.WriteCharPtr( pClass->GetName().getString().getStr() );
SvMetaClass* pSC = pClass->GetSuperClass();
if( pSC )
- rOutStm << " : " << pSC->GetName().getString().getStr();
+ rOutStm.WriteCharPtr( " : " ).WriteCharPtr( pSC->GetName().getString().getStr() );
// imported classes
const SvClassElementMemberList& rClassList = pClass->GetClassList();
if ( !rClassList.empty() )
{
- rOutStm << " ( ";
+ rOutStm.WriteCharPtr( " ( " );
for( sal_uLong m=0; m<rClassList.size(); ++m )
{
SvClassElement *pEle = rClassList[m];
SvMetaClass *pCl = pEle->GetClass();
- rOutStm << pCl->GetName().getString().getStr();
+ rOutStm.WriteCharPtr( pCl->GetName().getString().getStr() );
if ( m+1 == rClassList.size() )
- rOutStm << " )";
+ rOutStm.WriteCharPtr( " )" );
else
- rOutStm << " , ";
+ rOutStm.WriteCharPtr( " , " );
}
}
rOutStm << endl;
}
}
- rOutStm << "</CLASSES>" << endl << endl;
+ rOutStm.WriteCharPtr( "</CLASSES>" ) << endl << endl;
// no break!
}
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 81996677f701..a0c3b55fbcc5 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -62,8 +62,8 @@ void SvClassElement::Save( SvPersistStream & rStm )
if( xClass.Is() ) nMask |= 0x4;
// write data
- rStm << nMask;
- if( nMask & 0x01 ) rStm << aAutomation;
+ rStm.WriteUChar( nMask );
+ if( nMask & 0x01 ) rStm.WriteUChar( aAutomation );
if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
if( nMask & 0x04 ) WriteSvPersistBase( rStm, xClass );
}
@@ -116,12 +116,12 @@ void SvMetaClass::Save( SvPersistStream & rStm )
if( aAutomation.IsSet() ) nMask |= 0x10;
// write data
- rStm << nMask;
+ rStm.WriteUChar( nMask );
if( nMask & 0x01 ) WriteSvDeclPersistList( rStm, aAttrList );
if( nMask & 0x02 ) WriteSvPersistBase( rStm, aSuperClass );
if( nMask & 0x04 ) WriteSvDeclPersistList( rStm, aClassList );
if( nMask & 0x08 ) WriteSvPersistBase( rStm, xAutomationInterface );
- if( nMask & 0x10 ) rStm << aAutomation;
+ if( nMask & 0x10 ) rStm.WriteUChar( aAutomation );
}
void SvMetaClass::ReadAttributesSvIdl( SvIdlDataBase & rBase,
@@ -139,12 +139,12 @@ void SvMetaClass::WriteAttributesSvIdl( SvIdlDataBase & rBase,
if( !aAutomation )
{
WriteTab( rOutStm, nTab );
- rOutStm << "//class SvMetaClass" << endl;
+ rOutStm.WriteCharPtr( "//class SvMetaClass" ) << endl;
if( !aAutomation )
{
WriteTab( rOutStm, nTab );
aAutomation.WriteSvIdl( SvHash_Automation(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
}
}
@@ -260,20 +260,20 @@ void SvMetaClass::WriteContextSvIdl
{
WriteTab( rOutStm, nTab );
aAttrList[n]->WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
for( n = 0; n < aClassList.size(); n++ )
{
SvClassElement * pEle = aClassList[n];
WriteTab( rOutStm, nTab );
- rOutStm << SvHash_import()->GetName().getStr() << ' '
- << pEle->GetPrefix().getStr();
+ rOutStm.WriteCharPtr( SvHash_import()->GetName().getStr() ).WriteChar( ' ' )
+ .WriteCharPtr( pEle->GetPrefix().getStr() );
if( pEle->GetAutomation() )
- rOutStm << " [ " << SvHash_Automation()->GetName().getStr()
- << " ]";
+ rOutStm.WriteCharPtr( " [ " ).WriteCharPtr( SvHash_Automation()->GetName().getStr() )
+ .WriteCharPtr( " ]" );
if( !pEle->GetPrefix().isEmpty() )
- rOutStm << ' ' << pEle->GetPrefix().getStr();
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( pEle->GetPrefix().getStr() );
+ rOutStm.WriteChar( ';' ) << endl;
}
}
@@ -370,7 +370,7 @@ void SvMetaClass::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
{
WriteHeaderSvIdl( rBase, rOutStm, nTab );
if( aSuperClass.Is() )
- rOutStm << " : " << aSuperClass->GetName().getString().getStr();
+ rOutStm.WriteCharPtr( " : " ).WriteCharPtr( aSuperClass->GetName().getString().getStr() );
rOutStm << endl;
SvMetaName::WriteSvIdl( rBase, rOutStm, nTab );
rOutStm << endl;
@@ -396,13 +396,13 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
}
case WRITE_DOCU:
{
- rOutStm << "<INTERFACE>" << endl
- << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( "<INTERFACE>" ) << endl;
+ rOutStm.WriteCharPtr( GetName().getString().getStr() );
if ( GetAutomation() )
- rOutStm << " ( Automation ) ";
+ rOutStm.WriteCharPtr( " ( Automation ) " );
rOutStm << endl;
WriteDescription( rOutStm );
- rOutStm << "</INTERFACE>" << endl << endl;
+ rOutStm.WriteCharPtr( "</INTERFACE>" ) << endl << endl;
// write all attributes
sal_uLong n;
@@ -561,20 +561,20 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
WriteStars( rOutStm );
// define class
- rOutStm << "#ifdef " << GetName().getString().getStr() << endl;
- rOutStm << "#undef ShellClass" << endl;
- rOutStm << "#undef " << GetName().getString().getStr() << endl;
- rOutStm << "#define ShellClass " << GetName().getString().getStr() << endl;
+ rOutStm.WriteCharPtr( "#ifdef " ).WriteCharPtr( GetName().getString().getStr() ) << endl;
+ rOutStm.WriteCharPtr( "#undef ShellClass" ) << endl;
+ rOutStm.WriteCharPtr( "#undef " ).WriteCharPtr( GetName().getString().getStr() ) << endl;
+ rOutStm.WriteCharPtr( "#define ShellClass " ).WriteCharPtr( GetName().getString().getStr() ) << endl;
// no slotmaps get written for interfaces
if( !IsShell() )
{
- rOutStm << "#endif" << endl << endl;
+ rOutStm.WriteCharPtr( "#endif" ) << endl << endl;
return;
}
// write parameter array
- rOutStm << "SFX_ARGUMENTMAP(" << GetName().getString().getStr() << ')' << endl
- << '{' << endl;
+ rOutStm.WriteCharPtr( "SFX_ARGUMENTMAP(" ).WriteCharPtr( GetName().getString().getStr() ).WriteChar( ')' ) << endl;
+ rOutStm.WriteChar( '{' ) << endl;
std::vector<sal_uLong> aSuperList;
SvMetaClassList classList;
@@ -597,9 +597,10 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
// at leaast one dummy
WriteTab( rOutStm, 1 );
- rOutStm << "SFX_ARGUMENT( 0, 0, SfxVoidItem )" << endl;
+ rOutStm.WriteCharPtr( "SFX_ARGUMENT( 0, 0, SfxVoidItem )" ) << endl;
}
- rOutStm << endl << "};" << endl << endl;
+ rOutStm << endl;
+ rOutStm.WriteCharPtr( "};" ) << endl << endl;
ByteStringList aStringList;
WriteSlotStubs( GetName().getString(), aSlotList, aStringList, rOutStm );
@@ -610,8 +611,8 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
rOutStm << endl;
// write slotmap
- rOutStm << "SFX_SLOTMAP_ARG(" << GetName().getString().getStr() << ')' << endl
- << '{' << endl;
+ rOutStm.WriteCharPtr( "SFX_SLOTMAP_ARG(" ).WriteCharPtr( GetName().getString().getStr() ).WriteChar( ')' ) << endl;
+ rOutStm.WriteChar( '{' ) << endl;
// write all attributes
WriteSlots( GetName().getString(), 0, aSlotList, rBase, rOutStm );
@@ -621,13 +622,15 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
// at least one dummy
WriteTab( rOutStm, 1 );
- rOutStm << "SFX_SLOT_ARG(" << GetName().getString().getStr()
- << ", 0, 0, "
- << "SFX_STUB_PTR_EXEC_NONE,"
- << "SFX_STUB_PTR_STATE_NONE,"
- << "0, SfxVoidItem, 0, 0, \"\", 0 )" << endl;
+ rOutStm.WriteCharPtr( "SFX_SLOT_ARG(" ).WriteCharPtr( GetName().getString().getStr() )
+ .WriteCharPtr( ", 0, 0, " )
+ .WriteCharPtr( "SFX_STUB_PTR_EXEC_NONE," )
+ .WriteCharPtr( "SFX_STUB_PTR_STATE_NONE," )
+ .WriteCharPtr( "0, SfxVoidItem, 0, 0, \"\", 0 )" ) << endl;
}
- rOutStm << endl << "};" << endl << "#endif" << endl << endl;
+ rOutStm << endl;
+ rOutStm.WriteCharPtr( "};" ) << endl;
+ rOutStm.WriteCharPtr( "#endif" ) << endl << endl;
for( size_t i = 0, n = aSlotList.size(); i < n; ++i )
{
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 1627aa801336..612bd60a116c 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -180,13 +180,13 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
if( aAsynchron.IsSet() ) nMask |= 0x8000;
// write data
- rStm << nMask;
+ rStm.WriteUInt16( nMask );
TEST_WRITE
if( nMask & 0x0001 ) WriteSvPersistBase( rStm, aMethod );
TEST_WRITE
if( nMask & 0x0002 ) WriteSvIdentifier( rStm, aGroupId );
TEST_WRITE
- if( nMask & 0x0004 ) rStm << aHasCoreId;
+ if( nMask & 0x0004 ) rStm.WriteUChar( aHasCoreId );
TEST_WRITE
if( nMask & 0x0008 ) WriteSvIdentifier( rStm, aConfigId );
TEST_WRITE
@@ -196,23 +196,23 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
TEST_WRITE
if( nMask & 0x0040 ) WriteSvIdentifier( rStm, aDefault );
TEST_WRITE
- if( nMask & 0x0080 ) rStm << aPseudoSlots;
+ if( nMask & 0x0080 ) rStm.WriteUChar( aPseudoSlots );
TEST_WRITE
- if( nMask & 0x0100 ) rStm << aGet;
+ if( nMask & 0x0100 ) rStm.WriteUChar( aGet );
TEST_WRITE
- if( nMask & 0x0200 ) rStm << aSet;
+ if( nMask & 0x0200 ) rStm.WriteUChar( aSet );
TEST_WRITE
- if( nMask & 0x0400 ) rStm << aCachable;
+ if( nMask & 0x0400 ) rStm.WriteUChar( aCachable );
TEST_WRITE
- if( nMask & 0x0800 ) rStm << aVolatile;
+ if( nMask & 0x0800 ) rStm.WriteUChar( aVolatile );
TEST_WRITE
- if( nMask & 0x1000 ) rStm << aToggle;
+ if( nMask & 0x1000 ) rStm.WriteUChar( aToggle );
TEST_WRITE
- if( nMask & 0x2000 ) rStm << aAutoUpdate;
+ if( nMask & 0x2000 ) rStm.WriteUChar( aAutoUpdate );
TEST_WRITE
- if( nMask & 0x4000 ) rStm << aSynchron;
+ if( nMask & 0x4000 ) rStm.WriteUChar( aSynchron );
TEST_WRITE
- if( nMask & 0x8000 ) rStm << aAsynchron;
+ if( nMask & 0x8000 ) rStm.WriteUChar( aAsynchron );
// write next bunch
// create mask
@@ -235,48 +235,48 @@ void SvMetaSlot::Save( SvPersistStream & rStm )
if( aImageRotation.IsSet() ) nMask |= 0x8000;
// write data
- rStm << nMask;
+ rStm.WriteUInt16( nMask );
TEST_WRITE
- if( nMask & 0x0001 ) rStm << aRecordPerItem;
+ if( nMask & 0x0001 ) rStm.WriteUChar( aRecordPerItem );
TEST_WRITE
- if( nMask & 0x0002 ) rStm << aRecordManual;
+ if( nMask & 0x0002 ) rStm.WriteUChar( aRecordManual );
TEST_WRITE
- if( nMask & 0x0004 ) rStm << aNoRecord;
+ if( nMask & 0x0004 ) rStm.WriteUChar( aNoRecord );
TEST_WRITE
- if( nMask & 0x0008 ) rStm << aHasDialog;
+ if( nMask & 0x0008 ) rStm.WriteUChar( aHasDialog );
TEST_WRITE
if( nMask & 0x0010 ) WriteSvString( rStm, aDisableFlags );
TEST_WRITE
if( nMask & 0x0020 ) WriteSvIdentifier( rStm, aPseudoPrefix );
TEST_WRITE
- if( nMask & 0x0040 ) rStm << aRecordPerSet;
+ if( nMask & 0x0040 ) rStm.WriteUChar( aRecordPerSet );
TEST_WRITE
- if( nMask & 0x0080 ) rStm << aMenuConfig;
+ if( nMask & 0x0080 ) rStm.WriteUChar( aMenuConfig );
TEST_WRITE
- if( nMask & 0x0100 ) rStm << aToolBoxConfig;
+ if( nMask & 0x0100 ) rStm.WriteUChar( aToolBoxConfig );
TEST_WRITE
- if( nMask & 0x0200 ) rStm << aStatusBarConfig;
+ if( nMask & 0x0200 ) rStm.WriteUChar( aStatusBarConfig );
TEST_WRITE
- if( nMask & 0x0400 ) rStm << aAccelConfig;
+ if( nMask & 0x0400 ) rStm.WriteUChar( aAccelConfig );
TEST_WRITE
- if( nMask & 0x0800 ) rStm << aFastCall;
+ if( nMask & 0x0800 ) rStm.WriteUChar( aFastCall );
TEST_WRITE
- if( nMask & 0x1000 ) rStm << aContainer;
+ if( nMask & 0x1000 ) rStm.WriteUChar( aContainer );
TEST_WRITE
if( nMask & 0x2000 ) WriteSvPersistBase( rStm, aSlotType );
TEST_WRITE
- if( nMask & 0x4000 ) rStm << aRecordAbsolute;
+ if( nMask & 0x4000 ) rStm.WriteUChar( aRecordAbsolute );
TEST_WRITE
- if( nMask & 0x8000 ) rStm << aImageRotation;
+ if( nMask & 0x8000 ) rStm.WriteUChar( aImageRotation );
nMask = 0;
if( aUnoName.IsSet() ) nMask |= 0x0001;
if( aImageReflection.IsSet() ) nMask |= 0x0002;
- rStm << nMask;
+ rStm.WriteUInt16( nMask );
TEST_WRITE
if( nMask & 0x0001 ) WriteSvString( rStm, aUnoName );
TEST_WRITE
- if( nMask & 0x0002 ) rStm << aImageReflection;
+ if( nMask & 0x0002 ) rStm.WriteUChar( aImageReflection );
}
sal_Bool SvMetaSlot::IsVariable() const
@@ -629,45 +629,45 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase,
if( aSlotType.Is() )
{
WriteTab( rOutStm, nTab );
- rOutStm << SvHash_SlotType()->GetName().getStr() << '(';
+ rOutStm.WriteCharPtr( SvHash_SlotType()->GetName().getStr() ).WriteChar( '(' );
aSlotType->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ");" << endl;
+ rOutStm.WriteCharPtr( ");" ) << endl;
}
if( aMethod.Is() )
{
WriteTab( rOutStm, nTab );
aMethod->WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( aHasCoreId )
{
aHasCoreId.WriteSvIdl( SvHash_HasCoreId(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aGroupId.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aGroupId.WriteSvIdl( SvHash_GroupId(), rOutStm, nTab +1);
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aExecMethod.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aExecMethod.WriteSvIdl( SvHash_ExecMethod(), rOutStm, nTab +1);
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aStateMethod.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aStateMethod.WriteSvIdl( SvHash_StateMethod(), rOutStm, nTab +1);
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aDisableFlags.getString().isEmpty() )
{
WriteTab( rOutStm, nTab );
aDisableFlags.WriteSvIdl( SvHash_DisableFlags(), rOutStm, nTab +1);
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( aSet || aGet || aPseudoSlots )
@@ -681,16 +681,16 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase,
}
if( aGet )
{
- rOutStm << p;
+ rOutStm.WriteCharPtr( p );
aGet.WriteSvIdl( SvHash_Get(), rOutStm );
p = ", ";
}
if( aSet )
{
- rOutStm << p;
+ rOutStm.WriteCharPtr( p );
aSet.WriteSvIdl( SvHash_Set(), rOutStm );
}
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
OString aDel(", ");
@@ -793,7 +793,7 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase,
if( !aOut.isEmpty() )
{
WriteTab( rOutStm, nTab );
- rOutStm << aOut.getStr() << endl;
+ rOutStm.WriteCharPtr( aOut.getStr() ) << endl;
}
}
@@ -1105,11 +1105,11 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
if ( !bIn )
{
rList.push_back( new OString(aMethodName) );
- rOutStm << "SFX_EXEC_STUB("
- << rShellName.getStr()
- << ','
- << aMethodName.getStr()
- << ')' << endl;
+ rOutStm.WriteCharPtr( "SFX_EXEC_STUB(" )
+ .WriteCharPtr( rShellName.getStr() )
+ .WriteChar( ',' )
+ .WriteCharPtr( aMethodName.getStr() )
+ .WriteChar( ')' ) << endl;
}
}
@@ -1130,11 +1130,11 @@ void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
if ( !bIn )
{
rList.push_back( new OString(aMethodName) );
- rOutStm << "SFX_STATE_STUB("
- << rShellName.getStr()
- << ','
- << aMethodName.getStr()
- << ')' << endl;
+ rOutStm.WriteCharPtr( "SFX_STATE_STUB(" )
+ .WriteCharPtr( rShellName.getStr() )
+ .WriteChar( ',' )
+ .WriteCharPtr( aMethodName.getStr() )
+ .WriteChar( ')' ) << endl;
}
}
}
@@ -1151,51 +1151,51 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
sal_Bool bIsEnumSlot = 0 != pEnumValue;
- rOutStm << "// Slot Nr. "
- << OString::number(nListPos).getStr()
- << " : ";
+ rOutStm.WriteCharPtr( "// Slot Nr. " )
+ .WriteCharPtr( OString::number(nListPos).getStr() )
+ .WriteCharPtr( " : " );
OString aSlotIdValue(OString::number(GetSlotId().GetValue()));
- rOutStm << aSlotIdValue.getStr() << endl;
+ rOutStm.WriteCharPtr( aSlotIdValue.getStr() ) << endl;
WriteTab( rOutStm, 1 );
if( bIsEnumSlot )
- rOutStm << "SFX_NEW_SLOT_ENUM( ";
+ rOutStm.WriteCharPtr( "SFX_NEW_SLOT_ENUM( " );
else
- rOutStm << "SFX_NEW_SLOT_ARG( " << rShellName.getStr() << ',' ;
+ rOutStm.WriteCharPtr( "SFX_NEW_SLOT_ARG( " ).WriteCharPtr( rShellName.getStr() ).WriteChar( ',' ) ;
- rOutStm << rSlotId.getStr() << ',';
+ rOutStm.WriteCharPtr( rSlotId.getStr() ).WriteChar( ',' );
const SvHelpContext& rHlpCtx = GetHelpContext();
if( rHlpCtx.IsSet() )
- rOutStm << rHlpCtx.getString().getStr() << ',';
+ rOutStm.WriteCharPtr( rHlpCtx.getString().getStr() ).WriteChar( ',' );
else
- rOutStm << rSlotId.getStr() << ',';
+ rOutStm.WriteCharPtr( rSlotId.getStr() ).WriteChar( ',' );
// GroupId
if( !GetGroupId().isEmpty() )
- rOutStm << GetGroupId().getStr();
+ rOutStm.WriteCharPtr( GetGroupId().getStr() );
else
- rOutStm << '0';
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( '0' );
+ rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 4 );
if( bIsEnumSlot )
{
- rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
- << OString::number(pLinkedSlot->GetListPos()).getStr()
- << "] /*Offset Master*/, " << endl;
+ rOutStm.WriteCharPtr( "&a" ).WriteCharPtr( rShellName.getStr() ).WriteCharPtr( "Slots_Impl[" )
+ .WriteCharPtr( OString::number(pLinkedSlot->GetListPos()).getStr() )
+ .WriteCharPtr( "] /*Offset Master*/, " ) << endl;
WriteTab( rOutStm, 4 );
- rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
- << OString::number(pNextSlot->GetListPos()).getStr()
- << "] /*Offset Next*/, " << endl;
+ rOutStm.WriteCharPtr( "&a" ).WriteCharPtr( rShellName.getStr() ).WriteCharPtr( "Slots_Impl[" )
+ .WriteCharPtr( OString::number(pNextSlot->GetListPos()).getStr() )
+ .WriteCharPtr( "] /*Offset Next*/, " ) << endl;
WriteTab( rOutStm, 4 );
// SlotId
if( !GetSlotId().getString().isEmpty() )
- rOutStm << pLinkedSlot->GetSlotId().getString().getStr();
+ rOutStm.WriteCharPtr( pLinkedSlot->GetSlotId().getString().getStr() );
else
- rOutStm << '0';
- rOutStm << ',';
- rOutStm << pEnumValue->GetName().getString().getStr();
+ rOutStm.WriteChar( '0' );
+ rOutStm.WriteChar( ',' );
+ rOutStm.WriteCharPtr( pEnumValue->GetName().getString().getStr() );
}
else
{
@@ -1234,19 +1234,19 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
if ( !pLinkedSlot )
{
- rOutStm << "0 ,";
+ rOutStm.WriteCharPtr( "0 ," );
}
else
{
- rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
- << OString::number(pLinkedSlot->GetListPos()).getStr()
- << "] /*Offset Linked*/, " << endl;
+ rOutStm.WriteCharPtr( "&a" ).WriteCharPtr( rShellName.getStr() ).WriteCharPtr( "Slots_Impl[" )
+ .WriteCharPtr( OString::number(pLinkedSlot->GetListPos()).getStr() )
+ .WriteCharPtr( "] /*Offset Linked*/, " ) << endl;
WriteTab( rOutStm, 4 );
}
- rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
- << OString::number(pNextSlot->GetListPos()).getStr()
- << "] /*Offset Next*/, " << endl;
+ rOutStm.WriteCharPtr( "&a" ).WriteCharPtr( rShellName.getStr() ).WriteCharPtr( "Slots_Impl[" )
+ .WriteCharPtr( OString::number(pNextSlot->GetListPos()).getStr() )
+ .WriteCharPtr( "] /*Offset Next*/, " ) << endl;
WriteTab( rOutStm, 4 );
@@ -1254,84 +1254,84 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
if( !GetExecMethod().isEmpty() &&
GetExecMethod() != "NoExec")
{
- rOutStm << "SFX_STUB_PTR(" << rShellName.getStr() << ','
- << GetExecMethod().getStr() << ')';
+ rOutStm.WriteCharPtr( "SFX_STUB_PTR(" ).WriteCharPtr( rShellName.getStr() ).WriteChar( ',' )
+ .WriteCharPtr( GetExecMethod().getStr() ).WriteChar( ')' );
}
else
- rOutStm << "SFX_STUB_PTR_EXEC_NONE";
- rOutStm << ',';
+ rOutStm.WriteCharPtr( "SFX_STUB_PTR_EXEC_NONE" );
+ rOutStm.WriteChar( ',' );
// write StateMethod, with standard name if not specified
if( !GetStateMethod().isEmpty() &&
GetStateMethod() != "NoState")
{
- rOutStm << "SFX_STUB_PTR(" << rShellName.getStr() << ','
- << GetStateMethod().getStr() << ')';
+ rOutStm.WriteCharPtr( "SFX_STUB_PTR(" ).WriteCharPtr( rShellName.getStr() ).WriteChar( ',' )
+ .WriteCharPtr( GetStateMethod().getStr() ).WriteChar( ')' );
}
else
- rOutStm << "SFX_STUB_PTR_STATE_NONE";
+ rOutStm.WriteCharPtr( "SFX_STUB_PTR_STATE_NONE" );
}
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 4 );
// write flags
if( GetHasCoreId() )
- rOutStm << MakeSlotName( SvHash_HasCoreId() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_HasCoreId() ).getStr() ).WriteChar( '|' );
if( GetCachable() )
- rOutStm << MakeSlotName( SvHash_Cachable() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_Cachable() ).getStr() ).WriteChar( '|' );
if( GetVolatile() )
- rOutStm << MakeSlotName( SvHash_Volatile() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_Volatile() ).getStr() ).WriteChar( '|' );
if( GetToggle() )
- rOutStm << MakeSlotName( SvHash_Toggle() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_Toggle() ).getStr() ).WriteChar( '|' );
if( GetAutoUpdate() )
- rOutStm << MakeSlotName( SvHash_AutoUpdate() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_AutoUpdate() ).getStr() ).WriteChar( '|' );
if( GetSynchron() )
- rOutStm << MakeSlotName( SvHash_Synchron() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_Synchron() ).getStr() ).WriteChar( '|' );
if( GetAsynchron() )
- rOutStm << MakeSlotName( SvHash_Asynchron() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_Asynchron() ).getStr() ).WriteChar( '|' );
if( GetRecordPerItem() )
- rOutStm << MakeSlotName( SvHash_RecordPerItem() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_RecordPerItem() ).getStr() ).WriteChar( '|' );
if( GetRecordPerSet() )
- rOutStm << MakeSlotName( SvHash_RecordPerSet() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_RecordPerSet() ).getStr() ).WriteChar( '|' );
if( GetRecordManual() )
- rOutStm << MakeSlotName( SvHash_RecordManual() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_RecordManual() ).getStr() ).WriteChar( '|' );
if( GetNoRecord() )
- rOutStm << MakeSlotName( SvHash_NoRecord() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_NoRecord() ).getStr() ).WriteChar( '|' );
if( GetRecordAbsolute() )
- rOutStm << MakeSlotName( SvHash_RecordAbsolute() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_RecordAbsolute() ).getStr() ).WriteChar( '|' );
if( GetHasDialog() )
- rOutStm << MakeSlotName( SvHash_HasDialog() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_HasDialog() ).getStr() ).WriteChar( '|' );
if( GetMenuConfig() )
- rOutStm << MakeSlotName( SvHash_MenuConfig() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_MenuConfig() ).getStr() ).WriteChar( '|' );
if( GetToolBoxConfig() )
- rOutStm << MakeSlotName( SvHash_ToolBoxConfig() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_ToolBoxConfig() ).getStr() ).WriteChar( '|' );
if( GetStatusBarConfig() )
- rOutStm << MakeSlotName( SvHash_StatusBarConfig() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_StatusBarConfig() ).getStr() ).WriteChar( '|' );
if( GetAccelConfig() )
- rOutStm << MakeSlotName( SvHash_AccelConfig() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_AccelConfig() ).getStr() ).WriteChar( '|' );
if( GetFastCall() )
- rOutStm << MakeSlotName( SvHash_FastCall() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_FastCall() ).getStr() ).WriteChar( '|' );
if( GetContainer() )
- rOutStm << MakeSlotName( SvHash_Container() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_Container() ).getStr() ).WriteChar( '|' );
if ( GetReadOnlyDoc() )
- rOutStm << MakeSlotName( SvHash_ReadOnlyDoc() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_ReadOnlyDoc() ).getStr() ).WriteChar( '|' );
if( GetImageRotation() )
- rOutStm << MakeSlotName( SvHash_ImageRotation() ).getStr() << '|';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_ImageRotation() ).getStr() ).WriteChar( '|' );
if( GetImageReflection() )
- rOutStm << MakeSlotName( SvHash_ImageReflection() ).getStr() << '|';
- rOutStm << '0';
+ rOutStm.WriteCharPtr( MakeSlotName( SvHash_ImageReflection() ).getStr() ).WriteChar( '|' );
+ rOutStm.WriteChar( '0' );
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 4 );
if ( GetDisableFlags().isEmpty() )
- rOutStm << "0";
+ rOutStm.WriteCharPtr( "0" );
else
- rOutStm << GetDisableFlags().getStr();
+ rOutStm.WriteCharPtr( GetDisableFlags().getStr() );
// write attribute type
if( !bIsEnumSlot )
{
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 4 );
SvMetaType * pT = GetSlotType();
@@ -1344,12 +1344,12 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
}
if( pT )
{
- rOutStm << pT->GetName().getString().getStr();
+ rOutStm.WriteCharPtr( pT->GetName().getString().getStr() );
if( !rBase.FindType( pT, rBase.aUsedTypes ) )
rBase.aUsedTypes.push_back( pT );
}
else
- rOutStm << "SfxVoidItem not defined";
+ rOutStm.WriteCharPtr( "SfxVoidItem not defined" );
}
else
{
@@ -1360,11 +1360,11 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
if( !bIsEnumSlot )
{
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 4 );
rOutStm
- << OString::number(nCount).getStr()
- << "/*Offset*/, ";
+ .WriteCharPtr( OString::number(nCount).getStr() )
+ .WriteCharPtr( "/*Offset*/, " );
if( IsMethod() )
{
@@ -1376,47 +1376,47 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
pType = GetType();
sal_uLong nSCount = pType->GetAttrCount();
rOutStm
- << OString::number(nSCount).getStr()
- << "/*Count*/";
+ .WriteCharPtr( OString::number(nSCount).getStr() )
+ .WriteCharPtr( "/*Count*/" );
}
else
- rOutStm << '0';
+ rOutStm.WriteChar( '0' );
// name for recording
if ( GetExport() )
{
- rOutStm << ",\"";
+ rOutStm.WriteCharPtr( ",\"" );
if (!rPrefix.isEmpty())
- rOutStm << rPrefix.getStr();
- rOutStm << '.';
+ rOutStm.WriteCharPtr( rPrefix.getStr() );
+ rOutStm.WriteChar( '.' );
if ( !IsVariable() || !GetType() ||
GetType()->GetBaseType()->GetType() != TYPE_STRUCT )
- rOutStm << GetMangleName( sal_False ).getStr();
- rOutStm << "\",";
+ rOutStm.WriteCharPtr( GetMangleName( sal_False ).getStr() );
+ rOutStm.WriteCharPtr( "\"," );
}
else
- rOutStm << ", 0, ";
+ rOutStm.WriteCharPtr( ", 0, " );
// Method/Property flags
if( IsMethod() )
- rOutStm << "SFX_SLOT_METHOD|";
+ rOutStm.WriteCharPtr( "SFX_SLOT_METHOD|" );
if( IsVariable() )
{
- rOutStm << "SFX_SLOT_PROPGET|";
+ rOutStm.WriteCharPtr( "SFX_SLOT_PROPGET|" );
if( !GetReadonly() )
- rOutStm << "SFX_SLOT_PROPSET|";
+ rOutStm.WriteCharPtr( "SFX_SLOT_PROPSET|" );
}
- rOutStm << '0';
+ rOutStm.WriteChar( '0' );
}
{
- rOutStm << ",\"";
- rOutStm << GetMangleName( sal_False ).getStr();
- rOutStm << "\"";
+ rOutStm.WriteCharPtr( ",\"" );
+ rOutStm.WriteCharPtr( GetMangleName( sal_False ).getStr() );
+ rOutStm.WriteCharPtr( "\"" );
}
- rOutStm << " )," << endl;
+ rOutStm.WriteCharPtr( " )," ) << endl;
}
sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm )
@@ -1443,12 +1443,12 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO
SvMetaAttribute * pPar = rList[n];
SvMetaType * pPType = pPar->GetType();
WriteTab( rOutStm, 1 );
- rOutStm << "SFX_ARGUMENT("
- << pPar->GetSlotId().getString().getStr() << ',' // SlodId
+ rOutStm.WriteCharPtr( "SFX_ARGUMENT(" )
+ .WriteCharPtr( pPar->GetSlotId().getString().getStr() ).WriteChar( ',' ) // SlodId
// parameter name
- << "\"" << pPar->GetName().getString().getStr() << "\","
+ .WriteCharPtr( "\"" ).WriteCharPtr( pPar->GetName().getString().getStr() ).WriteCharPtr( "\"," )
// item name
- << pPType->GetName().getString().getStr() << ")," << endl;
+ .WriteCharPtr( pPType->GetName().getString().getStr() ).WriteCharPtr( ")," ) << endl;
if( !rBase.FindType( pPType, rBase.aUsedTypes ) )
rBase.aUsedTypes.push_back( pPType );
}
@@ -1491,8 +1491,8 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
if( rTable.find( nSId ) == rTable.end() )
{
rTable[ nSId ] = this;
- rOutStm << "#define " << GetSlotId().getString().getStr() << '\t'
- << OString::number(nSId).getStr()
+ rOutStm.WriteCharPtr( "#define " ).WriteCharPtr( GetSlotId().getString().getStr() ).WriteChar( '\t' )
+ .WriteCharPtr( OString::number(nSId).getStr() )
<< endl;
}
@@ -1526,9 +1526,9 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
{
rTable[ nSId2 ] = this;
- rOutStm << "#define " << aSId.getStr() << '\t'
- << OString::number(
- nSId2).getStr()
+ rOutStm.WriteCharPtr( "#define " ).WriteCharPtr( aSId.getStr() ).WriteChar( '\t' )
+ .WriteCharPtr( OString::number(
+ nSId2).getStr() )
<< endl;
}
}
@@ -1538,26 +1538,26 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
void WriteBool( sal_Bool bSet, SvStream& rStream )
{
if ( bSet )
- rStream << "TRUE" << ',';
+ rStream.WriteCharPtr( "TRUE" ).WriteChar( ',' );
else
- rStream << "FALSE" << ',';
+ rStream.WriteCharPtr( "FALSE" ).WriteChar( ',' );
}
void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
{
- rStrm << "PROJECT,";
- rStrm << GetSlotId().getString().getStr() << ',';
+ rStrm.WriteCharPtr( "PROJECT," );
+ rStrm.WriteCharPtr( GetSlotId().getString().getStr() ).WriteChar( ',' );
rStrm
- << OString::number(
- GetSlotId().GetValue()).getStr()
- << ',';
+ .WriteCharPtr( OString::number(
+ GetSlotId().GetValue()).getStr() )
+ .WriteChar( ',' );
if ( !GetPseudoPrefix().isEmpty() )
- rStrm << GetPseudoPrefix().getStr() << ',';
+ rStrm.WriteCharPtr( GetPseudoPrefix().getStr() ).WriteChar( ',' );
else
- rStrm << ',';
+ rStrm.WriteChar( ',' );
- rStrm << GetGroupId().getStr() << ',';
+ rStrm.WriteCharPtr( GetGroupId().getStr() ).WriteChar( ',' );
WriteBool( GetAccelConfig(), rStrm );
WriteBool( GetMenuConfig(), rStrm );
@@ -1565,15 +1565,15 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
WriteBool( GetToolBoxConfig(), rStrm );
if ( GetSlotType() )
- rStrm << GetSlotType()->GetName().getString().getStr() << ',';
+ rStrm.WriteCharPtr( GetSlotType()->GetName().getString().getStr() ).WriteChar( ',' );
else
- rStrm << ',';
+ rStrm.WriteChar( ',' );
WriteBool( GetAutoUpdate(), rStrm );
if ( GetCachable() )
- rStrm << "Cachable" << ',';
+ rStrm.WriteCharPtr( "Cachable" ).WriteChar( ',' );
else
- rStrm << "Volatile" << ',';
+ rStrm.WriteCharPtr( "Volatile" ).WriteChar( ',' );
WriteBool( GetContainer(), rStrm );
WriteBool( GetFastCall(), rStrm );
@@ -1582,39 +1582,39 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
WriteBool( GetReadOnlyDoc(), rStrm );
WriteBool( GetImageRotation(), rStrm );
WriteBool( GetImageReflection(), rStrm );
- rStrm << GetDisableFlags().getStr() << ',';
+ rStrm.WriteCharPtr( GetDisableFlags().getStr() ).WriteChar( ',' );
if( GetSynchron() )
- rStrm << "Synchron" << ',';
+ rStrm.WriteCharPtr( "Synchron" ).WriteChar( ',' );
else
- rStrm << "Asynchron" << ',';
+ rStrm.WriteCharPtr( "Asynchron" ).WriteChar( ',' );
WriteBool( GetToggle(), rStrm );
WriteBool( GetReadonly(), rStrm );
WriteBool( GetExport(), rStrm );
if( GetRecordPerItem() )
- rStrm << "RecordPerItem" << ',';
+ rStrm.WriteCharPtr( "RecordPerItem" ).WriteChar( ',' );
else if ( GetNoRecord() )
- rStrm << "NoRecord" << ',';
+ rStrm.WriteCharPtr( "NoRecord" ).WriteChar( ',' );
else if ( GetRecordManual() )
- rStrm << "RecordManual" << ',';
+ rStrm.WriteCharPtr( "RecordManual" ).WriteChar( ',' );
else
- rStrm << "RecordPerSet" << ',';
+ rStrm.WriteCharPtr( "RecordPerSet" ).WriteChar( ',' );
WriteBool( GetRecordAbsolute(), rStrm );
if ( GetType()->GetType() != TYPE_METHOD && GetMethod() )
{
- rStrm << GetMethod()->GetType()->GetReturnType()->GetName().getString().getStr() << ',';
- rStrm << GetMethod()->GetName().getString().getStr() << ',';
+ rStrm.WriteCharPtr( GetMethod()->GetType()->GetReturnType()->GetName().getString().getStr() ).WriteChar( ',' );
+ rStrm.WriteCharPtr( GetMethod()->GetName().getString().getStr() ).WriteChar( ',' );
}
else
{
- rStrm << ",,";
+ rStrm.WriteCharPtr( ",," );
}
- rStrm << GetType()->GetSvName().getStr() << ',';
- rStrm << GetName().getString().getStr() << ',';
+ rStrm.WriteCharPtr( GetType()->GetSvName().getStr() ).WriteChar( ',' );
+ rStrm.WriteCharPtr( GetName().getString().getStr() ).WriteChar( ',' );
if ( GetType()->GetType() == TYPE_METHOD || GetMethod() )
{
@@ -1624,7 +1624,7 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
if( pList && !pList->empty() )
{
- rStrm << "\"(";
+ rStrm.WriteCharPtr( "\"(" );
SvMetaAttributeMemberList::const_iterator it = pList->begin();
while( it != pList->end() )
{
@@ -1632,12 +1632,12 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
pAttr->WriteCSV( rBase, rStrm );
++it;
if( it != pList->end() )
- rStrm << ',';
+ rStrm.WriteChar( ',' );
}
- rStrm << ")\"";
+ rStrm.WriteCharPtr( ")\"" );
}
else
- rStrm << "()";
+ rStrm.WriteCharPtr( "()" );
}
rStrm << endl;
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index c9c93717134f..89ce61f6c32e 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -86,15 +86,15 @@ void SvMetaAttribute::Save( SvPersistStream & rStm )
if( aHidden.IsSet() ) nMask |= 0x80;
// write data
- rStm << nMask;
+ rStm.WriteUChar( nMask );
if( nMask & 0x1 ) WriteSvPersistBase( rStm, aType );
if( nMask & 0x2 ) WriteSvNumberIdentifier( rStm, aSlotId );
- if( nMask & 0x4 ) rStm << aExport;
- if( nMask & 0x8 ) rStm << aReadonly;
- if( nMask & 0x10 ) rStm << aAutomation;
- if( nMask & 0x20 ) rStm << aIsCollection;
- if( nMask & 0x40 ) rStm << aReadOnlyDoc;
- if( nMask & 0x80 ) rStm << aHidden;
+ if( nMask & 0x4 ) rStm.WriteUChar( aExport );
+ if( nMask & 0x8 ) rStm.WriteUChar( aReadonly );
+ if( nMask & 0x10 ) rStm.WriteUChar( aAutomation );
+ if( nMask & 0x20 ) rStm.WriteUChar( aIsCollection );
+ if( nMask & 0x40 ) rStm.WriteUChar( aReadOnlyDoc );
+ if( nMask & 0x80 ) rStm.WriteUChar( aHidden );
}
SvMetaType * SvMetaAttribute::GetType() const
@@ -240,9 +240,9 @@ void SvMetaAttribute::WriteSvIdl
{
SvMetaType * pType = GetType();
pType->WriteTypePrefix( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ' ' << GetName().getString().getStr();
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
if( aSlotId.IsSet() )
- rOutStm << ' ' << aSlotId.getString().getStr();
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( aSlotId.getString().getStr() );
if( pType->GetType() == TYPE_METHOD )
pType->WriteMethodArgs( rBase, rOutStm, nTab, WRITE_IDL );
sal_uLong nPos = rOutStm.Tell();
@@ -284,42 +284,42 @@ void SvMetaAttribute::WriteAttributesSvIdl
if( !aExport || !aAutomation || aReadonly )
{
WriteTab( rOutStm, nTab );
- rOutStm << "//class SvMetaAttribute" << endl;
+ rOutStm.WriteCharPtr( "//class SvMetaAttribute" ) << endl;
if( !aExport )
{
WriteTab( rOutStm, nTab );
aExport.WriteSvIdl( SvHash_Export(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if ( aHidden != aExport )
{
WriteTab( rOutStm, nTab );
aExport.WriteSvIdl( SvHash_Hidden(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( aReadonly )
{
WriteTab( rOutStm, nTab );
aReadonly.WriteSvIdl( SvHash_Readonly(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aAutomation )
{
WriteTab( rOutStm, nTab );
aAutomation.WriteSvIdl( SvHash_Automation(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( aIsCollection )
{
WriteTab( rOutStm, nTab );
aIsCollection.WriteSvIdl( SvHash_IsCollection(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
if( !aReadOnlyDoc )
{
WriteTab( rOutStm, nTab );
aReadOnlyDoc.WriteSvIdl( SvHash_ReadOnlyDoc(), rOutStm );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
}
}
@@ -346,7 +346,7 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
rList[i]->WriteParam( rBase, rOutStm, nTab, nT );
if( i+1<nCount )
{
- rOutStm << ',';
+ rOutStm.WriteChar( ',' );
}
}
}
@@ -360,8 +360,8 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
if( !GetName().getString().isEmpty() )
{
- rOutStm << ' ';
- rOutStm << GetName().getString().getStr();
+ rOutStm.WriteChar( ' ' );
+ rOutStm.WriteCharPtr( GetName().getString().getStr() );
}
if ( nT == WRITE_DOCU )
@@ -373,7 +373,7 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
OSL_FAIL( "Falscher Parametertyp!" );
}
else
- rOutStm << pBaseType->GetBasicPostfix().getStr();
+ rOutStm.WriteCharPtr( pBaseType->GetBasicPostfix().getStr() );
}
}
}
@@ -414,18 +414,18 @@ void SvMetaAttribute::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm
bVar = sal_False;
WriteTab( rOutStm, nTab );
- rOutStm << "//class SvMetaAttribute" << endl;
+ rOutStm.WriteCharPtr( "//class SvMetaAttribute" ) << endl;
if( rId.IsSet() && !(nA & WA_STRUCT) )
{
WriteTab( rOutStm, nTab );
- rOutStm << "id("
- << OString::number(MakeSlotValue(rBase,bVar)).getStr()
- << ")," << endl;
+ rOutStm.WriteCharPtr( "id(" )
+ .WriteCharPtr( OString::number(MakeSlotValue(rBase,bVar)).getStr() )
+ .WriteCharPtr( ")," ) << endl;
}
if( bVar && (bReadonly || IsMethod()) )
{
WriteTab( rOutStm, nTab );
- rOutStm << "readonly," << endl;
+ rOutStm.WriteCharPtr( "readonly," ) << endl;
}
}
}
@@ -444,66 +444,66 @@ void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm,
bVoid = pBaseType->GetReturnType()->GetBaseType()->GetName().getString() == "void";
// emit methods/functions body
- rOutStm << '{' << endl;
+ rOutStm.WriteChar( '{' ) << endl;
WriteTab( rOutStm, 1 );
if( !bVoid )
{
if ( pBaseType->GetCName() == "double" )
{
- rOutStm << "return *(double*)";
+ rOutStm.WriteCharPtr( "return *(double*)" );
}
else
{
- rOutStm << "return (";
+ rOutStm.WriteCharPtr( "return (" );
pType->WriteTypePrefix( rBase, rOutStm, 2, WRITE_C_SOURCE );
- rOutStm << ") ";
+ rOutStm.WriteCharPtr( ") " );
}
}
- rOutStm << "pODKCallFunction( "
- << OString::number(MakeSlotValue(rBase, IsVariable())).getStr();
- rOutStm << ',' << endl;
+ rOutStm.WriteCharPtr( "pODKCallFunction( " )
+ .WriteCharPtr( OString::number(MakeSlotValue(rBase, IsVariable())).getStr() );
+ rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 3 );
- rOutStm << " h" << rBase.aIFaceName.getStr() << " , ";
+ rOutStm.WriteCharPtr( " h" ).WriteCharPtr( rBase.aIFaceName.getStr() ).WriteCharPtr( " , " );
OString aParserStr;
if( pBaseType->GetType() == TYPE_METHOD || bSet )
aParserStr = pBaseType->GetParserString();
if( !aParserStr.isEmpty() )
{
- rOutStm << '\"';
- rOutStm << aParserStr.getStr();
- rOutStm << "\", ";
+ rOutStm.WriteChar( '\"' );
+ rOutStm.WriteCharPtr( aParserStr.getStr() );
+ rOutStm.WriteCharPtr( "\", " );
}
else
- rOutStm << "NULL, ";
+ rOutStm.WriteCharPtr( "NULL, " );
if( pBaseType->GetType() == TYPE_METHOD && !bVoid )
{
- rOutStm << "'";
- rOutStm << pBaseType->GetReturnType()->GetBaseType()->GetParserChar();
- rOutStm << "'";
+ rOutStm.WriteCharPtr( "'" );
+ rOutStm.WriteChar( pBaseType->GetReturnType()->GetBaseType()->GetParserChar() );
+ rOutStm.WriteCharPtr( "'" );
}
else if ( !bSet )
{
- rOutStm << "'";
- rOutStm << pBaseType->GetParserChar();
- rOutStm << "'";
+ rOutStm.WriteCharPtr( "'" );
+ rOutStm.WriteChar( pBaseType->GetParserChar() );
+ rOutStm.WriteCharPtr( "'" );
}
else
- rOutStm << '0';
+ rOutStm.WriteChar( '0' );
if( !aParserStr.isEmpty() )
{
- rOutStm << ", ";
+ rOutStm.WriteCharPtr( ", " );
if( IsMethod() )
pBaseType->WriteParamNames( rBase, rOutStm, OString() );
else if( bSet )
pBaseType->WriteParamNames( rBase, rOutStm, GetName().getString() );
}
- rOutStm << " );" << endl;
- rOutStm << '}' << endl;
+ rOutStm.WriteCharPtr( " );" ) << endl;
+ rOutStm.WriteChar( '}' ) << endl;
}
void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
@@ -528,7 +528,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
pAttr->SetDescription( GetDescription().getString() );
pAttr->Write( rBase, rOutStm, nTab, nT, nA );
if( nT == WRITE_ODL && i +1 < nCount )
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
rBase.aStructSlotId = slotId;
@@ -575,8 +575,8 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( !GetName().getString().isEmpty() )
{
- rOutStm << ' ';
- rOutStm << GetName().getString().getStr();
+ rOutStm.WriteChar( ' ' );
+ rOutStm.WriteCharPtr( GetName().getString().getStr() );
}
if( pType->GetType() == TYPE_METHOD )
pType->WriteMethodArgs( rBase, rOutStm, nTab, nT );
@@ -591,10 +591,10 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
const char * pName = name.getStr();
WriteTab( rOutStm, nTab );
pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- rOutStm << ' ' << pName;
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( pName );
pType->WriteMethodArgs( rBase, rOutStm, nTab, nT );
if( nT == WRITE_C_HEADER )
- rOutStm << ';' << endl << endl;
+ rOutStm.WriteChar( ';' ) << endl << endl;
else
WriteCSource( rBase, rOutStm, sal_False );
}
@@ -603,7 +603,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( nBType == TYPE_STRUCT )
{
// for assistance emit the name of the property as acomment
- rOutStm << "/* " << GetName().getString().getStr() << " */" << endl;
+ rOutStm.WriteCharPtr( "/* " ).WriteCharPtr( GetName().getString().getStr() ).WriteCharPtr( " */" ) << endl;
WriteRecursiv_Impl( rBase, rOutStm, nTab, nT, nA );
}
@@ -616,15 +616,15 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
// allocation
WriteTab( rOutStm, nTab );
- rOutStm << "void ";
- rOutStm << rBase.aIFaceName.getStr()
- << "Set" << name.getStr() << "( " << C_PREF
- << "Object h" << rBase.aIFaceName.getStr() << ", " << endl;
+ 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 << ' ' << name.getStr() << " )";
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( name.getStr() ).WriteCharPtr( " )" );
if( nT == WRITE_C_HEADER )
- rOutStm << ';' << endl << endl;
+ rOutStm.WriteChar( ';' ) << endl << endl;
else
WriteCSource( rBase, rOutStm, sal_True );
}
@@ -632,12 +632,12 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
// access
WriteTab( rOutStm, nTab );
pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- rOutStm << ' ';
- rOutStm << rBase.aIFaceName.getStr()
- << "Get" << name.getStr() << "( " << C_PREF
- << "Object h" << rBase.aIFaceName.getStr() << " )";
+ 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 << ';' << endl << endl;
+ rOutStm.WriteChar( ';' ) << endl << endl;
else
WriteCSource( rBase, rOutStm, sal_False );
}
@@ -647,21 +647,21 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
if( !bVariable && IsMethod() )
{
- rOutStm << "<METHOD>" << endl
- << GetSlotId().getString().getStr() << endl
- << GetName().getString().getStr() << endl
+ rOutStm.WriteCharPtr( "<METHOD>" ) << endl;
+ rOutStm.WriteCharPtr( GetSlotId().getString().getStr() ) << endl;
+ rOutStm.WriteCharPtr( GetName().getString().getStr() ) << endl
<< endl; // readonly
// return type
SvMetaType* pType2 = GetType();
SvMetaType* pBaseType2 = pType2->GetBaseType();
- rOutStm << pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().getStr() << endl;
+ rOutStm.WriteCharPtr( pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().getStr() ) << endl;
DBG_ASSERT( !pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().isEmpty(),
"Leerer BasicName" );
// syntax
- rOutStm << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( GetName().getString().getStr() );
pType2->WriteMethodArgs( rBase, rOutStm, nTab, nT );
// C return type
@@ -669,13 +669,13 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
rOutStm << endl;
// for methods also C syntax
- rOutStm << "<C-SYNTAX>" << endl;
+ rOutStm.WriteCharPtr( "<C-SYNTAX>" ) << endl;
Write( rBase, rOutStm, 0, WRITE_C_HEADER, nA );
- rOutStm << "</C-SYNTAX>" << endl;
+ rOutStm.WriteCharPtr( "</C-SYNTAX>" ) << endl;
// description
WriteDescription( rOutStm );
- rOutStm << "</METHOD>" << endl << endl;
+ rOutStm.WriteCharPtr( "</METHOD>" ) << endl << endl;
}
else if( bVariable && IsVariable() )
{
@@ -685,16 +685,16 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
}
else
{
- rOutStm << "<PROPERTY>" << endl
- << GetSlotId().getString().getStr() << endl
- << GetName().getString().getStr() << endl;
+ rOutStm.WriteCharPtr( "<PROPERTY>" ) << endl;
+ rOutStm.WriteCharPtr( GetSlotId().getString().getStr() ) << endl;
+ rOutStm.WriteCharPtr( GetName().getString().getStr() ) << endl;
if ( GetReadonly() )
- rOutStm << "(nur lesen)" << endl;
+ rOutStm.WriteCharPtr( "(nur lesen)" ) << endl;
else
rOutStm << endl;
// for properties type instead of the return value
- rOutStm << pBaseType->GetBasicName().getStr() << endl;
+ rOutStm.WriteCharPtr( pBaseType->GetBasicName().getStr() ) << endl;
DBG_ASSERT( !pBaseType->GetBasicName().isEmpty(),
"Leerer BasicName" );
@@ -708,7 +708,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
// description
WriteDescription( rOutStm );
- rOutStm << "</PROPERTY>" << endl << endl;
+ rOutStm.WriteCharPtr( "</PROPERTY>" ) << endl << endl;
}
}
}
@@ -837,7 +837,7 @@ void SvMetaType::Save( SvPersistStream & rStm )
if( aBasicPostfix.IsSet() ) nMask |= 0x8000;
// write data
- rStm << nMask;
+ rStm.WriteUInt16( nMask );
if( nMask & 0x0001 ) WriteSvBOOL( rStm, aIn );
if( nMask & 0x0002 ) WriteSvBOOL( rStm, aOut );
if( nMask & 0x0004 ) WriteSvint( rStm, aCall0 );
@@ -847,8 +847,8 @@ void SvMetaType::Save( SvPersistStream & rStm )
if( nMask & 0x0040 ) WriteSvIdentifier( rStm, aSbxName );
if( nMask & 0x0080 ) WriteSvIdentifier( rStm, aOdlName );
if( nMask & 0x0100 ) WriteSvDeclPersistList( rStm, *pAttrList );
- if( nMask & 0x0800 ) rStm << (sal_uInt16)nType;
- if( nMask & 0x1000 ) rStm << cParserChar;
+ if( nMask & 0x0800 ) rStm.WriteUInt16( (sal_uInt16)nType );
+ if( nMask & 0x1000 ) rStm.WriteChar( cParserChar );
if( nMask & 0x2000 ) WriteSvIdentifier( rStm, aCName );
if( nMask & 0x4000 ) WriteSvIdentifier( rStm, aBasicName );
if( nMask & 0x8000 ) WriteSvIdentifier( rStm, aBasicPostfix );
@@ -1127,7 +1127,7 @@ void SvMetaType::WriteSvIdl
if( TestAndSeekSpaceOnly( rOutStm, nOldPos ) )
// nothin written
rOutStm.Seek( nOldPos );
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
}
void SvMetaType::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
@@ -1142,9 +1142,9 @@ void SvMetaType::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
SvMetaAttribute * pAttr = *it;
pAttr->Write( rBase, rOutStm, nTab, nT, nA );
if( GetType() == TYPE_METHOD )
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
else
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
++it;
}
}
@@ -1180,39 +1180,39 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if ( nT == WRITE_C_HEADER )
{
OString aStr = name.toAsciiUpperCase();
- rOutStm << "#ifndef " << C_PREF << aStr.getStr() << "_DEF " << endl;
- rOutStm << "#define " << C_PREF << aStr.getStr() << "_DEF " << endl;
+ 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 << "typedef" << endl;
+ rOutStm.WriteCharPtr( "typedef" ) << endl;
if ( nT == WRITE_ODL )
SvMetaName::Write( rBase, rOutStm, nTab, nT, nA );
}
WriteTab( rOutStm, nTab );
if( nType == TYPE_STRUCT )
- rOutStm << "struct";
+ rOutStm.WriteCharPtr( "struct" );
else if( nType == TYPE_UNION )
- rOutStm << "union";
+ rOutStm.WriteCharPtr( "union" );
else
- rOutStm << "enum";
+ rOutStm.WriteCharPtr( "enum" );
if( nT != WRITE_ODL && nT != WRITE_C_HEADER)
- rOutStm << ' ' << name.getStr();
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( name.getStr() );
rOutStm << endl;
WriteTab( rOutStm, nTab );
- rOutStm << '{' << endl;
+ rOutStm.WriteChar( '{' ) << endl;
WriteContext( rBase, rOutStm, nTab +1, nT, nA );
WriteTab( rOutStm, nTab );
- rOutStm << '}';
+ rOutStm.WriteChar( '}' );
if( nT == WRITE_ODL || nT == WRITE_C_HEADER )
{
- rOutStm << ' ' << C_PREF << name.getStr();
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( C_PREF ).WriteCharPtr( name.getStr() );
}
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
if ( nT == WRITE_C_HEADER )
- rOutStm << "#endif";
+ rOutStm.WriteCharPtr( "#endif" );
rOutStm << endl;
}
break;
@@ -1246,52 +1246,52 @@ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
case TYPE_CLASS:
{
if( IsShell() )
- rOutStm << SvHash_shell()->GetName().getStr();
+ rOutStm.WriteCharPtr( SvHash_shell()->GetName().getStr() );
else
- rOutStm << SvHash_interface()->GetName().getStr();
- rOutStm << ' ' << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( SvHash_interface()->GetName().getStr() );
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
}
break;
case TYPE_STRUCT:
{
- rOutStm << SvHash_struct()->GetName().getStr()
- << ' ' << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( SvHash_struct()->GetName().getStr() )
+ .WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
}
break;
case TYPE_UNION:
{
- rOutStm << SvHash_union()->GetName().getStr()
- << ' ' << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( SvHash_union()->GetName().getStr() )
+ .WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
}
break;
case TYPE_ENUM:
{
- rOutStm << SvHash_enum()->GetName().getStr()
- << ' ' << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( SvHash_enum()->GetName().getStr() )
+ .WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
}
break;
case TYPE_POINTER:
case TYPE_BASE:
{
if( IsItem() )
- rOutStm << SvHash_item()->GetName().getStr() << ' ';
+ rOutStm.WriteCharPtr( SvHash_item()->GetName().getStr() ).WriteChar( ' ' );
else
- rOutStm << SvHash_typedef()->GetName().getStr() << ' ';
+ rOutStm.WriteCharPtr( SvHash_typedef()->GetName().getStr() ).WriteChar( ' ' );
if( GetRef() )
{
((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ' ';
+ rOutStm.WriteChar( ' ' );
}
- rOutStm << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( GetName().getString().getStr() );
}
break;
case TYPE_METHOD:
{
- rOutStm << SvHash_typedef()->GetName().getStr() << ' ';
+ rOutStm.WriteCharPtr( SvHash_typedef()->GetName().getStr() ).WriteChar( ' ' );
((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm << ' ' << GetName().getString().getStr() << "( ";
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() ).WriteCharPtr( "( " );
WriteContextSvIdl( rBase, rOutStm, nTab );
- rOutStm << " )";
+ rOutStm.WriteCharPtr( " )" );
}
break;
}
@@ -1315,7 +1315,7 @@ void SvMetaType::WriteAttributesSvIdl( SvIdlDataBase & rBase,
if( aSvName.getString() != name || aSbxName.getString() != name || aOdlName.getString() != name )
{
WriteTab( rOutStm, nTab );
- rOutStm << "class SvMetaType" << endl;
+ rOutStm.WriteCharPtr( "class SvMetaType" ) << endl;
if( aSvName.getString() != name )
{
WriteTab( rOutStm, nTab );
@@ -1364,9 +1364,9 @@ void SvMetaType::WriteContextSvIdl
WriteTab( rOutStm, nTab );
pAttr->WriteSvIdl( rBase, rOutStm, nTab );
if( GetType() == TYPE_METHOD )
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
else
- rOutStm << ';' << endl;
+ rOutStm.WriteChar( ';' ) << endl;
++it;
}
}
@@ -1411,28 +1411,29 @@ void SvMetaType::WriteSfxItem(
OString::number(nAttrCount));
aTypeName.append(aAttrCount);
- rOutStm << "extern " << aTypeName.getStr()
- << aVarName.getStr() << ';' << endl;
+ rOutStm.WriteCharPtr( "extern " ).WriteCharPtr( aTypeName.getStr() )
+ .WriteCharPtr( aVarName.getStr() ).WriteChar( ';' ) << endl;
// write the implementation part
- rOutStm << "#ifdef SFX_TYPEMAP" << endl
- << "#if !defined(_WIN32) && ((defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS))) || defined(LIBO_MERGELIBS))" << endl
- << "__attribute__((__weak__))" << endl
- << "#endif" << endl
- << aTypeName.getStr() << aVarName.getStr()
- << " = " << endl;
- rOutStm << '{' << endl
- << "\tTYPE(" << rItemName.getStr() << "), "
- << aAttrCount.getStr();
+ rOutStm.WriteCharPtr( "#ifdef SFX_TYPEMAP" ) << endl;
+ rOutStm.WriteCharPtr( "#if !defined(_WIN32) && ((defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS))) || defined(LIBO_MERGELIBS))" ) << endl;
+ rOutStm.WriteCharPtr( "__attribute__((__weak__))" ) << endl;
+ rOutStm.WriteCharPtr( "#endif" ) << endl;
+ rOutStm.WriteCharPtr( aTypeName.getStr() ).WriteCharPtr( aVarName.getStr() )
+ .WriteCharPtr( " = " ) << endl;
+ rOutStm.WriteChar( '{' ) << endl;
+ rOutStm.WriteCharPtr( "\tTYPE(" ).WriteCharPtr( rItemName.getStr() ).WriteCharPtr( "), " )
+ .WriteCharPtr( aAttrCount.getStr() );
if( nAttrCount )
{
- rOutStm << ", { ";
+ rOutStm.WriteCharPtr( ", { " );
// write the single attributes
- rOutStm << aAttrArray.getStr();
- rOutStm << " }";
+ rOutStm.WriteCharPtr( aAttrArray.getStr() );
+ rOutStm.WriteCharPtr( " }" );
}
- rOutStm << endl << "};" << endl
- << "#endif" << endl << endl;
+ rOutStm << endl;
+ rOutStm.WriteCharPtr( "};" ) << endl;
+ rOutStm.WriteCharPtr( "#endif" ) << endl << endl;
}
void SvMetaType::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
@@ -1476,7 +1477,7 @@ void SvMetaType::WriteMethodArgs
{
rOutStm << endl;
WriteTab( rOutStm, nTab );
- rOutStm << '(' << endl;
+ rOutStm.WriteChar( '(' ) << endl;
SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
while( it != pAttrList->end() )
@@ -1486,19 +1487,19 @@ void SvMetaType::WriteMethodArgs
pAttr->WriteSvIdl( rBase, rOutStm, nTab +1 );
++it;
if( it != pAttrList->end() )
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
}
rOutStm << endl;
WriteTab( rOutStm, nTab );
- rOutStm << ')';
+ rOutStm.WriteChar( ')' );
}
else
- rOutStm << "()";
+ rOutStm.WriteCharPtr( "()" );
}
else if ( nT == WRITE_DOCU )
{
- rOutStm << '(';
+ rOutStm.WriteChar( '(' );
if( GetAttrCount() )
{
SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
@@ -1508,23 +1509,23 @@ void SvMetaType::WriteMethodArgs
pAttr->WriteParam( rBase, rOutStm, nTab+1, nT );
++it;
if( it != pAttrList->end() )
- rOutStm << ',';
+ rOutStm.WriteChar( ',' );
else
- rOutStm << ' ';
+ rOutStm.WriteChar( ' ' );
}
}
- rOutStm << ')' << endl;
+ rOutStm.WriteChar( ')' ) << endl;
}
else
{
- rOutStm << '(';
+ rOutStm.WriteChar( '(' );
if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
{
- rOutStm << ' ' << C_PREF << "Object h" << rBase.aIFaceName.getStr();
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( C_PREF ).WriteCharPtr( "Object h" ).WriteCharPtr( rBase.aIFaceName.getStr() );
if( GetAttrCount() )
- rOutStm << ',';
+ rOutStm.WriteChar( ',' );
else
- rOutStm << ' ';
+ rOutStm.WriteChar( ' ' );
}
if( GetAttrCount() )
@@ -1551,16 +1552,16 @@ void SvMetaType::WriteMethodArgs
}
++it;
if( it != pAttrList->end() )
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
}
if( nT != WRITE_C_HEADER && nT != WRITE_C_SOURCE )
{
rOutStm << endl;
WriteTab( rOutStm, nTab +1 );
}
- rOutStm << ' ';
+ rOutStm.WriteChar( ' ' );
}
- rOutStm << ')';
+ rOutStm.WriteChar( ')' );
}
}
@@ -1572,12 +1573,12 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
case WRITE_IDL:
{
if( GetIn() && GetOut() )
- rOutStm << SvHash_inout()->GetName().getStr() << ' ';
+ rOutStm.WriteCharPtr( SvHash_inout()->GetName().getStr() ).WriteChar( ' ' );
else if( GetIn() )
- rOutStm << SvHash_in()->GetName().getStr() << ' ';
+ rOutStm.WriteCharPtr( SvHash_in()->GetName().getStr() ).WriteChar( ' ' );
else if( GetOut() )
- rOutStm << SvHash_out()->GetName().getStr() << ' ';
- rOutStm << GetCString().getStr();
+ rOutStm.WriteCharPtr( SvHash_out()->GetName().getStr() ).WriteChar( ' ' );
+ rOutStm.WriteCharPtr( GetCString().getStr() );
}
break;
@@ -1588,11 +1589,11 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
if( bIn || bOut )
{
if( bIn && bOut )
- rOutStm << "[in,out] ";
+ rOutStm.WriteCharPtr( "[in,out] " );
else if( bIn )
- rOutStm << "[in] ";
+ rOutStm.WriteCharPtr( "[in] " );
else if( bOut )
- rOutStm << "[out] ";
+ rOutStm.WriteCharPtr( "[out] " );
}
OString out;
@@ -1605,11 +1606,11 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
}
if( aCall0 == (int)CALL_POINTER
|| aCall0 == (int)CALL_REFERENCE )
- rOutStm << " *";
+ rOutStm.WriteCharPtr( " *" );
if( aCall1 == (int)CALL_POINTER
|| aCall1 == (int)CALL_REFERENCE )
- rOutStm << " *";
- rOutStm << out.getStr();
+ rOutStm.WriteCharPtr( " *" );
+ rOutStm.WriteCharPtr( out.getStr() );
}
break;
@@ -1628,21 +1629,21 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
else if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << C_PREF << pBaseType->GetName().getString().getStr()
- << " *";
+ rOutStm.WriteCharPtr( C_PREF ).WriteCharPtr( pBaseType->GetName().getString().getStr() )
+ .WriteCharPtr( " *" );
else
{
if ( pBaseType->GetType() == TYPE_ENUM )
- rOutStm << C_PREF;
- rOutStm << pBaseType->GetCName().getStr();
+ rOutStm.WriteCharPtr( C_PREF );
+ rOutStm.WriteCharPtr( pBaseType->GetCName().getStr() );
}
}
else
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << pBaseType->GetName().getString().getStr() << " *";
+ rOutStm.WriteCharPtr( pBaseType->GetName().getString().getStr() ).WriteCharPtr( " *" );
else
- rOutStm << pBaseType->GetName().getString().getStr();
+ rOutStm.WriteCharPtr( pBaseType->GetName().getString().getStr() );
}
}
break;
@@ -1661,11 +1662,11 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
else
{
if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm << "VARIANT" << pBaseType->GetName().getString().getStr();
+ rOutStm.WriteCharPtr( "VARIANT" ).WriteCharPtr( pBaseType->GetName().getString().getStr() );
else if ( pBaseType->GetType() == TYPE_ENUM )
- rOutStm << "integer";
+ rOutStm.WriteCharPtr( "integer" );
else
- rOutStm << pBaseType->GetOdlName().getStr();
+ rOutStm.WriteCharPtr( pBaseType->GetOdlName().getStr() );
}
}
@@ -1729,11 +1730,11 @@ void SvMetaType::WriteParamNames( SvIdlDataBase & rBase,
OString aStr = pA->GetName().getString();
pA->GetType()->WriteParamNames( rBase, rOutStm, aStr );
if( n +1 < nAttrCount )
- rOutStm << ", ";
+ rOutStm.WriteCharPtr( ", " );
}
}
else
- rOutStm << rChief.getStr();
+ rOutStm.WriteCharPtr( rChief.getStr() );
}
}
@@ -1782,7 +1783,7 @@ void SvMetaEnumValue::Save( SvPersistStream & rStm )
if( !aEnumValue.isEmpty() ) nMask |= 0x01;
// write data
- rStm << nMask;
+ rStm.WriteUChar( nMask );
if( nMask & 0x01 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aEnumValue);
}
@@ -1796,16 +1797,16 @@ sal_Bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
void SvMetaEnumValue::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
{
- rOutStm << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( GetName().getString().getStr() );
}
void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16,
WriteType nT, WriteAttribute )
{
if ( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- rOutStm << C_PREF << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( C_PREF ).WriteCharPtr( GetName().getString().getStr() );
else
- rOutStm << GetName().getString().getStr();
+ rOutStm.WriteCharPtr( GetName().getString().getStr() );
}
SV_IMPL_META_FACTORY1( SvMetaTypeEnum, SvMetaType );
@@ -1840,7 +1841,7 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm )
if( !aPrefix.isEmpty() ) nMask |= 0x02;
// write data
- rStm << nMask;
+ rStm.WriteUChar( nMask );
if( nMask & 0x01 ) WriteSvDeclPersistList( rStm, aEnumValueList );
if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
}
@@ -1894,7 +1895,7 @@ void SvMetaTypeEnum::WriteContextSvIdl( SvIdlDataBase & rBase,
{
aEnumValueList[n]->WriteSvIdl( rBase, rOutStm, nTab );
if( n + 1 != aEnumValueList.size() )
- rOutStm << ", ";
+ rOutStm.WriteCharPtr( ", " );
else
rOutStm << endl;
}
@@ -1943,11 +1944,11 @@ void SvMetaTypeEnum::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
{
if( 2 == n % 3 )
{
- rOutStm << ',' << endl;
+ rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, nTab +1 );
}
else
- rOutStm << ",\t";
+ rOutStm.WriteCharPtr( ",\t" );
}
else
rOutStm << endl;
@@ -2036,9 +2037,9 @@ OString SvMetaAttribute::Compare( SvMetaAttribute* pAttr )
void SvMetaAttribute::WriteCSV( SvIdlDataBase&, SvStream& rStrm )
{
- rStrm << GetType()->GetSvName().getStr() << ' ';
- rStrm << GetName().getString().getStr() << ' ';
- rStrm << GetSlotId().getString().getStr();
+ rStrm.WriteCharPtr( GetType()->GetSvName().getStr() ).WriteChar( ' ' );
+ rStrm.WriteCharPtr( GetName().getString().getStr() ).WriteChar( ' ' );
+ rStrm.WriteCharPtr( GetSlotId().getString().getStr() );
}
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 1439ce7a1fb4..c1152e6d94b7 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -128,8 +128,8 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags )
SvPersistStream aPStm( *IDLAPP->pClassMgr, &rStm );
aPStm.SetContextFlags( nFlags );
- aPStm << (sal_uInt32)DATABASE_SIGNATURE;
- aPStm << (sal_uInt16)DATABASE_VER;
+ aPStm.WriteUInt32( (sal_uInt32)DATABASE_SIGNATURE );
+ aPStm.WriteUInt16( (sal_uInt16)DATABASE_VER );
sal_Bool bOnlyStreamedObjs = sal_False;
if( nFlags & IDL_WRITE_CALLING )
@@ -152,7 +152,7 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags )
aTypeList.WriteObjects( aPStm, bOnlyStreamedObjs );
aAttrList.WriteObjects( aPStm, bOnlyStreamedObjs );
aModuleList.WriteObjects( aPStm, bOnlyStreamedObjs );
- aPStm << nUniqueId;
+ aPStm.WriteUInt32( nUniqueId );
}
void SvIdlDataBase::SetError( const OString& rError, SvToken * pTok )
@@ -709,9 +709,9 @@ sal_Bool SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm )
for ( size_t i = 0, n = aList.size(); i < n; ++i )
{
SvStringHashEntry* pEntry = aList[ i ];
- rOutStm << "#define " << pEntry->GetName().getStr()
- << '\t'
- << OString::number(pEntry->GetValue()).getStr()
+ rOutStm.WriteCharPtr( "#define " ).WriteCharPtr( pEntry->GetName().getStr() )
+ .WriteChar( '\t' )
+ .WriteCharPtr( OString::number(pEntry->GetValue()).getStr() )
<< endl;
}
}
@@ -746,7 +746,7 @@ sal_Bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm )
pType->WriteSfx( *this, rOutStm );
}
aUsedTypes.clear();
- rOutStm << aTmpStm;
+ rOutStm.WriteStream( aTmpStm );
return sal_True;
}
@@ -833,8 +833,8 @@ struct WriteDep
explicit WriteDep(SvFileStream & rStream) : m_rStream(rStream) { }
void operator() (OUString const& rItem)
{
- m_rStream << " \\\n ";
- m_rStream << OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr();
+ m_rStream.WriteCharPtr( " \\\n " );
+ m_rStream.WriteCharPtr( OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr() );
}
};
@@ -846,18 +846,18 @@ struct WriteDummy
explicit WriteDummy(SvFileStream & rStream) : m_rStream(rStream) { }
void operator() (OUString const& rItem)
{
- m_rStream << OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr();
- m_rStream << " :\n\n";
+ m_rStream.WriteCharPtr( OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr() );
+ m_rStream.WriteCharPtr( " :\n\n" );
}
};
bool SvIdlDataBase::WriteDepFile(
SvFileStream & rStream, OUString const& rTarget)
{
- rStream << OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr();
- rStream << " :";
+ rStream.WriteCharPtr( OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr() );
+ rStream.WriteCharPtr( " :" );
::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDep(rStream));
- rStream << "\n\n";
+ rStream.WriteCharPtr( "\n\n" );
::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDummy(rStream));
return rStream.GetError() == SVSTREAM_OK;
}