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 /svx/source | |
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 'svx/source')
-rw-r--r-- | svx/source/gallery2/codec.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 32 | ||||
-rw-r--r-- | svx/source/items/algitem.cxx | 10 | ||||
-rw-r--r-- | svx/source/items/chrtitem.cxx | 2 | ||||
-rw-r--r-- | svx/source/items/e3ditem.cxx | 6 | ||||
-rw-r--r-- | svx/source/items/grfitem.cxx | 2 | ||||
-rw-r--r-- | svx/source/items/hlnkitem.cxx | 16 | ||||
-rw-r--r-- | svx/source/items/pageitem.cxx | 6 | ||||
-rw-r--r-- | svx/source/items/rotmodit.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 10 | ||||
-rw-r--r-- | svx/source/xml/xmleohlp.cxx | 2 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 76 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr2.cxx | 12 | ||||
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 6 | ||||
-rw-r--r-- | svx/source/xoutdev/xexch.cxx | 4 |
17 files changed, 100 insertions, 100 deletions
diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx index 92b0975da1bb..7d58d18142af 100644 --- a/svx/source/gallery2/codec.cxx +++ b/svx/source/gallery2/codec.cxx @@ -44,7 +44,7 @@ sal_Bool GalleryCodec::IsCoded( SvStream& rStm, sal_uInt32& rVersion ) sal_Bool bRet; sal_uInt8 cByte1, cByte2, cByte3, cByte4, cByte5, cByte6; - rStm >> cByte1 >> cByte2 >> cByte3 >> cByte4 >> cByte5 >> cByte6; + rStm.ReadUChar( cByte1 ).ReadUChar( cByte2 ).ReadUChar( cByte3 ).ReadUChar( cByte4 ).ReadUChar( cByte5 ).ReadUChar( cByte6 ); if ( cByte1 == 'S' && cByte2 == 'V' && cByte3 == 'R' && cByte4 == 'L' && cByte5 == 'E' && ( cByte6 == '1' || cByte6 == '2' ) ) { @@ -96,7 +96,7 @@ void GalleryCodec::Read( SvStream& rStmToRead ) sal_uInt32 nCompressedSize, nUnCompressedSize; rStm.SeekRel( 6 ); - rStm >> nUnCompressedSize >> nCompressedSize; + rStm.ReadUInt32( nUnCompressedSize ).ReadUInt32( nCompressedSize ); // decompress if( 1 == nVersion ) diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 17f5da756217..0175162dc874 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -200,7 +200,7 @@ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion ) sal_uInt32 nTmp32; sal_uInt16 nTmp16; - rIn >> nTmp32 >> nTmp16 >> rReadVersion >> nTmp16 >> bIsThumbBmp; + rIn.ReadUInt32( nTmp32 ).ReadUInt16( nTmp16 ).ReadUInt16( rReadVersion ).ReadUInt16( nTmp16 ).ReadUChar( bIsThumbBmp ); if( bIsThumbBmp ) { @@ -382,7 +382,7 @@ void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion ) { sal_uInt16 nTmp16; - rIn >> nTmp16; eSoundType = (GalSoundType) nTmp16; + rIn.ReadUInt16( nTmp16 ); eSoundType = (GalSoundType) nTmp16; if( rReadVersion >= 6 ) aTitle = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index c1b43842fa33..0549d7f5cd91 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -154,7 +154,7 @@ SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry ) // Check to ensure that the file is a valid SGA file pIStm->Seek( pEntry->nOffset ); - *pIStm >> nInventor; + pIStm->ReadUInt32( nInventor ); if( nInventor == COMPAT_FORMAT( 'S', 'G', 'A', '3' ) ) { @@ -255,7 +255,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, sal_uIntPt if( pIStm ) { - *pIStm >> nNextNumber; + pIStm->ReadUInt32( nNextNumber ); delete pIStm; } } @@ -700,7 +700,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa sal_uInt16 nVersion; sal_Bool bThemeNameFromResource = sal_False; - *pIStm >> nVersion; + pIStm->ReadUInt16( nVersion ); if( nVersion <= 0x00ff ) { @@ -715,7 +715,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa sal_uInt32 nCount; sal_uInt16 nTemp16; - *pIStm >> nCount >> nTemp16; + pIStm->ReadUInt32( nCount ).ReadUInt16( nTemp16 ); pIStm->Seek( STREAM_SEEK_TO_END ); // check whether there is a newer version; @@ -726,18 +726,18 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa sal_uInt32 nId1, nId2; pIStm->SeekRel( -520 ); - *pIStm >> nId1 >> nId2; + pIStm->ReadUInt32( nId1 ).ReadUInt32( nId2 ); if( nId1 == COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) && nId2 == COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) ) { VersionCompat* pCompat = new VersionCompat( *pIStm, STREAM_READ ); - *pIStm >> nThemeId; + pIStm->ReadUInt32( nThemeId ); if( pCompat->GetVersion() >= 2 ) { - *pIStm >> bThemeNameFromResource; + pIStm->ReadUChar( bThemeNameFromResource ); } delete pCompat; @@ -1383,14 +1383,14 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) OUString aThemeName; rtl_TextEncoding nTextEncoding; - rIStm >> nVersion; + rIStm.ReadUInt16( nVersion ); OString aTmpStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); - rIStm >> nCount; + rIStm.ReadUInt32( nCount ); if( nVersion >= 0x0004 ) { sal_uInt16 nTmp16; - rIStm >> nTmp16; + rIStm.ReadUInt16( nTmp16 ); nTextEncoding = (rtl_TextEncoding) nTmp16; } else @@ -1423,10 +1423,10 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) OUString aPath; sal_uInt16 nTemp; - rIStm >> bRel; + rIStm.ReadUChar( bRel ); OString aTempFileName = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); - rIStm >> pObj->nOffset; - rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp; + rIStm.ReadUInt32( pObj->nOffset ); + rIStm.ReadUInt16( nTemp ); pObj->eObjKind = (SgaObjKind) nTemp; aFileName = OStringToOUString(aTempFileName, osl_getThreadTextEncoding()); @@ -1480,7 +1480,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) aObjectList.push_back( pObj ); } - rIStm >> nId1 >> nId2; + rIStm.ReadUInt32( nId1 ).ReadUInt32( nId2 ); // In newer versions a 512 byte reserve buffer is located at the end, // the data is located at the beginning of this buffer and are clamped @@ -1493,11 +1493,11 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) sal_uInt32 nTemp32; sal_Bool bThemeNameFromResource = sal_False; - rIStm >> nTemp32; + rIStm.ReadUInt32( nTemp32 ); if( pCompat->GetVersion() >= 2 ) { - rIStm >> bThemeNameFromResource; + rIStm.ReadUChar( bThemeNameFromResource ); } SetId( nTemp32, bThemeNameFromResource ); diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index 85331e6b10c5..2ec403520c37 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -148,7 +148,7 @@ SfxPoolItem* SvxOrientationItem::Clone( SfxItemPool* ) const SfxPoolItem* SvxOrientationItem::Create( SvStream& rStream, sal_uInt16 ) const { sal_uInt16 nVal; - rStream >> nVal; + rStream.ReadUInt16( nVal ); return new SvxOrientationItem( (SvxCellOrientation)nVal, Which() ); } @@ -313,10 +313,10 @@ SfxPoolItem* SvxMarginItem::Create( SvStream& rStream, sal_uInt16 ) const sal_Int16 nTop; sal_Int16 nRight; sal_Int16 nBottom; - rStream >> nLeft; - rStream >> nTop; - rStream >> nRight; - rStream >> nBottom; + rStream.ReadInt16( nLeft ); + rStream.ReadInt16( nTop ); + rStream.ReadInt16( nRight ); + rStream.ReadInt16( nBottom ); return new SvxMarginItem( nLeft, nTop, nRight, nBottom, Which() ); } diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx index 6398e4baecb2..02bff07b4dd5 100644 --- a/svx/source/items/chrtitem.cxx +++ b/svx/source/items/chrtitem.cxx @@ -281,7 +281,7 @@ SfxPoolItem* SvxDoubleItem::Clone(SfxItemPool* /*pPool*/) const SfxPoolItem* SvxDoubleItem::Create(SvStream& rIn, sal_uInt16 /*nVersion*/) const { double _fVal; - rIn >> _fVal; + rIn.ReadDouble( _fVal ); return new SvxDoubleItem(_fVal, Which()); } diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx index 2a3a14051cec..765d5651b720 100644 --- a/svx/source/items/e3ditem.cxx +++ b/svx/source/items/e3ditem.cxx @@ -88,9 +88,9 @@ SfxPoolItem* SvxB3DVectorItem::Create(SvStream &rStream, sal_uInt16 /*nVersion*/ DBG_CHKTHIS(SvxB3DVectorItem, 0); basegfx::B3DVector aStr; double fValue; - rStream >> fValue; aStr.setX(fValue); - rStream >> fValue; aStr.setY(fValue); - rStream >> fValue; aStr.setZ(fValue); + rStream.ReadDouble( fValue ); aStr.setX(fValue); + rStream.ReadDouble( fValue ); aStr.setY(fValue); + rStream.ReadDouble( fValue ); aStr.setZ(fValue); return new SvxB3DVectorItem(Which(), aStr); } diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx index b83cab7c95de..be3181097ba9 100644 --- a/svx/source/items/grfitem.cxx +++ b/svx/source/items/grfitem.cxx @@ -59,7 +59,7 @@ bool SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const SfxPoolItem* SvxGrfCrop::Create( SvStream& rStrm, sal_uInt16 nVersion ) const { sal_Int32 top, left, right, bottom; - rStrm >> top >> left >> right >> bottom; + rStrm.ReadInt32( top ).ReadInt32( left ).ReadInt32( right ).ReadInt32( bottom ); if( GRFCROP_VERSION_SWDEFAULT == nVersion ) top = -top, bottom = -bottom, left = -left, right = -right; diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx index 367b1141e102..1e06287e33a1 100644 --- a/svx/source/items/hlnkitem.cxx +++ b/svx/source/items/hlnkitem.cxx @@ -131,12 +131,12 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer // UNICODE: rStrm >> pNew->sTarget; pNew->sTarget = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet()); - rStrm >> nType; + rStrm.ReadUInt32( nType ); pNew->eType = (SvxLinkInsertMode) nType; sal_uInt32 nPos = rStrm.Tell(); sal_uInt32 nMarker; - rStrm >> nMarker; + rStrm.ReadUInt32( nMarker ); if ( nMarker == HYPERLINKFF_MARKER ) { // new data @@ -144,17 +144,17 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer pNew->sIntName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet()); // macro-events - rStrm >> pNew->nMacroEvents; + rStrm.ReadUInt16( pNew->nMacroEvents ); // macros sal_uInt16 nCnt; - rStrm >> nCnt; + rStrm.ReadUInt16( nCnt ); while( nCnt-- ) { sal_uInt16 nCurKey; OUString aLibName, aMacName; - rStrm >> nCurKey; + rStrm.ReadUInt16( nCurKey ); // UNICODE: rStrm >> aLibName; aLibName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet()); @@ -164,13 +164,13 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer pNew->SetMacro( nCurKey, SvxMacro( aMacName, aLibName, STARBASIC ) ); } - rStrm >> nCnt; + rStrm.ReadUInt16( nCnt ); while( nCnt-- ) { sal_uInt16 nCurKey, nScriptType; OUString aLibName, aMacName; - rStrm >> nCurKey; + rStrm.ReadUInt16( nCurKey ); // UNICODE: rStrm >> aLibName; aLibName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet()); @@ -178,7 +178,7 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer // UNICODE: rStrm >> aMacName; aMacName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet()); - rStrm >> nScriptType; + rStrm.ReadUInt16( nScriptType ); pNew->SetMacro( nCurKey, SvxMacro( aMacName, aLibName, (ScriptType)nScriptType ) ); diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index 2ace029f5a37..50d6659e7629 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -245,9 +245,9 @@ SfxPoolItem* SvxPageItem::Create( SvStream& rStream, sal_uInt16 ) const // UNICODE: rStream >> sStr; OUString sStr = rStream.ReadUniOrByteString( rStream.GetStreamCharSet() ); - rStream >> eType; - rStream >> bLand; - rStream >> nUse; + rStream.ReadUChar( eType ); + rStream.ReadUChar( bLand ); + rStream.ReadUInt16( nUse ); SvxPageItem* pPage = new SvxPageItem( Which() ); pPage->SetDescName( sStr ); diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx index 95798fef8e8c..27f6e2c59571 100644 --- a/svx/source/items/rotmodit.cxx +++ b/svx/source/items/rotmodit.cxx @@ -62,7 +62,7 @@ SvxRotateModeItem::~SvxRotateModeItem() SfxPoolItem* SvxRotateModeItem::Create( SvStream& rStream, sal_uInt16 ) const { sal_uInt16 nVal; - rStream >> nVal; + rStream.ReadUInt16( nVal ); return new SvxRotateModeItem( (SvxRotateMode) nVal,Which() ); } diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index abe4d03c050c..23837d2e3808 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -183,10 +183,10 @@ void NBOTypeMgrBase::ImplLoad(OUString filename) if( pIStm ) { sal_uInt32 nVersion = 0; sal_Int32 nNumIndex = 0; - *pIStm >> nVersion; + pIStm->ReadUInt32( nVersion ); if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) //first version { - *pIStm >> nNumIndex; + pIStm->ReadInt32( nNumIndex ); sal_uInt16 mLevel = 0x1; while (nNumIndex>=0 && nNumIndex<DEFAULT_NUM_VALUSET_COUNT) { SvxNumRule aNum(*pIStm); @@ -204,7 +204,7 @@ void NBOTypeMgrBase::ImplLoad(OUString filename) } } RelplaceNumRule(aNum,nNumIndex,mLevel); - *pIStm >> nNumIndex; + pIStm->ReadInt32( nNumIndex ); } } delete pIStm; diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index d532d0826827..7ddfb3b1132a 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -650,8 +650,8 @@ SdrFractionItem::SdrFractionItem(sal_uInt16 nId, SvStream& rIn): SfxPoolItem(nId) { sal_Int32 nMul,nDiv; - rIn>>nMul; - rIn>>nDiv; + rIn.ReadInt32( nMul ); + rIn.ReadInt32( nDiv ); nValue=Fraction(nMul,nDiv); } @@ -1396,7 +1396,7 @@ SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( SvStream & rStream, sal_ if ( nVersion ) { sal_Bool bValue; - rStream >> bValue; + rStream.ReadUChar( bValue ); SetValue( bValue ); } } @@ -1462,10 +1462,10 @@ SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_u { SdrCustomShapeAdjustmentValue aVal; sal_uInt32 i, nCount; - rIn >> nCount; + rIn.ReadUInt32( nCount ); for ( i = 0; i < nCount; i++ ) { - rIn >> aVal.nValue; + rIn.ReadUInt32( aVal.nValue ); SetValue( i, aVal ); } } diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index 4cac9057870f..4f6ac4a37ecc 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -406,7 +406,7 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplReadObject( uno::Reference < io::XStream > xStm = xDocStor->openStreamElement( rObjName, embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( xStm ); - *pTemp >> *pStream; + pTemp->ReadStream( *pStream ); delete pStream; // TODO/LATER: what to do when other types of objects are based on substream persistence? diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 3350feb0523a..f5f3c0dbad37 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -95,7 +95,7 @@ NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, const OUString& rName) : NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, SvStream& rIn) : SfxStringItem(_nWhich, rIn) { - rIn >> nPalIndex; + rIn.ReadInt32( nPalIndex ); } NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) : @@ -683,12 +683,12 @@ XLineDashItem::XLineDashItem(SvStream& rIn) : sal_uInt32 nLTemp; sal_Int32 nITemp; - rIn >> nITemp; aDash.SetDashStyle((XDashStyle)nITemp); - rIn >> nSTemp; aDash.SetDots(nSTemp); - rIn >> nLTemp; aDash.SetDotLen(nLTemp); - rIn >> nSTemp; aDash.SetDashes(nSTemp); - rIn >> nLTemp; aDash.SetDashLen(nLTemp); - rIn >> nLTemp; aDash.SetDistance(nLTemp); + rIn.ReadInt32( nITemp ); aDash.SetDashStyle((XDashStyle)nITemp); + rIn.ReadUInt16( nSTemp ); aDash.SetDots(nSTemp); + rIn.ReadUInt32( nLTemp ); aDash.SetDotLen(nLTemp); + rIn.ReadUInt16( nSTemp ); aDash.SetDashes(nSTemp); + rIn.ReadUInt32( nLTemp ); aDash.SetDashLen(nLTemp); + rIn.ReadUInt32( nLTemp ); aDash.SetDistance(nLTemp); } } @@ -1225,7 +1225,7 @@ namespace { basegfx::B2DPolyPolygon aRetval; sal_uInt32 nPolygonCount; - rIn >> nPolygonCount; + rIn.ReadUInt32( nPolygonCount ); for(sal_uInt32 a(0L); a < nPolygonCount; a++) { @@ -1233,9 +1233,9 @@ namespace sal_uInt8 bClosed; sal_uInt8 bControlPoints; - rIn >> nPointCount; - rIn >> bClosed; - rIn >> bControlPoints; + rIn.ReadUInt32( nPointCount ); + rIn.ReadUChar( bClosed ); + rIn.ReadUChar( bControlPoints ); basegfx::B2DPolygon aCandidate; aCandidate.setClosed(0 != bClosed); @@ -1243,23 +1243,23 @@ namespace for(sal_uInt32 b(0L); b < nPointCount; b++) { double fX, fY; - rIn >> fX; - rIn >> fY; + rIn.ReadDouble( fX ); + rIn.ReadDouble( fY ); aCandidate.append(basegfx::B2DPoint(fX, fY)); if(0 != bControlPoints) { sal_uInt8 bEdgeIsCurve; - rIn >> bEdgeIsCurve; + rIn.ReadUChar( bEdgeIsCurve ); if(0 != bEdgeIsCurve) { - rIn >> fX; - rIn >> fY; + rIn.ReadDouble( fX ); + rIn.ReadDouble( fY ); aCandidate.setPrevControlPoint(b, basegfx::B2DVector(fX, fY)); - rIn >> fX; - rIn >> fY; + rIn.ReadDouble( fX ); + rIn.ReadDouble( fY ); aCandidate.setNextControlPoint(b, basegfx::B2DVector(fX, fY)); } } @@ -2570,30 +2570,30 @@ XFillGradientItem::XFillGradientItem(SvStream& rIn, sal_uInt16 nVer) : sal_Int16 nITemp; sal_Int32 nLTemp; - rIn >> nITemp; aGradient.SetGradientStyle((XGradientStyle)nITemp); - rIn >> nRed; - rIn >> nGreen; - rIn >> nBlue; + rIn.ReadInt16( nITemp ); aGradient.SetGradientStyle((XGradientStyle)nITemp); + rIn.ReadUInt16( nRed ); + rIn.ReadUInt16( nGreen ); + rIn.ReadUInt16( nBlue ); Color aCol; aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) ); aGradient.SetStartColor( aCol ); - rIn >> nRed; - rIn >> nGreen; - rIn >> nBlue; + rIn.ReadUInt16( nRed ); + rIn.ReadUInt16( nGreen ); + rIn.ReadUInt16( nBlue ); aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) ); aGradient.SetEndColor(aCol); - rIn >> nLTemp; aGradient.SetAngle(nLTemp); - rIn >> nUSTemp; aGradient.SetBorder(nUSTemp); - rIn >> nUSTemp; aGradient.SetXOffset(nUSTemp); - rIn >> nUSTemp; aGradient.SetYOffset(nUSTemp); - rIn >> nUSTemp; aGradient.SetStartIntens(nUSTemp); - rIn >> nUSTemp; aGradient.SetEndIntens(nUSTemp); + rIn.ReadInt32( nLTemp ); aGradient.SetAngle(nLTemp); + rIn.ReadUInt16( nUSTemp ); aGradient.SetBorder(nUSTemp); + rIn.ReadUInt16( nUSTemp ); aGradient.SetXOffset(nUSTemp); + rIn.ReadUInt16( nUSTemp ); aGradient.SetYOffset(nUSTemp); + rIn.ReadUInt16( nUSTemp ); aGradient.SetStartIntens(nUSTemp); + rIn.ReadUInt16( nUSTemp ); aGradient.SetEndIntens(nUSTemp); // for newer versions consider the step width as well if (nVer >= 1) { - rIn >> nUSTemp; aGradient.SetSteps(nUSTemp); + rIn.ReadUInt16( nUSTemp ); aGradient.SetSteps(nUSTemp); } } } @@ -3086,16 +3086,16 @@ XFillHatchItem::XFillHatchItem(SvStream& rIn) : sal_Int16 nITemp; sal_Int32 nLTemp; - rIn >> nITemp; aHatch.SetHatchStyle((XHatchStyle)nITemp); - rIn >> nRed; - rIn >> nGreen; - rIn >> nBlue; + rIn.ReadInt16( nITemp ); aHatch.SetHatchStyle((XHatchStyle)nITemp); + rIn.ReadUInt16( nRed ); + rIn.ReadUInt16( nGreen ); + rIn.ReadUInt16( nBlue ); Color aCol; aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) ); aHatch.SetColor(aCol); - rIn >> nLTemp; aHatch.SetDistance(nLTemp); - rIn >> nLTemp; aHatch.SetAngle(nLTemp); + rIn.ReadInt32( nLTemp ); aHatch.SetDistance(nLTemp); + rIn.ReadInt32( nLTemp ); aHatch.SetAngle(nLTemp); } } diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index 7a000300d2da..69feb1e09cde 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -221,12 +221,12 @@ AffineMatrixItem::AffineMatrixItem(const com::sun::star::geometry::AffineMatrix2 AffineMatrixItem::AffineMatrixItem(SvStream& rIn) : SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX) { - rIn >> maMatrix.m00; - rIn >> maMatrix.m01; - rIn >> maMatrix.m02; - rIn >> maMatrix.m10; - rIn >> maMatrix.m11; - rIn >> maMatrix.m12; + rIn.ReadDouble( maMatrix.m00 ); + rIn.ReadDouble( maMatrix.m01 ); + rIn.ReadDouble( maMatrix.m02 ); + rIn.ReadDouble( maMatrix.m10 ); + rIn.ReadDouble( maMatrix.m11 ); + rIn.ReadDouble( maMatrix.m12 ); } AffineMatrixItem::AffineMatrixItem(const AffineMatrixItem& rRef) diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index a52c0d1fd116..797e08979c04 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -296,8 +296,8 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) { sal_Int16 iTmp; - rIn >> iTmp; // former XBitmapStyle - rIn >> iTmp; // former XBitmapType + rIn.ReadInt16( iTmp ); // former XBitmapStyle + rIn.ReadInt16( iTmp ); // former XBitmapType if(XBITMAP_IMPORT == iTmp) { @@ -312,7 +312,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) for(sal_uInt16 i(0); i < 64; i++) { - rIn >> aArray[i]; + rIn.ReadUInt16( aArray[i] ); } Color aColorPix; diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx index 693f6a7f6a6f..3df1f820f3fc 100644 --- a/svx/source/xoutdev/xexch.cxx +++ b/svx/source/xoutdev/xexch.cxx @@ -96,7 +96,7 @@ SvStream& ReadXFillExchangeData( SvStream& rIStm, XFillExchangeData& rData ) sal_uInt32 nItemCount = 0; sal_uInt16 nWhich, nItemVersion; - rIStm >> nItemCount; + rIStm.ReadUInt32( nItemCount ); if( nItemCount > ( XATTR_FILL_LAST - XATTR_FILL_FIRST + 1 ) ) nItemCount = ( XATTR_FILL_LAST - XATTR_FILL_FIRST + 1 ); @@ -105,7 +105,7 @@ SvStream& ReadXFillExchangeData( SvStream& rIStm, XFillExchangeData& rData ) { VersionCompat aCompat( rIStm, STREAM_READ ); - rIStm >> nWhich >> nItemVersion; + rIStm.ReadUInt16( nWhich ).ReadUInt16( nItemVersion ); if( nWhich ) { |