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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/core/sdiocmpt.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/eppt/eppt.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 14 | ||||
-rw-r--r-- | sd/source/filter/html/pubdlg.cxx | 38 | ||||
-rw-r--r-- | sd/source/filter/ppt/ppt97animations.cxx | 28 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 74 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptinanimations.cxx | 98 | ||||
-rw-r--r-- | sd/source/filter/ppt/propread.cxx | 46 | ||||
-rw-r--r-- | sd/source/ui/dlg/morphdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/vectdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/sddetect.cxx | 2 |
11 files changed, 156 insertions, 156 deletions
diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx index ce28ab43f854..1a0d943e47a4 100644 --- a/sd/source/core/sdiocmpt.cxx +++ b/sd/source/core/sdiocmpt.cxx @@ -41,7 +41,7 @@ old_SdrDownCompat::~old_SdrDownCompat() void old_SdrDownCompat::Read() { - rStream >> nSubRecSiz; + rStream.ReadUInt32( nSubRecSiz ); } void old_SdrDownCompat::Write() @@ -113,7 +113,7 @@ SdIOCompat::SdIOCompat(SvStream& rNewStream, sal_uInt16 nNewMode, sal_uInt16 nVe { DBG_ASSERT(nVer == SDIOCOMPAT_VERSIONDONTKNOW, "referring to the version while reading is silly!"); - rNewStream >> nVersion; + rNewStream.ReadUInt16( nVersion ); } } diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 99ec203736ad..b2760c6cdbbb 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1430,8 +1430,8 @@ sal_Bool PPTWriter::ImplWriteAtomEnding() sal_uInt32 n1, n2; mpVBA->Seek( 0 ); - *mpVBA >> n1 - >> n2; + mpVBA->ReadUInt32( n1 ) + .ReadUInt32( n2 ); mpStrm->WriteUInt32( mnVBAOleOfs ); sal_uInt32 nOldPos = mpStrm->Tell(); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 354a20adeaa5..6dfa1050da07 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -2565,20 +2565,20 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a xCompObj->Seek( 0 ); sal_Int16 nVersion, nByteOrder; sal_Int32 nWinVersion, nVal, nStringLen; - *xCompObj >> nVersion - >> nByteOrder - >> nWinVersion - >> nVal; + xCompObj->ReadInt16( nVersion ) + .ReadInt16( nByteOrder ) + .ReadInt32( nWinVersion ) + .ReadInt32( nVal ); xCompObj->SeekRel( 16 ); // skipping clsid - *xCompObj >> nStringLen; + xCompObj->ReadInt32( nStringLen ); if ( ( xCompObj->Tell() + nStringLen ) < nStreamLen ) { xCompObj->SeekRel( nStringLen ); // now skipping the UserName; - *xCompObj >> nStringLen; + xCompObj->ReadInt32( nStringLen ); if ( ( xCompObj->Tell() + nStringLen ) < nStreamLen ) { xCompObj->SeekRel( nStringLen ); // now skipping the clipboard formatname - *xCompObj >> nStringLen; + xCompObj->ReadInt32( nStringLen ); if ( ( nStringLen > 1 ) && ( ( xCompObj->Tell() + nStringLen ) < nStreamLen ) ) { // i think that the OleIdentifier will follow OString aTemp = read_uInt8s_ToOString(*xCompObj, nStringLen - 1); diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 9004f17299a8..37ce783a90fa 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -249,14 +249,14 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign) rDesign.m_aDesignName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); - rIn >> nTemp16; + rIn.ReadUInt16( nTemp16 ); rDesign.m_eMode = (HtmlPublishMode)nTemp16; - rIn >> rDesign.m_bContentPage; - rIn >> rDesign.m_bNotes; - rIn >> rDesign.m_nResolution; + rIn.ReadUChar( rDesign.m_bContentPage ); + rIn.ReadUChar( rDesign.m_bNotes ); + rIn.ReadUInt16( rDesign.m_nResolution ); rDesign.m_aCompression = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); - rIn >> nTemp16; + rIn.ReadUInt16( nTemp16 ); rDesign.m_eFormat = (PublishingFormat)nTemp16; rDesign.m_aAuthor = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); @@ -266,30 +266,30 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign) RTL_TEXTENCODING_UTF8); rDesign.m_aMisc = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); - rIn >> rDesign.m_bDownload; - rIn >> rDesign.m_bCreated; // not used - rIn >> rDesign.m_nButtonThema; - rIn >> rDesign.m_bUserAttr; + rIn.ReadUChar( rDesign.m_bDownload ); + rIn.ReadUChar( rDesign.m_bCreated ); // not used + rIn.ReadInt16( rDesign.m_nButtonThema ); + rIn.ReadUChar( rDesign.m_bUserAttr ); ReadColor( rIn, rDesign.m_aBackColor ); ReadColor( rIn, rDesign.m_aTextColor ); ReadColor( rIn, rDesign.m_aLinkColor ); ReadColor( rIn, rDesign.m_aVLinkColor ); ReadColor( rIn, rDesign.m_aALinkColor ); - rIn >> rDesign.m_bUseAttribs; - rIn >> rDesign.m_bUseColor; + rIn.ReadUChar( rDesign.m_bUseAttribs ); + rIn.ReadUChar( rDesign.m_bUseColor ); - rIn >> nTemp16; + rIn.ReadUInt16( nTemp16 ); rDesign.m_eScript = (PublishingScript)nTemp16; rDesign.m_aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); rDesign.m_aCGI = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); - rIn >> rDesign.m_bAutoSlide; - rIn >> rDesign.m_nSlideDuration; - rIn >> rDesign.m_bEndless; - rIn >> rDesign.m_bSlideSound; - rIn >> rDesign.m_bHiddenSlides; + rIn.ReadUChar( rDesign.m_bAutoSlide ); + rIn.ReadUInt32( rDesign.m_nSlideDuration ); + rIn.ReadUChar( rDesign.m_bEndless ); + rIn.ReadUChar( rDesign.m_bSlideSound ); + rIn.ReadUChar( rDesign.m_bHiddenSlides ); return rIn; } @@ -1521,7 +1521,7 @@ sal_Bool SdPublishingDlg::Load() return( sal_False ); sal_uInt16 aCheck; - *pStream >> aCheck; + pStream->ReadUInt16( aCheck ); if(aCheck != nMagic) return sal_False; @@ -1529,7 +1529,7 @@ sal_Bool SdPublishingDlg::Load() SdIOCompat aIO(*pStream, STREAM_READ); sal_uInt16 nDesigns; - *pStream >> nDesigns; + pStream->ReadUInt16( nDesigns ); for( sal_uInt16 nIndex = 0; pStream->GetError() == SVSTREAM_OK && nIndex < nDesigns; diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx index d5124155c8a2..fc30f643cf85 100644 --- a/sd/source/filter/ppt/ppt97animations.cxx +++ b/sd/source/filter/ppt/ppt97animations.cxx @@ -41,20 +41,20 @@ using namespace ::com::sun::star; void Ppt97AnimationInfoAtom::ReadStream( SvStream& rIn ) { - rIn >> nDimColor; - rIn >> nFlags; - rIn >> nSoundRef; - rIn >> nDelayTime; - rIn >> nOrderID; - rIn >> nSlideCount; - rIn >> nBuildType; - rIn >> nFlyMethod; - rIn >> nFlyDirection; - rIn >> nAfterEffect; - rIn >> nSubEffect; - rIn >> nOLEVerb; - rIn >> nUnknown1; - rIn >> nUnknown2; + rIn.ReadUInt32( nDimColor ); + rIn.ReadUInt32( nFlags ); + rIn.ReadUInt32( nSoundRef ); + rIn.ReadInt32( nDelayTime ); + rIn.ReadUInt16( nOrderID ); + rIn.ReadUInt16( nSlideCount ); + rIn.ReadUChar( nBuildType ); + rIn.ReadUChar( nFlyMethod ); + rIn.ReadUChar( nFlyDirection ); + rIn.ReadUChar( nAfterEffect ); + rIn.ReadUChar( nSubEffect ); + rIn.ReadUChar( nOLEVerb ); + rIn.ReadUChar( nUnknown1 ); + rIn.ReadUChar( nUnknown2 ); } //--------------------------------------------------------------------------------------- diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 5398d39eba9c..02157f410397 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -275,12 +275,12 @@ sal_Bool ImplSdPPTImport::Import() { if ( pSection->GetProperty( PID_SLIDECOUNT, aPropItem ) ) { - aPropItem >> nType; + aPropItem.ReadUInt32( nType ); if ( ( nType == VT_I4 ) || ( nType == VT_UI4 ) ) { // examine PID_HEADINGPAIR to get the correct entry for PID_DOCPARTS sal_uInt32 nSlideCount, nVecCount; - aPropItem >> nSlideCount; + aPropItem.ReadUInt32( nSlideCount ); if ( nSlideCount && pSection->GetProperty( PID_HEADINGPAIR, aPropItem ) ) { sal_uInt32 nSlideTitleIndex = 0, nSlideTitleCount = 0; @@ -288,8 +288,8 @@ sal_Bool ImplSdPPTImport::Import() OUString aUString; - aPropItem >> nType - >> nVecCount; + aPropItem.ReadUInt32( nType ) + .ReadUInt32( nVecCount ); if ( ( nType == ( VT_VARIANT | VT_VECTOR ) ) && ( nVecCount ^ 1 ) ) { @@ -299,10 +299,10 @@ sal_Bool ImplSdPPTImport::Import() { if ( !aPropItem.Read( aUString, VT_EMPTY, sal_False ) ) break; - aPropItem >> nType; + aPropItem.ReadUInt32( nType ); if ( ( nType != VT_I4 ) && ( nType != VT_UI4 ) ) break; - aPropItem >> nTemp; + aPropItem.ReadUInt32( nTemp ); if ( aUString == "Slide Titles" || aUString == "Folientitel" ) { nSlideTitleCount = nTemp; @@ -313,15 +313,15 @@ sal_Bool ImplSdPPTImport::Import() } if ( ( nSlideCount == nSlideTitleCount ) && pSection->GetProperty( PID_DOCPARTS, aPropItem ) ) { - aPropItem >> nType - >> nVecCount; + aPropItem.ReadUInt32( nType ) + .ReadUInt32( nVecCount ); if ( ( nVecCount >= ( nSlideTitleIndex + nSlideTitleCount ) ) && ( nType == ( VT_LPSTR | VT_VECTOR ) ) ) { for ( i = 0; i != nSlideTitleIndex; i++ ) { - aPropItem >> nTemp; + aPropItem.ReadUInt32( nTemp ); aPropItem.SeekRel( nTemp ); } for ( i = 0; i < nSlideTitleCount; i++ ) @@ -365,11 +365,11 @@ sal_Bool ImplSdPPTImport::Import() if ( pSection->GetProperty( iter->second, aPropItem ) ) { aPropItem.Seek( STREAM_SEEK_TO_BEGIN ); - aPropItem >> nType; + aPropItem.ReadUInt32( nType ); if ( nType == VT_BLOB ) { - aPropItem >> nPropSize - >> nPropCount; + aPropItem.ReadUInt32( nPropSize ) + .ReadUInt32( nPropCount ); if ( ! ( nPropCount % 6 ) ) { @@ -382,22 +382,22 @@ sal_Bool ImplSdPPTImport::Import() { pHyperlink = new SdHyperlinkEntry; pHyperlink->nIndex = 0; - aPropItem >> nType; + aPropItem.ReadUInt32( nType ); if ( nType != VT_I4 ) break; - aPropItem >> pHyperlink->nPrivate1 - >> nType; + aPropItem.ReadInt32( pHyperlink->nPrivate1 ) + .ReadUInt32( nType ); if ( nType != VT_I4 ) break; - aPropItem >> pHyperlink->nPrivate2 - >> nType; + aPropItem.ReadInt32( pHyperlink->nPrivate2 ) + .ReadUInt32( nType ); if ( nType != VT_I4 ) break; - aPropItem >> pHyperlink->nPrivate3 - >> nType; + aPropItem.ReadInt32( pHyperlink->nPrivate3 ) + .ReadUInt32( nType ); if ( nType != VT_I4 ) break; - aPropItem >> pHyperlink->nInfo; + aPropItem.ReadInt32( pHyperlink->nInfo ); if ( !aPropItem.Read( pHyperlink->aTarget, VT_EMPTY ) ) break; @@ -524,7 +524,7 @@ sal_Bool ImplSdPPTImport::Import() if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlinkAtom, nExObjHyperListLen, NULL, 0 ) ) break; rStCtrl.SeekRel( 8 ); - rStCtrl >> pPtr->nIndex; + rStCtrl.ReadUInt32( pPtr->nIndex ); aHyperE.SeekToEndOfRecord( rStCtrl ); } } @@ -1282,7 +1282,7 @@ sal_Bool ImplSdPPTImport::Import() for ( sal_uInt32 nS = 0; nS < nSCount; nS++ ) { sal_uInt32 nPageNumber; - rStCtrl >> nPageNumber; + rStCtrl.ReadUInt32( nPageNumber ); sal_uInt16 nPage = pPageList->FindPage( nPageNumber ); if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND ) { @@ -1318,15 +1318,15 @@ sal_Bool ImplSdPPTImport::Import() sal_uInt32 nPenColor = 0x1000000; sal_Int32 nRestartTime = 0x7fffffff; sal_Int16 nEndSlide = 0; - rStCtrl >> nPenColor - >> nRestartTime - >> nStartSlide - >> nEndSlide; + rStCtrl.ReadUInt32( nPenColor ) + .ReadInt32( nRestartTime ) + .ReadUInt16( nStartSlide ) + .ReadInt16( nEndSlide ); sal_Unicode nChar; for ( sal_uInt32 i2 = 0; i2 < 32; i2++ ) { - rStCtrl >> nChar; + rStCtrl.ReadUInt16( nChar ); if ( nChar ) aCustomShow.append( nChar ); else @@ -1335,7 +1335,7 @@ sal_Bool ImplSdPPTImport::Import() break; } } - rStCtrl >> nFlags; + rStCtrl.ReadUInt32( nFlags ); } // set the current custom show if ( !aCustomShow.isEmpty() ) @@ -1533,13 +1533,13 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat sal_Int8 nDirection, nTransitionType, nByteDummy, nSpeed; sal_Int16 nBuildFlags; sal_Int32 nSlideTime, nSoundRef; - rStCtrl >> nSlideTime // time to show (in Ticks) - >> nSoundRef // Index of SoundCollection - >> nDirection // direction of fade effect - >> nTransitionType // fade effect - >> nBuildFlags // Buildflags (s.u.) - >> nSpeed // speed (slow, medium, fast) - >> nByteDummy >> nByteDummy >> nByteDummy; + rStCtrl.ReadInt32( nSlideTime ) // time to show (in Ticks) + .ReadInt32( nSoundRef ) // Index of SoundCollection + .ReadSChar( nDirection ) // direction of fade effect + .ReadSChar( nTransitionType ) // fade effect + .ReadInt16( nBuildFlags ) // Buildflags (s.u.) + .ReadSChar( nSpeed ) // speed (slow, medium, fast) + .ReadSChar( nByteDummy ).ReadSChar( nByteDummy ).ReadSChar( nByteDummy ); switch ( nTransitionType ) { @@ -1993,7 +1993,7 @@ OUString ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const if ( SeekToRec( rStCtrl, PPT_PST_ExMediaAtom, aExVideoHd.GetRecEndFilePos(), &aExMediaAtomHd ) ) { sal_uInt32 nRef; - rStCtrl >> nRef; + rStCtrl.ReadUInt32( nRef ); if ( nRef == nMediaRef ) { aExVideoHd.SeekToContent( rStCtrl ); @@ -2651,7 +2651,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi if ( SeekToRec( rSt, PPT_PST_ExObjRefAtom, nHdRecEnd, &aObjRefAtomHd ) ) { sal_uInt32 nRef; - rSt >> nRef; + rSt.ReadUInt32( nRef ); OUString aMediaURL( ReadMedia( nRef ) ); if ( aMediaURL.isEmpty() ) aMediaURL = ReadSound( nRef ); diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index d761e2b961ae..e61122ee2e3e 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -108,14 +108,14 @@ const transition* transition::find( const OUString& rName ) SvStream& operator>>(SvStream& rIn, AnimationNode& rNode ) { - rIn >> rNode.mnU1; - rIn >> rNode.mnRestart; - rIn >> rNode.mnGroupType; - rIn >> rNode.mnFill; - rIn >> rNode.mnU3; - rIn >> rNode.mnU4; - rIn >> rNode.mnDuration; - rIn >> rNode.mnNodeType; + rIn.ReadInt32( rNode.mnU1 ); + rIn.ReadInt32( rNode.mnRestart ); + rIn.ReadInt32( rNode.mnGroupType ); + rIn.ReadInt32( rNode.mnFill ); + rIn.ReadInt32( rNode.mnU3 ); + rIn.ReadInt32( rNode.mnU4 ); + rIn.ReadInt32( rNode.mnDuration ); + rIn.ReadInt32( rNode.mnNodeType ); return rIn; } @@ -1444,7 +1444,7 @@ int AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference< float fInterval; sal_Int32 nTextUnitEffect, nU1, nU2, nU3; - mrStCtrl >> fInterval >> nTextUnitEffect >> nU1 >> nU2 >> nU3; + mrStCtrl.ReadFloat( fInterval ).ReadInt32( nTextUnitEffect ).ReadInt32( nU1 ).ReadInt32( nU2 ).ReadInt32( nU3 ); Reference< XIterateContainer > xIter( xNode, UNO_QUERY ); if( xIter.is() ) @@ -1600,8 +1600,8 @@ void AnimationImporter::importAnimateFilterContainer( const Atom* pAtom, const R case DFF_msofbtAnimateFilterData: { sal_uInt32 transition; - mrStCtrl >> nBits; - mrStCtrl >> transition; + mrStCtrl.ReadUInt32( nBits ); + mrStCtrl.ReadUInt32( transition ); if( nBits & 1 ) xFilter->setMode( transition == 0 ); @@ -1706,7 +1706,7 @@ void AnimationImporter::importAnimateAttributeTargetContainer( const Atom* pAtom sal_uInt32 nAccumulate; sal_uInt32 nTransformType; - mrStCtrl >> nBits >> nAdditive >> nAccumulate >> nTransformType; + mrStCtrl.ReadUInt32( nBits ).ReadUInt32( nAdditive ).ReadUInt32( nAccumulate ).ReadUInt32( nTransformType ); // nBits %0001: additive, %0010: accumulate, %0100: attributeName, %1000: transformtype // nAdditive 0 = base, 1 = sum, 2 = replace, 3 = multiply, 4 = none @@ -1892,10 +1892,10 @@ void AnimationImporter::importAnimateColorContainer( const Atom* pAtom, const Re sal_Int32 nByMode, nByA, nByB, nByC; sal_Int32 nFromMode, nFromA, nFromB, nFromC; sal_Int32 nToMode, nToA, nToB, nToC; - mrStCtrl >> nBits; - mrStCtrl >> nByMode >> nByA >> nByB >> nByC; - mrStCtrl >> nFromMode >> nFromA >> nFromB >> nFromC; - mrStCtrl >> nToMode >> nToA >> nToB >> nToC; + mrStCtrl.ReadUInt32( nBits ); + mrStCtrl.ReadInt32( nByMode ).ReadInt32( nByA ).ReadInt32( nByB ).ReadInt32( nByC ); + mrStCtrl.ReadInt32( nFromMode ).ReadInt32( nFromA ).ReadInt32( nFromB ).ReadInt32( nFromC ); + mrStCtrl.ReadInt32( nToMode ).ReadInt32( nToA ).ReadInt32( nToB ).ReadInt32( nToC ); if( nBits & 1 ) { @@ -1961,7 +1961,7 @@ void AnimationImporter::importAnimateSetContainer( const Atom* pAtom, const Refe case DFF_msofbtAnimateSetData: { sal_Int32 nU1, nU2; - mrStCtrl >> nU1 >> nU2; + mrStCtrl.ReadInt32( nU1 ).ReadInt32( nU2 ); dump( " set_1=\"%ld\"", nU1 ), dump( " set_2=\"%ld\"", nU2 ); @@ -2020,7 +2020,7 @@ void AnimationImporter::importAnimateContainer( const Atom* pAtom, const Referen case DFF_msofbtAnimateData: { sal_uInt32 nCalcmode, nBits, nValueType; - mrStCtrl >> nCalcmode >> nBits >> nValueType; + mrStCtrl.ReadUInt32( nCalcmode ).ReadUInt32( nBits ).ReadUInt32( nValueType ); if( nBits & 0x08 ) { @@ -2101,7 +2101,7 @@ void AnimationImporter::importAnimateMotionContainer( const Atom* pAtom, const R sal_uInt32 nBits, nOrigin; float fByX, fByY, fFromX, fFromY, fToX, fToY; - mrStCtrl >> nBits >> fByX >> fByY >> fFromX >> fFromY >> fToX >> fToY >> nOrigin; + mrStCtrl.ReadUInt32( nBits ).ReadFloat( fByX ).ReadFloat( fByY ).ReadFloat( fFromX ).ReadFloat( fFromY ).ReadFloat( fToX ).ReadFloat( fToY ).ReadUInt32( nOrigin ); #ifdef DBG_ANIM_LOG if( nBits & 1 ) @@ -2185,8 +2185,8 @@ void AnimationImporter::importCommandContainer( const Atom* pAtom, const Referen sal_Int32 nCommandType; // looks like U1 is a bitset, bit 1 enables the type and bit 2 enables // a propertyvalue that follows - mrStCtrl >> nBits; - mrStCtrl >> nCommandType; + mrStCtrl.ReadInt32( nBits ); + mrStCtrl.ReadInt32( nCommandType ); if( nBits & 1 ) { @@ -2398,7 +2398,7 @@ void AnimationImporter::importAnimateScaleContainer( const Atom* pAtom, const Re float fByX, fByY, fFromX, fFromY, fToX, fToY; // nBits %001: by, %010: from, %100: to, %1000: zoomContents(bool) - mrStCtrl >> nBits >> fByX >> fByY >> fFromX >> fFromY >> fToX >> fToY >> nZoomContents; + mrStCtrl.ReadUInt32( nBits ).ReadFloat( fByX ).ReadFloat( fByY ).ReadFloat( fFromX ).ReadFloat( fFromY ).ReadFloat( fToX ).ReadFloat( fToY ).ReadUInt32( nZoomContents ); ValuePair aPair; // 'from' value @@ -2499,7 +2499,7 @@ void AnimationImporter::importAnimateRotationContainer( const Atom* pAtom, const float fBy, fFrom, fTo; // nBits %001: by, %010: from, %100: to, %1000: zoomContents(bool) - mrStCtrl >> nBits >> fBy >> fFrom >> fTo >> nU1; + mrStCtrl.ReadUInt32( nBits ).ReadFloat( fBy ).ReadFloat( fFrom ).ReadFloat( fTo ).ReadUInt32( nU1 ); if( nBits & 1 ) xTransform->setBy( makeAny( (double) fBy ) ); @@ -2590,13 +2590,13 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc while( pValueAtom && pValueAtom->seekToContent() ) { sal_uInt32 nType; - mrStCtrl >> nType; + mrStCtrl.ReadUInt32( nType ); switch( nType ) { case 0: { float fRepeat; - mrStCtrl >> fRepeat; + mrStCtrl.ReadFloat( fRepeat ); xNode->setRepeatCount( (fRepeat < ((float)3.40282346638528860e+38)) ? makeAny( (double)fRepeat ) : makeAny( Timing_INDEFINITE ) ); #ifdef DBG_ANIM_LOG @@ -2615,7 +2615,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc case 3: { float faccelerate; - mrStCtrl >> faccelerate; + mrStCtrl.ReadFloat( faccelerate ); xNode->setAcceleration( faccelerate ); dump( " accelerate=\"%g\"", (double)faccelerate ); } @@ -2624,7 +2624,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc case 4: { float fdecelerate; - mrStCtrl >> fdecelerate; + mrStCtrl.ReadFloat( fdecelerate ); xNode->setDecelerate( fdecelerate ); dump( " decelerate=\"%g\"", (double)fdecelerate ); } @@ -2633,7 +2633,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc case 5: { sal_Int32 nAutoreverse; - mrStCtrl >> nAutoreverse; + mrStCtrl.ReadInt32( nAutoreverse ); xNode->setAutoReverse( nAutoreverse != 0 ); dump( " autoreverse=\"%#lx\"", nAutoreverse ); } @@ -2642,7 +2642,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc default: { sal_uInt32 nUnknown; - mrStCtrl >> nUnknown; + mrStCtrl.ReadUInt32( nUnknown ); #ifdef DBG_ANIM_LOG fprintf(mpFile, " attribute_%d=\"%#lx\"", nType, nUnknown ); #endif @@ -2683,7 +2683,7 @@ void AnimationImporter::importAnimateKeyPoints( const Atom* pAtom, const Referen { if( pIter->seekToContent() ) { - mrStCtrl >> nTemp; + mrStCtrl.ReadInt32( nTemp ); double fTemp = (double)nTemp / 1000.0; aKeyTimes[nKeyTime] = fTemp; @@ -2803,7 +2803,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny ) if ( nRecLen >= 1 ) { sal_Int8 nType; - mrStCtrl >> nType; + mrStCtrl.ReadSChar( nType ); switch( nType ) { case DFF_ANIM_PROP_TYPE_BYTE : @@ -2811,7 +2811,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny ) if ( nRecLen == 2 ) { sal_uInt8 nByte; - mrStCtrl >> nByte; + mrStCtrl.ReadUChar( nByte ); rAny <<= nByte; bOk = true; @@ -2824,7 +2824,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny ) if ( nRecLen == 5 ) { sal_uInt32 nInt32; - mrStCtrl >> nInt32; + mrStCtrl.ReadUInt32( nInt32 ); rAny <<= nInt32; bOk = true; @@ -2837,7 +2837,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny ) if( nRecLen == 5 ) { float fFloat; - mrStCtrl >> fFloat; + mrStCtrl.ReadFloat( fFloat ); rAny <<= (double)fFloat; bOk = true; @@ -2900,10 +2900,10 @@ void AnimationImporter::importAnimationEvents( const Atom* pAtom, const Referenc case DFF_msofbtAnimTrigger: { sal_Int32 nU1, nTrigger, nU3, nBegin; - mrStCtrl >> nU1; - mrStCtrl >> nTrigger; - mrStCtrl >> nU3; - mrStCtrl >> nBegin; + mrStCtrl.ReadInt32( nU1 ); + mrStCtrl.ReadInt32( nTrigger ); + mrStCtrl.ReadInt32( nU3 ); + mrStCtrl.ReadInt32( nBegin ); switch( nTrigger ) { @@ -2995,11 +2995,11 @@ void AnimationImporter::importAnimationActions( const Atom* pAtom, const Referen if( pActionAtom && pActionAtom->seekToContent() ) { sal_Int32 nConcurrent, nNextAction, nEndSync, nU4, nU5; - mrStCtrl >> nConcurrent; - mrStCtrl >> nNextAction; - mrStCtrl >> nEndSync; - mrStCtrl >> nU4; - mrStCtrl >> nU5; + mrStCtrl.ReadInt32( nConcurrent ); + mrStCtrl.ReadInt32( nNextAction ); + mrStCtrl.ReadInt32( nEndSync ); + mrStCtrl.ReadInt32( nU4 ); + mrStCtrl.ReadInt32( nU5 ); if( nEndSync == 1 ) xNode->setEndSync( makeAny( AnimationEndSync::ALL ) ); @@ -3040,11 +3040,11 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An { sal_Int32 nRefType,nRefId; sal_Int32 begin,end; - mrStCtrl >> nRefMode; - mrStCtrl >> nRefType; - mrStCtrl >> nRefId; - mrStCtrl >> begin; - mrStCtrl >> end; + mrStCtrl.ReadInt32( nRefMode ); + mrStCtrl.ReadInt32( nRefType ); + mrStCtrl.ReadInt32( nRefId ); + mrStCtrl.ReadInt32( begin ); + mrStCtrl.ReadInt32( end ); switch( nRefType ) { @@ -3128,7 +3128,7 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An case 0x2b01: { sal_Int32 nU1; - mrStCtrl >> nU1; + mrStCtrl.ReadInt32( nU1 ); } break; default: diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index 42fc3f816241..894efb4b4c21 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -84,13 +84,13 @@ sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAl if ( nStringType == VT_EMPTY ) { nType = VT_NULL; // Initialize in case stream fails. - *this >> nType; + ReadUInt32( nType ); } else nType = nStringType & VT_TYPEMASK; nItemSize = 0; // Initialize in case stream fails. - *this >> nItemSize; + ReadUInt32( nItemSize ); switch( nType ) { @@ -108,7 +108,7 @@ sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAl { sal_Unicode* pWString = (sal_Unicode*)pString; for ( i = 0; i < nItemSize; i++ ) - *this >> pWString[ i ]; + ReadUInt16( pWString[ i ] ); rString = OUString(pWString, lcl_getMaxSafeStrLen(nItemSize)); } else @@ -147,7 +147,7 @@ sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAl { sal_Unicode* pString = new sal_Unicode[ nItemSize ]; for ( i = 0; i < nItemSize; i++ ) - *this >> pString[ i ]; + ReadUInt16( pString[ i ] ); if ( pString[ i - 1 ] == 0 ) { if ( (sal_uInt16)nItemSize > 1 ) @@ -280,10 +280,10 @@ sal_Bool Section::GetDictionary( Dictionary& rDict ) sal_uInt32 nDictCount, nId, nSize, nPos; SvMemoryStream aStream( (sal_Int8*)iter->mpBuf, iter->mnSize, STREAM_READ ); aStream.Seek( STREAM_SEEK_TO_BEGIN ); - aStream >> nDictCount; + aStream.ReadUInt32( nDictCount ); for ( sal_uInt32 i = 0; i < nDictCount; i++ ) { - aStream >> nId >> nSize; + aStream.ReadUInt32( nId ).ReadUInt32( nSize ); if ( nSize ) { OUString aString; @@ -298,7 +298,7 @@ sal_Bool Section::GetDictionary( Dictionary& rDict ) aStream.Seek( nPos ); sal_Unicode* pWString = (sal_Unicode*)pString; for ( i = 0; i < nSize; i++ ) - aStream >> pWString[ i ]; + aStream.ReadUInt16( pWString[ i ] ); aString = OUString(pWString, lcl_getMaxSafeStrLen(nSize)); } else @@ -331,22 +331,22 @@ void Section::Read( SvStorageStream *pStrm ) pStrm->Seek( nSecOfs ); mnTextEnc = RTL_TEXTENCODING_MS_1252; - *pStrm >> nSecSize >> nPropCount; + pStrm->ReadUInt32( nSecSize ).ReadUInt32( nPropCount ); while( nPropCount-- && ( pStrm->GetError() == ERRCODE_NONE ) ) { - *pStrm >> nPropId >> nPropOfs; + pStrm->ReadUInt32( nPropId ).ReadUInt32( nPropOfs ); nCurrent = pStrm->Tell(); pStrm->Seek( nPropOfs + nSecOfs ); if ( nPropId ) // do not read dictionary { - *pStrm >> nPropType; + pStrm->ReadUInt32( nPropType ); nPropSize = 4; if ( nPropType & VT_VECTOR ) { - *pStrm >> nVectorCount; + pStrm->ReadUInt32( nVectorCount ); nPropType &=~VT_VECTOR; nPropSize += 4; } @@ -360,7 +360,7 @@ void Section::Read( SvStorageStream *pStrm ) { if ( bVariant ) { - *pStrm >> nPropType; + pStrm->ReadUInt32( nPropType ); nPropSize += 4; } switch( nPropType ) @@ -392,18 +392,18 @@ void Section::Read( SvStorageStream *pStrm ) break; case VT_BSTR : - *pStrm >> nTemp; + pStrm->ReadUInt32( nTemp ); nPropSize += ( nTemp + 4 ); break; case VT_LPSTR : - *pStrm >> nTemp; + pStrm->ReadUInt32( nTemp ); nPropSize += ( nTemp + 4 ); break; case VT_LPWSTR : { - *pStrm >> nTemp; + pStrm->ReadUInt32( nTemp ); // looks like these are aligned to 4 bytes sal_uInt32 nLength = nPropOfs + nSecOfs + nPropSize + ( nTemp << 1 ) + 4; nPropSize += ( nTemp << 1 ) + 4 + (nLength % 4); @@ -413,7 +413,7 @@ void Section::Read( SvStorageStream *pStrm ) case VT_BLOB_OBJECT : case VT_BLOB : case VT_CF : - *pStrm >> nTemp; + pStrm->ReadUInt32( nTemp ); nPropSize += ( nTemp + 4 ); break; @@ -457,10 +457,10 @@ void Section::Read( SvStorageStream *pStrm ) if ( GetProperty( 1, aPropItem ) ) { sal_uInt16 nCodePage; - aPropItem >> nPropType; + aPropItem.ReadUInt32( nPropType ); if ( nPropType == VT_I2 ) { - aPropItem >> nCodePage; + aPropItem.ReadUInt16( nCodePage ); if ( nCodePage == 1200 ) { @@ -483,10 +483,10 @@ void Section::Read( SvStorageStream *pStrm ) else { sal_uInt32 nDictCount, nSize; - *pStrm >> nDictCount; + pStrm->ReadUInt32( nDictCount ); for ( i = 0; i < nDictCount; i++ ) { - *pStrm >> nSize >> nSize; + pStrm->ReadUInt32( nSize ).ReadUInt32( nSize ); pStrm->SeekRel( nSize ); } nSize = pStrm->Tell(); @@ -572,12 +572,12 @@ void PropRead::Read() sal_uInt32 nSections; sal_uInt32 nSectionOfs; sal_uInt32 nCurrent; - *mpSvStream >> mnByteOrder >> mnFormat >> mnVersionLo >> mnVersionHi; + mpSvStream->ReadUInt16( mnByteOrder ).ReadUInt16( mnFormat ).ReadUInt16( mnVersionLo ).ReadUInt16( mnVersionHi ); if ( mnByteOrder == 0xfffe ) { sal_uInt8* pSectCLSID = new sal_uInt8[ 16 ]; mpSvStream->Read( mApplicationCLSID, 16 ); - *mpSvStream >> nSections; + mpSvStream->ReadUInt32( nSections ); if ( nSections > 2 ) // sj: PowerPoint documents are containing max 2 sections { mbStatus = sal_False; @@ -585,7 +585,7 @@ void PropRead::Read() else for ( sal_uInt32 i = 0; i < nSections; i++ ) { mpSvStream->Read( pSectCLSID, 16 ); - *mpSvStream >> nSectionOfs; + mpSvStream->ReadUInt32( nSectionOfs ); nCurrent = mpSvStream->Tell(); mpSvStream->Seek( nSectionOfs ); Section aSection( pSectCLSID ); diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index 0559dda21ba4..af3a252f66ef 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -76,7 +76,7 @@ void MorphDlg::LoadSettings() { SdIOCompat aCompat( *xIStm, STREAM_READ ); - *xIStm >> nSteps >> bOrient >> bAttrib; + xIStm->ReadUInt16( nSteps ).ReadUChar( bOrient ).ReadUChar( bAttrib ); } else { diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 85fac7688b9b..bd159e99555b 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -308,7 +308,7 @@ void SdVectorizeDlg::LoadSettings() if( xIStm.Is() ) { SdIOCompat aCompat( *xIStm, STREAM_READ ); - *xIStm >> nLayers >> nReduce >> nFillHoles >> bFillHoles; + xIStm->ReadUInt16( nLayers ).ReadUInt16( nReduce ).ReadUInt16( nFillHoles ).ReadUChar( bFillHoles ); } else { diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index f962b9c82c03..8ade5b964c12 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -394,7 +394,7 @@ OUString SAL_CALL SdFilterDetect::detect( Sequence< beans::PropertyValue >& lDes { sal_uInt8 n8; pStm->Seek( STREAM_SEEK_TO_BEGIN ); - *pStm >> n8; + pStm->ReadUChar( n8 ); if ( ( n8 & 0xf0 ) == 0 ) // we are supporting binary cgm format only, so { // this is a small test to exclude cgm text SfxFilterMatcher aMatch(OUString("simpress")); |