summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pngwrite.cxx
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 /vcl/source/gdi/pngwrite.cxx
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 'vcl/source/gdi/pngwrite.cxx')
-rw-r--r--vcl/source/gdi/pngwrite.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index f7c60860c67f..0e8160e02d91 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -238,8 +238,8 @@ sal_Bool PNGWriterImpl::Write( SvStream& rOStm )
/* png signature is always an array of 8 bytes */
sal_uInt16 nOldMode = rOStm.GetNumberFormatInt();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- rOStm << static_cast<sal_uInt32>(0x89504e47);
- rOStm << static_cast<sal_uInt32>(0x0d0a1a0a);
+ rOStm.WriteUInt32( static_cast<sal_uInt32>(0x89504e47) );
+ rOStm.WriteUInt32( static_cast<sal_uInt32>(0x0d0a1a0a) );
std::vector< vcl::PNGWriter::ChunkData >::iterator aBeg( maChunkSeq.begin() );
std::vector< vcl::PNGWriter::ChunkData >::iterator aEnd( maChunkSeq.end() );
@@ -253,11 +253,11 @@ sal_Bool PNGWriterImpl::Write( SvStream& rOStm )
sal_uInt32 nDataSize = aBeg->aData.size();
if ( nDataSize )
nCRC = rtl_crc32( nCRC, &aBeg->aData[ 0 ], nDataSize );
- rOStm << nDataSize
- << aBeg->nType;
+ rOStm.WriteUInt32( nDataSize )
+ .WriteUInt32( aBeg->nType );
if ( nDataSize )
rOStm.Write( &aBeg->aData[ 0 ], nDataSize );
- rOStm << nCRC;
+ rOStm.WriteUInt32( nCRC );
++aBeg;
}
rOStm.SetNumberFormatInt( nOldMode );