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 /sc | |
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 'sc')
-rw-r--r-- | sc/source/core/data/attrib.cxx | 16 | ||||
-rw-r--r-- | sc/source/core/data/documen8.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/patattr.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/autoform.cxx | 68 | ||||
-rw-r--r-- | sc/source/core/tool/ddelink.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/rechead.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/tool/zforauto.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xistream.cxx | 26 | ||||
-rw-r--r-- | sc/source/filter/excel/xltoolbar.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/lotus/filter.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotread.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/lotus/op.cxx | 56 | ||||
-rw-r--r-- | sc/source/filter/qpro/biff.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/qpro/qpro.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/qpro/qproform.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/starcalc/scflt.cxx | 404 | ||||
-rw-r--r-- | sc/source/ui/dbgui/scuiasciiopt.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/exceldetect.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/scdetect.cxx | 10 |
20 files changed, 332 insertions, 332 deletions
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index fa3e209f3282..d6d3b4f125bc 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -158,8 +158,8 @@ SfxPoolItem* ScMergeAttr::Create( SvStream& rStream, sal_uInt16 /* nVer */ ) con { sal_Int16 nCol; sal_Int16 nRow; - rStream >> nCol; - rStream >> nRow; + rStream.ReadInt16( nCol ); + rStream.ReadInt16( nRow ); return new ScMergeAttr(static_cast<SCCOL>(nCol),static_cast<SCROW>(nRow)); } @@ -402,10 +402,10 @@ SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) c sal_Bool bHCell; sal_Bool bHPrint; - rStream >> bProtect; - rStream >> bHFormula; - rStream >> bHCell; - rStream >> bHPrint; + rStream.ReadUChar( bProtect ); + rStream.ReadUChar( bHFormula ); + rStream.ReadUChar( bHCell ); + rStream.ReadUChar( bHPrint ); return new ScProtectionAttr(bProtect,bHFormula,bHCell,bHPrint); } @@ -1038,7 +1038,7 @@ SfxPoolItem* ScViewObjectModeItem::Create( else { sal_uInt16 nVal; - rStream >> nVal; + rStream.ReadUInt16( nVal ); //#i80528# adapt to new range eventually if((sal_uInt16)VOBJ_MODE_HIDE < nVal) nVal = (sal_uInt16)VOBJ_MODE_SHOW; @@ -1093,7 +1093,7 @@ SfxPoolItem* ScDoubleItem::Clone( SfxItemPool* ) const SfxPoolItem* ScDoubleItem::Create( SvStream& rStream, sal_uInt16 /* nVer */ ) const { double nTmp=0; - rStream >> nTmp; + rStream.ReadDouble( nTmp ); ScDoubleItem* pItem = new ScDoubleItem( Which(), nTmp ); diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index aed55b6bb1f8..187a86e80ebe 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -793,7 +793,7 @@ void ScDocument::LoadDdeLinks(SvStream& rStream) ScMultipleReadHeader aHdr( rStream ); sal_uInt16 nCount; - rStream >> nCount; + rStream.ReadUInt16( nCount ); for (sal_uInt16 i=0; i<nCount; i++) { ScDdeLink* pLink = new ScDdeLink( this, rStream, aHdr ); diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 46397cbda4c4..bf3d179ae5f1 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -153,14 +153,14 @@ SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */ OUString* pStr; sal_Bool bHasStyle; - rStream >> bHasStyle; + rStream.ReadUChar( bHasStyle ); if ( bHasStyle ) { short eFamDummy; pStr = new OUString; *pStr = rStream.ReadUniOrByteString( rStream.GetStreamCharSet() ); - rStream >> eFamDummy; // wg. altem Dateiformat + rStream.ReadInt16( eFamDummy ); // wg. altem Dateiformat } else pStr = new OUString( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ); diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 100a06bda5a2..2243ba4e900a 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -87,7 +87,7 @@ namespace blob.Reset(); sal_uInt64 endOfBlob = 0; - stream >> endOfBlob; + stream.ReadUInt64( endOfBlob ); const sal_uInt64 currentPosition = stream.Tell(); const sal_uInt64 blobSize = endOfBlob - currentPosition; @@ -143,35 +143,35 @@ ScAfVersions::ScAfVersions() : void ScAfVersions::Load( SvStream& rStream, sal_uInt16 nVer ) { - rStream >> nFontVersion; - rStream >> nFontHeightVersion; - rStream >> nWeightVersion; - rStream >> nPostureVersion; - rStream >> nUnderlineVersion; + rStream.ReadUInt16( nFontVersion ); + rStream.ReadUInt16( nFontHeightVersion ); + rStream.ReadUInt16( nWeightVersion ); + rStream.ReadUInt16( nPostureVersion ); + rStream.ReadUInt16( nUnderlineVersion ); if ( nVer >= AUTOFORMAT_ID_300OVRLN ) - rStream >> nOverlineVersion; - rStream >> nCrossedOutVersion; - rStream >> nContourVersion; - rStream >> nShadowedVersion; - rStream >> nColorVersion; - rStream >> nBoxVersion; + rStream.ReadUInt16( nOverlineVersion ); + rStream.ReadUInt16( nCrossedOutVersion ); + rStream.ReadUInt16( nContourVersion ); + rStream.ReadUInt16( nShadowedVersion ); + rStream.ReadUInt16( nColorVersion ); + rStream.ReadUInt16( nBoxVersion ); if ( nVer >= AUTOFORMAT_ID_680DR14 ) - rStream >> nLineVersion; - rStream >> nBrushVersion; - rStream >> nAdjustVersion; + rStream.ReadUInt16( nLineVersion ); + rStream.ReadUInt16( nBrushVersion ); + rStream.ReadUInt16( nAdjustVersion ); if (nVer >= AUTOFORMAT_ID_31005) rStream >> swVersions; - rStream >> nHorJustifyVersion; - rStream >> nVerJustifyVersion; - rStream >> nOrientationVersion; - rStream >> nMarginVersion; - rStream >> nBoolVersion; + rStream.ReadUInt16( nHorJustifyVersion ); + rStream.ReadUInt16( nVerJustifyVersion ); + rStream.ReadUInt16( nOrientationVersion ); + rStream.ReadUInt16( nMarginVersion ); + rStream.ReadUInt16( nBoolVersion ); if ( nVer >= AUTOFORMAT_ID_504 ) { - rStream >> nInt32Version; - rStream >> nRotateModeVersion; + rStream.ReadUInt16( nInt32Version ); + rStream.ReadUInt16( nRotateModeVersion ); } - rStream >> nNumFmtVersion; + rStream.ReadUInt16( nNumFmtVersion ); } void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion) @@ -741,7 +741,7 @@ void ScAutoFormatData::GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rIte bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions ) { sal_uInt16 nVer = 0; - rStream >> nVer; + rStream.ReadUInt16( nVer ); bool bRet = 0 == rStream.GetError(); if( bRet && (nVer == AUTOFORMAT_DATA_ID_X || (AUTOFORMAT_DATA_ID_504 <= nVer && nVer <= AUTOFORMAT_DATA_ID)) ) @@ -757,7 +757,7 @@ bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions ) if( AUTOFORMAT_DATA_ID_552 <= nVer ) { - rStream >> nStrResId; + rStream.ReadUInt16( nStrResId ); sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId; if( RID_SVXSTR_TBLAFMT_BEGIN <= nId && nId < RID_SVXSTR_TBLAFMT_END ) @@ -769,12 +769,12 @@ bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions ) } sal_Bool b; - rStream >> b; bIncludeFont = b; - rStream >> b; bIncludeJustify = b; - rStream >> b; bIncludeFrame = b; - rStream >> b; bIncludeBackground = b; - rStream >> b; bIncludeValueFormat = b; - rStream >> b; bIncludeWidthHeight = b; + rStream.ReadUChar( b ); bIncludeFont = b; + rStream.ReadUChar( b ); bIncludeJustify = b; + rStream.ReadUChar( b ); bIncludeFrame = b; + rStream.ReadUChar( b ); bIncludeBackground = b; + rStream.ReadUChar( b ); bIncludeValueFormat = b; + rStream.ReadUChar( b ); bIncludeWidthHeight = b; if (nVer >= AUTOFORMAT_DATA_ID_31005) rStream >> m_swFields; @@ -1020,7 +1020,7 @@ bool ScAutoFormat::Load() SvStream& rStream = *pStream; // Attention: A common header has to be read sal_uInt16 nVal = 0; - rStream >> nVal; + rStream.ReadUInt16( nVal ); bRet = 0 == rStream.GetError(); if (bRet) @@ -1031,7 +1031,7 @@ bool ScAutoFormat::Load() sal_uInt16 nFileVers = SOFFICE_FILEFORMAT_40; sal_uInt8 nChrSet, nCnt; long nPos = rStream.Tell(); - rStream >> nCnt >> nChrSet; + rStream.ReadUChar( nCnt ).ReadUChar( nChrSet ); if( rStream.Tell() != sal_uLong(nPos + nCnt) ) { OSL_FAIL( "header contains more/newer data" ); @@ -1048,7 +1048,7 @@ bool ScAutoFormat::Load() ScAutoFormatData* pData; sal_uInt16 nAnz = 0; - rStream >> nAnz; + rStream.ReadUInt16( nAnz ); bRet = (rStream.GetError() == 0); for (sal_uInt16 i=0; bRet && (i < nAnz); i++) { diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index a66931eb40da..925678de860c 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -88,12 +88,12 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& r aItem = rStream.ReadUniOrByteString( eCharSet ); sal_Bool bHasValue; - rStream >> bHasValue; + rStream.ReadUChar( bHasValue ); if ( bHasValue ) pResult = new ScMatrix(0, 0); if (rHdr.BytesLeft()) // neu in 388b und der 364w (RealTime-Client) Version - rStream >> nMode; + rStream.ReadUChar( nMode ); else nMode = SC_DDE_DEFAULT; diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx index 87590aaa3ec9..6d7a10ffd1e7 100644 --- a/sc/source/core/tool/rechead.cxx +++ b/sc/source/core/tool/rechead.cxx @@ -26,14 +26,14 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) : rStream( rNewStream ) { sal_uInt32 nDataSize; - rStream >> nDataSize; + rStream.ReadUInt32( nDataSize ); sal_uLong nDataPos = rStream.Tell(); nTotalEnd = nDataPos + nDataSize; nEntryEnd = nTotalEnd; rStream.SeekRel(nDataSize); sal_uInt16 nID; - rStream >> nID; + rStream.ReadUInt16( nID ); if (nID != SCID_SIZES) { OSL_FAIL("SCID_SIZES not found"); @@ -47,7 +47,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) : else { sal_uInt32 nSizeTableLen; - rStream >> nSizeTableLen; + rStream.ReadUInt32( nSizeTableLen ); pBuf = new sal_uInt8[nSizeTableLen]; rStream.Read( pBuf, nSizeTableLen ); pMemStream = new SvMemoryStream( (char*)pBuf, nSizeTableLen, STREAM_READ ); @@ -89,7 +89,7 @@ void ScMultipleReadHeader::StartEntry() { sal_uLong nPos = rStream.Tell(); sal_uInt32 nEntrySize; - (*pMemStream) >> nEntrySize; + (*pMemStream).ReadUInt32( nEntrySize ); nEntryEnd = nPos + nEntrySize; OSL_ENSURE( nEntryEnd <= nTotalEnd, "read too many entries" ); diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx index 27abc627713a..132f1634d162 100644 --- a/sc/source/core/tool/zforauto.cxx +++ b/sc/source/core/tool/zforauto.cxx @@ -48,7 +48,7 @@ void ScNumFormatAbbrev::Load( SvStream& rStream, rtl_TextEncoding eByteStrSet ) { sal_uInt16 nSysLang, nLang; sFormatstring = rStream.ReadUniOrByteString( eByteStrSet ); - rStream >> nSysLang >> nLang; + rStream.ReadUInt16( nSysLang ).ReadUInt16( nLang ); eLnge = (LanguageType) nLang; eSysLnge = (LanguageType) nSysLang; if ( eSysLnge == LANGUAGE_SYSTEM ) // old versions did write it diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 01ceeded8c63..b1ad9b3710f3 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -3504,7 +3504,7 @@ void XclImpDffConverter::ProcessClientAnchor2( SvStream& rDffStrm, XclObjAnchor aAnchor; rHeader.SeekToContent( rDffStrm ); sal_uInt8 nFlags(0); - rDffStrm >> nFlags; + rDffStrm.ReadUChar( nFlags ); rDffStrm.SeekRel( 1 ); // flags rDffStrm >> aAnchor; // anchor format equal to BIFF5 OBJ records diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index 5dd944ee3556..bc57e556d623 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -372,7 +372,7 @@ XclBiff XclImpStream::DetectBiffVersion( SvStream& rStrm ) rStrm.Seek( STREAM_SEEK_TO_BEGIN ); sal_uInt16 nBofId, nBofSize; - rStrm >> nBofId >> nBofSize; + rStrm.ReadUInt16( nBofId ).ReadUInt16( nBofSize ); if( (4 <= nBofSize) && (nBofSize <= 16) ) switch( nBofId ) { @@ -388,7 +388,7 @@ XclBiff XclImpStream::DetectBiffVersion( SvStream& rStrm ) case EXC_ID5_BOF: { sal_uInt16 nVersion; - rStrm >> nVersion; + rStrm.ReadUInt16( nVersion ); // #i23425# #i44031# #i62752# there are some *really* broken documents out there... switch( nVersion & 0xFF00 ) { @@ -585,7 +585,7 @@ sal_uInt16 XclImpStream::GetNextRecId() if( mnNextRecPos < mnStreamSize ) { mrStrm.Seek( mnNextRecPos ); - mrStrm >> nRecId; + mrStrm.ReadUInt16( nRecId ); } PopPosition(); } @@ -599,7 +599,7 @@ sal_uInt16 XclImpStream::PeekRecId( sal_Size nPos ) { sal_Size nCurPos = mrStrm.Tell(); mrStrm.Seek(nPos); - mrStrm >> nRecId; + mrStrm.ReadUInt16( nRecId ); mrStrm.Seek(nCurPos); } return nRecId; @@ -614,7 +614,7 @@ XclImpStream& XclImpStream::operator>>( sal_Int8& rnValue ) if( mbUseDecr ) mxDecrypter->Read( mrStrm, &rnValue, 1 ); else - mrStrm >> rnValue; + mrStrm.ReadSChar( rnValue ); --mnRawRecLeft; } return *this; @@ -627,7 +627,7 @@ XclImpStream& XclImpStream::operator>>( sal_uInt8& rnValue ) if( mbUseDecr ) mxDecrypter->Read( mrStrm, &rnValue, 1 ); else - mrStrm >> rnValue; + mrStrm.ReadUChar( rnValue ); --mnRawRecLeft; } return *this; @@ -644,7 +644,7 @@ XclImpStream& XclImpStream::operator>>( sal_Int16& rnValue ) rnValue = static_cast< sal_Int16 >( SVBT16ToShort( pnBuffer ) ); } else - mrStrm >> rnValue; + mrStrm.ReadInt16( rnValue ); mnRawRecLeft -= 2; } return *this; @@ -661,7 +661,7 @@ XclImpStream& XclImpStream::operator>>( sal_uInt16& rnValue ) rnValue = SVBT16ToShort( pnBuffer ); } else - mrStrm >> rnValue; + mrStrm.ReadUInt16( rnValue ); mnRawRecLeft -= 2; } return *this; @@ -678,7 +678,7 @@ XclImpStream& XclImpStream::operator>>( sal_Int32& rnValue ) rnValue = static_cast< sal_Int32 >( SVBT32ToUInt32( pnBuffer ) ); } else - mrStrm >> rnValue; + mrStrm.ReadInt32( rnValue ); mnRawRecLeft -= 4; } return *this; @@ -695,7 +695,7 @@ XclImpStream& XclImpStream::operator>>( sal_uInt32& rnValue ) rnValue = SVBT32ToUInt32( pnBuffer ); } else - mrStrm >> rnValue; + mrStrm.ReadUInt32( rnValue ); mnRawRecLeft -= 4; } return *this; @@ -713,7 +713,7 @@ XclImpStream& XclImpStream::operator>>( float& rfValue ) memcpy( &rfValue, &nValue, 4 ); } else - mrStrm >> rfValue; + mrStrm.ReadFloat( rfValue ); mnRawRecLeft -= 4; } return *this; @@ -730,7 +730,7 @@ XclImpStream& XclImpStream::operator>>( double& rfValue ) rfValue = SVBT64ToDouble( pnBuffer ); } else - mrStrm >> rfValue; + mrStrm.ReadDouble( rfValue ); mnRawRecLeft -= 8; } return *this; @@ -1045,7 +1045,7 @@ bool XclImpStream::ReadNextRawRecHeader() bool bRet = (nSeekedPos == mnNextRecPos) && (mnNextRecPos + 4 <= mnStreamSize); if( bRet ) { - mrStrm >> mnRawRecId >> mnRawRecSize; + mrStrm.ReadUInt16( mnRawRecId ).ReadUInt16( mnRawRecSize ); bRet = mrStrm.good(); } return bRet; diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx index 2e588d98f214..4748c3191528 100644 --- a/sc/source/filter/excel/xltoolbar.cxx +++ b/sc/source/filter/excel/xltoolbar.cxx @@ -88,7 +88,7 @@ bool ScCTB::Read( SvStream &rS ) aVisData.Read( rS ); rVisualData.push_back( aVisData ); } - rS >> ectbid; + rS.ReadUInt32( ectbid ); for ( sal_Int16 index = 0; index < tb.getcCL(); ++index ) { @@ -190,7 +190,7 @@ bool CTBS::Read( SvStream &rS ) { OSL_TRACE("CTBS::Read() stream pos 0x%x", rS.Tell() ); nOffSet = rS.Tell(); - rS >> bSignature >> bVersion >> reserved1 >> reserved2 >> reserved3 >> ctb >> ctbViews >> ictbView; + rS.ReadUChar( bSignature ).ReadUChar( bVersion ).ReadUInt16( reserved1 ).ReadUInt16( reserved2 ).ReadUInt16( reserved3 ).ReadUInt16( ctb ).ReadUInt16( ctbViews ).ReadUInt16( ictbView ); return true; } @@ -326,9 +326,9 @@ bool TBCCmd::Read( SvStream &rS ) { OSL_TRACE("TBCCmd::Read() stream pos 0x%x", rS.Tell() ); nOffSet = rS.Tell(); - rS >> cmdID; + rS.ReadUInt16( cmdID ); sal_uInt16 temp; - rS >> temp; + rS.ReadUInt16( temp ); OSL_TRACE("TBCmd temp = 0x%x", temp ); A = (temp & 0x8000 ) == 0x8000; B = (temp & 0x4000) == 0x4000; diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx index 7771234b30bb..dc1a8adbb94b 100644 --- a/sc/source/filter/lotus/filter.cxx +++ b/sc/source/filter/lotus/filter.cxx @@ -102,7 +102,7 @@ generate_Opcodes( SvStream& aStream, ScDocument& rDoc, { sal_uInt16 nOpcode, nLength; - aStream >> nOpcode >> nLength; + aStream.ReadUInt16( nOpcode ).ReadUInt16( nLength ); aPrgrsBar.Progress(); if( nOpcode == LOTUS_EOF ) bEOF = sal_True; @@ -118,11 +118,11 @@ generate_Opcodes( SvStream& aStream, ScDocument& rDoc, { // This is really ugly - needs re-factoring ... aStream.SeekRel(nLength); - aStream >> nOpcode >> nLength; + aStream.ReadUInt16( nOpcode ).ReadUInt16( nLength ); if ( nOpcode == 0x29a) { aStream.SeekRel(nLength); - aStream >> nOpcode >> nLength; + aStream.ReadUInt16( nOpcode ).ReadUInt16( nLength ); if ( nOpcode == 0x804 ) { aStream.SeekRel(nLength); @@ -152,11 +152,11 @@ WKTYP ScanVersion( SvStream& aStream ) sal_uInt16 nOpcode, nVersNr, nRecLen; // erstes Byte muss wegen BOF zwingend 0 sein! - aStream >> nOpcode; + aStream.ReadUInt16( nOpcode ); if( nOpcode != nBOF ) return eWK_UNKNOWN; - aStream >> nRecLen >> nVersNr; + aStream.ReadUInt16( nRecLen ).ReadUInt16( nVersNr ); if( aStream.IsEof() ) return eWK_Error; @@ -176,7 +176,7 @@ WKTYP ScanVersion( SvStream& aStream ) return eWK_UNKNOWN; case 0x1000: - aStream >> nVersNr; + aStream.ReadUInt16( nVersNr ); if( aStream.IsEof() ) return eWK_Error; if( nVersNr == 0x0004 && nRecLen == 26 ) { // 4 bytes of 26 read => skip 22 (read instead of seek to make IsEof() work just in case) diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index a5b5d7b8e563..db31966a7ba2 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -60,7 +60,7 @@ FltError ImportLotus::Read() while( eAkt != S_END ) { - *pIn >> nOp >> nRecLen; + pIn->ReadUInt16( nOp ).ReadUInt16( nRecLen ); if( pIn->IsEof() || nNextRec > SAL_MAX_UINT32 - nRecLen - 4 ) eAkt = S_END; @@ -248,7 +248,7 @@ FltError ImportLotus::Read( SvStream& rIn ) while( bRead ) { - *pIn >> nOp >> nRecLen; + pIn->ReadUInt16( nOp ).ReadUInt16( nRecLen ); if( pIn->IsEof() || nNextRec > SAL_MAX_UINT32 - nRecLen - 4 ) bRead = false; diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index c42211d89278..8e733db33485 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -89,7 +89,7 @@ void OP_Integer( SvStream& r, sal_uInt16 /*n*/ ) SCTAB nTab = 0; sal_Int16 nValue; - r >> nFormat >> nCol >> nRow >> nValue; + r.ReadUChar( nFormat ).ReadUInt16( nCol ).ReadUInt16( nRow ).ReadInt16( nValue ); if (ValidColRow( static_cast<SCCOL>(nCol), nRow)) { @@ -109,7 +109,7 @@ void OP_Number( SvStream& r, sal_uInt16 /*n*/ ) SCTAB nTab = 0; double fValue; - r >> nFormat >> nCol >> nRow >> fValue; + r.ReadUChar( nFormat ).ReadUInt16( nCol ).ReadUInt16( nRow ).ReadDouble( fValue ); if (ValidColRow( static_cast<SCCOL>(nCol), nRow)) { @@ -128,7 +128,7 @@ void OP_Label( SvStream& r, sal_uInt16 n ) sal_uInt16 nCol, nRow; SCTAB nTab = 0; - r >> nFormat >> nCol >> nRow; + r.ReadUChar( nFormat ).ReadUInt16( nCol ).ReadUInt16( nRow ); n -= (n > 5) ? 5 : n; @@ -155,9 +155,9 @@ void OP_Formula( SvStream& r, sal_uInt16 /*n*/ ) sal_uInt16 nCol, nRow, nFormulaSize; SCTAB nTab = 0; - r >> nFormat >> nCol >> nRow; + r.ReadUChar( nFormat ).ReadUInt16( nCol ).ReadUInt16( nRow ); r.SeekRel( 8 ); // Ergebnis ueberspringen - r >> nFormulaSize; + r.ReadUInt16( nFormulaSize ); const ScTokenArray* pErg; sal_Int32 nBytesLeft = nFormulaSize; @@ -186,7 +186,7 @@ void OP_ColumnWidth( SvStream& r, sal_uInt16 /*n*/ ) sal_uInt8 nWidthSpaces; SCTAB nTab = 0; - r >> nCol >> nWidthSpaces; + r.ReadUInt16( nCol ).ReadUChar( nWidthSpaces ); if (ValidCol( static_cast<SCCOL>(nCol))) { @@ -213,7 +213,7 @@ void OP_NamedRange( SvStream& r, sal_uInt16 /*n*/ ) r.Read( cPuffer, 16 ); cPuffer[ 16 ] = 0; - r >> nColSt >> nRowSt >> nColEnd >> nRowEnd; + r.ReadUInt16( nColSt ).ReadUInt16( nRowSt ).ReadUInt16( nColEnd ).ReadUInt16( nRowEnd ); if (ValidColRow( static_cast<SCCOL>(nColSt), nRowSt) && ValidColRow( static_cast<SCCOL>(nColEnd), nRowEnd)) { @@ -253,7 +253,7 @@ void OP_SymphNamedRange( SvStream& r, sal_uInt16 /*n*/ ) r.Read( cPuffer, 16 ); cPuffer[ 16 ] = 0; - r >> nColSt >> nRowSt >> nColEnd >> nRowEnd >> nType; + r.ReadUInt16( nColSt ).ReadUInt16( nRowSt ).ReadUInt16( nColEnd ).ReadUInt16( nRowEnd ).ReadUChar( nType ); if (ValidColRow( static_cast<SCCOL>(nColSt), nRowSt) && ValidColRow( static_cast<SCCOL>(nColEnd), nRowEnd)) { @@ -309,7 +309,7 @@ void OP_HiddenCols( SvStream& r, sal_uInt16 /*n*/ ) for( nByte = 0 ; nByte < 32 ; nByte++ ) // 32 Bytes mit ... { - r >> nAkt; + r.ReadUChar( nAkt ); for( nBit = 0 ; nBit < 8 ; nBit++ ) // ...jeweils 8 Bits = 256 Bits { if( nAkt & 0x01 ) // unterstes Bit gesetzt? @@ -327,11 +327,11 @@ void OP_Window1( SvStream& r, sal_uInt16 n ) { r.SeekRel( 4 ); // Cursor Pos ueberspringen - r >> nDefaultFormat; + r.ReadUChar( nDefaultFormat ); r.SeekRel( 1 ); // 'unused' ueberspringen - r >> nDefWidth; + r.ReadUInt16( nDefWidth ); r.SeekRel( n - 8 ); // und den Rest ueberspringen @@ -347,7 +347,7 @@ void OP_Blank( SvStream& r, sal_uInt16 /*n*/ ) { sal_uInt16 nCol, nRow; sal_uInt8 nFormat; - r >> nFormat >> nCol >> nRow; + r.ReadUChar( nFormat ).ReadUInt16( nCol ).ReadUInt16( nRow ); SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), 0, nFormat, nDezFloat ); } @@ -367,7 +367,7 @@ void OP_Label123( SvStream& r, sal_uInt16 n ) { sal_uInt8 nTab, nCol; sal_uInt16 nRow; - r >> nRow >> nTab >> nCol; + r.ReadUInt16( nRow ).ReadUChar( nTab ).ReadUChar( nCol ); n -= (n > 4) ? 4 : n; sal_Char* pText = new sal_Char[n + 1]; @@ -385,7 +385,7 @@ void OP_Number123( SvStream& r, sal_uInt16 /*n*/ ) sal_uInt16 nRow; sal_uInt32 nValue; - r >> nRow >> nTab >> nCol >> nValue; + r.ReadUInt16( nRow ).ReadUChar( nTab ).ReadUChar( nCol ).ReadUInt32( nValue ); if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab <= pDoc->GetMaxTableNumber()) { @@ -400,7 +400,7 @@ void OP_Formula123( SvStream& r, sal_uInt16 n ) sal_uInt8 nCol,nTab; sal_uInt16 nRow; - r >> nRow >> nTab >> nCol; + r.ReadUInt16( nRow ).ReadUChar( nTab ).ReadUChar( nCol ); r.SeekRel( 8 ); // Result- jump over const ScTokenArray* pErg; @@ -426,7 +426,7 @@ void OP_IEEENumber123( SvStream& r, sal_uInt16 /*n*/ ) sal_uInt16 nRow; double dValue; - r >> nRow >> nTab >> nCol >> dValue; + r.ReadUInt16( nRow ).ReadUChar( nTab ).ReadUChar( nCol ).ReadDouble( dValue ); if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab <= pDoc->GetMaxTableNumber()) { @@ -439,7 +439,7 @@ void OP_Note123( SvStream& r, sal_uInt16 n) { sal_uInt8 nTab, nCol; sal_uInt16 nRow; - r >> nRow >> nTab >> nCol; + r.ReadUInt16( nRow ).ReadUChar( nTab ).ReadUChar( nCol ); n -= (n > 4) ? 4 : n; sal_Char* pText = new sal_Char[n + 1]; @@ -522,12 +522,12 @@ void OP_CreatePattern123( SvStream& r, sal_uInt16 n) ScPatternAttr aPattern(pDoc->GetPool()); SfxItemSet& rItemSet = aPattern.GetItemSet(); - r >> nCode; + r.ReadUInt16( nCode ); n -= (n > 2) ? 2 : n; if ( nCode == 0x0fd2 ) { - r >> nPatternId; + r.ReadUInt16( nPatternId ); sal_uInt8 Hor_Align, Ver_Align, temp; sal_Bool bIsBold,bIsUnderLine,bIsItalics; @@ -535,7 +535,7 @@ void OP_CreatePattern123( SvStream& r, sal_uInt16 n) r.SeekRel(12); // Read 17th Byte - r >> temp; + r.ReadUChar( temp ); bIsBold = (temp & 0x01); bIsItalics = (temp & 0x02); @@ -551,10 +551,10 @@ void OP_CreatePattern123( SvStream& r, sal_uInt16 n) r.SeekRel(3); // Read 21st Byte - r >> Hor_Align; + r.ReadUChar( Hor_Align ); OP_HorAlign123( Hor_Align, rItemSet ); - r >> Ver_Align; + r.ReadUChar( Ver_Align ); OP_VerAlign123( Ver_Align, rItemSet ); aLotusPatternPool.insert( std::map<sal_uInt16, ScPatternAttr>::value_type( nPatternId, aPattern ) ); @@ -574,8 +574,8 @@ void OP_SheetName123( SvStream& rStream, sal_uInt16 nLength ) // B0 36 [sheet number (2 bytes?)] [sheet name (null terminated char array)] sal_uInt16 nDummy; - rStream >> nDummy; // ignore the first 2 bytes (B0 36). - rStream >> nDummy; + rStream.ReadUInt16( nDummy ); // ignore the first 2 bytes (B0 36). + rStream.ReadUInt16( nDummy ); SCTAB nSheetNum = static_cast<SCTAB>(nDummy); pDoc->MakeTable(nSheetNum); @@ -584,7 +584,7 @@ void OP_SheetName123( SvStream& rStream, sal_uInt16 nLength ) for (sal_uInt16 i = 4; i < nLength; ++i) { sal_Char c; - rStream >> c; + rStream.ReadChar( c ); sSheetName.push_back(c); } @@ -602,7 +602,7 @@ void OP_ApplyPatternArea123( SvStream& rStream ) do { - rStream >> nOpcode >> nLength; + rStream.ReadUInt16( nOpcode ).ReadUInt16( nLength ); switch ( nOpcode ) { case ROW_FORMAT_MARKER: @@ -620,7 +620,7 @@ void OP_ApplyPatternArea123( SvStream& rStream ) case LOTUS_FORMAT_INDEX: if( nLength >= 2 ) { - rStream >> nData; + rStream.ReadUInt16( nData ); rStream.SeekRel( nLength - 2 ); if( nLevel == 1 ) nTabCount = nData; @@ -645,7 +645,7 @@ void OP_ApplyPatternArea123( SvStream& rStream ) case LOTUS_FORMAT_INFO: if( nLength >= 2 ) { - rStream >> nData; + rStream.ReadUInt16( nData ); rStream.SeekRel( nLength - 2 ); std::map<sal_uInt16, ScPatternAttr>::iterator loc = aLotusPatternPool.find( nData ); // #126338# apparently, files with invalid index occur in the wild -> don't crash then diff --git a/sc/source/filter/qpro/biff.cxx b/sc/source/filter/qpro/biff.cxx index 350afa763717..7ec4f9e4a3ec 100644 --- a/sc/source/filter/qpro/biff.cxx +++ b/sc/source/filter/qpro/biff.cxx @@ -63,7 +63,7 @@ bool ScBiffReader::nextRecord() mpStream->Seek( mnOffset + mnLength ); mnLength = mnId = 0; - *mpStream >> mnId >> mnLength; + mpStream->ReadUInt16( mnId ).ReadUInt16( mnLength ); mnOffset = mpStream->Tell(); #if OSL_DEBUG_LEVEL > 1 diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index dbb5eb630c22..9ec57571bad7 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -54,7 +54,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt { case 0x000f:{ // Label cell OUString aLabel; - *mpStream >> nCol >> nDummy >> nRow >> nStyle >> nDummy; + mpStream->ReadUChar( nCol ).ReadUChar( nDummy ).ReadUInt16( nRow ).ReadUInt16( nStyle ).ReadUChar( nDummy ); sal_uInt16 nLen = getLength(); if (nLen >= 7) { @@ -74,14 +74,14 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt break; case 0x000c: // Blank cell - *mpStream >> nCol >> nDummy >> nRow >> nStyle; + mpStream->ReadUChar( nCol ).ReadUChar( nDummy ).ReadUInt16( nRow ).ReadUInt16( nStyle ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); break; case 0x000d:{ // Integer cell sal_Int16 nValue; - *mpStream >> nCol >> nDummy >> nRow >> nStyle >> nValue; + mpStream->ReadUChar( nCol ).ReadUChar( nDummy ).ReadUInt16( nRow ).ReadUInt16( nStyle ).ReadInt16( nValue ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); pDoc->EnsureTable(nTab); @@ -91,7 +91,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt case 0x000e:{ // Floating point cell double nValue; - *mpStream >> nCol >> nDummy >> nRow >> nStyle >> nValue; + mpStream->ReadUChar( nCol ).ReadUChar( nDummy ).ReadUInt16( nRow ).ReadUInt16( nStyle ).ReadDouble( nValue ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); pDoc->EnsureTable(nTab); @@ -102,7 +102,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt case 0x0010:{ // Formula cell double nValue; sal_uInt16 nState, nLen; - *mpStream >> nCol >> nDummy >> nRow >> nStyle >> nValue >> nState >> nLen; + mpStream->ReadUChar( nCol ).ReadUChar( nDummy ).ReadUInt16( nRow ).ReadUInt16( nStyle ).ReadDouble( nValue ).ReadUInt16( nState ).ReadUInt16( nLen ); ScAddress aAddr( nCol, nRow, nTab ); const ScTokenArray *pArray; QProToSc aConv( *mpStream, aAddr ); @@ -154,7 +154,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) switch( getId() ) { case 0x0000: // Begginning of file - *mpStream >> nVersion; + mpStream->ReadUInt16( nVersion ); break; case 0x00ca: // Beginning of sheet @@ -181,7 +181,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) case 0x00ce:{ // Attribute cell sal_uInt8 nFormat, nAlign, nFont; sal_Int16 nColor; - *mpStream >> nFormat >> nAlign >> nColor >> nFont; + mpStream->ReadUChar( nFormat ).ReadUChar( nAlign ).ReadInt16( nColor ).ReadUChar( nFont ); pStyleElement->setAlign( i, nAlign ); pStyleElement->setFont( i, nFont ); i++; @@ -191,7 +191,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) case 0x00cf:{ // Font description sal_uInt16 nPtSize, nFontAttr; OUString aLabel; - *mpStream >> nPtSize >> nFontAttr; + mpStream->ReadUInt16( nPtSize ).ReadUInt16( nFontAttr ); pStyleElement->setFontRecord( j, nFontAttr, nPtSize ); sal_uInt16 nLen = getLength(); if (nLen >= 4) diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx index ccdeec502624..ff47b007a8fc 100644 --- a/sc/source/filter/qpro/qproform.cxx +++ b/sc/source/filter/qpro/qproform.cxx @@ -201,17 +201,17 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con aCRD.InitFlags(); aSRD.InitFlags(); - maIn >> nRef; + maIn.ReadUInt16( nRef ); if( nRef < nBufSize ) { for( i=0; i < nRef; i++) { - maIn >> nFmla[i]; + maIn.ReadUChar( nFmla[i] ); if( nFmla[ i ] == 0x05 ) { - maIn >> nInt; + maIn.ReadUInt16( nInt ); nIntArray[ nIntCount ] = nInt; SAFEDEC_OR_RET(nRef, 2, ConvErrCount); nIntCount++; @@ -219,7 +219,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con if( nFmla[ i ] == 0x00 ) { - maIn >> nFloat; + maIn.ReadDouble( nFloat ); nFloatArray[ nFloatCount ] = nFloat; SAFEDEC_OR_RET(nRef, 8, ConvErrCount); nFloatCount++; @@ -227,7 +227,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con if( nFmla[ i ] == 0x1a ) { - maIn >> nArg >> nDummy >> nDLLId; + maIn.ReadUChar( nArg ).ReadUInt16( nDummy ).ReadUInt16( nDLLId ); nArgArray[ nArgCount ] = nArg; nDLLArray[ nDLLCount ] = nDLLId; SAFEDEC_OR_RET(nRef, 5, ConvErrCount); @@ -299,15 +299,15 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con break; case FT_Cref : // Single cell reference - maIn >> nNote >> nCol >> nPage >> nRelBits; + maIn.ReadUInt16( nNote ).ReadSChar( nCol ).ReadSChar( nPage ).ReadUInt16( nRelBits ); ReadSRD( aSRD, nPage, nCol, nRelBits ); aStack << aPool.Store( aSRD ); break; case FT_Range: // Block reference - maIn >> nNote >> nCol >> nPage >> nRelBits; + maIn.ReadUInt16( nNote ).ReadSChar( nCol ).ReadSChar( nPage ).ReadUInt16( nRelBits ); ReadSRD( aCRD.Ref1, nPage, nCol, nRelBits ); - maIn >> nCol >> nPage >> nRelBits; + maIn.ReadSChar( nCol ).ReadSChar( nPage ).ReadUInt16( nRelBits ); ReadSRD( aCRD.Ref2, nPage, nCol, nRelBits ); // Sheet name of second corner is not displayed if identical if (aCRD.Ref1.IsFlag3D() && aCRD.Ref1.Tab() == aCRD.Ref2.Tab() && diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 5feae93e6978..f7dd30e39d48 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -95,7 +95,7 @@ static void lcl_ReadFixedString( SvStream& rStream, void* pData, size_t nLen ) static void lcl_ReadFileHeader(SvStream& rStream, Sc10FileHeader& rFileHeader) { lcl_ReadFixedString( rStream, &rFileHeader.CopyRight, sizeof(rFileHeader.CopyRight)); - rStream >> rFileHeader.Version; + rStream.ReadUInt16( rFileHeader.Version ); rStream.Read(&rFileHeader.Reserved, sizeof(rFileHeader.Reserved)); } @@ -103,25 +103,25 @@ static void lcl_ReadFileHeader(SvStream& rStream, Sc10FileHeader& rFileHeader) static void lcl_ReadTabProtect(SvStream& rStream, Sc10TableProtect& rProtect) { lcl_ReadFixedString( rStream, &rProtect.PassWord, sizeof(rProtect.PassWord)); - rStream >> rProtect.Flags; - rStream >> rProtect.Protect; + rStream.ReadUInt16( rProtect.Flags ); + rStream.ReadUChar( rProtect.Protect ); } static void lcl_ReadSheetProtect(SvStream& rStream, Sc10SheetProtect& rProtect) { lcl_ReadFixedString( rStream, &rProtect.PassWord, sizeof(rProtect.PassWord)); - rStream >> rProtect.Flags; - rStream >> rProtect.Protect; + rStream.ReadUInt16( rProtect.Flags ); + rStream.ReadUChar( rProtect.Protect ); } static void lcl_ReadRGB(SvStream& rStream, Sc10Color& rColor) { - rStream >> rColor.Dummy; - rStream >> rColor.Blue; - rStream >> rColor.Green; - rStream >> rColor.Red; + rStream.ReadUChar( rColor.Dummy ); + rStream.ReadUChar( rColor.Blue ); + rStream.ReadUChar( rColor.Green ); + rStream.ReadUChar( rColor.Red ); } @@ -134,36 +134,36 @@ static void lcl_ReadPalette(SvStream& rStream, Sc10Color* pPalette) static void lcl_ReadValueFormat(SvStream& rStream, Sc10ValueFormat& rFormat) { - rStream >> rFormat.Format; - rStream >> rFormat.Info; + rStream.ReadUChar( rFormat.Format ); + rStream.ReadUChar( rFormat.Info ); } static void lcl_ReadLogFont(SvStream& rStream, Sc10LogFont& rFont) { - rStream >> rFont.lfHeight; - rStream >> rFont.lfWidth; - rStream >> rFont.lfEscapement; - rStream >> rFont.lfOrientation; - rStream >> rFont.lfWeight; - rStream >> rFont.lfItalic; - rStream >> rFont.lfUnderline; - rStream >> rFont.lfStrikeOut; - rStream >> rFont.lfCharSet; - rStream >> rFont.lfOutPrecision; - rStream >> rFont.lfClipPrecision; - rStream >> rFont.lfQuality; - rStream >> rFont.lfPitchAndFamily; + rStream.ReadInt16( rFont.lfHeight ); + rStream.ReadInt16( rFont.lfWidth ); + rStream.ReadInt16( rFont.lfEscapement ); + rStream.ReadInt16( rFont.lfOrientation ); + rStream.ReadInt16( rFont.lfWeight ); + rStream.ReadUChar( rFont.lfItalic ); + rStream.ReadUChar( rFont.lfUnderline ); + rStream.ReadUChar( rFont.lfStrikeOut ); + rStream.ReadUChar( rFont.lfCharSet ); + rStream.ReadUChar( rFont.lfOutPrecision ); + rStream.ReadUChar( rFont.lfClipPrecision ); + rStream.ReadUChar( rFont.lfQuality ); + rStream.ReadUChar( rFont.lfPitchAndFamily ); lcl_ReadFixedString( rStream, &rFont.lfFaceName, sizeof(rFont.lfFaceName)); } static void lcl_ReadBlockRect(SvStream& rStream, Sc10BlockRect& rBlock) { - rStream >> rBlock.x1; - rStream >> rBlock.y1; - rStream >> rBlock.x2; - rStream >> rBlock.y2; + rStream.ReadInt16( rBlock.x1 ); + rStream.ReadInt16( rBlock.y1 ); + rStream.ReadInt16( rBlock.x2 ); + rStream.ReadInt16( rBlock.y2 ); } @@ -171,15 +171,15 @@ static void lcl_ReadHeadFootLine(SvStream& rStream, Sc10HeadFootLine& rLine) { lcl_ReadFixedString( rStream, &rLine.Title, sizeof(rLine.Title)); lcl_ReadLogFont(rStream, rLine.LogFont); - rStream >> rLine.HorJustify; - rStream >> rLine.VerJustify; - rStream >> rLine.Raster; - rStream >> rLine.Frame; + rStream.ReadUChar( rLine.HorJustify ); + rStream.ReadUChar( rLine.VerJustify ); + rStream.ReadUInt16( rLine.Raster ); + rStream.ReadUInt16( rLine.Frame ); lcl_ReadRGB(rStream, rLine.TextColor); lcl_ReadRGB(rStream, rLine.BackColor); lcl_ReadRGB(rStream, rLine.RasterColor); - rStream >> rLine.FrameColor; - rStream >> rLine.Reserved; + rStream.ReadUInt16( rLine.FrameColor ); + rStream.ReadUInt16( rLine.Reserved ); } @@ -187,49 +187,49 @@ static void lcl_ReadPageFormat(SvStream& rStream, Sc10PageFormat& rFormat) { lcl_ReadHeadFootLine(rStream, rFormat.HeadLine); lcl_ReadHeadFootLine(rStream, rFormat.FootLine); - rStream >> rFormat.Orientation; - rStream >> rFormat.Width; - rStream >> rFormat.Height; - rStream >> rFormat.NonPrintableX; - rStream >> rFormat.NonPrintableY; - rStream >> rFormat.Left; - rStream >> rFormat.Top; - rStream >> rFormat.Right; - rStream >> rFormat.Bottom; - rStream >> rFormat.Head; - rStream >> rFormat.Foot; - rStream >> rFormat.HorCenter; - rStream >> rFormat.VerCenter; - rStream >> rFormat.PrintGrid; - rStream >> rFormat.PrintColRow; - rStream >> rFormat.PrintNote; - rStream >> rFormat.TopBottomDir; + rStream.ReadInt16( rFormat.Orientation ); + rStream.ReadInt16( rFormat.Width ); + rStream.ReadInt16( rFormat.Height ); + rStream.ReadInt16( rFormat.NonPrintableX ); + rStream.ReadInt16( rFormat.NonPrintableY ); + rStream.ReadInt16( rFormat.Left ); + rStream.ReadInt16( rFormat.Top ); + rStream.ReadInt16( rFormat.Right ); + rStream.ReadInt16( rFormat.Bottom ); + rStream.ReadInt16( rFormat.Head ); + rStream.ReadInt16( rFormat.Foot ); + rStream.ReadUChar( rFormat.HorCenter ); + rStream.ReadUChar( rFormat.VerCenter ); + rStream.ReadUChar( rFormat.PrintGrid ); + rStream.ReadUChar( rFormat.PrintColRow ); + rStream.ReadUChar( rFormat.PrintNote ); + rStream.ReadUChar( rFormat.TopBottomDir ); lcl_ReadFixedString( rStream, &rFormat.PrintAreaName, sizeof(rFormat.PrintAreaName)); lcl_ReadBlockRect(rStream, rFormat.PrintArea); rStream.Read(&rFormat.PrnZoom, sizeof(rFormat.PrnZoom)); - rStream >> rFormat.FirstPageNo; - rStream >> rFormat.RowRepeatStart; - rStream >> rFormat.RowRepeatEnd; - rStream >> rFormat.ColRepeatStart; - rStream >> rFormat.ColRepeatEnd; + rStream.ReadInt16( rFormat.FirstPageNo ); + rStream.ReadInt16( rFormat.RowRepeatStart ); + rStream.ReadInt16( rFormat.RowRepeatEnd ); + rStream.ReadInt16( rFormat.ColRepeatStart ); + rStream.ReadInt16( rFormat.ColRepeatEnd ); rStream.Read(&rFormat.Reserved, sizeof(rFormat.Reserved)); } static void lcl_ReadGraphHeader(SvStream& rStream, Sc10GraphHeader& rHeader) { - rStream >> rHeader.Typ; - rStream >> rHeader.CarretX; - rStream >> rHeader.CarretY; - rStream >> rHeader.CarretZ; - rStream >> rHeader.x; - rStream >> rHeader.y; - rStream >> rHeader.w; - rStream >> rHeader.h; - rStream >> rHeader.IsRelPos; - rStream >> rHeader.DoPrint; - rStream >> rHeader.FrameType; - rStream >> rHeader.IsTransparent; + rStream.ReadUChar( rHeader.Typ ); + rStream.ReadInt16( rHeader.CarretX ); + rStream.ReadInt16( rHeader.CarretY ); + rStream.ReadInt16( rHeader.CarretZ ); + rStream.ReadInt32( rHeader.x ); + rStream.ReadInt32( rHeader.y ); + rStream.ReadInt32( rHeader.w ); + rStream.ReadInt32( rHeader.h ); + rStream.ReadUChar( rHeader.IsRelPos ); + rStream.ReadUChar( rHeader.DoPrint ); + rStream.ReadUInt16( rHeader.FrameType ); + rStream.ReadUChar( rHeader.IsTransparent ); lcl_ReadRGB(rStream, rHeader.FrameColor); lcl_ReadRGB(rStream, rHeader.BackColor); rStream.Read(&rHeader.Reserved, sizeof(rHeader.Reserved)); @@ -239,90 +239,90 @@ static void lcl_ReadGraphHeader(SvStream& rStream, Sc10GraphHeader& rHeader) static void lcl_ReadImageHeaer(SvStream& rStream, Sc10ImageHeader& rHeader) { lcl_ReadFixedString( rStream, &rHeader.FileName, sizeof(rHeader.FileName)); - rStream >> rHeader.Typ; - rStream >> rHeader.Linked; - rStream >> rHeader.x1; - rStream >> rHeader.y1; - rStream >> rHeader.x2; - rStream >> rHeader.y2; - rStream >> rHeader.Size; + rStream.ReadInt16( rHeader.Typ ); + rStream.ReadUChar( rHeader.Linked ); + rStream.ReadInt16( rHeader.x1 ); + rStream.ReadInt16( rHeader.y1 ); + rStream.ReadInt16( rHeader.x2 ); + rStream.ReadInt16( rHeader.y2 ); + rStream.ReadUInt32( rHeader.Size ); } static void lcl_ReadChartHeader(SvStream& rStream, Sc10ChartHeader& rHeader) { - rStream >> rHeader.MM; - rStream >> rHeader.xExt; - rStream >> rHeader.yExt; - rStream >> rHeader.Size; + rStream.ReadInt16( rHeader.MM ); + rStream.ReadInt16( rHeader.xExt ); + rStream.ReadInt16( rHeader.yExt ); + rStream.ReadUInt32( rHeader.Size ); } static void lcl_ReadChartSheetData(SvStream& rStream, Sc10ChartSheetData& rSheetData) { - rStream >> rSheetData.HasTitle; - rStream >> rSheetData.TitleX; - rStream >> rSheetData.TitleY; - rStream >> rSheetData.HasSubTitle; - rStream >> rSheetData.SubTitleX; - rStream >> rSheetData.SubTitleY; - rStream >> rSheetData.HasLeftTitle; - rStream >> rSheetData.LeftTitleX; - rStream >> rSheetData.LeftTitleY; - rStream >> rSheetData.HasLegend; - rStream >> rSheetData.LegendX1; - rStream >> rSheetData.LegendY1; - rStream >> rSheetData.LegendX2; - rStream >> rSheetData.LegendY2; - rStream >> rSheetData.HasLabel; - rStream >> rSheetData.LabelX1; - rStream >> rSheetData.LabelY1; - rStream >> rSheetData.LabelX2; - rStream >> rSheetData.LabelY2; - rStream >> rSheetData.DataX1; - rStream >> rSheetData.DataY1; - rStream >> rSheetData.DataX2; - rStream >> rSheetData.DataY2; + rStream.ReadUChar( rSheetData.HasTitle ); + rStream.ReadInt16( rSheetData.TitleX ); + rStream.ReadInt16( rSheetData.TitleY ); + rStream.ReadUChar( rSheetData.HasSubTitle ); + rStream.ReadInt16( rSheetData.SubTitleX ); + rStream.ReadInt16( rSheetData.SubTitleY ); + rStream.ReadUChar( rSheetData.HasLeftTitle ); + rStream.ReadInt16( rSheetData.LeftTitleX ); + rStream.ReadInt16( rSheetData.LeftTitleY ); + rStream.ReadUChar( rSheetData.HasLegend ); + rStream.ReadInt16( rSheetData.LegendX1 ); + rStream.ReadInt16( rSheetData.LegendY1 ); + rStream.ReadInt16( rSheetData.LegendX2 ); + rStream.ReadInt16( rSheetData.LegendY2 ); + rStream.ReadUChar( rSheetData.HasLabel ); + rStream.ReadInt16( rSheetData.LabelX1 ); + rStream.ReadInt16( rSheetData.LabelY1 ); + rStream.ReadInt16( rSheetData.LabelX2 ); + rStream.ReadInt16( rSheetData.LabelY2 ); + rStream.ReadInt16( rSheetData.DataX1 ); + rStream.ReadInt16( rSheetData.DataY1 ); + rStream.ReadInt16( rSheetData.DataX2 ); + rStream.ReadInt16( rSheetData.DataY2 ); rStream.Read(&rSheetData.Reserved, sizeof(rSheetData.Reserved)); } static void lcl_ReadChartTypeData(SvStream& rStream, Sc10ChartTypeData& rTypeData) { - rStream >> rTypeData.NumSets; - rStream >> rTypeData.NumPoints; - rStream >> rTypeData.DrawMode; - rStream >> rTypeData.GraphType; - rStream >> rTypeData.GraphStyle; + rStream.ReadInt16( rTypeData.NumSets ); + rStream.ReadInt16( rTypeData.NumPoints ); + rStream.ReadInt16( rTypeData.DrawMode ); + rStream.ReadInt16( rTypeData.GraphType ); + rStream.ReadInt16( rTypeData.GraphStyle ); lcl_ReadFixedString( rStream, &rTypeData.GraphTitle, sizeof(rTypeData.GraphTitle)); lcl_ReadFixedString( rStream, &rTypeData.BottomTitle, sizeof(rTypeData.BottomTitle)); sal_uInt16 i; for (i = 0; i < 256; i++) - rStream >> rTypeData.SymbolData[i]; + rStream.ReadInt16( rTypeData.SymbolData[i] ); for (i = 0; i < 256; i++) - rStream >> rTypeData.ColorData[i]; + rStream.ReadInt16( rTypeData.ColorData[i] ); for (i = 0; i < 256; i++) - rStream >> rTypeData.ThickLines[i]; + rStream.ReadInt16( rTypeData.ThickLines[i] ); for (i = 0; i < 256; i++) - rStream >> rTypeData.PatternData[i]; + rStream.ReadInt16( rTypeData.PatternData[i] ); for (i = 0; i < 256; i++) - rStream >> rTypeData.LinePatternData[i]; + rStream.ReadInt16( rTypeData.LinePatternData[i] ); for (i = 0; i < 11; i++) - rStream >> rTypeData.NumGraphStyles[i]; - rStream >> rTypeData.ShowLegend; + rStream.ReadInt16( rTypeData.NumGraphStyles[i] ); + rStream.ReadInt16( rTypeData.ShowLegend ); for (i = 0; i < 256; i++) lcl_ReadFixedString( rStream, &rTypeData.LegendText[i], sizeof(Sc10ChartText)); - rStream >> rTypeData.ExplodePie; - rStream >> rTypeData.FontUse; + rStream.ReadInt16( rTypeData.ExplodePie ); + rStream.ReadInt16( rTypeData.FontUse ); for (i = 0; i < 5; i++) - rStream >> rTypeData.FontFamily[i]; + rStream.ReadInt16( rTypeData.FontFamily[i] ); for (i = 0; i < 5; i++) - rStream >> rTypeData.FontStyle[i]; + rStream.ReadInt16( rTypeData.FontStyle[i] ); for (i = 0; i < 5; i++) - rStream >> rTypeData.FontSize[i]; - rStream >> rTypeData.GridStyle; - rStream >> rTypeData.Labels; - rStream >> rTypeData.LabelEvery; + rStream.ReadInt16( rTypeData.FontSize[i] ); + rStream.ReadInt16( rTypeData.GridStyle ); + rStream.ReadInt16( rTypeData.Labels ); + rStream.ReadInt16( rTypeData.LabelEvery ); for (i = 0; i < 50; i++) lcl_ReadFixedString( rStream, &rTypeData.LabelText[i], sizeof(Sc10ChartText)); lcl_ReadFixedString( rStream, &rTypeData.LeftTitle, sizeof(rTypeData.LeftTitle)); @@ -406,11 +406,11 @@ template < typename T > sal_uLong insert_new( ScCollection* pCollection, SvStrea Sc10FontData::Sc10FontData(SvStream& rStream) { - rStream >> Height; - rStream >> CharSet; - rStream >> PitchAndFamily; + rStream.ReadInt16( Height ); + rStream.ReadUChar( CharSet ); + rStream.ReadUChar( PitchAndFamily ); sal_uInt16 nLen; - rStream >> nLen; + rStream.ReadUInt16( nLen ); if (nLen < sizeof(FaceName)) rStream.Read(FaceName, nLen); else @@ -423,11 +423,11 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) : nError (0) { sal_uInt16 ID; - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID == FontID) { sal_uInt16 nAnz; - rStream >> nAnz; + rStream.ReadUInt16( nAnz ); for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { nError = insert_new<Sc10FontData>( this, rStream); @@ -447,13 +447,13 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) : Sc10NameData::Sc10NameData(SvStream& rStream) { sal_uInt8 nLen; - rStream >> nLen; + rStream.ReadUChar( nLen ); rStream.Read(Name, sizeof(Name) - 1); if (nLen >= sizeof(Name)) nLen = sizeof(Name) - 1; Name[nLen] = 0; - rStream >> nLen; + rStream.ReadUChar( nLen ); rStream.Read(Reference, sizeof(Reference) - 1); if (nLen >= sizeof(Reference)) nLen = sizeof(Reference) - 1; @@ -467,11 +467,11 @@ Sc10NameCollection::Sc10NameCollection(SvStream& rStream) : nError (0) { sal_uInt16 ID; - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID == NameID) { sal_uInt16 nAnz; - rStream >> nAnz; + rStream.ReadUInt16( nAnz ); for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { nError = insert_new<Sc10NameData>( this, rStream); @@ -494,14 +494,14 @@ Sc10PatternData::Sc10PatternData(SvStream& rStream) lcl_ReadValueFormat(rStream, ValueFormat); lcl_ReadLogFont(rStream, LogFont); - rStream >> Attr; - rStream >> Justify; - rStream >> Frame; - rStream >> Raster; - rStream >> nColor; - rStream >> FrameColor; - rStream >> Flags; - rStream >> FormatFlags; + rStream.ReadUInt16( Attr ); + rStream.ReadUInt16( Justify ); + rStream.ReadUInt16( Frame ); + rStream.ReadUInt16( Raster ); + rStream.ReadUInt16( nColor ); + rStream.ReadUInt16( FrameColor ); + rStream.ReadUInt16( Flags ); + rStream.ReadUInt16( FormatFlags ); rStream.Read(Reserved, sizeof(Reserved)); } @@ -511,11 +511,11 @@ Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream) : nError (0) { sal_uInt16 ID; - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID == PatternID) { sal_uInt16 nAnz; - rStream >> nAnz; + rStream.ReadUInt16( nAnz ); for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { nError = insert_new<Sc10PatternData>( this, rStream); @@ -535,34 +535,34 @@ Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream) : Sc10DataBaseData::Sc10DataBaseData(SvStream& rStream) { lcl_ReadFixedString( rStream, &DataBaseRec.Name, sizeof(DataBaseRec.Name)); - rStream >> DataBaseRec.Tab; + rStream.ReadInt16( DataBaseRec.Tab ); lcl_ReadBlockRect(rStream, DataBaseRec.Block); - rStream >> DataBaseRec.RowHeader; - rStream >> DataBaseRec.SortField0; - rStream >> DataBaseRec.SortUpOrder0; - rStream >> DataBaseRec.SortField1; - rStream >> DataBaseRec.SortUpOrder1; - rStream >> DataBaseRec.SortField2; - rStream >> DataBaseRec.SortUpOrder2; - rStream >> DataBaseRec.IncludeFormat; - - rStream >> DataBaseRec.QueryField0; - rStream >> DataBaseRec.QueryOp0; - rStream >> DataBaseRec.QueryByString0; + rStream.ReadUChar( DataBaseRec.RowHeader ); + rStream.ReadInt16( DataBaseRec.SortField0 ); + rStream.ReadUChar( DataBaseRec.SortUpOrder0 ); + rStream.ReadInt16( DataBaseRec.SortField1 ); + rStream.ReadUChar( DataBaseRec.SortUpOrder1 ); + rStream.ReadInt16( DataBaseRec.SortField2 ); + rStream.ReadUChar( DataBaseRec.SortUpOrder2 ); + rStream.ReadUChar( DataBaseRec.IncludeFormat ); + + rStream.ReadInt16( DataBaseRec.QueryField0 ); + rStream.ReadInt16( DataBaseRec.QueryOp0 ); + rStream.ReadUChar( DataBaseRec.QueryByString0 ); lcl_ReadFixedString( rStream, &DataBaseRec.QueryString0, sizeof(DataBaseRec.QueryString0)); DataBaseRec.QueryValue0 = ScfTools::ReadLongDouble(rStream); - rStream >> DataBaseRec.QueryConnect1; - rStream >> DataBaseRec.QueryField1; - rStream >> DataBaseRec.QueryOp1; - rStream >> DataBaseRec.QueryByString1; + rStream.ReadInt16( DataBaseRec.QueryConnect1 ); + rStream.ReadInt16( DataBaseRec.QueryField1 ); + rStream.ReadInt16( DataBaseRec.QueryOp1 ); + rStream.ReadUChar( DataBaseRec.QueryByString1 ); lcl_ReadFixedString( rStream, &DataBaseRec.QueryString1, sizeof(DataBaseRec.QueryString1)); DataBaseRec.QueryValue1 = ScfTools::ReadLongDouble(rStream); - rStream >> DataBaseRec.QueryConnect2; - rStream >> DataBaseRec.QueryField2; - rStream >> DataBaseRec.QueryOp2; - rStream >> DataBaseRec.QueryByString2; + rStream.ReadInt16( DataBaseRec.QueryConnect2 ); + rStream.ReadInt16( DataBaseRec.QueryField2 ); + rStream.ReadInt16( DataBaseRec.QueryOp2 ); + rStream.ReadUChar( DataBaseRec.QueryByString2 ); lcl_ReadFixedString( rStream, &DataBaseRec.QueryString2, sizeof(DataBaseRec.QueryString2)); DataBaseRec.QueryValue2 = ScfTools::ReadLongDouble(rStream); } @@ -573,12 +573,12 @@ Sc10DataBaseCollection::Sc10DataBaseCollection(SvStream& rStream) : nError (0) { sal_uInt16 ID; - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID == DataBaseID) { lcl_ReadFixedString( rStream, ActName, sizeof(ActName)); sal_uInt16 nAnz; - rStream >> nAnz; + rStream.ReadUInt16( nAnz ); for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { nError = insert_new<Sc10DataBaseData>( this, rStream); @@ -1086,7 +1086,7 @@ void Sc10Import::LoadProtect() void Sc10Import::LoadViewColRowBar() { sal_uInt8 ViewColRowBar; - rStream >> ViewColRowBar; + rStream.ReadUChar( ViewColRowBar ); nError = rStream.GetError(); aSc30ViewOpt.SetOption( VOPT_HEADER, (sal_Bool)ViewColRowBar ); } @@ -1404,7 +1404,7 @@ void Sc10Import::LoadTables() Sc10PageCollection aPageCollection; sal_Int16 nTabCount; - rStream >> nTabCount; + rStream.ReadInt16( nTabCount ); for (sal_Int16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++) { Sc10PageFormat PageFormat; @@ -1429,7 +1429,7 @@ void Sc10Import::LoadTables() pPrgrsBar->Progress(); - rStream >> DataBaseIndex; + rStream.ReadInt16( DataBaseIndex ); lcl_ReadTabProtect(rStream, TabProtect); @@ -1438,17 +1438,17 @@ void Sc10Import::LoadTables() aProtection.setPassword(SC10TOSTRING(TabProtect.PassWord)); pDoc->SetTabProtection(static_cast<SCTAB>(Tab), &aProtection); - rStream >> TabNo; + rStream.ReadInt16( TabNo ); sal_uInt8 nLen; - rStream >> nLen; + rStream.ReadUChar( nLen ); rStream.Read(TabName, sizeof(TabName) - 1); if (nLen >= sizeof(TabName)) nLen = sizeof(TabName) - 1; TabName[nLen] = 0; //---------------------------------------------------------- - rStream >> Display; + rStream.ReadUInt16( Display ); if ( Tab == (sal_Int16)nShowTab ) { @@ -1479,7 +1479,7 @@ void Sc10Import::LoadTables() } //-------------------------------------------------------------------- - rStream >> Visible; + rStream.ReadUChar( Visible ); nError = rStream.GetError(); if (nError != 0) return; @@ -1494,26 +1494,26 @@ void Sc10Import::LoadTables() if (Visible == 0) pDoc->SetVisible(static_cast<SCTAB> (TabNo), false); // ColWidth - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID != ColWidthID) { OSL_FAIL( "ColWidthID" ); nError = errUnknownID; return; } - rStream >> DataCount; + rStream.ReadUInt16( DataCount ); DataStart = 0; for (i=0; i < DataCount; i++) { - rStream >> DataEnd; - rStream >> DataValue; + rStream.ReadUInt16( DataEnd ); + rStream.ReadUInt16( DataValue ); for (SCCOL j = static_cast<SCCOL>(DataStart); j <= static_cast<SCCOL>(DataEnd); j++) pDoc->SetColWidth(j, static_cast<SCTAB> (TabNo), DataValue); DataStart = DataEnd + 1; } pPrgrsBar->Progress(); // ColAttr - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID != ColAttrID) { OSL_FAIL( "ColAttrID" ); @@ -1521,12 +1521,12 @@ void Sc10Import::LoadTables() return; } - rStream >> DataCount; + rStream.ReadUInt16( DataCount ); DataStart = 0; for (i=0; i < DataCount; i++) { - rStream >> DataEnd; - rStream >> DataValue; + rStream.ReadUInt16( DataEnd ); + rStream.ReadUInt16( DataValue ); if (DataValue != 0) { bool bPageBreak = ((DataValue & crfSoftBreak) == crfSoftBreak); @@ -1543,7 +1543,7 @@ void Sc10Import::LoadTables() pPrgrsBar->Progress(); // RowHeight - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID != RowHeightID) { OSL_FAIL( "RowHeightID" ); @@ -1551,19 +1551,19 @@ void Sc10Import::LoadTables() return; } - rStream >> DataCount; + rStream.ReadUInt16( DataCount ); DataStart = 0; for (i=0; i < DataCount; i++) { - rStream >> DataEnd; - rStream >> DataValue; + rStream.ReadUInt16( DataEnd ); + rStream.ReadUInt16( DataValue ); pDoc->SetRowHeightRange(static_cast<SCROW> (DataStart), static_cast<SCROW> (DataEnd), static_cast<SCTAB> (TabNo), DataValue); DataStart = DataEnd + 1; } pPrgrsBar->Progress(); // RowAttr - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID != RowAttrID) { OSL_FAIL( "RowAttrID" ); @@ -1571,12 +1571,12 @@ void Sc10Import::LoadTables() return; } - rStream >> DataCount; + rStream.ReadUInt16( DataCount ); DataStart = 0; for (i=0; i < DataCount; i++) { - rStream >> DataEnd; - rStream >> DataValue; + rStream.ReadUInt16( DataEnd ); + rStream.ReadUInt16( DataValue ); if (DataValue != 0) { bool bPageBreak = ((DataValue & crfSoftBreak) == crfSoftBreak); @@ -1593,7 +1593,7 @@ void Sc10Import::LoadTables() pPrgrsBar->Progress(); // DataTable - rStream >> ID; + rStream.ReadUInt16( ID ); if (ID != TableID) { OSL_FAIL( "TableID" ); @@ -1602,7 +1602,7 @@ void Sc10Import::LoadTables() } for (SCCOL Col = 0; (Col <= SC10MAXCOL) && (nError == 0); Col++) { - rStream >> Count; + rStream.ReadUInt16( Count ); nError = rStream.GetError(); if ((Count != 0) && (nError == 0)) LoadCol(Col, static_cast<SCTAB> (TabNo)); @@ -1622,13 +1622,13 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) sal_uInt16 CellCount; sal_uInt8 CellType; sal_uInt16 Row; - rStream >> CellCount; + rStream.ReadUInt16( CellCount ); SCROW nScCount = static_cast< SCROW >( CellCount ); if (nScCount > MAXROW) nError = errUnknownFormat; for (sal_uInt16 i = 0; (i < CellCount) && (nError == 0); i++) { - rStream >> CellType; - rStream >> Row; + rStream.ReadUChar( CellType ); + rStream.ReadUInt16( Row ); nError = rStream.GetError(); if (nError == 0) { @@ -1654,7 +1654,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) { sal_uInt8 Len; sal_Char s[256]; - rStream >> Len; + rStream.ReadUChar( Len ); rStream.Read(s, Len); s[Len] = 0; @@ -1666,7 +1666,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) /*double Value =*/ ScfTools::ReadLongDouble(rStream); sal_uInt8 Len; sal_Char s[256+1]; - rStream >> Len; + rStream.ReadUChar( Len ); rStream.Read(&s[1], Len); s[0] = '='; s[Len + 1] = 0; @@ -1683,7 +1683,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) break; } sal_uInt16 NoteLen; - rStream >> NoteLen; + rStream.ReadUInt16( NoteLen ); if (NoteLen != 0) { sal_Char* pNote = new sal_Char[NoteLen+1]; @@ -2154,7 +2154,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) void Sc10Import::LoadAttr(Sc10ColAttr& rAttr) { // rAttr is not reused, otherwise we'd have to delete [] rAttr.pData; - rStream >> rAttr.Count; + rStream.ReadUInt16( rAttr.Count ); if (rAttr.Count) { rAttr.pData = new (::std::nothrow) Sc10ColData[rAttr.Count]; @@ -2162,8 +2162,8 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr) { for (sal_uInt16 i = 0; i < rAttr.Count; i++) { - rStream >> rAttr.pData[i].Row; - rStream >> rAttr.pData[i].Value; + rStream.ReadUInt16( rAttr.pData[i].Row ); + rStream.ReadUInt16( rAttr.pData[i].Value ); } nError = rStream.GetError(); } @@ -2322,12 +2322,12 @@ void Sc10Import::ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& n void Sc10Import::LoadObjects() { sal_uInt16 ID; - rStream >> ID; + rStream.ReadUInt16( ID ); if (rStream.IsEof()) return; if (ID == ObjectID) { sal_uInt16 nAnz; - rStream >> nAnz; + rStream.ReadUInt16( nAnz ); sal_Char Reserved[32]; rStream.Read(Reserved, sizeof(Reserved)); nError = rStream.GetError(); @@ -2338,7 +2338,7 @@ void Sc10Import::LoadObjects() sal_Bool IsOleObject = false; // Achtung dies ist nur ein Notnagel for (sal_uInt16 i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++) { - rStream >> ObjectType; + rStream.ReadUChar( ObjectType ); lcl_ReadGraphHeader(rStream, GraphHeader); double nPPTX = ScGlobal::nScreenPPTX; diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index b73c4b0bbe9c..c33db9f517ef 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -345,7 +345,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,OUString aDatName, case 0: { sal_uInt16 n; - *mpDatStream >> n; + mpDatStream->ReadUInt16( n ); // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with // control characters except CR,LF,TAB if ( (n & 0xff00) < 0x2000 ) diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx index 69dc7731196e..611fc4a8f1fd 100644 --- a/sc/source/ui/unoobj/exceldetect.cxx +++ b/sc/source/ui/unoobj/exceldetect.cxx @@ -89,7 +89,7 @@ bool isExcel40(const uno::Reference<io::XInputStream>& xInStream) return false; sal_uInt16 nBofId, nBofSize; - *pStream >> nBofId >> nBofSize; + pStream->ReadUInt16( nBofId ).ReadUInt16( nBofSize ); switch (nBofId) { diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index 217033122e46..7de329276489 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -145,7 +145,7 @@ bool detectThisFormat(SvStream& rStr, const sal_uInt16* pSearch) { sal_uInt8 nByte; rStr.Seek( 0 ); // am Anfang war alles Uebel... - rStr >> nByte; + rStr.ReadUChar( nByte ); bool bSync = true; while( !rStr.IsEof() && bSync ) { @@ -177,7 +177,7 @@ bool detectThisFormat(SvStream& rStr, const sal_uInt16* pSearch) } pSearch++; - rStr >> nByte; + rStr.ReadUChar( nByte ); } return false; @@ -240,7 +240,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream ) 0x03, 0x04, 0x05, 0x30, 0x43, 0xB3, 0x83, 0x8b, 0x8e, 0xf5 }; sal_uInt8 nMark; rStream.Seek(STREAM_SEEK_TO_BEGIN); - rStream >> nMark; + rStream.ReadUChar( nMark ); bool bValidMark = false; for (size_t i=0; i < sizeof(nValidMarks)/sizeof(nValidMarks[0]) && !bValidMark; ++i) { @@ -262,7 +262,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream ) // length of header starts at 8 rStream.Seek(8); sal_uInt16 nHeaderLen; - rStream >> nHeaderLen; + rStream.ReadUInt16( nHeaderLen ); if ( nHeaderLen < nEmptyDbf || nSize < nHeaderLen ) return false; @@ -277,7 +277,7 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream ) sal_uInt8 nEndFlag = 0; while ( nBlocks > 1 && nEndFlag != 0x0d ) { rStream.Seek( nBlocks-- * nHeaderBlockSize ); - rStream >> nEndFlag; + rStream.ReadUChar( nEndFlag ); } return ( 0x0d == nEndFlag ); |