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 /sw | |
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 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/tblafmt.cxx | 76 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/dbg_lay.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/laycache.cxx | 22 | ||||
-rw-r--r-- | sw/source/filter/basflt/iodetect.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf2.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 52 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 56 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 60 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par4.cxx | 18 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 380 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8toolbar.cxx | 50 | ||||
-rw-r--r-- | sw/source/ui/config/uinums.cxx | 52 |
15 files changed, 394 insertions, 394 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index cdab9c15f347..94df3e8c0c28 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -135,7 +135,7 @@ xmlDocPtr Test::parseExport(const OUString& rStreamName) char ch; for (sal_Size i = 0; i < nSize; ++i) { - *pStream >> ch; + pStream->ReadChar( ch ); aDocument.append(ch); } diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index d14079d85648..43fe0311d92c 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -148,7 +148,7 @@ namespace bool WriterSpecificBlockExists(SvStream &stream) { sal_uInt64 endOfSwBlock = 0; - stream >> endOfSwBlock; + stream.ReadUInt64( endOfSwBlock ); // end-of-block pointing to itself indicates a zero-size block. return endOfSwBlock != stream.Tell(); @@ -222,39 +222,39 @@ SwAfVersions::SwAfVersions() : void SwAfVersions::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 && WriterSpecificBlockExists(rStream)) { - rStream >> m_nTextOrientationVersion; - rStream >> m_nVerticalAlignmentVersion; + rStream.ReadUInt16( m_nTextOrientationVersion ); + rStream.ReadUInt16( m_nVerticalAlignmentVersion ); } - 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 ); } SwBoxAutoFmt::SwBoxAutoFmt() @@ -475,7 +475,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s // --- from 680/dr25 on: store strings as UTF-8 rtl_TextEncoding eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet(); sNumFmtString = rStream.ReadUniOrByteString( eCharSet ); - rStream >> eSys >> eLge; + rStream.ReadUInt16( eSys ).ReadUInt16( eLge ); eSysLanguage = (LanguageType) eSys; eNumFmtLanguage = (LanguageType) eLge; if ( eSysLanguage == LANGUAGE_SYSTEM ) // from old versions (Calc) @@ -900,7 +900,7 @@ void SwTableAutoFmt::StoreTableProperties(const SwTable &table) sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions ) { sal_uInt16 nVal = 0; - rStream >> nVal; + rStream.ReadUInt16( nVal ); sal_Bool bRet = 0 == rStream.GetError(); if( bRet && (nVal == AUTOFORMAT_DATA_ID_X || @@ -912,7 +912,7 @@ sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions m_aName = rStream.ReadUniOrByteString( eCharSet ); if( AUTOFORMAT_DATA_ID_552 <= nVal ) { - rStream >> nStrResId; + rStream.ReadUInt16( nStrResId ); sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId; if( RID_SVXSTR_TBLAFMT_BEGIN <= nId && nId < RID_SVXSTR_TBLAFMT_END ) @@ -922,12 +922,12 @@ sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions else nStrResId = USHRT_MAX; } - rStream >> b; bInclFont = b; - rStream >> b; bInclJustify = b; - rStream >> b; bInclFrame = b; - rStream >> b; bInclBackground = b; - rStream >> b; bInclValueFormat = b; - rStream >> b; bInclWidthHeight = b; + rStream.ReadUChar( b ); bInclFont = b; + rStream.ReadUChar( b ); bInclJustify = b; + rStream.ReadUChar( b ); bInclFrame = b; + rStream.ReadUChar( b ); bInclBackground = b; + rStream.ReadUChar( b ); bInclValueFormat = b; + rStream.ReadUChar( b ); bInclWidthHeight = b; if (nVal >= AUTOFORMAT_DATA_ID_31005 && WriterSpecificBlockExists(rStream)) { @@ -937,7 +937,7 @@ sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions READ(m_aPageDesc, SwFmtPageDesc, AUTOFORMAT_FILE_VERSION); READ(m_aKeepWithNextPara, SvxFmtKeepItem, AUTOFORMAT_FILE_VERSION); - rStream >> m_aRepeatHeading >> m_bLayoutSplit >> m_bRowSplit >> m_bCollapsingBorders; + rStream.ReadUInt16( m_aRepeatHeading ).ReadUChar( m_bLayoutSplit ).ReadUChar( m_bRowSplit ).ReadUChar( m_bCollapsingBorders ); READ(m_aShadow, SvxShadowItem, AUTOFORMAT_FILE_VERSION); } @@ -1131,7 +1131,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream ) { // Attention: We need to read a general Header here sal_uInt16 nVal = 0; - rStream >> nVal; + rStream.ReadUInt16( nVal ); bRet = 0 == rStream.GetError(); if( bRet ) @@ -1148,7 +1148,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream ) { sal_uInt8 nChrSet, nCnt; long nPos = rStream.Tell(); - rStream >> nCnt >> nChrSet; + rStream.ReadUChar( nCnt ).ReadUChar( nChrSet ); if( rStream.Tell() != sal_uLong(nPos + nCnt) ) { OSL_ENSURE( !this, "The Header contains more or newer Data" ); @@ -1165,7 +1165,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream ) SwTableAutoFmt* pNew; sal_uInt16 nAnz = 0; - rStream >> nAnz; + rStream.ReadUInt16( nAnz ); bRet = 0 == rStream.GetError(); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 71cfacdf7ae0..45c784f41dec 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1235,7 +1235,7 @@ SfxPoolItem* SwFmtVertOrient::Create(SvStream &rStream, sal_uInt16 /*itemVersion rStream >> n; yPos = n; #endif - rStream >> orient >> relation; + rStream.ReadInt16( orient ).ReadInt16( relation ); return new SwFmtVertOrient(yPos, orient, relation); } diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 901b843fe09a..f8b52eef8f26 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -459,7 +459,7 @@ void SwImplProtocol::FileInit() while( aStream.good() ) { sal_Char c; - aStream >> c; + aStream.ReadChar( c ); if( '\n' == c || '\r' == c ) // line ending { aLine = aLine.trim(); diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 4cf2bd251730..3c289bc5c437 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -116,9 +116,9 @@ bool SwLayCacheImpl::Read( SvStream& rStream ) { aIo.OpenRec( SW_LAYCACHE_IO_REC_PARA ); sal_uInt8 cFlags = aIo.OpenFlagRec(); - aIo.GetStream() >> nIndex; + aIo.GetStream().ReadUInt32( nIndex ); if( (cFlags & 0x01) != 0 ) - aIo.GetStream() >> nOffset; + aIo.GetStream().ReadUInt32( nOffset ); else nOffset = COMPLETE_STRING; aIo.CloseFlagRec(); @@ -129,8 +129,8 @@ bool SwLayCacheImpl::Read( SvStream& rStream ) case SW_LAYCACHE_IO_REC_TABLE: aIo.OpenRec( SW_LAYCACHE_IO_REC_TABLE ); aIo.OpenFlagRec(); - aIo.GetStream() >> nIndex - >> nOffset; + aIo.GetStream().ReadUInt32( nIndex ) + .ReadUInt32( nOffset ); Insert( SW_LAYCACHE_IO_REC_TABLE, nIndex, (sal_Int32)nOffset ); aIo.CloseFlagRec(); aIo.CloseRec( SW_LAYCACHE_IO_REC_TABLE ); @@ -142,8 +142,8 @@ bool SwLayCacheImpl::Read( SvStream& rStream ) aIo.CloseFlagRec(); sal_Int32 nX(0), nY(0), nW(0), nH(0); sal_uInt16 nPgNum(0); - aIo.GetStream() >> nPgNum >> nIndex - >> nX >> nY >> nW >> nH; + aIo.GetStream().ReadUInt16( nPgNum ).ReadUInt32( nIndex ) + .ReadInt32( nX ).ReadInt32( nY ).ReadInt32( nW ).ReadInt32( nH ); SwFlyCache* pFly = new SwFlyCache( nPgNum, nIndex, nX, nY, nW, nH ); aFlyCache.push_back( pFly ); aIo.CloseRec( SW_LAYCACHE_IO_REC_FLY ); @@ -1108,8 +1108,8 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, bool bWrtMd ) : .WriteUInt16( nMinorVersion ); else - *pStream >> nMajorVersion - >> nMinorVersion; + pStream->ReadUInt16( nMajorVersion ) + .ReadUInt16( nMinorVersion ); } bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) @@ -1124,7 +1124,7 @@ bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) else { sal_uInt32 nVal(0); - *pStream >> nVal; + pStream->ReadUInt32( nVal ); sal_uInt8 cRecTyp = (sal_uInt8)nVal; if( !nVal || cRecTyp != cType || pStream->GetErrorCode() != SVSTREAM_OK || pStream->IsEof() ) @@ -1205,7 +1205,7 @@ sal_uInt8 SwLayCacheIoImpl::Peek() if( !bError ) { sal_uInt32 nPos = pStream->Tell(); - *pStream >> c; + pStream->ReadUChar( c ); pStream->Seek( nPos ); if( pStream->GetErrorCode() != SVSTREAM_OK ) { @@ -1228,7 +1228,7 @@ sal_uInt8 SwLayCacheIoImpl::OpenFlagRec() { OSL_ENSURE( !bWriteMode, "OpenFlagRec illegal in write mode" ); sal_uInt8 cFlags(0); - *pStream >> cFlags; + pStream->ReadUChar( cFlags ); nFlagRecEnd = pStream->Tell() + ( cFlags & 0x0F ); return (cFlags >> 4); } diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 8472e33e9505..e8c6729a6c90 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -174,7 +174,7 @@ sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter STREAM_STD_READ | STREAM_NOCREATE ); xRef->Seek(10); sal_uInt8 nByte; - *xRef >> nByte; + xRef->ReadUChar( nByte ); bRet = !(nByte & 1); } } diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 9e8b26f013c0..fb261f989bb7 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3497,10 +3497,10 @@ sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar ) rStrm.SeekRel(IsUnicode() ? -2 : -1); if (IsUnicode()) - rStrm >> nUCode; + rStrm.ReadUInt16( nUCode ); else { - rStrm >> nBCode; + rStrm.ReadUChar( nBCode ); nUCode = nBCode; } //If the last char was a cr @@ -3511,10 +3511,10 @@ sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar ) { rStrm.SeekRel( IsUnicode() ? -4 : -2 ); if (IsUnicode()) - rStrm >> nUCode; + rStrm.ReadUInt16( nUCode ); else { - rStrm >> nUCode; + rStrm.ReadUInt16( nUCode ); nUCode = nBCode; } } diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 590229461b03..f5928c65004d 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -450,8 +450,8 @@ void SwWW8ImplReader::PicRead(SvStream *pDataStream, WW8_PIC *pPic, WW8PicShadowToReal( &aPicS, pPic ); for (int i=0;i<4;i++) pDataStream->Read( &pPic->rgbrc[i], bVer67 ? 2 : 4); - *pDataStream >> pPic->dxaOrigin; - *pDataStream >> pPic->dyaOrigin; + pDataStream->ReadInt16( pPic->dxaOrigin ); + pDataStream->ReadInt16( pPic->dyaOrigin ); if (!bVer67) pDataStream->SeekRel(2); //cProps } @@ -533,7 +533,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, { //These ones have names prepended sal_uInt8 nNameLen=0; - *pDataStream >> nNameLen; + pDataStream->ReadUChar( nNameLen ); pDataStream->SeekRel( nNameLen ); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 5ccd6bbaa905..a729801a0b51 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -191,7 +191,7 @@ void lclGetAbsPath(OUString& rPath, sal_uInt16 nLevel, SwDocShell* pDocShell) void lclIgnoreString32( SvMemoryStream& rStrm, bool b16Bit ) { sal_uInt32 nChars(0); - rStrm >> nChars; + rStrm.ReadUInt32( nChars ); if( b16Bit ) nChars *= 2; rStrm.SeekRel( nChars ); @@ -215,7 +215,7 @@ OUString SwWW8ImplReader::ReadRawUniString(SvMemoryStream& rStrm, sal_uInt16 nCh sal_uInt16 nReadChar; for( ; (pcUniChar < pcEndChar); ++pcUniChar ) { - rStrm >> (nReadChar); + rStrm.ReadUInt16( nReadChar ); (*pcUniChar) = (nReadChar == WW8_NUL) ? mcNulSubst : static_cast< sal_Unicode >( nReadChar ); } } @@ -224,7 +224,7 @@ OUString SwWW8ImplReader::ReadRawUniString(SvMemoryStream& rStrm, sal_uInt16 nCh sal_uInt8 nReadChar; for( ; (pcUniChar < pcEndChar); ++pcUniChar ) { - rStrm >> nReadChar ; + rStrm.ReadUChar( nReadChar ) ; (*pcUniChar) = (nReadChar == WW8_NUL_C) ? mcNulSubst : static_cast< sal_Unicode >( nReadChar ); } } @@ -245,7 +245,7 @@ void lclAppendString32(OUString& rString, SvMemoryStream& rStrm, sal_uInt32 nCha void lclAppendString32(OUString& rString, SvMemoryStream& rStrm, bool b16Bit) { sal_uInt32 nValue(0); - rStrm >> nValue; + rStrm.ReadUInt32( nValue ); lclAppendString32(rString, rStrm, nValue, b16Bit); } @@ -275,7 +275,7 @@ void SwWW8ImplReader::ReadEmbeddedData( SvMemoryStream& rStrm, SwDocShell* pDocS rStrm.Read(aGuid, 16); rStrm.SeekRel( 4 ); - rStrm >> nFlags; + rStrm.ReadUInt32( nFlags ); sal_uInt16 nLevel = 0; // counter for level to climb down in path boost::scoped_ptr< OUString > xLongName; // link / file name @@ -308,17 +308,17 @@ void SwWW8ImplReader::ReadEmbeddedData( SvMemoryStream& rStrm, SwDocShell* pDocS if( (memcmp(aGuid, maGuidFileMoniker, 16) == 0) ) { - rStrm >> nLevel; + rStrm.ReadUInt16( nLevel ); xShortName.reset( new OUString ); lclAppendString32( *xShortName,rStrm, false ); rStrm.SeekRel( 24 ); sal_uInt32 nStrLen(0); - rStrm >> nStrLen; + rStrm.ReadUInt32( nStrLen ); if( nStrLen ) { nStrLen = 0; - rStrm >> nStrLen; + rStrm.ReadUInt32( nStrLen ); nStrLen /= 2; rStrm.SeekRel( 2 ); xLongName.reset( new OUString ); @@ -331,7 +331,7 @@ void SwWW8ImplReader::ReadEmbeddedData( SvMemoryStream& rStrm, SwDocShell* pDocS else if( (memcmp(aGuid, maGuidUrlMoniker, 16) == 0) ) { sal_uInt32 nStrLen(0); - rStrm >> nStrLen; + rStrm.ReadUInt32( nStrLen ); nStrLen /= 2; xLongName.reset( new OUString ); lclAppendString32( *xLongName,rStrm, nStrLen, true ); @@ -462,13 +462,13 @@ bool Sttb::Read( SvStream& rS ) { OSL_TRACE("Sttb::Read() stream pos 0x%x", rS.Tell() ); nOffSet = rS.Tell(); - rS >> fExtend >> cData >> cbExtra; + rS.ReadUInt16( fExtend ).ReadUInt16( cData ).ReadUInt16( cbExtra ); if ( cData ) { for ( sal_Int32 index = 0; index < cData; ++index ) { SBBItem aItem; - rS >> aItem.cchData; + rS.ReadUInt16( aItem.cchData ); aItem.data = read_uInt16s_ToOUString(rS, aItem.cchData); dataItems.push_back( aItem ); } @@ -658,10 +658,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, sal_uInt16 nPID; while( 5 < nBytesLeft ) { - rSt >> nPID; + rSt.ReadUInt16( nPID ); if ( rSt.GetError() != 0 ) break; - rSt >> nUDData; + rSt.ReadUInt32( nUDData ); switch( nPID ) { case 0x038F: pImpRec->nXAlign = nUDData; break; @@ -1044,7 +1044,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, pImpRec->pWrapPolygon = NULL; sal_uInt16 nNumElemVert, nNumElemMemVert, nElemSizeVert; - rSt >> nNumElemVert >> nNumElemMemVert >> nElemSizeVert; + rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert ); if (nNumElemVert && ((nElemSizeVert == 8) || (nElemSizeVert == 4))) { pImpRec->pWrapPolygon = new Polygon(nNumElemVert); @@ -1052,11 +1052,11 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, { sal_Int32 nX, nY; if (nElemSizeVert == 8) - rSt >> nX >> nY; + rSt.ReadInt32( nX ).ReadInt32( nY ); else { sal_Int16 nSmallX, nSmallY; - rSt >> nSmallX >> nSmallY; + rSt.ReadInt16( nSmallX ).ReadInt16( nSmallY ); nX = nSmallX; nY = nSmallY; } @@ -1134,7 +1134,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, aMemStream.Seek( STREAM_SEEK_TO_BEGIN ); bool bRet = 4 <= mnStreamSize; if( bRet ) - aMemStream >> mnRawRecId >> mnRawRecSize; + aMemStream.ReadUInt16( mnRawRecId ).ReadUInt16( mnRawRecSize ); SwDocShell* pDocShell = rReader.mpDocShell; if(pDocShell) { @@ -3049,10 +3049,10 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp for( nL2 = 0; nL2 < nStrLen; ++nL2, ++pWork ) { if (bIsUnicode) - *pStrm >> nUCode; // unicode --> read 2 bytes + pStrm->ReadUInt16( nUCode ); // unicode --> read 2 bytes else { - *pStrm >> nBCode; // old code --> read 1 byte + pStrm->ReadUChar( nBCode ); // old code --> read 1 byte nUCode = nBCode; } @@ -3475,10 +3475,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) sal_uInt8 nBCode(0); sal_uInt16 nWCharVal(0); if( bIsUnicode ) - *pStrm >> nWCharVal; // unicode --> read 2 bytes + pStrm->ReadUInt16( nWCharVal ); // unicode --> read 2 bytes else { - *pStrm >> nBCode; // old code --> read 1 byte + pStrm -> ReadUChar( nBCode ); // old code --> read 1 byte nWCharVal = nBCode; } @@ -3570,11 +3570,11 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) sal_uInt16 nWordCode(0); if( bIsUnicode ) - *pStrm >> nWordCode; + pStrm->ReadUInt16( nWordCode ); else { sal_uInt8 nByteCode(0); - *pStrm >> nByteCode; + pStrm->ReadUChar( nByteCode ); nWordCode = nByteCode; } if( nWordCode == 0x1 ) @@ -5549,7 +5549,7 @@ sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGlos { pTableStream->Seek(0); sal_uInt32 nEncType; - *pTableStream >> nEncType; + pTableStream->ReadUInt32( nEncType ); if (nEncType == 0x10001) eAlgo = RC4; } @@ -6008,7 +6008,7 @@ sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss) } sal_uInt16 nMagic(0); - *pStrm >> nMagic; + pStrm->ReadUInt16( nMagic ); // Remember: 6 means "6 OR 7", 7 means "JUST 7" switch (nWantedVersion) @@ -6027,7 +6027,7 @@ sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss) if (pStrm->Seek(nCurPos + 22)) { sal_uInt32 nfcMin; - *pStrm >> nfcMin; + pStrm->ReadUInt32( nfcMin ); if (0x300 != nfcMin) nErrRet = ERR_WW6_NO_WW6_FILE_ERR; } diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 898afc37c6f6..8f5831f0646c 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3623,7 +3623,7 @@ short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd) nLen = nLen - WW8SkipOdd( pStStrm ); sal_Int16 cbUPX(0); - *pStStrm >> cbUPX; + pStStrm->ReadInt16( cbUPX ); nLen-=2; @@ -3635,7 +3635,7 @@ short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd) if( bPAP ) { sal_uInt16 id; - *pStStrm >> id; + pStStrm->ReadUInt16( id ); cbUPX-= 2; nLen-= 2; @@ -4077,7 +4077,7 @@ Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize) while (true) { sal_uInt8 nFlags8; - rSt >> nFlags8; + rSt.ReadUChar( nFlags8 ); nCount++; aChpx.fBold = nFlags8 & 0x01; @@ -4090,7 +4090,7 @@ Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize) aChpx.fVanish = (nFlags8 & 0x80) >> 7; if (nCount >= nSize) break; - rSt >> nFlags8; + rSt.ReadUChar( nFlags8 ); nCount++; aChpx.fRMark = nFlags8 & 0x01; @@ -4103,7 +4103,7 @@ Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize) aChpx.fDiacUSico = (nFlags8 & 0x80) >> 7; if (nCount >= nSize) break; - rSt >> nFlags8; + rSt.ReadUChar( nFlags8 ); nCount++; aChpx.fsIco = nFlags8 & 0x01; @@ -4116,7 +4116,7 @@ Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize) aChpx.fsIcoBi = (nFlags8 & 0x80) >> 7; if (nCount >= nSize) break; - rSt >> nFlags8; + rSt.ReadUChar( nFlags8 ); nCount++; aChpx.fsFtcBi = nFlags8 & 0x01; @@ -4124,15 +4124,15 @@ Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize) aChpx.fsLidBi = (nFlags8 & 0x04) >> 2; if (nCount >= nSize) break; - rSt >> aChpx.ftc; + rSt.ReadUInt16( aChpx.ftc ); nCount+=2; if (nCount >= nSize) break; - rSt >> aChpx.hps; + rSt.ReadUInt16( aChpx.hps ); nCount+=2; if (nCount >= nSize) break; - rSt >> nFlags8; + rSt.ReadUChar( nFlags8 ); nCount++; aChpx.qpsSpace = nFlags8 & 0x3F; @@ -4140,38 +4140,38 @@ Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize) aChpx.fNumRun = (nFlags8 & 0x80) >> 7; if (nCount >= nSize) break; - rSt >> nFlags8; + rSt.ReadUChar( nFlags8 ); nCount++; aChpx.ico = nFlags8 & 0x1F; aChpx.kul = (nFlags8 & 0xE0) >> 5; if (nCount >= nSize) break; - rSt >> aChpx.hpsPos; + rSt.ReadUChar( aChpx.hpsPos ); nCount++; if (nCount >= nSize) break; - rSt >> aChpx.icoBi; + rSt.ReadUChar( aChpx.icoBi ); nCount++; if (nCount >= nSize) break; - rSt >> aChpx.lid; + rSt.ReadUInt16( aChpx.lid ); nCount+=2; if (nCount >= nSize) break; - rSt >> aChpx.ftcBi; + rSt.ReadUInt16( aChpx.ftcBi ); nCount+=2; if (nCount >= nSize) break; - rSt >> aChpx.hpsBi; + rSt.ReadUInt16( aChpx.hpsBi ); nCount+=2; if (nCount >= nSize) break; - rSt >> aChpx.lidBi; + rSt.ReadUInt16( aChpx.lidBi ); nCount+=2; if (nCount >= nSize) break; - rSt >> aChpx.fcPic; + rSt.ReadUInt32( aChpx.fcPic ); nCount+=4; break; @@ -4199,16 +4199,16 @@ void WW8RStyle::ImportOldFormatStyles() pIo->pWwFib->chseTables); sal_uInt16 cstcStd; - rSt >> cstcStd; + rSt.ReadUInt16( cstcStd ); sal_uInt16 cbName; - rSt >> cbName; + rSt.ReadUInt16( cbName ); sal_uInt16 nByteCount = 2; sal_uInt16 stcp=0; while (nByteCount < cbName) { sal_uInt8 nCount; - rSt >> nCount; + rSt.ReadUChar( nCount ); nByteCount++; sal_uInt8 stc = static_cast< sal_uInt8 >((stcp - cstcStd) & 255); @@ -4252,14 +4252,14 @@ void WW8RStyle::ImportOldFormatStyles() std::vector<pxoffset> aCHPXOffsets(stcp); sal_uInt16 cbChpx; - rSt >> cbChpx; + rSt.ReadUInt16( cbChpx ); nByteCount = 2; stcp=0; std::vector< std::vector<sal_uInt8> > aConvertedChpx; while (nByteCount < cbChpx) { sal_uInt8 cb; - rSt >> cb; + rSt.ReadUChar( cb ); nByteCount++; aCHPXOffsets[stcp].mnSize = 0; @@ -4290,13 +4290,13 @@ void WW8RStyle::ImportOldFormatStyles() std::vector<pxoffset> aPAPXOffsets(stcp); sal_uInt16 cbPapx; - rSt >> cbPapx; + rSt.ReadUInt16( cbPapx ); nByteCount = 2; stcp=0; while (nByteCount < cbPapx) { sal_uInt8 cb; - rSt >> cb; + rSt.ReadUChar( cb ); nByteCount++; aPAPXOffsets[stcp].mnSize = 0; @@ -4304,7 +4304,7 @@ void WW8RStyle::ImportOldFormatStyles() if (cb != 0xFF) { sal_uInt8 stc2; - rSt >> stc2; + rSt.ReadUChar( stc2 ); rSt.SeekRel(6); nByteCount+=7; sal_uInt8 nRemainder = cb-7; @@ -4326,15 +4326,15 @@ void WW8RStyle::ImportOldFormatStyles() } sal_uInt16 iMac; - rSt >> iMac; + rSt.ReadUInt16( iMac ); if (iMac > nStyles) iMac = nStyles; for (stcp = 0; stcp < iMac; ++stcp) { sal_uInt8 stcNext, stcBase; - rSt >> stcNext; - rSt >> stcBase; + rSt.ReadUChar( stcNext ); + rSt.ReadUChar( stcBase ); sal_uInt8 stc = static_cast< sal_uInt8 >((stcp - cstcStd) & 255); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index ff6c1759436d..724e91df1a48 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -523,9 +523,9 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, // 1. LVLF einlesen // memset(&aLVL, 0, sizeof( aLVL )); - rSt >> aLVL.nStartAt; - rSt >> aLVL.nNFC; - rSt >> aBits1; + rSt.ReadInt32( aLVL.nStartAt ); + rSt.ReadUChar( aLVL.nNFC ); + rSt.ReadUChar( aBits1 ); if( 0 != rSt.GetError() ) return false; aLVL.nAlign = (aBits1 & 0x03); if( aBits1 & 0x10 ) aLVL.bV6Prev = true; @@ -535,7 +535,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, sal_uInt8 nLevelB = 0; for(nLevelB = 0; nLevelB < nMaxLevel; ++nLevelB) { - rSt >> aLVL.aOfsNumsXCH[ nLevelB ]; + rSt.ReadUChar( aLVL.aOfsNumsXCH[ nLevelB ] ); if( 0 != rSt.GetError() ) { bLVLOkB = false; @@ -547,11 +547,11 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, return false; sal_uInt8 ixchFollow(0); - rSt >> ixchFollow; - rSt >> aLVL.nV6DxaSpace; - rSt >> aLVL.nV6Indent; - rSt >> aLVL.nLenGrpprlChpx; - rSt >> aLVL.nLenGrpprlPapx; + rSt.ReadUChar( ixchFollow ); + rSt.ReadInt32( aLVL.nV6DxaSpace ); + rSt.ReadInt32( aLVL.nV6Indent ); + rSt.ReadUChar( aLVL.nLenGrpprlChpx ); + rSt.ReadUChar( aLVL.nLenGrpprlPapx ); rSt.SeekRel( 2 ); if( 0 != rSt.GetError()) return false; @@ -1131,7 +1131,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) sal_uInt32 nRemainingPlcfLst = rFib.lcbPlcfLst; sal_uInt16 nListCount(0); - rSt >> nListCount; + rSt.ReadUInt16( nListCount ); nRemainingPlcfLst -= 2; bOk = nListCount > 0; @@ -1152,13 +1152,13 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) // // 1.1.1 Daten einlesen // - rSt >> aLST.nIdLst; - rSt >> aLST.nTplC; + rSt.ReadUInt32( aLST.nIdLst ); + rSt.ReadUInt32( aLST.nTplC ); for (sal_uInt16 nLevel = 0; nLevel < nMaxLevel; ++nLevel) - rSt >> aLST.aIdSty[ nLevel ]; + rSt.ReadUInt16( aLST.aIdSty[ nLevel ] ); sal_uInt8 aBits1(0); - rSt >> aBits1; + rSt.ReadUChar( aBits1 ); rSt.SeekRel( 1 ); @@ -1248,7 +1248,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) return; sal_Int32 nLfoCount(0); - rSt >> nLfoCount; + rSt.ReadInt32( nLfoCount ); bOk = nLfoCount > 0; if (!bOk) @@ -1267,9 +1267,9 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) WW8LFO aLFO; memset(&aLFO, 0, sizeof( aLFO )); - rSt >> aLFO.nIdLst; + rSt.ReadUInt32( aLFO.nIdLst ); rSt.SeekRel( 8 ); - rSt >> aLFO.nLfoLvl; + rSt.ReadUChar( aLFO.nLfoLvl ); rSt.SeekRel( 3 ); // soviele Overrides existieren if ((nMaxLevel < aLFO.nLfoLvl) || rSt.GetError()) @@ -1361,11 +1361,11 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) //4 byte header, there might be more than one if //that header was 0xFFFFFFFF, e.g. #114412# ? sal_uInt32 nTest; - rSt >> nTest; + rSt.ReadUInt32( nTest ); do { nTest = 0; - rSt >> nTest; + rSt.ReadUInt32( nTest ); } while (nTest == 0xFFFFFFFF); rSt.SeekRel(-4); @@ -1379,9 +1379,9 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) // // 2.2.2.1 den LFOLVL einlesen // - rSt >> aLFOLVL.nStartAt; + rSt.ReadInt32( aLFOLVL.nStartAt ); sal_uInt8 aBits1(0); - rSt >> aBits1; + rSt.ReadUChar( aBits1 ); rSt.SeekRel( 3 ); if (rSt.GetError()) break; @@ -2178,14 +2178,14 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, // The following is a FFData structure as described in // Microsoft's DOC specification (chapter 2.9.78) - *pDataStream >> nHeaderByte; + pDataStream->ReadUInt32( nHeaderByte ); // might be better to read the bits as a 16 bit word // ( like it is in the spec. ) sal_uInt8 bits1 = 0; - *pDataStream >> bits1; + pDataStream->ReadUChar( bits1 ); sal_uInt8 bits2 = 0; - *pDataStream >> bits2; + pDataStream->ReadUChar( bits2 ); sal_uInt8 iType = ( bits1 & 0x3 ); @@ -2197,10 +2197,10 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, sal_uInt8 iRes = (bits1 & 0x7C) >> 2; sal_uInt16 cch = 0; - *pDataStream >> cch; + pDataStream->ReadUInt16( cch ); sal_uInt16 hps = 0; - *pDataStream >> hps; + pDataStream->ReadUInt16( hps ); // xstzName sTitle = read_uInt16_BeltAndBracesString(*pDataStream); @@ -2215,7 +2215,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, { // CheckBox or ComboBox sal_uInt16 wDef = 0; - *pDataStream >> wDef; + pDataStream->ReadUInt16( wDef ); nChecked = wDef; // default if (nWhich == WW8_CT_CHECKBOX) { @@ -2239,18 +2239,18 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, bool bAllOk = true; // SSTB (see Spec. 2.2.4) sal_uInt16 fExtend = 0; - *pDataStream >> fExtend; + pDataStream->ReadUInt16( fExtend ); sal_uInt16 nNoStrings = 0; // Isn't it that if fExtend isn't 0xFFFF then fExtend actually // doesn't exist and we really have just read nNoStrings ( or cData )? if (fExtend != 0xFFFF) bAllOk = false; - *pDataStream >> nNoStrings; + pDataStream->ReadUInt16( nNoStrings ); // I guess this should be zero ( and we should ensure that ) sal_uInt16 cbExtra = 0; - *pDataStream >> cbExtra; + pDataStream->ReadUInt16( cbExtra ); OSL_ENSURE(bAllOk, "Unknown formfield dropdown list structure. Report to cmc"); diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 0c8a59c0679e..0611e8a3c9bc 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -98,15 +98,15 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1) nCropRight, nCropBottom; pS->Seek( 0x14 ); - *pS >> nOrgWidth // Original Size in 1/100 mm - >> nOrgHeight; + pS->ReadInt32( nOrgWidth ) // Original Size in 1/100 mm + .ReadInt32( nOrgHeight ); pS->Seek( 0x2c ); - *pS >> nScaleX // Scaling in Promille - >> nScaleY - >> nCropLeft // Cropping in 1/100 mm - >> nCropTop - >> nCropRight - >> nCropBottom; + pS->ReadInt32( nScaleX ) // Scaling in Promille + .ReadInt32( nScaleY ) + .ReadInt32( nCropLeft ) // Cropping in 1/100 mm + .ReadInt32( nCropTop ) + .ReadInt32( nCropRight ) + .ReadInt32( nCropBottom ); rX = nOrgWidth - nCropLeft - nCropRight; rY = nOrgHeight - nCropTop - nCropBottom; @@ -431,7 +431,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() ) { sal_uInt8 nByte = 0; - *xObjInfoSrc >> nByte; + xObjInfoSrc->ReadUChar( nByte ); if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON ) nAspect = embed::Aspects::MSOLE_ICON; } diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 725843b601df..c5bdc95c1abf 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1515,14 +1515,14 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF ) while( true ) // Zaehle Zahl der Grpprls { sal_uInt8 clxt(2); - *pStr >> clxt; + pStr->ReadUChar( clxt ); nLeft--; if( 2 == clxt ) // PLCFfpcd ? break; // PLCFfpcd gefunden if( 1 == clxt ) // clxtGrpprl ? nGrpprl++; sal_uInt16 nLen(0); - *pStr >> nLen; + pStr->ReadUInt16( nLen ); nLeft -= 2 + nLen; if( nLeft < 0 ) return NULL; // gone wrong @@ -1540,12 +1540,12 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF ) while( true ) { sal_uInt8 clxt(2); - *pStr >> clxt; + pStr->ReadUChar( clxt ); nLeft--; if( 2 == clxt) // PLCFfpcd ? break; // PLCFfpcd found sal_uInt16 nLen(0); - *pStr >> nLen; + pStr->ReadUInt16( nLen ); nLeft -= 2 + nLen; if( nLeft < 0 ) return NULL; // gone wrong @@ -1568,11 +1568,11 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF ) if (pWwF->GetFIBVersion() <= ww::eWW2) { sal_Int16 nWordTwoLen(0); - *pStr >> nWordTwoLen; + pStr->ReadInt16( nWordTwoLen ); nPLCFfLen = nWordTwoLen; } else - *pStr >> nPLCFfLen; + pStr->ReadInt32( nPLCFfLen ); OSL_ENSURE( 65536 > nPLCFfLen, "PLCFfpcd above 64 k" ); return new WW8PLCFpcd( pStr, pStr->Tell(), nPLCFfLen, 8 ); } @@ -2169,7 +2169,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN) if (checkSeek(rSt, ( nPN + i ) << 9 )) continue; WW8_CP nFc(0); - rSt >> nFc; + rSt.ReadInt32( nFc ); pPLCF_PosArray[i] = nFc; failure = rSt.GetError(); } @@ -2187,13 +2187,13 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN) break; sal_uInt8 nb(0); - rSt >> nb; + rSt.ReadUChar( nb ); // letzer FC-Eintrag des letzten Fkp if (!checkSeek(rSt, nLastFkpPos + nb * 4)) break; WW8_CP nFc(0); - rSt >> nFc; + rSt.ReadInt32( nFc ); pPLCF_PosArray[nIMax] = nFc; // end of the last Fkp failure = rSt.GetError(); @@ -2549,7 +2549,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt, sal_uInt16 nOrigLen = bExpand ? aEntry.mnLen : 0; sal_uInt8 *pOrigData = bExpand ? aEntry.mpData : 0; - *pDataSt >> aEntry.mnLen; + pDataSt->ReadUInt16( aEntry.mnLen ); aEntry.mpData = new sal_uInt8[aEntry.mnLen + nOrigLen]; aEntry.mbMustDelete = true; @@ -3423,11 +3423,11 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p) if (GetFIBVersion() <= ww::eWW2) // eWW6 ?, docs say yes, but... { sal_uInt8 nSiz(0); - *pStrm >> nSiz; + pStrm->ReadUChar( nSiz ); nSprmSiz = nSiz; } else - *pStrm >> nSprmSiz; + pStrm->ReadUInt16( nSprmSiz ); if( nSprmSiz > nArrMax ) { // does not fit @@ -3801,7 +3801,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen if (checkSeek(rStrm, nStart)) { sal_uInt16 nLen2(0); - rStrm >> nLen2; // bVer67: total length of structure + rStrm.ReadUInt16( nLen2 ); // bVer67: total length of structure // bVer8 : count of strings if( bVer8 ) @@ -3809,11 +3809,11 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen sal_uInt16 nStrings(0); bool bUnicode = (0xFFFF == nLen2); if (bUnicode) - rStrm >> nStrings; + rStrm.ReadUInt16( nStrings ); else nStrings = nLen2; - rStrm >> nExtraLen; + rStrm.ReadUInt16( nExtraLen ); for (sal_uInt16 i=0; i < nStrings; ++i) { @@ -3834,7 +3834,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen for (sal_uInt16 j = 0; j < nExtraLen; ++j) { sal_uInt8 iTmp(0); - rStrm >> iTmp; + rStrm.ReadUChar( iTmp ); extraData.push_back(iTmp); } pExtraArray->push_back(extraData); @@ -3874,7 +3874,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen for( nLen2 -= 2; nRead < nLen2; ) { sal_uInt8 nBChar(0); - rStrm >> nBChar; + rStrm.ReadUChar( nBChar ); ++nRead; if (nBChar) { @@ -3895,7 +3895,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen for (sal_uInt16 i=0;i < nExtraLen;++i) { sal_uInt8 iTmp(0); - rStrm >> iTmp; + rStrm.ReadUChar( iTmp ); extraData.push_back(iTmp); } pExtraArray->push_back(extraData); @@ -5026,13 +5026,13 @@ namespace if (eVer <= ww::eWW2) { sal_uInt16 nShort; - rSt >> nShort; + rSt.ReadUInt16( nShort ); return nShort; } else { sal_uInt32 nLong; - rSt >> nLong; + rSt.ReadUInt32( nLong ); return nLong; } } @@ -5132,9 +5132,9 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) und gegen Wunsch-Nr. checken ! */ nVersion = nWantedVersion; - rSt >> wIdent; - rSt >> nFib; - rSt >> nProduct; + rSt.ReadUInt16( wIdent ); + rSt.ReadUInt16( nFib ); + rSt.ReadUInt16( nProduct ); if( 0 != rSt.GetError() ) { sal_Int16 nFibMin; @@ -5180,15 +5180,15 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) sal_Int16 cpnBtePap_Ver67=0; // und auf gehts: FIB einlesen - rSt >> lid; - rSt >> pnNext; - rSt >> aBits1; - rSt >> aBits2; - rSt >> nFibBack; - rSt >> nHash; - rSt >> nKey; - rSt >> envr; - rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld + rSt.ReadInt16( lid ); + rSt.ReadInt16( pnNext ); + rSt.ReadUChar( aBits1 ); + rSt.ReadUChar( aBits2 ); + rSt.ReadUInt16( nFibBack ); + rSt.ReadUInt16( nHash ); + rSt.ReadUInt16( nKey ); + rSt.ReadUChar( envr ); + rSt.ReadUChar( aVer8Bits1 ); // unter Ver67 nur leeres Reservefeld // Inhalt von aVer8Bits1 // // sal_uInt8 fMac :1; @@ -5197,21 +5197,21 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) // sal_uInt8 fFuturesavedUndo :1; // sal_uInt8 fWord97Saved :1; // sal_uInt8 :3; - rSt >> chse; - rSt >> chseTables; - rSt >> fcMin; - rSt >> fcMac; + rSt.ReadUInt16( chse ); + rSt.ReadUInt16( chseTables ); + rSt.ReadInt32( fcMin ); + rSt.ReadInt32( fcMac ); // Einschub fuer WW8 ***************************************************** if (IsEightPlus(eVer)) { - rSt >> csw; + rSt.ReadUInt16( csw ); // Marke: "rgsw" Beginning of the array of shorts - rSt >> wMagicCreated; - rSt >> wMagicRevised; - rSt >> wMagicCreatedPrivate; - rSt >> wMagicRevisedPrivate; + rSt.ReadUInt16( wMagicCreated ); + rSt.ReadUInt16( wMagicRevised ); + rSt.ReadUInt16( wMagicCreatedPrivate ); + rSt.ReadUInt16( wMagicRevisedPrivate ); rSt.SeekRel( 9 * sizeof( sal_Int16 ) ); /* @@ -5226,14 +5226,14 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) && (bVer67 || WW8ReadINT16( rSt, pnLvcFirst_W6 )) // 8 && (bVer67 || WW8ReadINT16( rSt, cpnBteLvc_W6 )) // 9 */ - rSt >> lidFE; - rSt >> clw; + rSt.ReadInt16( lidFE ); + rSt.ReadUInt16( clw ); } // Ende des Einschubs fuer WW8 ******************************************* // Marke: "rglw" Beginning of the array of longs - rSt >> cbMac; + rSt.ReadInt32( cbMac ); // 2 Longs uebergehen, da unwichtiger Quatsch rSt.SeekRel( 2 * sizeof( sal_Int32) ); @@ -5242,14 +5242,14 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) if (IsSevenMinus(eVer)) rSt.SeekRel( 2 * sizeof( sal_Int32) ); - rSt >> ccpText; - rSt >> ccpFtn; - rSt >> ccpHdr; - rSt >> ccpMcr; - rSt >> ccpAtn; - rSt >> ccpEdn; - rSt >> ccpTxbx; - rSt >> ccpHdrTxbx; + rSt.ReadInt32( ccpText ); + rSt.ReadInt32( ccpFtn ); + rSt.ReadInt32( ccpHdr ); + rSt.ReadInt32( ccpMcr ); + rSt.ReadInt32( ccpAtn ); + rSt.ReadInt32( ccpEdn ); + rSt.ReadInt32( ccpTxbx ); + rSt.ReadInt32( ccpHdrTxbx ); // weiteres Long nur bei Ver67 ueberspringen if (IsSevenMinus(eVer)) @@ -5257,98 +5257,98 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) else { // Einschub fuer WW8 ***************************************************** - rSt >> pnFbpChpFirst; - rSt >> pnChpFirst; - rSt >> cpnBteChp; - rSt >> pnFbpPapFirst; - rSt >> pnPapFirst; - rSt >> cpnBtePap; - rSt >> pnFbpLvcFirst; - rSt >> pnLvcFirst; - rSt >> cpnBteLvc; - rSt >> fcIslandFirst; - rSt >> fcIslandLim; - rSt >> cfclcb; + rSt.ReadInt32( pnFbpChpFirst ); + rSt.ReadInt32( pnChpFirst ); + rSt.ReadInt32( cpnBteChp ); + rSt.ReadInt32( pnFbpPapFirst ); + rSt.ReadInt32( pnPapFirst ); + rSt.ReadInt32( cpnBtePap ); + rSt.ReadInt32( pnFbpLvcFirst ); + rSt.ReadInt32( pnLvcFirst ); + rSt.ReadInt32( cpnBteLvc ); + rSt.ReadInt32( fcIslandFirst ); + rSt.ReadInt32( fcIslandLim ); + rSt.ReadUInt16( cfclcb ); } // Ende des Einschubs fuer WW8 ******************************************* // Marke: "rgfclcb" Beginning of array of FC/LCB pairs. - rSt >> fcStshfOrig; + rSt.ReadInt32( fcStshfOrig ); lcbStshfOrig = Readcb(rSt, eVer); - rSt >> fcStshf; + rSt.ReadInt32( fcStshf ); lcbStshf = Readcb(rSt, eVer); - rSt >> fcPlcffndRef; + rSt.ReadInt32( fcPlcffndRef ); lcbPlcffndRef = Readcb(rSt, eVer); - rSt >> fcPlcffndTxt; + rSt.ReadInt32( fcPlcffndTxt ); lcbPlcffndTxt = Readcb(rSt, eVer); - rSt >> fcPlcfandRef; + rSt.ReadInt32( fcPlcfandRef ); lcbPlcfandRef = Readcb(rSt, eVer); - rSt >> fcPlcfandTxt; + rSt.ReadInt32( fcPlcfandTxt ); lcbPlcfandTxt = Readcb(rSt, eVer); - rSt >> fcPlcfsed; + rSt.ReadInt32( fcPlcfsed ); lcbPlcfsed = Readcb(rSt, eVer); - rSt >> fcPlcfpad; + rSt.ReadInt32( fcPlcfpad ); lcbPlcfpad = Readcb(rSt, eVer); - rSt >> fcPlcfphe; + rSt.ReadInt32( fcPlcfphe ); lcbPlcfphe = Readcb(rSt, eVer); - rSt >> fcSttbfglsy; + rSt.ReadInt32( fcSttbfglsy ); lcbSttbfglsy = Readcb(rSt, eVer); - rSt >> fcPlcfglsy; + rSt.ReadInt32( fcPlcfglsy ); lcbPlcfglsy = Readcb(rSt, eVer); - rSt >> fcPlcfhdd; + rSt.ReadInt32( fcPlcfhdd ); lcbPlcfhdd = Readcb(rSt, eVer); - rSt >> fcPlcfbteChpx; + rSt.ReadInt32( fcPlcfbteChpx ); lcbPlcfbteChpx = Readcb(rSt, eVer); - rSt >> fcPlcfbtePapx; + rSt.ReadInt32( fcPlcfbtePapx ); lcbPlcfbtePapx = Readcb(rSt, eVer); - rSt >> fcPlcfsea; + rSt.ReadInt32( fcPlcfsea ); lcbPlcfsea = Readcb(rSt, eVer); - rSt >> fcSttbfffn; + rSt.ReadInt32( fcSttbfffn ); lcbSttbfffn = Readcb(rSt, eVer); - rSt >> fcPlcffldMom; + rSt.ReadInt32( fcPlcffldMom ); lcbPlcffldMom = Readcb(rSt, eVer); - rSt >> fcPlcffldHdr; + rSt.ReadInt32( fcPlcffldHdr ); lcbPlcffldHdr = Readcb(rSt, eVer); - rSt >> fcPlcffldFtn; + rSt.ReadInt32( fcPlcffldFtn ); lcbPlcffldFtn = Readcb(rSt, eVer); - rSt >> fcPlcffldAtn; + rSt.ReadInt32( fcPlcffldAtn ); lcbPlcffldAtn = Readcb(rSt, eVer); - rSt >> fcPlcffldMcr; + rSt.ReadInt32( fcPlcffldMcr ); lcbPlcffldMcr = Readcb(rSt, eVer); - rSt >> fcSttbfbkmk; + rSt.ReadInt32( fcSttbfbkmk ); lcbSttbfbkmk = Readcb(rSt, eVer); - rSt >> fcPlcfbkf; + rSt.ReadInt32( fcPlcfbkf ); lcbPlcfbkf = Readcb(rSt, eVer); - rSt >> fcPlcfbkl; + rSt.ReadInt32( fcPlcfbkl ); lcbPlcfbkl = Readcb(rSt, eVer); - rSt >> fcCmds; + rSt.ReadInt32( fcCmds ); lcbCmds = Readcb(rSt, eVer); - rSt >> fcPlcfmcr; + rSt.ReadInt32( fcPlcfmcr ); lcbPlcfmcr = Readcb(rSt, eVer); - rSt >> fcSttbfmcr; + rSt.ReadInt32( fcSttbfmcr ); lcbSttbfmcr = Readcb(rSt, eVer); - rSt >> fcPrDrvr; + rSt.ReadInt32( fcPrDrvr ); lcbPrDrvr = Readcb(rSt, eVer); - rSt >> fcPrEnvPort; + rSt.ReadInt32( fcPrEnvPort ); lcbPrEnvPort = Readcb(rSt, eVer); - rSt >> fcPrEnvLand; + rSt.ReadInt32( fcPrEnvLand ); lcbPrEnvLand = Readcb(rSt, eVer); - rSt >> fcWss; + rSt.ReadInt32( fcWss ); lcbWss = Readcb(rSt, eVer); - rSt >> fcDop; + rSt.ReadInt32( fcDop ); lcbDop = Readcb(rSt, eVer); - rSt >> fcSttbfAssoc; + rSt.ReadInt32( fcSttbfAssoc ); lcbSttbfAssoc = Readcb(rSt, eVer); - rSt >> fcClx; + rSt.ReadInt32( fcClx ); lcbClx = Readcb(rSt, eVer); - rSt >> fcPlcfpgdFtn; + rSt.ReadInt32( fcPlcfpgdFtn ); lcbPlcfpgdFtn = Readcb(rSt, eVer); - rSt >> fcAutosaveSource; + rSt.ReadInt32( fcAutosaveSource ); lcbAutosaveSource = Readcb(rSt, eVer); - rSt >> fcGrpStAtnOwners; + rSt.ReadInt32( fcGrpStAtnOwners ); lcbGrpStAtnOwners = Readcb(rSt, eVer); - rSt >> fcSttbfAtnbkmk; + rSt.ReadInt32( fcSttbfAtnbkmk ); lcbSttbfAtnbkmk = Readcb(rSt, eVer); // weiteres short nur bei Ver67 ueberspringen @@ -5357,63 +5357,63 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) rSt.SeekRel( 1*sizeof( sal_Int16) ); // folgende 4 Shorts existieren nur bei Ver67; - rSt >> pnChpFirst_Ver67; - rSt >> pnPapFirst_Ver67; - rSt >> cpnBteChp_Ver67; - rSt >> cpnBtePap_Ver67; + rSt.ReadInt16( pnChpFirst_Ver67 ); + rSt.ReadInt16( pnPapFirst_Ver67 ); + rSt.ReadInt16( cpnBteChp_Ver67 ); + rSt.ReadInt16( cpnBtePap_Ver67 ); } if (eVer > ww::eWW2) { - rSt >> fcPlcfdoaMom; - rSt >> lcbPlcfdoaMom; - rSt >> fcPlcfdoaHdr; - rSt >> lcbPlcfdoaHdr; - rSt >> fcPlcfspaMom; - rSt >> lcbPlcfspaMom; - rSt >> fcPlcfspaHdr; - rSt >> lcbPlcfspaHdr; - - rSt >> fcPlcfAtnbkf; - rSt >> lcbPlcfAtnbkf; - rSt >> fcPlcfAtnbkl; - rSt >> lcbPlcfAtnbkl; - rSt >> fcPms; - rSt >> lcbPMS; - rSt >> fcFormFldSttbf; - rSt >> lcbFormFldSttbf; - rSt >> fcPlcfendRef; - rSt >> lcbPlcfendRef; - rSt >> fcPlcfendTxt; - rSt >> lcbPlcfendTxt; - rSt >> fcPlcffldEdn; - rSt >> lcbPlcffldEdn; - rSt >> fcPlcfpgdEdn; - rSt >> lcbPlcfpgdEdn; - rSt >> fcDggInfo; - rSt >> lcbDggInfo; - rSt >> fcSttbfRMark; - rSt >> lcbSttbfRMark; - rSt >> fcSttbfCaption; - rSt >> lcbSttbfCaption; - rSt >> fcSttbAutoCaption; - rSt >> lcbSttbAutoCaption; - rSt >> fcPlcfwkb; - rSt >> lcbPlcfwkb; - rSt >> fcPlcfspl; - rSt >> lcbPlcfspl; - rSt >> fcPlcftxbxTxt; - rSt >> lcbPlcftxbxTxt; - rSt >> fcPlcffldTxbx; - rSt >> lcbPlcffldTxbx; - rSt >> fcPlcfHdrtxbxTxt; - rSt >> lcbPlcfHdrtxbxTxt; - rSt >> fcPlcffldHdrTxbx; - rSt >> lcbPlcffldHdrTxbx; - rSt >> fcStwUser; - rSt >> lcbStwUser; - rSt >> fcSttbttmbd; - rSt >> lcbSttbttmbd; + rSt.ReadInt32( fcPlcfdoaMom ); + rSt.ReadInt32( lcbPlcfdoaMom ); + rSt.ReadInt32( fcPlcfdoaHdr ); + rSt.ReadInt32( lcbPlcfdoaHdr ); + rSt.ReadInt32( fcPlcfspaMom ); + rSt.ReadInt32( lcbPlcfspaMom ); + rSt.ReadInt32( fcPlcfspaHdr ); + rSt.ReadInt32( lcbPlcfspaHdr ); + + rSt.ReadInt32( fcPlcfAtnbkf ); + rSt.ReadInt32( lcbPlcfAtnbkf ); + rSt.ReadInt32( fcPlcfAtnbkl ); + rSt.ReadInt32( lcbPlcfAtnbkl ); + rSt.ReadInt32( fcPms ); + rSt.ReadInt32( lcbPMS ); + rSt.ReadInt32( fcFormFldSttbf ); + rSt.ReadInt32( lcbFormFldSttbf ); + rSt.ReadInt32( fcPlcfendRef ); + rSt.ReadInt32( lcbPlcfendRef ); + rSt.ReadInt32( fcPlcfendTxt ); + rSt.ReadInt32( lcbPlcfendTxt ); + rSt.ReadInt32( fcPlcffldEdn ); + rSt.ReadInt32( lcbPlcffldEdn ); + rSt.ReadInt32( fcPlcfpgdEdn ); + rSt.ReadInt32( lcbPlcfpgdEdn ); + rSt.ReadInt32( fcDggInfo ); + rSt.ReadInt32( lcbDggInfo ); + rSt.ReadInt32( fcSttbfRMark ); + rSt.ReadInt32( lcbSttbfRMark ); + rSt.ReadInt32( fcSttbfCaption ); + rSt.ReadInt32( lcbSttbfCaption ); + rSt.ReadInt32( fcSttbAutoCaption ); + rSt.ReadInt32( lcbSttbAutoCaption ); + rSt.ReadInt32( fcPlcfwkb ); + rSt.ReadInt32( lcbPlcfwkb ); + rSt.ReadInt32( fcPlcfspl ); + rSt.ReadInt32( lcbPlcfspl ); + rSt.ReadInt32( fcPlcftxbxTxt ); + rSt.ReadInt32( lcbPlcftxbxTxt ); + rSt.ReadInt32( fcPlcffldTxbx ); + rSt.ReadInt32( lcbPlcffldTxbx ); + rSt.ReadInt32( fcPlcfHdrtxbxTxt ); + rSt.ReadInt32( lcbPlcfHdrtxbxTxt ); + rSt.ReadInt32( fcPlcffldHdrTxbx ); + rSt.ReadInt32( lcbPlcffldHdrTxbx ); + rSt.ReadInt32( fcStwUser ); + rSt.ReadUInt32( lcbStwUser ); + rSt.ReadInt32( fcSttbttmbd ); + rSt.ReadUInt32( lcbSttbttmbd ); } if( 0 == rSt.GetError() ) @@ -5461,44 +5461,44 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) long nOldPos = rSt.Tell(); rSt.Seek( 0x02da ); - rSt >> fcSttbFnm; - rSt >> lcbSttbFnm; - rSt >> fcPlcfLst; - rSt >> lcbPlcfLst; - rSt >> fcPlfLfo; - rSt >> lcbPlfLfo; - rSt >> fcPlcftxbxBkd; - rSt >> lcbPlcftxbxBkd; - rSt >> fcPlcfHdrtxbxBkd; - rSt >> lcbPlcfHdrtxbxBkd; + rSt.ReadInt32( fcSttbFnm ); + rSt.ReadInt32( lcbSttbFnm ); + rSt.ReadInt32( fcPlcfLst ); + rSt.ReadInt32( lcbPlcfLst ); + rSt.ReadInt32( fcPlfLfo ); + rSt.ReadInt32( lcbPlfLfo ); + rSt.ReadInt32( fcPlcftxbxBkd ); + rSt.ReadInt32( lcbPlcftxbxBkd ); + rSt.ReadInt32( fcPlcfHdrtxbxBkd ); + rSt.ReadInt32( lcbPlcfHdrtxbxBkd ); if( 0 != rSt.GetError() ) { nFibError = ERR_SWG_READ_ERROR; } rSt.Seek( 0x372 ); // fcSttbListNames - rSt >> fcSttbListNames; - rSt >> lcbSttbListNames; + rSt.ReadInt32( fcSttbListNames ); + rSt.ReadInt32( lcbSttbListNames ); if (cfclcb > 93) { rSt.Seek( 0x382 ); // MagicTables - rSt >> fcPlcfTch; - rSt >> lcbPlcfTch; + rSt.ReadInt32( fcPlcfTch ); + rSt.ReadInt32( lcbPlcfTch ); } if (cfclcb > 113) { rSt.Seek( 0x41A ); // new ATRD - rSt >> fcAtrdExtra; - rSt >> lcbAtrdExtra; + rSt.ReadInt32( fcAtrdExtra ); + rSt.ReadUInt32( lcbAtrdExtra ); } if( 0 != rSt.GetError() ) nFibError = ERR_SWG_READ_ERROR; rSt.Seek( 0x5bc ); // Actual nFib introduced in Word 2003 - rSt >> nFib_actual; + rSt.ReadUInt16( nFib_actual ); rSt.Seek( nOldPos ); } @@ -5917,7 +5917,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara) if (nRemaining < sizeof(cbStshi)) return; // lies die Laenge der in der Datei gespeicherten Struktur - rSt >> cbStshi; + rSt.ReadUInt16( cbStshi ); nRemaining-=2; } } @@ -5931,36 +5931,36 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara) { sal_uInt16 a16Bit; - rSt >> cstd; + rSt.ReadUInt16( cstd ); - rSt >> cbSTDBaseInFile; + rSt.ReadUInt16( cbSTDBaseInFile ); if( 6 > nRead ) break; - rSt >> a16Bit; + rSt.ReadUInt16( a16Bit ); fStdStylenamesWritten = a16Bit & 0x0001; if( 8 > nRead ) break; - rSt >> stiMaxWhenSaved; + rSt.ReadUInt16( stiMaxWhenSaved ); if( 10 > nRead ) break; - rSt >> istdMaxFixedWhenSaved; + rSt.ReadUInt16( istdMaxFixedWhenSaved ); if( 12 > nRead ) break; - rSt >> nVerBuiltInNamesWhenSaved; + rSt.ReadUInt16( nVerBuiltInNamesWhenSaved ); if( 14 > nRead ) break; - rSt >> ftcAsci; + rSt.ReadUInt16( ftcAsci ); if( 16 > nRead ) break; - rSt >> ftcFE; + rSt.ReadUInt16( ftcFE ); if ( 18 > nRead ) break; - rSt >> ftcOther; + rSt.ReadUInt16( ftcOther ); ftcBi = ftcOther; if ( 20 > nRead ) break; - rSt >> ftcBi; + rSt.ReadUInt16( ftcBi ); // ggfs. den Rest ueberlesen if( 20 < nRead ) @@ -5990,7 +5990,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd ) WW8_STD* pStd = 0; sal_uInt16 cbStd(0); - rSt >> cbStd; // lies Laenge + rSt.ReadUInt16( cbStd ); // lies Laenge sal_uInt16 nRead = cbSTDBaseInFile; if( cbStd >= cbSTDBaseInFile ) @@ -6007,7 +6007,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd ) if( 2 > nRead ) break; a16Bit = 0; - rSt >> a16Bit; + rSt.ReadUInt16( a16Bit ); pStd->sti = a16Bit & 0x0fff ; pStd->fScratch = sal_uInt16(0 != ( a16Bit & 0x1000 )); pStd->fInvalHeight = sal_uInt16(0 != ( a16Bit & 0x2000 )); @@ -6016,24 +6016,24 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd ) if( 4 > nRead ) break; a16Bit = 0; - rSt >> a16Bit; + rSt.ReadUInt16( a16Bit ); pStd->sgc = a16Bit & 0x000f ; pStd->istdBase = ( a16Bit & 0xfff0 ) >> 4; if( 6 > nRead ) break; a16Bit = 0; - rSt >> a16Bit; + rSt.ReadUInt16( a16Bit ); pStd->cupx = a16Bit & 0x000f ; pStd->istdNext = ( a16Bit & 0xfff0 ) >> 4; if( 8 > nRead ) break; a16Bit = 0; - rSt >> pStd->bchUpe; + rSt.ReadUInt16( pStd->bchUpe ); // ab Ver8 sollten diese beiden Felder dazukommen: if(10 > nRead ) break; a16Bit = 0; - rSt >> a16Bit; + rSt.ReadUInt16( a16Bit ); pStd->fAutoRedef = a16Bit & 0x0001 ; pStd->fHidden = ( a16Bit & 0x0002 ) >> 1; @@ -6231,7 +6231,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib ) if( eVersion >= ww::eWW8 ) { // bVer8: read the count of strings in nMax - rSt >> nMax; + rSt.ReadUInt16( nMax ); } // Ver8: skip undefined uint16 diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index 1fd2ec62523a..c6cfa0eb8c82 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -115,8 +115,8 @@ bool SwCTBWrapper::Read( SvStream& rS ) SAL_INFO("sw.ww8","SwCTBWrapper::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); Tcg255SubStruct::Read( rS ); - rS >> reserved2 >> reserved3 >> reserved4 >> reserved5; - rS >> cbTBD >> cCust >> cbDTBC; + rS.ReadUInt16( reserved2 ).ReadUChar( reserved3 ).ReadUInt16( reserved4 ).ReadUInt16( reserved5 ); + rS.ReadInt16( cbTBD ).ReadInt16( cCust ).ReadInt32( cbDTBC ); long nExpectedPos = rS.Tell() + cbDTBC; if ( cbDTBC ) { @@ -254,7 +254,7 @@ bool Customization::Read( SvStream &rS) { SAL_INFO("sw.ww8","Custimization::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS >> tbidForTBD >> reserved1 >> ctbds; + rS.ReadInt32( tbidForTBD ).ReadUInt16( reserved1 ).ReadInt16( ctbds ); if ( tbidForTBD ) { for ( sal_Int32 index = 0; index < ctbds; ++index ) @@ -447,8 +447,8 @@ bool TBDelta::Read(SvStream &rS) { SAL_INFO("sw.ww8","TBDelta::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS >> doprfatendFlags >> ibts >> cidNext >> cid >> fc ; - rS >> CiTBDE >> cbTBC; + rS.ReadUChar( doprfatendFlags ).ReadUChar( ibts ).ReadInt32( cidNext ).ReadInt32( cid ).ReadInt32( fc ) ; + rS.ReadUInt16( CiTBDE ).ReadUInt16( cbTBC ); return true; } @@ -495,7 +495,7 @@ bool SwCTB::Read( SvStream &rS) nOffSet = rS.Tell(); if ( !name.Read( rS ) ) return false; - rS >> cbTBData; + rS.ReadInt32( cbTBData ); if ( !tb.Read( rS ) ) return false; for ( short index = 0; index < nVisualData; ++index ) @@ -505,7 +505,7 @@ bool SwCTB::Read( SvStream &rS) rVisualData.push_back( aVisData ); } - rS >> iWCTBl >> reserved >> unused >> cCtls; + rS.ReadInt32( iWCTBl ).ReadUInt16( reserved ).ReadUInt16( unused ).ReadInt32( cCtls ); if ( cCtls ) { @@ -620,7 +620,7 @@ bool SwTBC::Read( SvStream &rS ) if ( tbch.getTcID() != 0x1 && tbch.getTcID() != 0x1051 ) { cid.reset( new sal_uInt32 ); - rS >> *cid; + rS.ReadUInt32( *cid ); } // MUST exist if tbch.tct is not equal to 0x16 if ( tbch.getTct() != 0x16 ) @@ -787,7 +787,7 @@ bool Tcg::Read(SvStream &rS) { SAL_INFO("sw.ww8","Tcg::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS >> nTcgVer; + rS.ReadSChar( nTcgVer ); if ( nTcgVer != -1 ) return false; tcg.reset( new Tcg255() ); @@ -892,13 +892,13 @@ bool Tcg255::Read(SvStream &rS) SAL_INFO("sw.ww8","Tcg255::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); sal_uInt8 nId = 0x40; - rS >> nId; + rS.ReadUChar( nId ); while ( nId != 0x40 ) { if ( !processSubStruct( nId, rS ) ) return false; nId = 0x40; - rS >> nId; + rS.ReadUChar( nId ); } return true; // Peek at @@ -929,7 +929,7 @@ bool Tcg255SubStruct::Read(SvStream &rS) SAL_INFO("sw.ww8","Tcg255SubStruct::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); if ( mbReadId ) - rS >> ch; + rS.ReadUChar( ch ); return true; } @@ -944,7 +944,7 @@ bool PlfMcd::Read(SvStream &rS) SAL_INFO("sw.ww8","PffMcd::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); Tcg255SubStruct::Read( rS ); - rS >> iMac; + rS.ReadInt32( iMac ); if ( iMac ) { rgmcd.resize(iMac); @@ -987,7 +987,7 @@ bool PlfAcd::Read( SvStream &rS) SAL_INFO("sw.ww8","PffAcd::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); Tcg255SubStruct::Read( rS ); - rS >> iMac; + rS.ReadInt32( iMac ); if ( iMac ) { rgacd = new Acd[ iMac ]; @@ -1030,7 +1030,7 @@ bool PlfKme::Read(SvStream &rS) SAL_INFO("sw.ww8","PlfKme::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); Tcg255SubStruct::Read( rS ); - rS >> iMac; + rS.ReadInt32( iMac ); if ( iMac ) { rgkme = new Kme[ iMac ]; @@ -1092,15 +1092,15 @@ bool TcgSttbfCore::Read( SvStream& rS ) { SAL_INFO("sw.ww8","TcgSttbfCore::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS >> fExtend >> cData >> cbExtra; + rS.ReadUInt16( fExtend ).ReadUInt16( cData ).ReadUInt16( cbExtra ); if ( cData ) { dataItems = new SBBItem[ cData ]; for ( sal_Int32 index = 0; index < cData; ++index ) { - rS >> dataItems[ index ].cchData; + rS.ReadUInt16( dataItems[ index ].cchData ); dataItems[ index ].data = read_uInt16s_ToOUString(rS, dataItems[index].cchData); - rS >> dataItems[ index ].extraData; + rS.ReadUInt16( dataItems[ index ].extraData ); } } return true; @@ -1138,7 +1138,7 @@ bool MacroNames::Read( SvStream &rS) SAL_INFO("sw.ww8","MacroNames::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); Tcg255SubStruct::Read( rS ); - rS >> iMac; + rS.ReadUInt16( iMac ); if ( iMac ) { rgNames = new MacroName[ iMac ]; @@ -1173,7 +1173,7 @@ bool MacroName::Read(SvStream &rS) { SAL_INFO("sw.ww8","MacroName::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS >> ibst; + rS.ReadUInt16( ibst ); return xstz.Read( rS ); } @@ -1196,7 +1196,7 @@ Xstz::Read(SvStream &rS) nOffSet = rS.Tell(); if ( !xst.Read( rS ) ) return false; - rS >> chTerm; + rS.ReadUInt16( chTerm ); if ( chTerm != 0 ) // should be an assert return false; return true; @@ -1229,7 +1229,7 @@ Kme::Read(SvStream &rS) { SAL_INFO("sw.ww8","Kme::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS >> reserved1 >> reserved2 >> kcm1 >> kcm2 >> kt >> param; + rS.ReadInt16( reserved1 ).ReadInt16( reserved2 ).ReadUInt16( kcm1 ).ReadUInt16( kcm2 ).ReadUInt16( kt ).ReadUInt32( param ); return true; } @@ -1255,7 +1255,7 @@ bool Acd::Read(SvStream &rS) { SAL_INFO("sw.ww8","Acd::Read() stream pos 0x" << std::hex << rS.Tell() ); nOffSet = rS.Tell(); - rS >> ibst >> fciBasedOnABC; + rS.ReadInt16( ibst ).ReadUInt16( fciBasedOnABC ); return true; } @@ -1315,8 +1315,8 @@ bool MCD::Read(SvStream &rS) { SAL_INFO("sw.ww8","MCD::Read() stream pos 0x" << rS.Tell() ); nOffSet = rS.Tell(); - rS >> reserved1 >> reserved2 >> ibst >> ibstName >> reserved3; - rS >> reserved4 >> reserved5 >> reserved6 >> reserved7; + rS.ReadSChar( reserved1 ).ReadUChar( reserved2 ).ReadUInt16( ibst ).ReadUInt16( ibstName ).ReadUInt16( reserved3 ); + rS.ReadUInt32( reserved4 ).ReadUInt32( reserved5 ).ReadUInt32( reserved6 ).ReadUInt32( reserved7 ); return true; } diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index ab4336bcd0c8..aa6fb9f8087f 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -133,7 +133,7 @@ int SwBaseNumRules::Load(SvStream &rStream) { int rc = 0; - rStream >> nVersion; + rStream.ReadUInt16( nVersion ); // due to a small but serious mistake, PreFinal writes the same VERION_40A as SP2 // #55402# @@ -147,7 +147,7 @@ int SwBaseNumRules::Load(SvStream &rStream) unsigned char bRule = sal_False; for(sal_uInt16 i = 0; i < nMaxRules; ++i) { - rStream >> bRule; + rStream.ReadUChar( bRule ); if(bRule) pNumRules[i] = new SwNumRulesWithName( rStream, nVersion ); } @@ -235,7 +235,7 @@ SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion ) else if(nVersion < VERSION_40A && n > 5) c = 0; else - rStream >> c; + rStream.ReadChar( c ); if( c ) aFmts[ n ] = new _SwNumFmtGlobal( rStream, nVersion ); @@ -326,44 +326,44 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, sal_Bool bFlag; OUString sStr; - rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS ); + rStream.ReadUInt16( nUS ); aFmt.SetNumberingType((sal_Int16)nUS ); if( VERSION_53A > nVersion ) { - rStream >> cChar; aFmt.SetBulletChar( cChar ); + rStream.ReadChar( cChar ); aFmt.SetBulletChar( cChar ); } else { - rStream >> nUS; aFmt.SetBulletChar( nUS ); + rStream.ReadUInt16( nUS ); aFmt.SetBulletChar( nUS ); } - rStream >> bFlag; aFmt.SetIncludeUpperLevels( bFlag ); + rStream.ReadUChar( bFlag ); aFmt.SetIncludeUpperLevels( bFlag ); if( VERSION_30B == nVersion ) { sal_Int32 nL; - rStream >> cChar; aFmt.SetStart( (sal_uInt16)cChar ); + rStream.ReadChar( cChar ); aFmt.SetStart( (sal_uInt16)cChar ); sStr = rStream.ReadUniOrByteString(eEncoding); aFmt.SetPrefix( sStr ); sStr = rStream.ReadUniOrByteString(eEncoding); aFmt.SetSuffix( sStr ); - rStream >> nUS; aFmt.SetNumAdjust( SvxAdjust( nUS ) ); - rStream >> nL; aFmt.SetLSpace( lNumIndent ); - rStream >> nL; aFmt.SetFirstLineOffset( (short)nL ); + rStream.ReadUInt16( nUS ); aFmt.SetNumAdjust( SvxAdjust( nUS ) ); + rStream.ReadInt32( nL ); aFmt.SetLSpace( lNumIndent ); + rStream.ReadInt32( nL ); aFmt.SetFirstLineOffset( (short)nL ); } else // old start-value was a Byte { - rStream >> nUS; aFmt.SetStart( nUS ); + rStream.ReadUInt16( nUS ); aFmt.SetStart( nUS ); sStr = rStream.ReadUniOrByteString(eEncoding); aFmt.SetPrefix( sStr ); sStr = rStream.ReadUniOrByteString(eEncoding); aFmt.SetSuffix( sStr ); - rStream >> nUS; aFmt.SetNumAdjust( SvxAdjust( nUS ) ); - rStream >> nUS; aFmt.SetAbsLSpace( nUS ); - rStream >> nShort; aFmt.SetFirstLineOffset( nShort ); - rStream >> nUS; aFmt.SetCharTextDistance( nUS ); - rStream >> nShort; aFmt.SetLSpace( nShort ); - rStream >> bFlag; + rStream.ReadUInt16( nUS ); aFmt.SetNumAdjust( SvxAdjust( nUS ) ); + rStream.ReadUInt16( nUS ); aFmt.SetAbsLSpace( nUS ); + rStream.ReadInt16( nShort ); aFmt.SetFirstLineOffset( nShort ); + rStream.ReadUInt16( nUS ); aFmt.SetCharTextDistance( nUS ); + rStream.ReadInt16( nShort ); aFmt.SetLSpace( nShort ); + rStream.ReadUChar( bFlag ); } sal_uInt16 nFamily; @@ -374,7 +374,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, OUString aName; aName = rStream.ReadUniOrByteString(eEncoding); - rStream >> nFamily >> nCharSet >> nWidth >> nHeight >> nPitch; + rStream.ReadUInt16( nFamily ).ReadUInt16( nCharSet ).ReadInt16( nWidth ).ReadInt16( nHeight ).ReadUInt16( nPitch ); if( !aName.isEmpty() ) { @@ -398,14 +398,14 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( VERSION_30B != nVersion ) { sal_uInt16 nItemCount; - rStream >> nCharPoolId; + rStream.ReadUInt16( nCharPoolId ); sCharFmtName = rStream.ReadUniOrByteString(eEncoding); - rStream >> nItemCount; + rStream.ReadUInt16( nItemCount ); while( nItemCount-- ) { sal_uInt16 nWhich, nVers; - rStream >> nWhich >> nVers; + rStream.ReadUInt16( nWhich ).ReadUInt16( nVers ); aItems.push_back( GetDfltAttr( nWhich )->Create( rStream, nVers ) ); } } @@ -415,11 +415,11 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, sal_uInt8 cF; sal_Int32 nWidth(0), nHeight(0); - rStream >> nWidth >> nHeight; + rStream.ReadInt32( nWidth ).ReadInt32( nHeight ); Size aSz(nWidth, nHeight); - rStream >> cF; + rStream.ReadUChar( cF ); if( cF ) { SvxBrushItem* pBrush = 0; @@ -428,14 +428,14 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( cF & 1 ) { - rStream >> nVer; + rStream.ReadUInt16( nVer ); pBrush = (SvxBrushItem*)GetDfltAttr( RES_BACKGROUND ) ->Create( rStream, nVer ); } if( cF & 2 ) { - rStream >> nVer; + rStream.ReadUInt16( nVer ); pVOrient = (SwFmtVertOrient*)GetDfltAttr( RES_VERT_ORIENT ) ->Create( rStream, nVer ); } |