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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/graphic/grfattr.cxx | 8 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/imap.cxx | 14 | ||||
-rw-r--r-- | svtools/source/misc/imap3.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/templatefoldercache.cxx | 20 | ||||
-rw-r--r-- | svtools/source/misc/transfer.cxx | 14 | ||||
-rw-r--r-- | svtools/source/svrtf/parrtf.cxx | 2 | ||||
-rw-r--r-- | svtools/source/svrtf/svparser.cxx | 14 | ||||
-rw-r--r-- | svtools/source/urlobj/inetimg.cxx | 8 |
9 files changed, 42 insertions, 42 deletions
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx index 95b92d782968..a98e534bf9cc 100644 --- a/svtools/source/graphic/grfattr.cxx +++ b/svtools/source/graphic/grfattr.cxx @@ -79,16 +79,16 @@ SvStream& ReadGraphicAttr( SvStream& rIStm, GraphicAttr& rAttr ) sal_uInt32 nTmp32; sal_uInt16 nTmp16; - rIStm >> nTmp32 >> nTmp32 >> rAttr.mfGamma >> rAttr.mnMirrFlags >> rAttr.mnRotate10; - rIStm >> rAttr.mnContPercent >> rAttr.mnLumPercent >> rAttr.mnRPercent >> rAttr.mnGPercent >> rAttr.mnBPercent; - rIStm >> rAttr.mbInvert >> rAttr.mcTransparency >> nTmp16; + rIStm.ReadUInt32( nTmp32 ).ReadUInt32( nTmp32 ).ReadDouble( rAttr.mfGamma ).ReadUInt32( rAttr.mnMirrFlags ).ReadUInt16( rAttr.mnRotate10 ); + rIStm.ReadInt16( rAttr.mnContPercent ).ReadInt16( rAttr.mnLumPercent ).ReadInt16( rAttr.mnRPercent ).ReadInt16( rAttr.mnGPercent ).ReadInt16( rAttr.mnBPercent ); + rIStm.ReadUChar( rAttr.mbInvert ).ReadUChar( rAttr.mcTransparency ).ReadUInt16( nTmp16 ); rAttr.meDrawMode = (GraphicDrawMode) nTmp16; if( aCompat.GetVersion() >= 2 ) { //#fdo39428 SvStream no longer supports operator>>(long&) sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0); - rIStm >> nTmpL >> nTmpT >> nTmpR >> nTmpB; + rIStm.ReadInt32( nTmpL ).ReadInt32( nTmpT ).ReadInt32( nTmpR ).ReadInt32( nTmpB ); rAttr.mnLeftCrop = nTmpL; rAttr.mnTopCrop = nTmpT; rAttr.mnRightCrop = nTmpR; diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index ae5a73400729..16ca08ce81ff 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -1153,7 +1153,7 @@ SvStream& ReadGraphicObject( SvStream& rIStm, GraphicObject& rGraphicObj ) ReadGraphic( rIStm, aGraphic ); ReadGraphicAttr( rIStm, aAttr ); - rIStm >> bLink; + rIStm.ReadUChar( bLink ); rGraphicObj.SetGraphic( aGraphic ); rGraphicObj.SetAttr( aAttr ); diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index b989171e5e04..c2c18fc7d68e 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -116,11 +116,11 @@ void IMapObject::Read( SvStream& rIStm, const OUString& rBaseURL ) // read on type and version rIStm.SeekRel( 2 ); - rIStm >> nReadVersion; - rIStm >> nTextEncoding; + rIStm.ReadUInt16( nReadVersion ); + rIStm.ReadUInt16( nTextEncoding ); aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding); aAltText = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding); - rIStm >> bActive; + rIStm.ReadUChar( bActive ); aTarget = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding); // make URL absolute @@ -308,7 +308,7 @@ void IMapCircleObject::ReadIMapObject( SvStream& rIStm ) sal_uInt32 nTmp; ReadPair( rIStm, aCenter ); - rIStm >> nTmp; + rIStm.ReadUInt32( nTmp ); nRadius = nTmp; } @@ -450,7 +450,7 @@ void IMapPolygonObject::ReadIMapObject( SvStream& rIStm ) // Version >= 2 has additional ellipses information if ( nReadVersion >= 2 ) { - rIStm >> bEllipse; + rIStm.ReadUChar( bEllipse ); ReadRectangle( rIStm, aEllipse ); } } @@ -894,7 +894,7 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount, const OUString& { sal_uInt16 nType; - rIStm >> nType; + rIStm.ReadUInt16( nType ); rIStm.SeekRel( -2 ); switch( nType ) @@ -993,7 +993,7 @@ void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL ) aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, osl_getThreadTextEncoding()); read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Dummy - rIStm >> nCount; + rIStm.ReadUInt16( nCount ); read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Dummy pCompat = new IMapCompat( rIStm, STREAM_READ ); diff --git a/svtools/source/misc/imap3.cxx b/svtools/source/misc/imap3.cxx index aecafea392fa..cc7f745f3f4d 100644 --- a/svtools/source/misc/imap3.cxx +++ b/svtools/source/misc/imap3.cxx @@ -45,7 +45,7 @@ IMapCompat::IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode ) : else { sal_uInt32 nTotalSizeTmp; - *pRWStm >> nTotalSizeTmp; + pRWStm->ReadUInt32( nTotalSizeTmp ); nTotalSize = nTotalSizeTmp; nCompatPos = pRWStm->Tell(); } diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 231e41cc653e..6a49d9dbbad7 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -75,15 +75,15 @@ namespace svt SvStream& operator >> ( SvStream& _rStorage, util::DateTime& _rDate ) { sal_uInt16 hundredthSeconds; - _rStorage >> hundredthSeconds; + _rStorage.ReadUInt16( hundredthSeconds ); _rDate.NanoSeconds = static_cast< sal_uInt32 >( hundredthSeconds ) * Time::nanoPerCenti; - _rStorage >> _rDate.Seconds; - _rStorage >> _rDate.Minutes; - _rStorage >> _rDate.Hours; - _rStorage >> _rDate.Day; - _rStorage >> _rDate.Month; - _rStorage >> _rDate.Year; + _rStorage.ReadUInt16( _rDate.Seconds ); + _rStorage.ReadUInt16( _rDate.Minutes ); + _rStorage.ReadUInt16( _rDate.Hours ); + _rStorage.ReadUInt16( _rDate.Day ); + _rStorage.ReadUInt16( _rDate.Month ); + _rStorage.ReadInt16( _rDate.Year ); return _rStorage; } @@ -407,7 +407,7 @@ namespace svt // store the info about the children // the number sal_Int32 nChildren = 0; - m_rStorage >> nChildren; + m_rStorage.ReadInt32( nChildren ); TemplateFolderContent& rChildren = _rContent.getSubContents(); rChildren.resize( 0 ); rChildren.reserve( nChildren ); @@ -729,7 +729,7 @@ namespace svt // check the magic number sal_Int32 nMagic = 0; - *m_pCacheStream >> nMagic; + m_pCacheStream->ReadInt32( nMagic ); DBG_ASSERT( getMagicNumber() == nMagic, "TemplateFolderCacheImpl::readPreviousState: invalid cache file!" ); if ( getMagicNumber() != nMagic ) return sal_False; @@ -737,7 +737,7 @@ namespace svt // the root directories // their number sal_Int32 nRootDirectories = 0; - *m_pCacheStream >> nRootDirectories; + m_pCacheStream->ReadInt32( nRootDirectories ); // init empty TemplateContens with the URLs m_aPreviousState.reserve( nRootDirectories ); while ( nRootDirectories-- ) diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index e587d7d1ee59..2d56c4a37df3 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -84,21 +84,21 @@ SvStream& operator>>( SvStream& rIStm, TransferableObjectDescriptor& rObjDesc ) //#fdo39428 Remove SvStream operator>>(long&) sal_Int32 nTmp(0); - rIStm >> nSize; + rIStm.ReadUInt32( nSize ); rIStm >> rObjDesc.maClassName; - rIStm >> nViewAspect; - rIStm >> nTmp; + rIStm.ReadUInt32( nViewAspect ); + rIStm.ReadInt32( nTmp ); rObjDesc.maSize.Width() = nTmp; - rIStm >> nTmp; + rIStm.ReadInt32( nTmp ); rObjDesc.maSize.Height() = nTmp; - rIStm >> nTmp; + rIStm.ReadInt32( nTmp ); rObjDesc.maDragStartPos.X() = nTmp; - rIStm >> nTmp; + rIStm.ReadInt32( nTmp ); rObjDesc.maDragStartPos.Y() = nTmp; rObjDesc.maTypeName = rIStm.ReadUniOrByteString(osl_getThreadTextEncoding()); rObjDesc.maDisplayName = rIStm.ReadUniOrByteString(osl_getThreadTextEncoding()); - rIStm >> nSig1 >> nSig2; + rIStm.ReadUInt32( nSig1 ).ReadUInt32( nSig2 ); rObjDesc.mnViewAspect = static_cast< sal_uInt16 >( nViewAspect ); diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index 4f8a94cb014d..62ddfeba6c68 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -542,7 +542,7 @@ SvParserState SvRTFParser::CallParser() { sal_Char cFirstCh; nNextChPos = rInput.Tell(); - rInput >> cFirstCh; nNextCh = cFirstCh; + rInput.ReadChar( cFirstCh ); nNextCh = cFirstCh; eState = SVPAR_WORKING; nOpenBrakets = 0; SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 ); diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index 5365a564f6d0..1286851169eb 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -148,13 +148,13 @@ sal_Unicode SvParser::GetNextChar() unsigned char c1, c2; sal_Bool bSeekBack = sal_True; - rInput >> c1; + rInput.ReadUChar( c1 ); bErr = rInput.IsEof() || rInput.GetError(); if( !bErr ) { if( 0xff == c1 || 0xfe == c1 ) { - rInput >> c2; + rInput.ReadUChar( c2 ); bErr = rInput.IsEof() || rInput.GetError(); if( !bErr ) { @@ -186,12 +186,12 @@ sal_Unicode SvParser::GetNextChar() sal_Unicode cUC = USHRT_MAX; unsigned char c1, c2; - rInput >> c1 >> c2; + rInput.ReadUChar( c1 ).ReadUChar( c2 ); if( 2 == rInput.Tell() && !(rInput.IsEof() || rInput.GetError()) && ( (bUCS2BSrcEnc && 0xfe == c1 && 0xff == c2) || (!bUCS2BSrcEnc && 0xff == c1 && 0xfe == c2) ) ) - rInput >> c1 >> c2; + rInput.ReadUChar( c1 ).ReadUChar( c2 ); bErr = rInput.IsEof() || rInput.GetError(); if( !bErr ) @@ -213,7 +213,7 @@ sal_Unicode SvParser::GetNextChar() do { sal_Char c1; // signed, that's the text converter expects - rInput >> c1; + rInput.ReadChar( c1 ); bErr = rInput.IsEof() || rInput.GetError(); if( !bErr ) { @@ -249,7 +249,7 @@ sal_Unicode SvParser::GetNextChar() { while( (nInfo&RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) != 0 ) { - rInput >> c1; + rInput.ReadChar( c1 ); bErr = rInput.IsEof() || rInput.GetError(); if( bErr ) break; @@ -291,7 +291,7 @@ sal_Unicode SvParser::GetNextChar() while( (nInfo&RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) != 0 && nLen < 10 ) { - rInput >> c1; + rInput.ReadChar( c1 ); bErr = rInput.IsEof() || rInput.GetError(); if( bErr ) break; diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 98999c42a779..c4dc4beb81d3 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -101,12 +101,12 @@ sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat ) nFilePos = rIStm.Tell(); // skip over iSize (int), bIsMao ( sal_Bool ) alignment of 4 !!!! rIStm.SeekRel( 8 ); - rIStm >> nVal; aSizePixel.Width() = nVal; - rIStm >> nVal; aSizePixel.Height() = nVal; + rIStm.ReadInt32( nVal ); aSizePixel.Width() = nVal; + rIStm.ReadInt32( nVal ); aSizePixel.Height() = nVal; // skip over iHSpace, iVSpace, iBorder, iLowResOffset rIStm.SeekRel( 3 * sizeof( sal_Int32 ) + sizeof( int ) ); - rIStm >> nAltOffset; - rIStm >> nAnchorOffset; + rIStm.ReadInt32( nAltOffset ); + rIStm.ReadInt32( nAnchorOffset ); // skip over iExtraHTML_Offset rIStm.SeekRel( sizeof( int ) ); |