summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/sbx/sbxbase.cxx6
-rw-r--r--basic/source/sbx/sbxcoll.cxx2
-rw-r--r--basic/source/sbx/sbxobj.cxx8
-rw-r--r--basic/source/sbx/sbxvalue.cxx8
-rw-r--r--basic/source/sbx/sbxvar.cxx2
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx6
-rw-r--r--editeng/source/editeng/editobj.cxx4
-rw-r--r--extensions/source/scanner/scanwin.cxx4
-rw-r--r--idl/inc/bastype.hxx2
-rw-r--r--idl/source/objects/bastype.cxx4
-rw-r--r--idl/source/objects/module.cxx6
-rw-r--r--idl/source/objects/object.cxx2
-rw-r--r--idl/source/objects/types.cxx4
-rw-r--r--include/svl/filerec.hxx2
-rw-r--r--include/tools/inetmsg.hxx4
-rw-r--r--include/tools/stream.hxx84
-rw-r--r--sc/inc/bigrange.hxx2
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx3
-rw-r--r--sc/source/filter/html/htmlexp.cxx14
-rw-r--r--sc/source/filter/inc/xlescher.hxx9
-rw-r--r--sd/source/filter/html/pubdlg.cxx16
-rw-r--r--sot/source/sdstor/ucbstorage.cxx2
-rw-r--r--starmath/source/eqnolefilehdr.hxx16
-rw-r--r--svtools/source/graphic/grfmgr.cxx2
-rw-r--r--svtools/source/misc/imap.cxx14
-rw-r--r--svx/source/gallery2/galobj.cxx10
-rw-r--r--svx/source/gallery2/galtheme.cxx4
-rw-r--r--sw/source/core/doc/tblafmt.cxx4
-rw-r--r--sw/source/core/inc/swfont.hxx21
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx4
-rw-r--r--tools/source/inet/inetmsg.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx2
-rw-r--r--vcl/source/gdi/animate.cxx2
-rw-r--r--vcl/source/gdi/cvtsvm.cxx2
-rw-r--r--vcl/source/gdi/jobset.cxx14
-rw-r--r--vcl/source/gdi/metaact.cxx10
-rw-r--r--vcl/source/gdi/print.cxx8
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx22
40 files changed, 135 insertions, 202 deletions
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 05b84b2bdb1b..376da5467ae3 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -391,14 +391,14 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const
{
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aComment,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aComment,
RTL_TEXTENCODING_ASCII_US );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aHelpFile,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aHelpFile,
RTL_TEXTENCODING_ASCII_US);
rStrm.WriteUInt32( nHelpId ).WriteUInt16( static_cast<sal_uInt16>(aParams.size()) );
for(SbxParams::const_iterator i = aParams.begin(); i != aParams.end(); ++i)
{
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, i->aName,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, i->aName,
RTL_TEXTENCODING_ASCII_US);
rStrm.WriteUInt16( (sal_uInt16) i->eType )
.WriteUInt16( (sal_uInt16) i->nFlags )
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index d92b0f3f9d1a..741735b32186 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -314,7 +314,7 @@ sal_Bool SbxStdCollection::StoreData( SvStream& rStrm ) const
sal_Bool bRes = SbxCollection::StoreData( rStrm );
if( bRes )
{
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aElemClass,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aElemClass,
RTL_TEXTENCODING_ASCII_US);
rStrm.WriteUChar( bAddRemoveOk );
}
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 5a0750f2161e..4b6c7dbcff5e 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -676,8 +676,8 @@ sal_Bool SbxObject::StoreData( SvStream& rStrm ) const
{
aDfltProp = pDfltProp->GetName();
}
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US);
sal_uIntPtr nPos = rStrm.Tell();
rStrm.WriteUInt32( (sal_uInt32) 0L );
if( !StorePrivateData( rStrm ) )
@@ -876,7 +876,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
{
aLine += " !! Not a Method !!";
}
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
// Output also the object at object-methods
if ( pVar->GetValues_Impl().eType == SbxOBJECT &&
@@ -915,7 +915,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
{
aLine += " !! Not a Property !!";
}
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
// output also the object at object properties
if ( pVar->GetValues_Impl().eType == SbxOBJECT &&
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 019834fa35eb..3cdaeb588e20 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1568,12 +1568,12 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxDATE:
// #49935: Save as double, otherwise an error during the read in
((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
((SbxValue*)this)->aData.eType = (SbxDataType)nType;
break;
case SbxSINGLE:
case SbxDOUBLE:
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
break;
case SbxSALUINT64:
case SbxSALINT64:
@@ -1590,11 +1590,11 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxSTRING:
if( aData.pOUString )
{
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US);
}
else
{
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, OUString(), RTL_TEXTENCODING_ASCII_US);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(r, OUString(), RTL_TEXTENCODING_ASCII_US);
}
break;
case SbxERROR:
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index d20ab4a1bc56..d621d662706f 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -644,7 +644,7 @@ sal_Bool SbxVariable::StoreData( SvStream& rStrm ) const
{
return sal_False;
}
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, maName,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, maName,
RTL_TEXTENCODING_ASCII_US);
rStrm.WriteUInt32( (sal_uInt32)nUserData );
if( pInfo.Is() )
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 29482ed378be..e12d111b392c 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -641,9 +641,9 @@ const char OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\
// Macros for HTML-Export
#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag )
#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, sal_False )
-#define OUT_LF() (*m_pStream) << SAL_NEWLINE_STRING << GetIndentStr()
-#define TAG_ON_LF( tag ) (TAG_ON( tag ) << SAL_NEWLINE_STRING << GetIndentStr())
-#define TAG_OFF_LF( tag ) (TAG_OFF( tag ) << SAL_NEWLINE_STRING << GetIndentStr())
+#define OUT_LF() m_pStream->WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() )
+#define TAG_ON_LF( tag ) (TAG_ON( tag ).WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() ))
+#define TAG_OFF_LF( tag ) (TAG_OFF( tag ).WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() ))
OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataDescriptor,
const Reference< XComponentContext >& _rM,
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index eee3e24eafce..e812547eb73e 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1215,10 +1215,10 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
// Convert CH_FEATURE to CH_FEATURE_OLD
OString aText = aBuffer.makeStringAndClear().replace(cFeatureConverted, CH_FEATURE_OLD);
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, aText);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, aText);
// StyleName and Family...
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rC.GetStyle(), eEncoding);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rC.GetStyle(), eEncoding);
rOStream.WriteUInt16( static_cast<sal_uInt16>(rC.GetFamily()) );
// Paragraph attributes ...
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index 319445f178d5..6db9b66e331a 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -847,8 +847,8 @@ uno::Sequence< sal_Int8 > ScannerManager::getDIB() throw()
sal_Int8* pBuf = aRet.getArray();
SvMemoryStream* pMemStm = new SvMemoryStream( (char*) pBuf, sizeof( BITMAPFILEHEADER ), STREAM_WRITE );
- *pMemStm << 'B' << 'M' << (sal_uInt32) 0 << (sal_uInt32) 0;
- *pMemStm << (sal_uInt32) ( sizeof( BITMAPFILEHEADER ) + pBIH->biSize + ( nColEntries * sizeof( RGBQUAD ) ) );
+ pMemStm->WriteChar( 'B' ).WriteChar( 'M' ).WriteUInt32( 0 ).WriteUInt32( 0 );
+ pMemStm->WriteUInt32( sizeof( BITMAPFILEHEADER ) + pBIH->biSize + ( nColEntries * sizeof( RGBQUAD ) ) );
delete pMemStm;
memcpy( pBuf + sizeof( BITMAPFILEHEADER ), pBIH, nDIBSize );
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index 8a2fe6f65a4e..4c7b2da8fca6 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -63,7 +63,7 @@ public:
sal_Bool IsSet() const { return bSet; }
friend SvStream& WriteSvint(SvStream & rStm, const Svint & r )
- { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); rStm << r.bSet; return rStm; }
+ { SvUINT32::Write( rStm, (sal_uInt32)r.nVal ); rStm.WriteUInt8( r.bSet ); return rStm; }
friend SvStream& operator >> (SvStream & rStm, Svint & r )
{ r.nVal = (int)SvUINT32::Read( rStm ); rStm >> r.bSet ; return rStm; }
};
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 7f517e7f4632..b315190773d2 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -214,7 +214,7 @@ sal_Bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName,
SvStream& WriteSvIdentifier(SvStream & rStm, const SvIdentifier & r )
{
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r.getString());
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, r.getString());
return rStm;
}
@@ -327,7 +327,7 @@ sal_Bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
SvStream& WriteSvString(SvStream & rStm, const SvString & r )
{
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r.getString());
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, r.getString());
return rStm;
}
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index ac9aed0930f9..72985e968cfd 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -82,9 +82,9 @@ void SvMetaModule::Save( SvPersistStream & rStm )
WriteSvDeclPersistList( rStm, aAttrList );
// browser
rStm.WriteUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aHelpFileName.getString());
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aSlotIdFile.getString());
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aModulePrefix.getString());
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aHelpFileName.getString());
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aSlotIdFile.getString());
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aModulePrefix.getString());
// write compiler data
sal_uInt16 nCmpLen = 0;
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index a0c3b55fbcc5..74977a1e75c5 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -64,7 +64,7 @@ void SvClassElement::Save( SvPersistStream & rStm )
// write data
rStm.WriteUChar( nMask );
if( nMask & 0x01 ) rStm.WriteUChar( aAutomation );
- if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
+ if( nMask & 0x02 ) write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aPrefix);
if( nMask & 0x04 ) WriteSvPersistBase( rStm, xClass );
}
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 89ce61f6c32e..d0ff705aa245 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -1784,7 +1784,7 @@ void SvMetaEnumValue::Save( SvPersistStream & rStm )
// write data
rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aEnumValue);
+ if( nMask & 0x01 ) write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aEnumValue);
}
sal_Bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
@@ -1843,7 +1843,7 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm )
// write data
rStm.WriteUChar( nMask );
if( nMask & 0x01 ) WriteSvDeclPersistList( rStm, aEnumValueList );
- if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
+ if( nMask & 0x02 ) write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aPrefix);
}
namespace
diff --git a/include/svl/filerec.hxx b/include/svl/filerec.hxx
index 3cc9248a8476..b7aca769a8bf 100644
--- a/include/svl/filerec.hxx
+++ b/include/svl/filerec.hxx
@@ -601,7 +601,7 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter( SvStream* pStream, sal_uInt8 nT
DBG(_nStartPos = pStream->Tell());
DBG( DbgOutf( "SfxFileRec: writing record to %ul", _nStartPos ) );
- *pStream << ( ( nTag << 24 ) | nSize );
+ pStream->WriteUInt32( ( nTag << 24 ) | nSize );
}
/** The destructor closes the record automatically if not done earlier */
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index d8af698dcc9a..4c07726bed42 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -65,8 +65,8 @@ public:
friend SvStream& WriteINetMessageHeader(
SvStream& rStrm, const INetMessageHeader& rHdr)
{
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStrm, rHdr.m_aName);
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStrm, rHdr.m_aValue);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStrm, rHdr.m_aName);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStrm, rHdr.m_aValue);
return rStrm;
}
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 320e10b03635..cfd4836aa82d 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -315,36 +315,6 @@ public:
SvStream& operator>>( double& rDouble );
SvStream& operator>>( SvStream& rStream );
- SvStream& operator<<( sal_uInt16 nUInt16 )
- { return WriteUInt16(nUInt16); }
- SvStream& operator<<( sal_uInt32 nUInt32 )
- { return WriteUInt32(nUInt32); }
- SvStream& operator<<( sal_uInt64 nuInt64 )
- { return WriteUInt64(nuInt64); }
- SvStream& operator<<( sal_Int16 nInt16 )
- { return WriteInt16(nInt16); }
- SvStream& operator<<( sal_Int32 nInt32 )
- { return WriteInt32(nInt32); }
- SvStream& operator<<( sal_Int64 nInt64 ) SAL_DELETED_FUNCTION;
- SvStream& operator<<( bool b )
- { return operator<<(static_cast< sal_Bool >(b)); }
- SvStream& operator<<( signed char nChar )
- { return WriteSChar(nChar); }
- SvStream& operator<<( char nChar )
- { return WriteChar(nChar); }
- SvStream& operator<<( unsigned char nChar )
- { return WriteUChar(nChar); }
- SvStream& operator<<( float nFloat )
- { return WriteFloat(nFloat); }
- SvStream& operator<<( const double& rDouble )
- { return WriteDouble(rDouble); }
- SvStream& operator<<( const char* pBuf )
- { return WriteCharPtr(pBuf); }
- SvStream& operator<<( const unsigned char* pBuf )
- { return WriteUCharPtr(pBuf); }
- SvStream& operator<<( SvStream& rStream )
- { return WriteStream(rStream); }
-
SvStream& WriteUInt16( sal_uInt16 nUInt16 );
SvStream& WriteUInt32( sal_uInt32 nUInt32 );
SvStream& WriteUInt64( sal_uInt64 nuInt64 );
@@ -577,39 +547,6 @@ TOOLS_DLLPUBLIC inline sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
return write_uInt16s_FromOUString(rStrm, rStr, rStr.getLength());
}
-namespace streamdetail
-{
- /// Attempt to write a pascal-style length (of type prefix) prefixed
- /// sequence of units from a string-type, returned value is number of bytes
- /// written (including byte-count of prefix)
- template<typename prefix, typename S, sal_Size (*writeOper)(SvStream&, const S&, sal_Size)>
- sal_Size write_lenPrefixed_seq_From_str(SvStream& rStrm, const S &rStr)
- {
- sal_Size nWritten = 0;
- prefix nUnits = std::min<sal_Size>(rStr.getLength(), std::numeric_limits<prefix>::max());
- SAL_WARN_IF(static_cast<sal_Size>(nUnits) != static_cast<sal_Size>(rStr.getLength()),
- "tools.stream",
- "string too long for prefix count to fit in output type");
- rStrm << nUnits;
- if (rStrm.good())
- {
- nWritten += sizeof(prefix);
- nWritten += writeOper(rStrm, rStr, nUnits);
- }
- return nWritten;
- }
-}
-
-/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
-/// of 16bit units from an OUString, returned value is number of bytes written
-/// (including byte-count of prefix)
-template<typename prefix>
-sal_Size write_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm,
- const OUString &rStr)
-{
- return streamdetail::write_lenPrefixed_seq_From_str<prefix, OUString, write_uInt16s_FromOUString>(rStrm, rStr);
-}
-
/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
/// of 16bit units from an OUString, returned value is number of bytes written
/// (including byte-count of prefix)
@@ -666,27 +603,6 @@ TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const
return write_uInt8s_FromOString(rStrm, rStr, rStr.getLength());
}
-/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
-/// of 8bit units from an OString, returned value is number of bytes written
-/// (including byte-count of prefix)
-template<typename prefix>
-sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream& rStrm,
- const OString &rStr)
-{
- return streamdetail::write_lenPrefixed_seq_From_str<prefix, OString, write_uInt8s_FromOString>(rStrm, rStr);
-}
-
-/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
-/// of 8bit units from an OUString, returned value is number of bytes written
-/// (including byte-count of prefix)
-template<typename prefix>
-sal_Size write_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
- const OUString &rStr,
- rtl_TextEncoding eEnc)
-{
- return write_lenPrefixed_uInt8s_FromOString<prefix>(rStrm, OUStringToOString(rStr, eEnc));
-}
-
/// Attempt to write a pascal-style length (of type prefix) prefixed
/// sequence of units from a string-type, returned value is number of bytes
/// written (including byte-count of prefix)
diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx
index 4f1a2341a7a5..6e8aed4ab2c8 100644
--- a/sc/inc/bigrange.hxx
+++ b/sc/inc/bigrange.hxx
@@ -133,7 +133,7 @@ inline ScAddress ScBigAddress::MakeAddress() const
inline SvStream& WriteScBigAddress( SvStream& rStream, const ScBigAddress& rAdr )
{
- rStream << rAdr.nCol << rAdr.nRow << rAdr.nTab;
+ rStream.WriteInt32( rAdr.nCol ).WriteInt32( rAdr.nRow ).WriteInt32( rAdr.nTab );
return rStream;
}
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index cbf36cd71111..100a06bda5a2 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -794,7 +794,7 @@ bool ScAutoFormatData::Save(SvStream& rStream, sal_uInt16 fileVersion)
bool b;
rStream.WriteUInt16( nVal );
// --- from 680/dr25 on: store strings as UTF-8
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, aName, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStream, aName, RTL_TEXTENCODING_UTF8);
rStream.WriteUInt16( nStrResId );
rStream.WriteUChar( ( b = bIncludeFont ) );
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index f58bd9cbdd96..fb07ddb8f1a7 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -224,7 +224,8 @@ void XclExpDffAnchorBase::SetSdrObject( const SdrObject& rSdrObj )
void XclExpDffAnchorBase::WriteDffData( EscherEx& rEscherEx ) const
{
rEscherEx.AddAtom( 18, ESCHER_ClientAnchor );
- rEscherEx.GetStream().WriteUInt16( mnFlags ) << maAnchor;
+ rEscherEx.GetStream().WriteUInt16( mnFlags );
+ WriteXclObjAnchor( rEscherEx.GetStream(), maAnchor );
}
void XclExpDffAnchorBase::WriteData( EscherEx& rEscherEx, const Rectangle& rRect )
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 999b8a3d9e76..d19636a53a8b 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -116,15 +116,15 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] =
#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag )
#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, false )
#define OUT_STR( str ) HTMLOutFuncs::Out_String( rStrm, str, eDestEnc, &aNonConvertibleChars )
-#define OUT_LF() rStrm << SAL_NEWLINE_STRING << GetIndentStr()
-#define TAG_ON_LF( tag ) (TAG_ON( tag ) << SAL_NEWLINE_STRING << GetIndentStr())
-#define TAG_OFF_LF( tag ) (TAG_OFF( tag ) << SAL_NEWLINE_STRING << GetIndentStr())
+#define OUT_LF() rStrm.WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() )
+#define TAG_ON_LF( tag ) (TAG_ON( tag ).WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() ))
+#define TAG_OFF_LF( tag ) (TAG_OFF( tag ).WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() ))
#define OUT_HR() TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_horzrule )
-#define OUT_COMMENT( comment ) (rStrm << sMyBegComment, OUT_STR( comment ) \
- << sMyEndComment << SAL_NEWLINE_STRING \
- << GetIndentStr())
+#define OUT_COMMENT( comment ) (rStrm.WriteCharPtr( sMyBegComment ), OUT_STR( comment ) \
+ .WriteCharPtr( sMyEndComment ).WriteCharPtr( SAL_NEWLINE_STRING ) \
+ .WriteCharPtr( GetIndentStr() ))
-#define OUT_SP_CSTR_ASS( s ) rStrm << ' ' << s << '='
+#define OUT_SP_CSTR_ASS( s ) rStrm.WriteChar( ' ').WriteCharPtr( s ).WriteChar( '=' )
#define GLOBSTR(id) ScGlobal::GetRscString( id )
diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx
index 5ecd2726f9ca..498fb1c3095f 100644
--- a/sc/source/filter/inc/xlescher.hxx
+++ b/sc/source/filter/inc/xlescher.hxx
@@ -333,6 +333,15 @@ StreamType& operator<<( StreamType& rStrm, const XclObjAnchor& rAnchor )
<< static_cast<sal_uInt16>(rAnchor.maLast.mnRow) << static_cast<sal_uInt16>(rAnchor.mnBY);
}
+inline SvStream& WriteXclObjAnchor( SvStream& rStrm, const XclObjAnchor& rAnchor )
+{
+ return rStrm
+ .WriteUInt16( rAnchor.maFirst.mnCol ).WriteUInt16( rAnchor.mnLX )
+ .WriteUInt16( rAnchor.maFirst.mnRow ).WriteUInt16( rAnchor.mnTY )
+ .WriteUInt16( rAnchor.maLast.mnCol ).WriteUInt16( rAnchor.mnRX )
+ .WriteUInt16( rAnchor.maLast.mnRow).WriteUInt16(rAnchor.mnBY);
+}
+
// ----------------------------------------------------------------------------
struct XclObjLineData
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 67b5c9e3131b..c82b34c8bb34 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -301,23 +301,23 @@ SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDes
SdIOCompat aIO(rOut, STREAM_WRITE, 0);
// Name
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aDesignName,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aDesignName,
RTL_TEXTENCODING_UTF8);
rOut.WriteUInt16( (sal_uInt16)rDesign.m_eMode );
rOut.WriteUChar( rDesign.m_bContentPage );
rOut.WriteUChar( rDesign.m_bNotes );
rOut.WriteUInt16( rDesign.m_nResolution );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aCompression,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCompression,
RTL_TEXTENCODING_UTF8);
rOut.WriteUInt16( (sal_uInt16)rDesign.m_eFormat );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aAuthor,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aAuthor,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aEMail,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aEMail,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aWWW,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aWWW,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aMisc,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aMisc,
RTL_TEXTENCODING_UTF8);
rOut.WriteUChar( rDesign.m_bDownload );
rOut.WriteUChar( rDesign.m_bCreated ); // not used
@@ -332,9 +332,9 @@ SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDes
rOut.WriteUChar( rDesign.m_bUseColor );
rOut.WriteUInt16( (sal_uInt16)rDesign.m_eScript );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aURL,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aURL,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aCGI,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCGI,
RTL_TEXTENCODING_UTF8);
rOut.WriteUChar( rDesign.m_bAutoSlide );
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 800134e3910b..4c6e4ef85e9b 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -3228,7 +3228,7 @@ OUString UCBStorage::CreateLinkFile( const OUString& rName )
// store it as key/value pair
OUString aLink = "ContentURL=" + aURL;
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(*pStream, aLink, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(*pStream, aLink, RTL_TEXTENCODING_UTF8);
pStream->Flush();
// move the stream to its desired location
diff --git a/starmath/source/eqnolefilehdr.hxx b/starmath/source/eqnolefilehdr.hxx
index dfb2baa6524f..000a72bb3431 100644
--- a/starmath/source/eqnolefilehdr.hxx
+++ b/starmath/source/eqnolefilehdr.hxx
@@ -58,14 +58,14 @@ public:
}
inline void Write(SvStorageStream *pS)
{
- *pS << nCBHdr;
- *pS << nVersion;
- *pS << nCf;
- *pS << nCBObject;
- *pS << nReserved1;
- *pS << nReserved2;
- *pS << nReserved3;
- *pS << nReserved4;
+ pS->WriteUInt16( nCBHdr );
+ pS->WriteUInt32( nVersion );
+ pS->WriteUInt16( nCf );
+ pS->WriteUInt32( nCBObject );
+ pS->WriteUInt32( nReserved1 );
+ pS->WriteUInt32( nReserved2 );
+ pS->WriteUInt32( nReserved3 );
+ pS->WriteUInt32( nReserved4 );
}
};
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 4267ebebc8a1..b99921696530 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -1139,7 +1139,7 @@ SvStream& WriteGraphicObject( SvStream& rOStm, const GraphicObject& rGraphicObj
rOStm.WriteUChar( bLink );
if( bLink )
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8);
return rOStm;
}
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 34244ac7a6ae..d38995ef69af 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -88,16 +88,16 @@ void IMapObject::Write( SvStream& rOStm, const OUString& rBaseURL ) const
const OString aRelURL = OUStringToOString(
URIHelper::simpleNormalizedMakeRelative(rBaseURL, aURL), eEncoding);
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, aRelURL);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aAltText, eEncoding);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, aRelURL);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aAltText, eEncoding);
rOStm.WriteUChar( bActive );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aTarget, eEncoding);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aTarget, eEncoding);
pCompat = new IMapCompat( rOStm, STREAM_WRITE );
WriteIMapObject( rOStm );
aEventList.Write( rOStm ); // V4
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aName, eEncoding); // V5
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aName, eEncoding); // V5
delete pCompat;
}
@@ -949,10 +949,10 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
// write MagicCode
rOStm.WriteCharPtr( IMAPMAGIC );
rOStm.WriteUInt16( GetVersion() );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aImageName, eEncoding);
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, OString()); //dummy
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, OString()); //dummy
rOStm.WriteUInt16( nCount );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aImageName, eEncoding);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding);
pCompat = new IMapCompat( rOStm, STREAM_WRITE );
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 2f078021059a..6d85fa8da31c 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -192,7 +192,7 @@ void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
OUString aURLWithoutDestDir = aURL.GetMainURL( INetURLObject::NO_DECODE );
aURLWithoutDestDir = aURLWithoutDestDir.replaceFirst(rDestDir, "");
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aURLWithoutDestDir, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, aURLWithoutDestDir, RTL_TEXTENCODING_UTF8);
}
void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion )
@@ -299,8 +299,8 @@ void SgaObjectBmp::WriteData( SvStream& rOut, const OUString& rDestDir ) const
SgaObject::WriteData( rOut, rDestDir );
char aDummy[ 10 ];
rOut.Write( aDummy, 10 );
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOut, OString()); //dummy
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOut, OString()); //dummy
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
void SgaObjectBmp::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
@@ -371,7 +371,7 @@ void SgaObjectSound::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
rOut.WriteUInt16( (sal_uInt16) eSoundType );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
@@ -530,7 +530,7 @@ sal_Bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
void SgaObjectSvDraw::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
void SgaObjectSvDraw::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 3567a0e56075..193026226b18 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -1295,7 +1295,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
sal_Bool bRel;
rOStm.WriteUInt16( (sal_uInt16) 0x0004 );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, GetRealName(), RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, GetRealName(), RTL_TEXTENCODING_UTF8);
rOStm.WriteUInt32( nCount ).WriteUInt16( (sal_uInt16) osl_getThreadTextEncoding() );
for( sal_uInt32 i = 0; i < nCount; i++ )
@@ -1347,7 +1347,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
}
rOStm.WriteUChar( bRel );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aPath, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aPath, RTL_TEXTENCODING_UTF8);
rOStm.WriteUInt32( pObj->nOffset ).WriteUInt16( (sal_uInt16) pObj->eObjKind );
}
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 126733a683a4..d14079d85648 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -534,7 +534,7 @@ sal_Bool SwBoxAutoFmt::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
aRotateMode.Store( rStream, aRotateMode.GetVersion(fileVersion) );
// --- from 680/dr25 on: store strings as UTF-8
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, sNumFmtString,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStream, sNumFmtString,
RTL_TEXTENCODING_UTF8);
rStream.WriteUInt16( (sal_uInt16)eSysLanguage ).WriteUInt16( (sal_uInt16)eNumFmtLanguage );
@@ -966,7 +966,7 @@ sal_Bool SwTableAutoFmt::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
sal_Bool b;
rStream.WriteUInt16( nVal );
// --- from 680/dr25 on: store strings as UTF-8
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, m_aName,
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStream, m_aName,
RTL_TEXTENCODING_UTF8 );
rStream.WriteUInt16( nStrResId );
rStream.WriteUChar( ( b = bInclFont ) );
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 6e3d432d620e..21bdfcf19e4a 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -1087,14 +1087,21 @@ inline void SvStatistics::PrintOn( SvStream &rOS ) const //$ ostream
if( IsEmpty() )
return;
- rOS << "{ SV called:" << '\n';
+ rOS.WriteCharPtr( "{ SV called:\n" );
if( nGetTextSize )
- rOS << "\tnGetTextSize: " << nGetTextSize << '\n'; if( nDrawText )
- rOS << "\tnDrawText: " << nDrawText << '\n'; if( nGetStretchTextSize )
- rOS << "\tnGetStretchTextSize: " << nGetStretchTextSize << '\n'; if( nDrawStretchText )
- rOS << "\tnDrawStretchText: " << nDrawStretchText << '\n'; if( nChangeFont )
- rOS << "\tnChangeFont: " << nChangeFont << '\n'; if( nGetFontMetric )
- rOS << "\tnGetFontMetric: " << nGetFontMetric << '\n'; rOS << "}" << '\n'; }
+ rOS.WriteCharPtr( "\tnGetTextSize: " ).WriteUInt16( nGetTextSize ).WriteChar( '\n' );
+ if( nDrawText )
+ rOS.WriteCharPtr( "\tnDrawText: " ).WriteUInt16( nDrawText ).WriteChar( '\n' );
+ if( nGetStretchTextSize )
+ rOS.WriteCharPtr( "\tnGetStretchTextSize: " ).WriteUInt16( nGetStretchTextSize ).WriteChar( '\n' );
+ if( nDrawStretchText )
+ rOS.WriteCharPtr( "\tnDrawStretchText: " ).WriteUInt16( nDrawStretchText ).WriteChar( '\n' );
+ if( nChangeFont )
+ rOS.WriteCharPtr( "\tnChangeFont: " ).WriteUInt16( nChangeFont ).WriteChar( '\n' );
+ if( nGetFontMetric )
+ rOS.WriteCharPtr( "\tnGetFontMetric: " ).WriteUInt16( nGetFontMetric ).WriteChar( '\n' );
+ rOS.WriteCharPtr( "}\n" );
+}
#else
#define SV_STAT(nWhich)
#endif /* DBG_UTIL */
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index ca7f67f2583e..b9c00a37d790 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1191,7 +1191,7 @@ SvStream& SwFmtVertOrient::Store(SvStream &rStream, sal_uInt16 /*version*/) cons
#if SAL_TYPES_SIZEOFLONG == 8
rStream.WriteInt64(nYPos);
#else
- rStream << static_cast<sal_Int32>(nYPos);
+ rStream.WriteInt32(nYPos);
#endif
rStream.WriteInt16( eOrient ).WriteInt16( eRelation );
return rStream;
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 786d296801f4..1a781e56744c 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -895,10 +895,10 @@ public:
static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
static void FillCount( SvStream& rStrm, sal_uLong nCount );
- static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm << nVal; }
+ static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm.WriteInt16( nVal ); }
static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
- static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm << nVal; }
+ static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm.WriteInt32( nVal ); }
static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
static void WriteString16(SvStream& rStrm, const OUString& rStr,
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index bdc7489c52c8..427cc26cbc78 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -103,7 +103,7 @@ sal_uIntPtr INetMessage::SetHeaderField (
SvStream& INetMessage::operator<< (SvStream& rStrm) const
{
rStrm.WriteUInt32( static_cast<sal_uInt32>(m_nDocSize) );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, m_aDocName, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, m_aDocName, RTL_TEXTENCODING_UTF8);
sal_uIntPtr i, n = m_aHeaderList.size();
rStrm.WriteUInt32( static_cast<sal_uInt32>(n) );
@@ -1018,7 +1018,7 @@ SvStream& INetMIMEMessage::operator<< (SvStream& rStrm) const
for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
rStrm.WriteUInt32( static_cast<sal_uInt32>(m_nIndex[i]) );
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStrm, m_aBoundary);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rStrm, m_aBoundary);
rStrm.WriteUInt32( static_cast<sal_uInt32>(aChildren.size()) );
return rStrm;
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 9f702bd4cb5c..22688ea7f115 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -825,7 +825,7 @@ void WMFWriter::TrueTextOut(const Point & rPoint, const OString& rString)
{
WriteRecordHeader(0,W_META_TEXTOUT);
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(*pWMF, rString);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(*pWMF, rString);
sal_Int32 nLen = rString.getLength();
if ((nLen&1)!=0) pWMF->WriteUChar( (sal_uInt8)0 );
WritePointYX(rPoint);
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 0b128d853740..2c1d817519d2 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -730,7 +730,7 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation )
rOStm.WriteUInt32( nDummy32 ); // Unused
rOStm.WriteUInt32( nDummy32 ); // Unused
rOStm.WriteUInt32( nDummy32 ); // Unused
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, OString()); // dummy
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, OString()); // dummy
rOStm.WriteUInt16( nRest ); // Count of remaining structures
}
}
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 8b6d597234b3..bad3016c6c19 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -2395,7 +2395,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm.SeekRel( 4 );
// write data
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, pA->GetComment());
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, pA->GetComment());
rOStm.WriteInt32( pA->GetValue() ).WriteUInt32( nDataSize );
if( nDataSize )
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 9184dc6199a7..b0204af4cc39 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -354,23 +354,23 @@ SvStream& WriteJobSetup( SvStream& rOStream, const JobSetup& rJobSetup )
::boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator it;
for( it = pJobData->maValueMap.begin(); it != pJobData->maValueMap.end(); ++it )
{
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, it->first, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, it->second, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, it->first, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, it->second, RTL_TEXTENCODING_UTF8);
}
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "COMPAT_DUPLEX_MODE");
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, "COMPAT_DUPLEX_MODE");
switch( pJobData->meDuplexMode )
{
case DUPLEX_UNKNOWN:
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_UNKNOWN");
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_UNKNOWN");
break;
case DUPLEX_OFF:
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_OFF");
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_OFF");
break;
case DUPLEX_SHORTEDGE:
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_SHORTEDGE");
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_SHORTEDGE");
break;
case DUPLEX_LONGEDGE:
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_LONGEDGE");
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_LONGEDGE");
break;
}
nLen = sal::static_int_cast<sal_uInt16>(rOStream.Tell() - nPos);
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 3414abe46f32..3151ac28dbed 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1254,7 +1254,7 @@ void MetaTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm.WriteInt32(mnIndex);
rOStm.WriteInt32(mnLen);
- write_lenPrefixed_uInt16s_FromOUString<sal_uInt16>(rOStm, maStr); // version 2
+ write_uInt16_lenPrefixed_uInt16s_FromOUString(rOStm, maStr); // version 2
}
// ------------------------------------------------------------------------
@@ -1395,7 +1395,7 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
for (sal_Int32 i = 0; i < nAryLen; ++i)
rOStm.WriteInt32( mpDXAry[ i ] );
- write_lenPrefixed_uInt16s_FromOUString<sal_uInt16>(rOStm, maStr); // version 2
+ write_uInt16_lenPrefixed_uInt16s_FromOUString(rOStm, maStr); // version 2
}
// ------------------------------------------------------------------------
@@ -1529,7 +1529,7 @@ void MetaStretchTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm.WriteInt32( mnIndex );
rOStm.WriteInt32( mnLen );
- write_lenPrefixed_uInt16s_FromOUString<sal_uInt16>(rOStm, maStr); // version 2
+ write_uInt16_lenPrefixed_uInt16s_FromOUString(rOStm, maStr); // version 2
}
// ------------------------------------------------------------------------
@@ -1610,7 +1610,7 @@ void MetaTextRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm.WriteUniOrByteString( maStr, pData->meActualCharSet );
rOStm.WriteUInt16( mnStyle );
- write_lenPrefixed_uInt16s_FromOUString<sal_uInt16>(rOStm, maStr); // version 2
+ write_uInt16_lenPrefixed_uInt16s_FromOUString(rOStm, maStr); // version 2
}
// ------------------------------------------------------------------------
@@ -4186,7 +4186,7 @@ sal_Bool MetaCommentAction::Compare( const MetaAction& rMetaAction ) const
void MetaCommentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, maComment);
+ write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, maComment);
rOStm.WriteInt32( mnValue ).WriteUInt32( mnDataSize );
if ( mnDataSize )
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 375be676d44a..c423e0cd02e7 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -253,10 +253,10 @@ SvStream& WriteQueueInfo( SvStream& rOStream, const QueueInfo& rInfo )
{
VersionCompat aCompat( rOStream, STREAM_WRITE, 1 );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maPrinterName, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maDriver, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maLocation, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maComment, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maPrinterName, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maDriver, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maLocation, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maComment, RTL_TEXTENCODING_UTF8);
rOStream.WriteUInt32( rInfo.mnStatus );
rOStream.WriteUInt32( rInfo.mnJobs );
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index c38f2718a442..a3758f4b0dd1 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -163,7 +163,7 @@ ImplFontAttrCache::~ImplFontAttrCache()
if ( aCacheFile.IsWritable() )
{
sal_uInt32 nCacheMagic = ImplFontAttrCache::MAGIC;
- aCacheFile << nCacheMagic;
+ aCacheFile.WriteUInt32( nCacheMagic );
// write the cache entries to the file
FontAttrMap::const_iterator aIter = aFontAttributes.begin();
@@ -171,22 +171,22 @@ ImplFontAttrCache::~ImplFontAttrCache()
{
const OUString rFontFileURL( (*aIter).first );
const ImplDevFontAttributes& rDFA( (*aIter).second );
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(aCacheFile, rFontFileURL, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(aCacheFile, rDFA.GetFamilyName(), RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(aCacheFile, rFontFileURL, RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(aCacheFile, rDFA.GetFamilyName(), RTL_TEXTENCODING_UTF8);
- aCacheFile << static_cast<short>(rDFA.GetWeight());
- aCacheFile << static_cast<short>(rDFA.GetSlant());
- aCacheFile << static_cast<short>(rDFA.GetPitch());
- aCacheFile << static_cast<short>(rDFA.GetWidthType());
- aCacheFile << static_cast<short>(rDFA.GetFamilyType());
- aCacheFile << static_cast<short>(rDFA.IsSymbolFont() != false);
+ aCacheFile.WriteInt16(rDFA.GetWeight());
+ aCacheFile.WriteInt16(rDFA.GetSlant());
+ aCacheFile.WriteInt16(rDFA.GetPitch());
+ aCacheFile.WriteInt16(rDFA.GetWidthType());
+ aCacheFile.WriteInt16(rDFA.GetFamilyType());
+ aCacheFile.WriteInt16(rDFA.IsSymbolFont() != false);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(aCacheFile, rDFA.GetStyleName(), RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(aCacheFile, rDFA.GetStyleName(), RTL_TEXTENCODING_UTF8);
++aIter;
}
// EOF Marker
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(aCacheFile, OString());
+ write_uInt16_lenPrefixed_uInt8s_FromOString(aCacheFile, OString());
}
}
}