diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-05 10:41:04 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-02-12 15:31:40 +0000 |
commit | 15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 (patch) | |
tree | db4badc477cea1ecd51f5fab82ce0f24ae20f155 /tools/source/stream | |
parent | 7accbd8c0d7f1d0b87748f0de599c4d8b469a61e (diff) |
convert SvStream::operator>> methods to ReadXXX methods
First, I updated the clang rewriter to do the conversion.
Then I lightly hand-tweaked the output for the few places where
the rewriter messed up, mostly when dealing with calls on "this".
Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9
Reviewed-on: https://gerrit.libreoffice.org/7879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'tools/source/stream')
-rw-r--r-- | tools/source/stream/stream.cxx | 26 | ||||
-rw-r--r-- | tools/source/stream/vcompat.cxx | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index ccb25d3d17f4..bcd73c52ce2d 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -813,7 +813,7 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ) bool bTryUtf8 = false; sal_uInt16 nFlag; sal_sSize nBack = sizeof(nFlag); - *this >> nFlag; + this->ReadUInt16( nFlag ); switch ( nFlag ) { case 0xfeff : @@ -850,7 +850,7 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ) { unsigned char nChar; nBack += sizeof(nChar); - *this >> nChar; + this->ReadUChar( nChar ); if (nChar == 0xbf) nBack = 0; // it is UTF-8 } @@ -879,7 +879,7 @@ sal_Size SvStream::SeekRel( sal_sSize nPos ) return Seek( nActualPos ); } -SvStream& SvStream::operator>>(sal_uInt16& r) +SvStream& SvStream::ReadUInt16(sal_uInt16& r) { sal_uInt16 n = 0; READNUMBER_WITHOUT_SWAP(sal_uInt16, n) @@ -892,7 +892,7 @@ SvStream& SvStream::operator>>(sal_uInt16& r) return *this; } -SvStream& SvStream::operator>>(sal_uInt32& r) +SvStream& SvStream::ReadUInt32(sal_uInt32& r) { sal_uInt32 n = 0; READNUMBER_WITHOUT_SWAP(sal_uInt32, n) @@ -905,7 +905,7 @@ SvStream& SvStream::operator>>(sal_uInt32& r) return *this; } -SvStream& SvStream::operator>>(sal_uInt64& r) +SvStream& SvStream::ReadUInt64(sal_uInt64& r) { sal_uInt64 n = 0; READNUMBER_WITHOUT_SWAP(sal_uInt64, n) @@ -918,7 +918,7 @@ SvStream& SvStream::operator>>(sal_uInt64& r) return *this; } -SvStream& SvStream::operator>>(sal_Int16& r) +SvStream& SvStream::ReadInt16(sal_Int16& r) { sal_Int16 n = 0; READNUMBER_WITHOUT_SWAP(sal_Int16, n) @@ -931,7 +931,7 @@ SvStream& SvStream::operator>>(sal_Int16& r) return *this; } -SvStream& SvStream::operator>>(sal_Int32& r) +SvStream& SvStream::ReadInt32(sal_Int32& r) { sal_Int32 n = 0; READNUMBER_WITHOUT_SWAP(sal_Int32, n) @@ -957,7 +957,7 @@ SvStream& SvStream::ReadInt64(sal_Int64& r) return *this; } -SvStream& SvStream::operator>>( signed char& r ) +SvStream& SvStream::ReadSChar( signed char& r ) { if( (bIoRead || !bIsConsistent) && sizeof(signed char) <= nBufFree ) @@ -974,7 +974,7 @@ SvStream& SvStream::operator>>( signed char& r ) // Special treatment for Chars due to PutBack -SvStream& SvStream::operator>>( char& r ) +SvStream& SvStream::ReadChar( char& r ) { if( (bIoRead || !bIsConsistent) && sizeof(char) <= nBufFree ) @@ -989,7 +989,7 @@ SvStream& SvStream::operator>>( char& r ) return *this; } -SvStream& SvStream::operator>>( unsigned char& r ) +SvStream& SvStream::ReadUChar( unsigned char& r ) { if( (bIoRead || !bIsConsistent) && sizeof(char) <= nBufFree ) @@ -1004,7 +1004,7 @@ SvStream& SvStream::operator>>( unsigned char& r ) return *this; } -SvStream& SvStream::operator>>(float& r) +SvStream& SvStream::ReadFloat(float& r) { float n = 0; READNUMBER_WITHOUT_SWAP(float, n) @@ -1019,7 +1019,7 @@ SvStream& SvStream::operator>>(float& r) return *this; } -SvStream& SvStream::operator>>(double& r) +SvStream& SvStream::ReadDouble(double& r) { double n = 0; READNUMBER_WITHOUT_SWAP(double, n) @@ -1034,7 +1034,7 @@ SvStream& SvStream::operator>>(double& r) return *this; } -SvStream& SvStream::operator>> ( SvStream& rStream ) +SvStream& SvStream::ReadStream( SvStream& rStream ) { const sal_uInt32 cBufLen = 0x8000; char* pBuf = new char[ cBufLen ]; diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx index 63575a951aa0..afd3fe545195 100644 --- a/tools/source/stream/vcompat.cxx +++ b/tools/source/stream/vcompat.cxx @@ -37,8 +37,8 @@ VersionCompat::VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 } else { - *mpRWStm >> mnVersion; - *mpRWStm >> mnTotalSize; + mpRWStm->ReadUInt16( mnVersion ); + mpRWStm->ReadUInt32( mnTotalSize ); mnCompatPos = mpRWStm->Tell(); } } |