summaryrefslogtreecommitdiff
path: root/svx/source/gallery2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-08 08:48:26 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-10 13:26:24 +0000
commitb69864f3f8c9be2e1f28f4b422074d2040b084a0 (patch)
tree93d51bc91257472198beffccb92188ceee61667d /svx/source/gallery2
parentde84529b55f5b295b089043a7119d6b0d8b92408 (diff)
re-write SvStream operator<< to non-overloaded methods
This is the actual re-write. Use a clang rewriter to rewrite SvStream::operator<< to methods like WriteuInt32. Note that the rewriter is not perfect, and I hand-tweaked the output. In particular, I had to adjust places doing things like (*this) << 1; Change-Id: I5923eda3f4ebaa8b452b6ef109e726e116235a2a Reviewed-on: https://gerrit.libreoffice.org/7342 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r--svx/source/gallery2/codec.cxx6
-rw-r--r--svx/source/gallery2/gallery1.cxx2
-rw-r--r--svx/source/gallery2/galobj.cxx6
3 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx
index 0643df2bc815..92b0975da1bb 100644
--- a/svx/source/gallery2/codec.cxx
+++ b/svx/source/gallery2/codec.cxx
@@ -70,8 +70,8 @@ void GalleryCodec::Write( SvStream& rStmToWrite )
const sal_uInt32 nSize = rStmToWrite.Tell();
rStmToWrite.Seek( 0UL );
- rStm << 'S' << 'V' << 'R' << 'L' << 'E' << '2';
- rStm << nSize;
+ rStm.WriteChar( 'S' ).WriteChar( 'V' ).WriteChar( 'R' ).WriteChar( 'L' ).WriteChar( 'E' ).WriteChar( '2' );
+ rStm.WriteUInt32( nSize );
nPos = rStm.Tell();
rStm.SeekRel( 4UL );
@@ -83,7 +83,7 @@ void GalleryCodec::Write( SvStream& rStmToWrite )
nCompSize = rStm.Tell() - nPos - 4UL;
rStm.Seek( nPos );
- rStm << nCompSize;
+ rStm.WriteUInt32( nCompSize );
rStm.Seek( STREAM_SEEK_TO_END );
}
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 12f2a0a00392..c9c034868070 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -246,7 +246,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR
if( pTestStm )
{
- *pTestStm << sal_Int32(1);
+ pTestStm->WriteInt32( sal_Int32(1) );
if( pTestStm->GetError() )
rbDirIsReadOnly = sal_True;
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index cb4f07a0e228..09bf8b40384b 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -171,8 +171,8 @@ void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
static const sal_uInt32 nInventor = COMPAT_FORMAT( 'S', 'G', 'A', '3' );
- rOut << nInventor << (sal_uInt16) 0x0004 << GetVersion() << (sal_uInt16) GetObjKind();
- rOut << bIsThumbBmp;
+ rOut.WriteUInt32( nInventor ).WriteUInt16( (sal_uInt16) 0x0004 ).WriteUInt16( GetVersion() ).WriteUInt16( (sal_uInt16) GetObjKind() );
+ rOut.WriteUChar( bIsThumbBmp );
if( bIsThumbBmp )
{
@@ -370,7 +370,7 @@ BitmapEx SgaObjectSound::GetThumbBmp() const
void SgaObjectSound::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
- rOut << (sal_uInt16) eSoundType;
+ rOut.WriteUInt16( (sal_uInt16) eSoundType );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}