summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-02-05 10:41:04 +0200
committerMichael Stahl <mstahl@redhat.com>2014-02-12 15:31:40 +0000
commit15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 (patch)
treedb4badc477cea1ecd51f5fab82ce0f24ae20f155
parent7accbd8c0d7f1d0b87748f0de599c4d8b469a61e (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>
-rw-r--r--basctl/source/basicide/bastypes.cxx4
-rw-r--r--basic/source/basmgr/basmgr.cxx26
-rw-r--r--basic/source/classes/image.cxx12
-rw-r--r--basic/source/classes/sb.cxx2
-rw-r--r--basic/source/classes/sbxmod.cxx6
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/runtime/methods1.cxx16
-rw-r--r--basic/source/sbx/sbxarray.cxx8
-rw-r--r--basic/source/sbx/sbxbase.cxx14
-rw-r--r--basic/source/sbx/sbxcoll.cxx2
-rw-r--r--basic/source/sbx/sbxobj.cxx2
-rw-r--r--basic/source/sbx/sbxvalue.cxx34
-rw-r--r--basic/source/sbx/sbxvar.cxx14
-rw-r--r--chart2/qa/extras/chart2export.cxx2
-rw-r--r--compilerplugins/clang/svstreamoutputoperators.cxx142
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx18
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx8
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx184
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableRow.cxx26
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx2
-rw-r--r--editeng/source/editeng/editobj.cxx38
-rw-r--r--editeng/source/items/bulitem.cxx36
-rw-r--r--editeng/source/items/flditem.cxx22
-rw-r--r--editeng/source/items/frmitems.cxx73
-rw-r--r--editeng/source/items/justifyitem.cxx6
-rw-r--r--editeng/source/items/numitem.cxx54
-rw-r--r--editeng/source/items/optitems.cxx2
-rw-r--r--editeng/source/items/paraitem.cxx36
-rw-r--r--editeng/source/items/svdfield.cxx2
-rw-r--r--editeng/source/items/textitem.cxx72
-rw-r--r--extensions/source/scanner/scanunx.cxx2
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx8
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx8
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx138
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx16
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx2
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx22
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx131
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx86
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx19
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx67
-rw-r--r--filter/source/graphicfilter/itiff/ccidecom.cxx10
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx54
-rw-r--r--filter/source/graphicfilter/itiff/lzwdecom.cxx4
-rw-r--r--filter/source/msfilter/dffpropset.cxx8
-rw-r--r--filter/source/msfilter/dffrecordheader.cxx6
-rw-r--r--filter/source/msfilter/escherex.cxx8
-rw-r--r--filter/source/msfilter/msdffimp.cxx150
-rw-r--r--filter/source/msfilter/mstoolbar.cxx28
-rw-r--r--filter/source/msfilter/svdfppt.cxx506
-rw-r--r--filter/source/xmlfilterdetect/filterdetect.cxx2
-rw-r--r--idl/source/objects/basobj.cxx14
-rw-r--r--idl/source/objects/bastype.cxx8
-rw-r--r--idl/source/objects/module.cxx4
-rw-r--r--idl/source/objects/object.cxx4
-rw-r--r--idl/source/objects/slot.cxx6
-rw-r--r--idl/source/objects/types.cxx12
-rw-r--r--idl/source/prj/database.cxx8
-rw-r--r--include/tools/stream.hxx46
-rw-r--r--linguistic/source/dicimp.cxx10
-rw-r--r--lotuswordpro/source/filter/LotusWordProImportFilter.cxx14
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.cxx190
-rw-r--r--lotuswordpro/source/filter/lwpfilter.cxx2
-rw-r--r--lotuswordpro/source/filter/lwpsvstream.cxx12
-rw-r--r--sc/source/core/data/attrib.cxx16
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx4
-rw-r--r--sc/source/core/tool/autoform.cxx68
-rw-r--r--sc/source/core/tool/ddelink.cxx4
-rw-r--r--sc/source/core/tool/rechead.cxx8
-rw-r--r--sc/source/core/tool/zforauto.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/excel/xistream.cxx26
-rw-r--r--sc/source/filter/excel/xltoolbar.cxx8
-rw-r--r--sc/source/filter/lotus/filter.cxx12
-rw-r--r--sc/source/filter/lotus/lotread.cxx4
-rw-r--r--sc/source/filter/lotus/op.cxx56
-rw-r--r--sc/source/filter/qpro/biff.cxx2
-rw-r--r--sc/source/filter/qpro/qpro.cxx16
-rw-r--r--sc/source/filter/qpro/qproform.cxx16
-rw-r--r--sc/source/filter/starcalc/scflt.cxx404
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx2
-rw-r--r--sc/source/ui/unoobj/exceldetect.cxx2
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx10
-rw-r--r--sd/source/core/sdiocmpt.cxx4
-rw-r--r--sd/source/filter/eppt/eppt.cxx4
-rw-r--r--sd/source/filter/eppt/epptso.cxx14
-rw-r--r--sd/source/filter/html/pubdlg.cxx38
-rw-r--r--sd/source/filter/ppt/ppt97animations.cxx28
-rw-r--r--sd/source/filter/ppt/pptin.cxx74
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx98
-rw-r--r--sd/source/filter/ppt/propread.cxx46
-rw-r--r--sd/source/ui/dlg/morphdlg.cxx2
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx2
-rw-r--r--sd/source/ui/unoidl/sddetect.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx2
-rw-r--r--sfx2/source/doc/oleprops.cxx37
-rw-r--r--sfx2/source/doc/zoomitem.cxx2
-rw-r--r--sot/source/base/filelist.cxx4
-rw-r--r--sot/source/sdstor/stgelem.cxx78
-rw-r--r--sot/source/sdstor/stgole.cxx6
-rw-r--r--sot/source/sdstor/storinfo.cxx6
-rw-r--r--sot/source/sdstor/ucbstorage.cxx14
-rw-r--r--starmath/source/eqnolefilehdr.cxx2
-rw-r--r--starmath/source/mathtype.cxx70
-rw-r--r--svl/source/filerec/filerec.cxx16
-rw-r--r--svl/source/items/cenumitm.cxx4
-rw-r--r--svl/source/items/cintitem.cxx8
-rw-r--r--svl/source/items/cntwall.cxx4
-rw-r--r--svl/source/items/ctypeitm.cxx4
-rw-r--r--svl/source/items/intitem.cxx4
-rw-r--r--svl/source/items/itemset.cxx2
-rw-r--r--svl/source/items/lckbitem.cxx4
-rw-r--r--svl/source/items/macitem.cxx8
-rw-r--r--svl/source/items/poolio.cxx64
-rw-r--r--svl/source/items/rngitem.cxx12
-rw-r--r--svl/source/items/slstitm.cxx2
-rw-r--r--svl/source/items/visitem.cxx2
-rw-r--r--svl/source/numbers/numhead.cxx8
-rw-r--r--svl/source/numbers/zforlist.cxx12
-rw-r--r--svl/source/numbers/zformat.cxx24
-rw-r--r--svtools/source/graphic/grfattr.cxx8
-rw-r--r--svtools/source/graphic/grfmgr.cxx2
-rw-r--r--svtools/source/misc/imap.cxx14
-rw-r--r--svtools/source/misc/imap3.cxx2
-rw-r--r--svtools/source/misc/templatefoldercache.cxx20
-rw-r--r--svtools/source/misc/transfer.cxx14
-rw-r--r--svtools/source/svrtf/parrtf.cxx2
-rw-r--r--svtools/source/svrtf/svparser.cxx14
-rw-r--r--svtools/source/urlobj/inetimg.cxx8
-rw-r--r--svx/source/gallery2/codec.cxx4
-rw-r--r--svx/source/gallery2/galobj.cxx4
-rw-r--r--svx/source/gallery2/galtheme.cxx32
-rw-r--r--svx/source/items/algitem.cxx10
-rw-r--r--svx/source/items/chrtitem.cxx2
-rw-r--r--svx/source/items/e3ditem.cxx6
-rw-r--r--svx/source/items/grfitem.cxx2
-rw-r--r--svx/source/items/hlnkitem.cxx16
-rw-r--r--svx/source/items/pageitem.cxx6
-rw-r--r--svx/source/items/rotmodit.cxx2
-rw-r--r--svx/source/sidebar/nbdtmg.cxx6
-rw-r--r--svx/source/svdraw/svdattr.cxx10
-rw-r--r--svx/source/xml/xmleohlp.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx76
-rw-r--r--svx/source/xoutdev/xattr2.cxx12
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx6
-rw-r--r--svx/source/xoutdev/xexch.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx2
-rw-r--r--sw/source/core/doc/tblafmt.cxx76
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/dbg_lay.cxx2
-rw-r--r--sw/source/core/layout/laycache.cxx22
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par.cxx52
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx56
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx60
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx18
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx380
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx50
-rw-r--r--sw/source/ui/config/uinums.cxx52
-rw-r--r--toolkit/source/awt/vclxprinter.cxx2
-rw-r--r--tools/qa/cppunit/test_stream.cxx8
-rw-r--r--tools/source/generic/color.cxx10
-rw-r--r--tools/source/generic/fract.cxx4
-rw-r--r--tools/source/generic/gen.cxx4
-rw-r--r--tools/source/generic/poly.cxx6
-rw-r--r--tools/source/generic/poly2.cxx4
-rw-r--r--tools/source/inet/inetmsg.cxx10
-rw-r--r--tools/source/ref/globname.cxx6
-rw-r--r--tools/source/ref/pstm.cxx22
-rw-r--r--tools/source/stream/stream.cxx26
-rw-r--r--tools/source/stream/vcompat.cxx4
-rw-r--r--tools/source/zcodec/zcodec.cxx12
-rw-r--r--vcl/source/filter/graphicfilter.cxx6
-rw-r--r--vcl/source/filter/graphicfilter2.cxx182
-rw-r--r--vcl/source/filter/igif/gifread.cxx54
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx2
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx2
-rw-r--r--vcl/source/filter/jpeg/Exif.cxx10
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx6
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx226
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx2
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx158
-rw-r--r--vcl/source/filter/wmf/wmf.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx2
-rw-r--r--vcl/source/gdi/animate.cxx20
-rw-r--r--vcl/source/gdi/cvtsvm.cxx114
-rw-r--r--vcl/source/gdi/dibtools.cxx94
-rw-r--r--vcl/source/gdi/font.cxx42
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rw-r--r--vcl/source/gdi/gfxlink.cxx2
-rw-r--r--vcl/source/gdi/gradient.cxx10
-rw-r--r--vcl/source/gdi/graphictools.cxx30
-rw-r--r--vcl/source/gdi/hatch.cxx4
-rw-r--r--vcl/source/gdi/impgraph.cxx20
-rw-r--r--vcl/source/gdi/jobset.cxx4
-rw-r--r--vcl/source/gdi/lineinfo.cxx14
-rw-r--r--vcl/source/gdi/mapmod.cxx4
-rw-r--r--vcl/source/gdi/metaact.cxx76
-rw-r--r--vcl/source/gdi/pngread.cxx8
-rw-r--r--vcl/source/gdi/print.cxx4
-rw-r--r--vcl/source/gdi/region.cxx6
-rw-r--r--vcl/source/gdi/regionband.cxx12
-rw-r--r--vcl/source/gdi/wall.cxx4
-rw-r--r--writerfilter/source/filter/WriterFilterDetection.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx20
-rw-r--r--writerfilter/source/rtftok/rtflookahead.cxx2
-rw-r--r--writerfilter/source/rtftok/rtftokenizer.cxx10
213 files changed, 3129 insertions, 3074 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 5194385df519..eb1299947a31 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -707,14 +707,14 @@ sal_uLong CalcLineCount( SvStream& rStream )
char c;
rStream.Seek( 0 );
- rStream >> c;
+ rStream.ReadChar( c );
while ( !rStream.IsEof() )
{
if ( c == '\n' )
nLFs++;
else if ( c == '\r' )
nCRs++;
- rStream >> c;
+ rStream.ReadChar( c );
}
rStream.Seek( 0 );
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 7a22f786c771..620deb98e740 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -545,16 +545,16 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
sal_uInt16 nId;
sal_uInt16 nVer;
- rSStream >> nEndPos;
- rSStream >> nId;
- rSStream >> nVer;
+ rSStream.ReadUInt32( nEndPos );
+ rSStream.ReadUInt16( nId );
+ rSStream.ReadUInt16( nVer );
DBG_ASSERT( nId == LIBINFO_ID, "No BasicLibInfo?!" );
if( nId == LIBINFO_ID )
{
// Reload?
sal_Bool bDoLoad;
- rSStream >> bDoLoad;
+ rSStream.ReadUChar( bDoLoad );
pInfo->bDoLoad = bDoLoad;
// The name of the lib...
@@ -572,7 +572,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
if ( nVer >= 2 )
{
sal_Bool bReferenz;
- rSStream >> bReferenz;
+ rSStream.ReadUChar( bReferenz );
pInfo->IsReference() = bReferenz;
}
@@ -637,7 +637,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
// in an 6.0+ office. So also the old basic dialogs can be saved.
SotStorageStreamRef xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode );
mpImpl->mpManagerStream = new SvMemoryStream();
- *static_cast<SvStream*>(&xManagerStream) >> *mpImpl->mpManagerStream;
+ static_cast<SvStream*>(&xManagerStream)->ReadStream( *mpImpl->mpManagerStream );
SotStorageRef xBasicStorage = rStorage.OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, sal_False );
if( xBasicStorage.Is() && !xBasicStorage->GetError() )
@@ -650,7 +650,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
DBG_ASSERT( pInfo, "pInfo?!" );
SotStorageStreamRef xBasicStream = xBasicStorage->OpenSotStream( pInfo->GetLibName(), eStreamReadMode );
mpImpl->mppLibStreams[nL] = new SvMemoryStream();
- *static_cast<SvStream*>(&xBasicStream) >> *( mpImpl->mppLibStreams[nL] );
+ static_cast<SvStream*>(&xBasicStream)->ReadStream( *( mpImpl->mppLibStreams[nL] ) );
}
}
}
@@ -858,10 +858,10 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
xManagerStream->Seek( STREAM_SEEK_TO_BEGIN );
sal_uInt32 nEndPos;
- *xManagerStream >> nEndPos;
+ xManagerStream->ReadUInt32( nEndPos );
sal_uInt16 nLibs;
- *xManagerStream >> nLibs;
+ xManagerStream->ReadUInt16( nLibs );
// Plausibility!
if( nLibs & 0xF000 )
{
@@ -930,8 +930,8 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
xManagerStream->SetBufferSize( 1024 );
xManagerStream->Seek( STREAM_SEEK_TO_BEGIN );
sal_uInt32 nBasicStartOff, nBasicEndOff;
- *xManagerStream >> nBasicStartOff;
- *xManagerStream >> nBasicEndOff;
+ xManagerStream->ReadUInt32( nBasicStartOff );
+ xManagerStream->ReadUInt32( nBasicEndOff );
DBG_ASSERT( !xManagerStream->GetError(), "Invalid Manager-Stream!" );
@@ -1139,7 +1139,7 @@ sal_Bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurS
xBasicStream->SetCryptMaskKey(szCryptingKey);
xBasicStream->RefreshBuffer();
sal_uInt32 nPasswordMarker = 0;
- *xBasicStream >> nPasswordMarker;
+ xBasicStream->ReadUInt32( nPasswordMarker );
if ( ( nPasswordMarker == PASSWORD_MARKER ) && !xBasicStream->IsEof() )
{
OUString aPassword = xBasicStream->ReadUniOrByteString(
@@ -1159,7 +1159,7 @@ sal_Bool BasicManager::ImplEncryptStream( SvStream& rStrm ) const
{
sal_uIntPtr nPos = rStrm.Tell();
sal_uInt32 nCreator;
- rStrm >> nCreator;
+ rStrm.ReadUInt32( nCreator );
rStrm.Seek( nPos );
sal_Bool bProtected = sal_False;
if ( nCreator != SBXCR_SBX )
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 2cf81ae6e3b3..cea14ddcd0fd 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -111,7 +111,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
Clear();
// Read Master-Record
- r >> nSign >> nLen >> nCount;
+ r.ReadUInt16( nSign ).ReadUInt32( nLen ).ReadUInt16( nCount );
sal_uIntPtr nLast = r.Tell() + nLen;
sal_uInt32 nCharSet; // System charset
sal_uInt32 lDimBase;
@@ -121,8 +121,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
bool bBadVer = false;
if( nSign == B_MODULE )
{
- r >> nVersion >> nCharSet >> lDimBase
- >> nFlags >> nReserved1 >> nReserved2 >> nReserved3;
+ r.ReadUInt32( nVersion ).ReadUInt32( nCharSet ).ReadUInt32( lDimBase )
+ .ReadUInt16( nFlags ).ReadUInt16( nReserved1 ).ReadUInt32( nReserved2 ).ReadUInt32( nReserved3 );
eCharSet = nCharSet;
eCharSet = GetSOLoadTextEncoding( eCharSet );
bBadVer = ( nVersion > B_CURVERSION );
@@ -135,7 +135,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
while( ( nNext = r.Tell() ) < nLast )
{
- r >> nSign >> nLen >> nCount;
+ r.ReadUInt16( nSign ).ReadUInt32( nLen ).ReadUInt16( nCount );
nNext += nLen + 8;
if( r.GetError() == SVSTREAM_OK )
{
@@ -196,10 +196,10 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
short i;
for( i = 0; i < nStrings && SbiGood( r ); i++ )
{
- r >> nOff;
+ r.ReadUInt32( nOff );
pStringOff[ i ] = (sal_uInt16) nOff;
}
- r >> nLen;
+ r.ReadUInt32( nLen );
if( SbiGood( r ) )
{
delete [] pStrings;
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 869db65846bb..bb9569b2e2bf 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1889,7 +1889,7 @@ sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
sal_uInt16 nMod;
pModules->Clear();
- r >> nMod;
+ r.ReadUInt16( nMod );
for( sal_uInt16 i = 0; i < nMod; i++ )
{
SbxBase* pBase = SbxBase::Load( r );
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index a75922bdc262..0e90a256d4f5 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1668,7 +1668,7 @@ sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
// As a precaution...
SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
sal_uInt8 bImage;
- rStrm >> bImage;
+ rStrm.ReadUChar( bImage );
if( bImage )
{
SbiImage* p = new SbiImage;
@@ -2076,10 +2076,10 @@ sal_Bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if( !SbxMethod::LoadData( rStrm, 1 ) )
return sal_False;
sal_Int16 n;
- rStrm >> n;
+ rStrm.ReadInt16( n );
sal_Int16 nTempStart = (sal_Int16)nStart;
if( nVer == 2 )
- rStrm >> nLine1 >> nLine2 >> nTempStart >> bInvalid;
+ rStrm.ReadUInt16( nLine1 ).ReadUInt16( nLine2 ).ReadInt16( nTempStart ).ReadUChar( bInvalid );
// HACK ue to 'Referenz could not be saved'
SetFlag( SBX_NO_MODIFY );
nStart = nTempStart;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index aeb5000d68ac..9f74c798efb2 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3320,7 +3320,7 @@ RTLFUNC(EOF)
if ( pSbStrm->IsText() )
{
char cBla;
- (*pSvStrm) >> cBla; // can we read another character?
+ (*pSvStrm).ReadChar( cBla ); // can we read another character?
bIsEof = pSvStrm->IsEof();
if ( !bIsEof )
{
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index af6ae3deda5e..efbd2da6f1a0 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1097,7 +1097,7 @@ static sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
if( bIsVariant )
{
sal_uInt16 nTemp;
- *pStrm >> nTemp;
+ pStrm->ReadUInt16( nTemp );
eSrcType = (SbxDataType)nTemp;
}
@@ -1108,7 +1108,7 @@ static sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxBYTE:
{
sal_uInt8 aByte;
- *pStrm >> aByte;
+ pStrm->ReadUChar( aByte );
if( bBinary && SbiRuntime::isVBAEnabled() && aByte == 1 && pStrm->IsEof() )
{
@@ -1127,7 +1127,7 @@ static sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxUINT:
{
sal_Int16 aInt;
- *pStrm >> aInt;
+ pStrm->ReadInt16( aInt );
rVar.PutInteger( aInt );
}
break;
@@ -1136,7 +1136,7 @@ static sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxULONG:
{
sal_Int32 aInt;
- *pStrm >> aInt;
+ pStrm->ReadInt32( aInt );
rVar.PutLong( aInt );
}
break;
@@ -1144,14 +1144,14 @@ static sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxSALUINT64:
{
sal_uInt32 aInt;
- *pStrm >> aInt;
+ pStrm->ReadUInt32( aInt );
rVar.PutInt64( (sal_Int64)aInt );
}
break;
case SbxSINGLE:
{
float nS;
- *pStrm >> nS;
+ pStrm->ReadFloat( nS );
rVar.PutSingle( nS );
}
break;
@@ -1159,14 +1159,14 @@ static sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxDOUBLE:
case SbxCURRENCY:
{
- *pStrm >> aDouble;
+ pStrm->ReadDouble( aDouble );
rVar.PutDouble( aDouble );
}
break;
case SbxDATE:
{
- *pStrm >> aDouble;
+ pStrm->ReadDouble( aDouble );
rVar.PutDate( aDouble );
}
break;
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index a25e46e24f3b..ab65a28b1a38 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -530,12 +530,12 @@ sal_Bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool bRes = sal_True;
sal_uInt16 f = nFlags;
nFlags |= SBX_WRITE;
- rStrm >> nElem;
+ rStrm.ReadUInt16( nElem );
nElem &= 0x7FFF;
for( sal_uInt32 n = 0; n < nElem; n++ )
{
sal_uInt16 nIdx;
- rStrm >> nIdx;
+ rStrm.ReadUInt16( nIdx );
SbxVariable* pVar = (SbxVariable*) Load( rStrm );
if( pVar )
{
@@ -818,11 +818,11 @@ SbxVariable* SbxDimArray::Get( SbxArray* pPar )
sal_Bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
short nDimension;
- rStrm >> nDimension;
+ rStrm.ReadInt16( nDimension );
for( short i = 0; i < nDimension && rStrm.GetError() == SVSTREAM_OK; i++ )
{
sal_Int16 lb, ub;
- rStrm >> lb >> ub;
+ rStrm.ReadInt16( lb ).ReadInt16( ub );
AddDim( lb, ub );
}
return SbxArray::LoadData( rStrm, nVer );
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 376da5467ae3..bf73df07ec35 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -216,14 +216,14 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
{
sal_uInt16 nSbxId, nFlags, nVer;
sal_uInt32 nCreator, nSize;
- rStrm >> nCreator >> nSbxId >> nFlags >> nVer;
+ rStrm.ReadUInt32( nCreator ).ReadUInt16( nSbxId ).ReadUInt16( nFlags ).ReadUInt16( nVer );
// Correcting a foolishness of mine:
if( nFlags & SBX_RESERVED )
nFlags = ( nFlags & ~SBX_RESERVED ) | SBX_GBLSEARCH;
sal_uIntPtr nOldPos = rStrm.Tell();
- rStrm >> nSize;
+ rStrm.ReadUInt32( nSize );
SbxBase* p = Create( nSbxId, nCreator );
if( p )
{
@@ -260,10 +260,10 @@ void SbxBase::Skip( SvStream& rStrm )
{
sal_uInt16 nSbxId, nFlags, nVer;
sal_uInt32 nCreator, nSize;
- rStrm >> nCreator >> nSbxId >> nFlags >> nVer;
+ rStrm.ReadUInt32( nCreator ).ReadUInt16( nSbxId ).ReadUInt16( nFlags ).ReadUInt16( nVer );
sal_uIntPtr nStartPos = rStrm.Tell();
- rStrm >> nSize;
+ rStrm.ReadUInt32( nSize );
rStrm.Seek( nStartPos + nSize );
}
@@ -372,16 +372,16 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
RTL_TEXTENCODING_ASCII_US);
aHelpFile = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
- rStrm >> nHelpId >> nParam;
+ rStrm.ReadUInt32( nHelpId ).ReadUInt16( nParam );
while( nParam-- )
{
sal_uInt16 nType, nFlags;
sal_uInt32 nUserData = 0;
OUString aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
- rStrm >> nType >> nFlags;
+ rStrm.ReadUInt16( nType ).ReadUInt16( nFlags );
if( nVer > 1 )
- rStrm >> nUserData;
+ rStrm.ReadUInt32( nUserData );
AddParam( aName, (SbxDataType) nType, nFlags );
SbxParamInfo& p(aParams.back());
p.nUserData = nUserData;
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 741735b32186..7c40c7868b4f 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -304,7 +304,7 @@ sal_Bool SbxStdCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
aElemClass = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
- rStrm >> bAddRemoveOk;
+ rStrm.ReadUChar( bAddRemoveOk );
}
return bRes;
}
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 4b6c7dbcff5e..7095294d5abb 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -638,7 +638,7 @@ sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
aClassName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm, RTL_TEXTENCODING_ASCII_US);
aDfltProp = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm, RTL_TEXTENCODING_ASCII_US);
sal_uIntPtr nPos = rStrm.Tell();
- rStrm >> nSize;
+ rStrm.ReadUInt32( nSize );
if( !LoadPrivateData( rStrm, nVer ) )
{
return sal_False;
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 3cdaeb588e20..25c3d652b7eb 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1408,15 +1408,15 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
// more than likely this is functionality used in the binfilter alone
SbxValue::Clear();
sal_uInt16 nType;
- r >> nType;
+ r.ReadUInt16( nType );
aData.eType = SbxDataType( nType );
switch( nType )
{
case SbxBOOL:
case SbxINTEGER:
- r >> aData.nInteger; break;
+ r.ReadInt16( aData.nInteger ); break;
case SbxLONG:
- r >> aData.nLong; break;
+ r.ReadInt32( aData.nLong ); break;
case SbxSINGLE:
{
// Floats as ASCII
@@ -1451,13 +1451,13 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
r.ReadInt64(aData.nInt64);
break;
case SbxSALUINT64:
- r >> aData.uInt64;
+ r.ReadUInt64( aData.uInt64 );
break;
case SbxCURRENCY:
{
sal_uInt32 tmpHi = 0;
sal_uInt32 tmpLo = 0;
- r >> tmpHi >> tmpLo;
+ r.ReadUInt32( tmpHi ).ReadUInt32( tmpLo );
aData.nInt64 = ((sal_Int64)tmpHi << 32);
aData.nInt64 |= (sal_Int64)tmpLo;
break;
@@ -1474,11 +1474,11 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
}
case SbxERROR:
case SbxUSHORT:
- r >> aData.nUShort; break;
+ r.ReadUInt16( aData.nUShort ); break;
case SbxOBJECT:
{
sal_uInt8 nMode;
- r >> nMode;
+ r.ReadUChar( nMode );
switch( nMode )
{
case 0:
@@ -1496,24 +1496,24 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxCHAR:
{
char c;
- r >> c;
+ r.ReadChar( c );
aData.nChar = c;
break;
}
case SbxBYTE:
- r >> aData.nByte; break;
+ r.ReadUChar( aData.nByte ); break;
case SbxULONG:
- r >> aData.nULong; break;
+ r.ReadUInt32( aData.nULong ); break;
case SbxINT:
{
sal_uInt8 n;
- r >> n;
+ r.ReadUChar( n );
// Match the Int on this system?
if( n > SAL_TYPES_SIZEOFINT )
- r >> aData.nLong, aData.eType = SbxLONG;
+ r.ReadInt32( aData.nLong ), aData.eType = SbxLONG;
else {
sal_Int32 nInt;
- r >> nInt;
+ r.ReadInt32( nInt );
aData.nInt = nInt;
}
break;
@@ -1521,13 +1521,13 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxUINT:
{
sal_uInt8 n;
- r >> n;
+ r.ReadUChar( n );
// Match the UInt on this system?
if( n > SAL_TYPES_SIZEOFINT )
- r >> aData.nULong, aData.eType = SbxULONG;
+ r.ReadUInt32( aData.nULong ), aData.eType = SbxULONG;
else {
sal_uInt32 nUInt;
- r >> nUInt;
+ r.ReadUInt32( nUInt );
aData.nUInt = nUInt;
}
break;
@@ -1537,7 +1537,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxVOID:
break;
case SbxDATAOBJECT:
- r >> aData.nLong;
+ r.ReadInt32( aData.nLong );
break;
// #78919 For backwards compatibility
case SbxWSTRING:
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index d621d662706f..bc60b86549f6 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -505,7 +505,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
sal_uInt16 nType;
sal_uInt8 cMark;
- rStrm >> cMark;
+ rStrm.ReadUChar( cMark );
if( cMark == 0xFF )
{
if( !SbxValue::LoadData( rStrm, nVer ) )
@@ -515,17 +515,17 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
maName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
sal_uInt32 nTemp;
- rStrm >> nTemp;
+ rStrm.ReadUInt32( nTemp );
nUserData = nTemp;
}
else
{
rStrm.SeekRel( -1L );
- rStrm >> nType;
+ rStrm.ReadUInt16( nType );
maName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
sal_uInt32 nTemp;
- rStrm >> nTemp;
+ rStrm.ReadUInt32( nTemp );
nUserData = nTemp;
// correction: old methods have instead of SbxNULL now SbxEMPTY
if( nType == SbxNULL && GetClass() == SbxCLASS_METHOD )
@@ -542,9 +542,9 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
case SbxBOOL:
case SbxERROR:
case SbxINTEGER:
- rStrm >> aTmp.nInteger; break;
+ rStrm.ReadInt16( aTmp.nInteger ); break;
case SbxLONG:
- rStrm >> aTmp.nLong; break;
+ rStrm.ReadInt32( aTmp.nLong ); break;
case SbxSINGLE:
{
// Floats as ASCII
@@ -592,7 +592,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
return sal_False;
}
}
- rStrm >> cMark;
+ rStrm.ReadUChar( cMark );
// cMark is also a version number!
// 1: initial version
// 2: with nUserData
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index e6dceb8a9084..6288d3d3f74e 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -154,7 +154,7 @@ xmlDocPtr Chart2ExportTest::parseExport(const OUString& rDir, const OUString& rF
char ch;
for (sal_Size i = 0; i < nSize; ++i)
{
- *pStream >> ch;
+ pStream->ReadChar( ch );
aDocument.append(ch);
}
diff --git a/compilerplugins/clang/svstreamoutputoperators.cxx b/compilerplugins/clang/svstreamoutputoperators.cxx
index 442779713059..9cdc4b278c30 100644
--- a/compilerplugins/clang/svstreamoutputoperators.cxx
+++ b/compilerplugins/clang/svstreamoutputoperators.cxx
@@ -66,59 +66,103 @@ bool SvStreamOutputOperators::VisitCallExpr( const CallExpr* callExpr )
if( func->getNumParams() != 1 )
return true;
string qualifiedName = func->getQualifiedNameAsString();
- if( qualifiedName != "SvStream::operator<<" )
+ bool bOutputOperator;
+ if( qualifiedName == "SvStream::operator<<" )
+ bOutputOperator = true;
+ else if( qualifiedName == "SvStream::operator>>" )
+ bOutputOperator = false;
+ else
return true;
string arg0 = func->getParamDecl( 0 )->getType().getAsString();
- string newWriteMethod;
- if( arg0 == "sal_uInt16" )
- newWriteMethod = "WriteUInt16";
- else if( arg0 == "sal_uInt32" )
- newWriteMethod = "WriteUInt32";
- else if( arg0 == "sal_uInt64" )
- newWriteMethod = "WriteUInt64";
- else if( arg0 == "sal_Int16" )
- newWriteMethod = "WriteInt16";
- else if( arg0 == "sal_Int32" )
- newWriteMethod = "WriteInt32";
- else if( arg0 == "sal_Int64" )
- newWriteMethod = "WriteInt64";
- else if( arg0 == "sal_uInt8" )
- newWriteMethod = "WriteUInt8";
- else if( arg0 == "sal_Unicode" )
- newWriteMethod = "WriteUnicode";
- else if( arg0 == "rtl::OString" )
- newWriteMethod = "WriteOString";
- else if( arg0 == "bool" )
- newWriteMethod = "WriteBool";
- else if( arg0 == "signed char" )
- newWriteMethod = "WriteSChar";
- else if( arg0 == "char" )
- newWriteMethod = "WriteChar";
- else if( arg0 == "unsigned char" )
- newWriteMethod = "WriteUChar";
- else if( arg0 == "float" )
- newWriteMethod = "WriteFloat";
- else if( arg0 == "double" )
- newWriteMethod = "WriteDouble";
- else if( arg0 == "const double &" )
- newWriteMethod = "WriteDouble";
- else if( arg0 == "const char *" )
- newWriteMethod = "WriteCharPtr";
- else if( arg0 == "char *" )
- newWriteMethod = "WriteCharPtr";
- else if( arg0 == "const unsigned char *" )
- newWriteMethod = "WriteUCharPtr";
- else if( arg0 == "unsigned char *" )
- newWriteMethod = "WriteUCharPtr";
- else if( arg0 == "class SvStream &" )
- newWriteMethod = "WriteStream";
+ string newIOMethod;
+ if (bOutputOperator)
+ {
+ if( arg0 == "sal_uInt16" )
+ newIOMethod = "WriteUInt16";
+ else if( arg0 == "sal_uInt32" )
+ newIOMethod = "WriteUInt32";
+ else if( arg0 == "sal_uInt64" )
+ newIOMethod = "WriteUInt64";
+ else if( arg0 == "sal_Int16" )
+ newIOMethod = "WriteInt16";
+ else if( arg0 == "sal_Int32" )
+ newIOMethod = "WriteInt32";
+ else if( arg0 == "sal_Int64" )
+ newIOMethod = "WriteInt64";
+ else if( arg0 == "sal_uInt8" )
+ newIOMethod = "WriteUInt8";
+ else if( arg0 == "sal_Unicode" )
+ newIOMethod = "WriteUnicode";
+ else if( arg0 == "rtl::OString" )
+ newIOMethod = "WriteOString";
+ else if( arg0 == "bool" )
+ newIOMethod = "WriteBool";
+ else if( arg0 == "signed char" )
+ newIOMethod = "WriteSChar";
+ else if( arg0 == "char" )
+ newIOMethod = "WriteChar";
+ else if( arg0 == "unsigned char" )
+ newIOMethod = "WriteUChar";
+ else if( arg0 == "float" )
+ newIOMethod = "WriteFloat";
+ else if( arg0 == "double" )
+ newIOMethod = "WriteDouble";
+ else if( arg0 == "const double &" )
+ newIOMethod = "WriteDouble";
+ else if( arg0 == "const char *" )
+ newIOMethod = "WriteCharPtr";
+ else if( arg0 == "char *" )
+ newIOMethod = "WriteCharPtr";
+ else if( arg0 == "const unsigned char *" )
+ newIOMethod = "WriteUCharPtr";
+ else if( arg0 == "unsigned char *" )
+ newIOMethod = "WriteUCharPtr";
+ else if( arg0 == "class SvStream &" )
+ newIOMethod = "WriteStream";
+ else
+ {
+ report( DiagnosticsEngine::Warning,
+ "found call to operator<< that I cannot convert with type: " + arg0,
+ callExpr->getLocStart());
+ return true;
+ }
+ }
else
{
- report( DiagnosticsEngine::Warning,
- "found call to operator<< that I cannot convert with type: " + arg0,
- callExpr->getLocStart());
- return true;
+ if( arg0 == "sal_uInt16 &" )
+ newIOMethod = "ReadUInt16";
+ else if( arg0 == "sal_uInt32 &" )
+ newIOMethod = "ReadUInt32";
+ else if( arg0 == "sal_uInt64 &" )
+ newIOMethod = "ReadUInt64";
+ else if( arg0 == "sal_Int16 &" )
+ newIOMethod = "ReadInt16";
+ else if( arg0 == "sal_Int32 &" )
+ newIOMethod = "ReadInt32";
+ else if( arg0 == "sal_Int64 &" )
+ newIOMethod = "ReadInt64";
+ else if( arg0 == "sal_uInt8 &" )
+ newIOMethod = "ReadUInt8";
+ else if( arg0 == "signed char &" )
+ newIOMethod = "ReadSChar";
+ else if( arg0 == "char &" )
+ newIOMethod = "ReadChar";
+ else if( arg0 == "unsigned char &" )
+ newIOMethod = "ReadUChar";
+ else if( arg0 == "float &" )
+ newIOMethod = "ReadFloat";
+ else if( arg0 == "double &" )
+ newIOMethod = "ReadDouble";
+ else if( arg0 == "class SvStream &" )
+ newIOMethod = "ReadStream";
+ else
+ {
+ report( DiagnosticsEngine::Warning,
+ "found call to operator>> that I cannot convert with type: " + arg0,
+ callExpr->getLocStart());
+ return true;
+ }
}
// CallExpr overrides the children() method from Stmt, but not the const variant of it, so we need to cast const away.
@@ -141,7 +185,7 @@ bool SvStreamOutputOperators::VisitCallExpr( const CallExpr* callExpr )
return true;
}
- if( !insertTextBefore( callExpr->getArg( 1 )->getLocStart(), newWriteMethod + "( " ) )
+ if( !insertTextBefore( callExpr->getArg( 1 )->getLocStart(), newIOMethod + "( " ) )
return true;
if( !insertTextAfter( after( callExpr->getLocEnd() ), " )" ) )
return true;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 2970cb51bd8a..3705e3302b26 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -85,7 +85,7 @@ sal_Int32 lcl_getFileSize(SvStream& _rStream)
_rStream.Seek(STREAM_SEEK_TO_END);
_rStream.SeekRel(-1);
char cEOL;
- _rStream >> cEOL;
+ _rStream.ReadChar( cEOL );
nFileSize = _rStream.Tell();
if ( cEOL == DBF_EOL )
nFileSize -= 1;
@@ -200,20 +200,20 @@ void ODbaseTable::readHeader()
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
sal_uInt8 nType=0;
- (*m_pFileStream) >> nType;
+ (*m_pFileStream).ReadUChar( nType );
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(sal_uInt8));
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
- (*m_pFileStream) >> m_aHeader.db_anz;
+ (*m_pFileStream).ReadUInt32( m_aHeader.db_anz );
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
- (*m_pFileStream) >> m_aHeader.db_kopf;
+ (*m_pFileStream).ReadUInt16( m_aHeader.db_kopf );
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
- (*m_pFileStream) >> m_aHeader.db_slng;
+ (*m_pFileStream).ReadUInt16( m_aHeader.db_slng );
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(sal_uInt8));
@@ -562,14 +562,14 @@ sal_Bool ODbaseTable::ReadMemoHeader()
m_pMemoStream->RefreshBuffer(); // make sure that the header information is actually read again
m_pMemoStream->Seek(0L);
- (*m_pMemoStream) >> m_aMemoHeader.db_next;
+ (*m_pMemoStream).ReadUInt32( m_aMemoHeader.db_next );
switch (m_aHeader.db_typ)
{
case dBaseIIIMemo: // dBase III: fixed block size
case dBaseIVMemo:
// sometimes dBase3 is attached to dBase4 memo
m_pMemoStream->Seek(20L);
- (*m_pMemoStream) >> m_aMemoHeader.db_size;
+ (*m_pMemoStream).ReadUInt16( m_aMemoHeader.db_size );
if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size != 512) // 1 is also for dBase 3
m_aMemoHeader.db_typ = MemodBaseIV;
else if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size == 512)
@@ -596,7 +596,7 @@ sal_Bool ODbaseTable::ReadMemoHeader()
m_aMemoHeader.db_typ = MemoFoxPro;
m_pMemoStream->Seek(6L);
m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN);
- (*m_pMemoStream) >> m_aMemoHeader.db_size;
+ (*m_pMemoStream).ReadUInt16( m_aMemoHeader.db_size );
break;
default:
SAL_WARN( "connectivity.drivers", "ODbaseTable::ReadMemoHeader: unsupported memo type!" );
@@ -2716,7 +2716,7 @@ sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable)
}
sal_uInt32 nLength(0);
- (*m_pMemoStream) >> nLength;
+ (*m_pMemoStream).ReadUInt32( nLength );
if (m_aMemoHeader.db_typ == MemodBaseIV)
nLength -= 8;
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index b795ea869098..7e519fc27837 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -654,12 +654,12 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage)
//------------------------------------------------------------------
void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex)
{
- rStream >> aKey.nRecord; // key
+ rStream.ReadUInt32( aKey.nRecord ); // key
if (rIndex.getHeader().db_keytype)
{
double aDbl;
- rStream >> aDbl;
+ rStream.ReadDouble( aDbl );
aKey = ONDXKey(aDbl,aKey.nRecord);
}
else
@@ -787,7 +787,7 @@ const ORowSetValue& ONDXKey::getValue() const
// -----------------------------------------------------------------------------
SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPagePtr& rPage)
{
- rStream >> rPage.nPagePos;
+ rStream.ReadUInt32( rPage.nPagePos );
return rStream;
}
// -----------------------------------------------------------------------------
@@ -836,7 +836,7 @@ static sal_uInt32 nValue;
SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
{
rStream.Seek(rPage.GetPagePos() * DINDEX_PAGE_SIZE);
- rStream >> nValue >> rPage.aChild;
+ rStream.ReadUInt32( nValue ) >> rPage.aChild;
rPage.nCount = sal_uInt16(nValue);
for (sal_uInt16 i = 0; i < rPage.nCount; i++)
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 48e0cd36dd96..1978f3ed6a6f 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -170,13 +170,13 @@ namespace cppcanvas
// EMFPlusPoint: stored in signed short 16bit integer format
sal_Int16 x, y;
- s >> x >> y;
+ s.ReadInt16( x ).ReadInt16( y );
SAL_INFO ("cppcanvas.emf", "EMF+\tEMFPlusPoint [x,y]: " << x << "," << y);
pPoints [i*2] = x;
pPoints [i*2 + 1] = y;
} else if (!(pathFlags & 0xC000)) {
// EMFPlusPointF: stored in Single (float) format
- s >> pPoints [i*2] >> pPoints [i*2 + 1];
+ s.ReadFloat( pPoints [i*2] ).ReadFloat( pPoints [i*2 + 1] );
SAL_INFO ("cppcanvas.emf", "EMF+\tEMFPlusPointF [x,y]: " << pPoints [i*2] << "," << pPoints [i*2 + 1]);
} else { //if (pathFlags & 0x8000)
// EMFPlusPointR: points are stored in EMFPlusInteger7 or
@@ -188,7 +188,7 @@ namespace cppcanvas
if (pPointTypes)
for (int i = 0; i < nPoints; i ++) {
- s >> pPointTypes [i];
+ s.ReadUChar( pPointTypes [i] );
SAL_INFO ("cppcanvas.emf", "EMF+\tpoint type: " << (int)pPointTypes [i]);
}
@@ -314,7 +314,7 @@ namespace cppcanvas
{
sal_uInt32 header;
- s >> header >> parts;
+ s.ReadUInt32( header ).ReadInt32( parts );
SAL_INFO ("cppcanvas.emf", "EMF+\tregion");
SAL_INFO ("cppcanvas.emf", "EMF+\theader: 0x" << std::hex << header << " parts: " << parts << std::dec );
@@ -326,12 +326,12 @@ namespace cppcanvas
combineMode = new sal_Int32 [parts];
for (int i = 0; i < parts; i ++) {
- s >> combineMode [i];
+ s.ReadInt32( combineMode [i] );
SAL_INFO ("cppcanvas.emf", "EMF+\tcombine mode [" << i << "]: 0x" << std::hex << combineMode [i] << std::dec);
}
}
- s >> initialState;
+ s.ReadInt32( initialState );
SAL_INFO ("cppcanvas.emf", "EMF+\tinitial state: 0x" << std::hex << initialState << std::dec);
}
};
@@ -400,7 +400,7 @@ namespace cppcanvas
{
sal_uInt32 header;
- s >> header >> type;
+ s.ReadUInt32( header ).ReadUInt32( type );
SAL_INFO ("cppcanvas.emf", "EMF+\tbrush");
SAL_INFO ("cppcanvas.emf", "EMF+\theader: 0x" << std::hex << header << " type: " << type << std::dec);
@@ -410,7 +410,7 @@ namespace cppcanvas
{
sal_uInt32 color;
- s >> color;
+ s.ReadUInt32( color );
solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
SAL_INFO ("cppcanvas.emf", "EMF+\tsolid color: 0x" << std::hex << color << std::dec);
@@ -419,20 +419,20 @@ namespace cppcanvas
// path gradient
case 3:
{
- s >> additionalFlags >> wrapMode;
+ s.ReadUInt32( additionalFlags ).ReadInt32( wrapMode );
SAL_INFO ("cppcanvas.emf", "EMF+\tpath gradient, additional flags: 0x" << std::hex << additionalFlags << std::dec);
sal_uInt32 color;
- s >> color;
+ s.ReadUInt32( color );
solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
SAL_INFO("cppcanvas.emf", "EMF+\tcenter color: 0x" << std::hex << color << std::dec);
- s >> areaX >> areaY;
+ s.ReadFloat( areaX ).ReadFloat( areaY );
SAL_INFO("cppcanvas.emf", "EMF+\tcenter point: " << areaX << "," << areaY);
- s >> surroundColorsNumber;
+ s.ReadInt32( surroundColorsNumber );
SAL_INFO("cppcanvas.emf", "EMF+\tsurround colors: " << surroundColorsNumber);
if( surroundColorsNumber<0 || sal_uInt32(surroundColorsNumber)>SAL_MAX_INT32/sizeof(::Color) )
@@ -440,7 +440,7 @@ namespace cppcanvas
surroundColors = new ::Color [surroundColorsNumber];
for (int i = 0; i < surroundColorsNumber; i++) {
- s >> color;
+ s.ReadUInt32( color );
surroundColors[i] = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
if (i == 0)
secondColor = surroundColors [0];
@@ -450,7 +450,7 @@ namespace cppcanvas
if (additionalFlags & 0x01) {
sal_Int32 pathLength;
- s >> pathLength;
+ s.ReadInt32( pathLength );
SAL_INFO("cppcanvas.emf", "EMF+\tpath length: " << pathLength);
sal_uInt32 pos = s.Tell ();
@@ -460,7 +460,7 @@ namespace cppcanvas
sal_uInt32 pathHeader;
sal_Int32 pathPoints, pathFlags;
- s >> pathHeader >> pathPoints >> pathFlags;
+ s.ReadUInt32( pathHeader ).ReadInt32( pathPoints ).ReadInt32( pathFlags );
SAL_INFO("cppcanvas.emf", "EMF+\tpath (brush path gradient)");
SAL_INFO("cppcanvas.emf", "EMF+\theader: 0x" << std::hex << pathHeader << " points: " << std::dec << pathPoints << " additional flags: 0x" << std::hex << pathFlags << std::dec );
@@ -488,24 +488,24 @@ namespace cppcanvas
}
if (additionalFlags & 0x08) {
- s >> blendPoints;
+ s.ReadInt32( blendPoints );
SAL_INFO("cppcanvas.emf", "EMF+\tuse blend, points: " << blendPoints);
if( blendPoints<0 || sal_uInt32(blendPoints)>SAL_MAX_INT32/(2*sizeof(float)) )
blendPoints = SAL_MAX_INT32/(2*sizeof(float));
blendPositions = new float [2*blendPoints];
blendFactors = blendPositions + blendPoints;
for (int i=0; i < blendPoints; i ++) {
- s >> blendPositions [i];
+ s.ReadFloat( blendPositions [i] );
SAL_INFO("cppcanvas.emf", "EMF+\tposition[" << i << "]: " << blendPositions [i]);
}
for (int i=0; i < blendPoints; i ++) {
- s >> blendFactors [i];
+ s.ReadFloat( blendFactors [i] );
SAL_INFO("cppcanvas.emf", "EMF+\tfactor[" << i << "]: " << blendFactors [i]);
}
}
if (additionalFlags & 0x04) {
- s >> colorblendPoints;
+ s.ReadInt32( colorblendPoints );
SAL_INFO("cppcanvas.emf", "EMF+\tuse color blend, points: " << colorblendPoints);
if( colorblendPoints<0 || sal_uInt32(colorblendPoints)>SAL_MAX_INT32/sizeof(float) )
colorblendPoints = SAL_MAX_INT32/sizeof(float);
@@ -514,11 +514,11 @@ namespace cppcanvas
colorblendPositions = new float [colorblendPoints];
colorblendColors = new ::Color [colorblendPoints];
for (int i=0; i < colorblendPoints; i ++) {
- s >> colorblendPositions [i];
+ s.ReadFloat( colorblendPositions [i] );
SAL_INFO("cppcanvas.emf", "EMF+\tposition[" << i << "]: " << colorblendPositions [i]);
}
for (int i=0; i < colorblendPoints; i ++) {
- s >> color;
+ s.ReadUInt32( color );
colorblendColors [i] = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
SAL_INFO("cppcanvas.emf", "EMF+\tcolor[" << i << "]: 0x" << std::hex << color << std::dec);
}
@@ -533,27 +533,27 @@ namespace cppcanvas
// linear gradient
case 4:
{
- s >> additionalFlags >> wrapMode;
+ s.ReadUInt32( additionalFlags ).ReadInt32( wrapMode );
SAL_INFO("cppcanvas.emf", "EMF+\tlinear gradient, additional flags: 0x" << std::hex << additionalFlags << std::dec);
- s >> areaX >> areaY >> areaWidth >> areaHeight;
+ s.ReadFloat( areaX ).ReadFloat( areaY ).ReadFloat( areaWidth ).ReadFloat( areaHeight );
SAL_INFO("cppcanvas.emf", "EMF+\tarea: " << areaX << "," << areaY << " - " << areaWidth << "x" << areaHeight);
sal_uInt32 color;
- s >> color;
+ s.ReadUInt32( color );
solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
SAL_INFO("cppcanvas.emf", "EMF+\tfirst color: 0x" << std::hex << color << std::dec);
- s >> color;
+ s.ReadUInt32( color );
secondColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
SAL_INFO("cppcanvas.emf", "EMF+\tsecond color: 0x" << std::hex << color << std::dec);
// repeated colors, unknown meaning, see http://www.aces.uiuc.edu/~jhtodd/Metafile/MetafileRecords/ObjectBrush.html
- s >> color;
- s >> color;
+ s.ReadUInt32( color );
+ s.ReadUInt32( color );
if (additionalFlags & 0x02) {
SAL_INFO("cppcanvas.emf", "EMF+\tuse transformation");
@@ -565,24 +565,24 @@ namespace cppcanvas
"\nEMF+\tdx: " << transformation.eDx << " dy: " << transformation.eDy);
}
if (additionalFlags & 0x08) {
- s >> blendPoints;
+ s.ReadInt32( blendPoints );
SAL_INFO("cppcanvas.emf", "EMF+\tuse blend, points: " << blendPoints);
if( blendPoints<0 || sal_uInt32(blendPoints)>SAL_MAX_INT32/(2*sizeof(float)) )
blendPoints = SAL_MAX_INT32/(2*sizeof(float));
blendPositions = new float [2*blendPoints];
blendFactors = blendPositions + blendPoints;
for (int i=0; i < blendPoints; i ++) {
- s >> blendPositions [i];
+ s.ReadFloat( blendPositions [i] );
SAL_INFO("cppcanvas.emf", "EMF+\tposition[" << i << "]: " << blendPositions [i]);
}
for (int i=0; i < blendPoints; i ++) {
- s >> blendFactors [i];
+ s.ReadFloat( blendFactors [i] );
SAL_INFO("cppcanvas.emf", "EMF+\tfactor[" << i << "]: " << blendFactors [i]);
}
}
if (additionalFlags & 0x04) {
- s >> colorblendPoints;
+ s.ReadInt32( colorblendPoints );
SAL_INFO("cppcanvas.emf", "EMF+\tuse color blend, points: " << colorblendPoints);
if( colorblendPoints<0 || sal_uInt32(colorblendPoints)>SAL_MAX_INT32/sizeof(float) )
colorblendPoints = SAL_MAX_INT32/sizeof(float);
@@ -591,11 +591,11 @@ namespace cppcanvas
colorblendPositions = new float [colorblendPoints];
colorblendColors = new ::Color [colorblendPoints];
for (int i=0; i < colorblendPoints; i ++) {
- s >> colorblendPositions [i];
+ s.ReadFloat( colorblendPositions [i] );
SAL_INFO("cppcanvas.emf", "EMF+\tposition[" << i << "]: " << colorblendPositions [i]);
}
for (int i=0; i < colorblendPoints; i ++) {
- s >> color;
+ s.ReadUInt32( color );
colorblendColors [i] = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
SAL_INFO("cppcanvas.emf", "EMF+\tcolor[" << i << "]: 0x" << std::hex << color << std::dec);
}
@@ -672,12 +672,12 @@ namespace cppcanvas
void ReadPath(SvStream& s, ImplRenderer& rR, bool bFill)
{
sal_Int32 pathLength;
- s >> pathLength;
+ s.ReadInt32( pathLength );
SAL_INFO("cppcanvas.emf", "EMF+\t\tpath length: " << pathLength);
sal_uInt32 pathHeader;
sal_Int32 pathPoints, pathFlags;
- s >> pathHeader >> pathPoints >> pathFlags;
+ s.ReadUInt32( pathHeader ).ReadInt32( pathPoints ).ReadInt32( pathFlags );
SAL_INFO("cppcanvas.emf", "EMF+\t\tpath (custom cap line path)");
SAL_INFO("cppcanvas.emf", "EMF+\t\theader: 0x" << std::hex << pathHeader << " points: " << std::dec << pathPoints << " additional flags: 0x" << std::hex << pathFlags << std::dec );
@@ -700,7 +700,7 @@ namespace cppcanvas
{
sal_uInt32 header;
- s >> header >> type;
+ s.ReadUInt32( header ).ReadUInt32( type );
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustom cap");
SAL_INFO("cppcanvas.emf", "EMF+\t\theader: 0x" << std::hex << header << " type: " << type << std::dec);
@@ -712,10 +712,10 @@ namespace cppcanvas
float widthScale;
float fillHotSpotX, fillHotSpotY, strokeHotSpotX, strokeHotSpotY;
- s >> customLineCapDataFlags >> baseCap >> baseInset
- >> strokeStartCap >> strokeEndCap >> strokeJoin
- >> miterLimit >> widthScale
- >> fillHotSpotX >> fillHotSpotY >> strokeHotSpotX >> strokeHotSpotY;
+ s.ReadUInt32( customLineCapDataFlags ).ReadUInt32( baseCap ).ReadFloat( baseInset )
+ .ReadUInt32( strokeStartCap ).ReadUInt32( strokeEndCap ).ReadUInt32( strokeJoin )
+ .ReadFloat( miterLimit ).ReadFloat( widthScale )
+ .ReadFloat( fillHotSpotX ).ReadFloat( fillHotSpotY ).ReadFloat( strokeHotSpotX ).ReadFloat( strokeHotSpotY );
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomLineCapDataFlags: 0x" << std::hex << customLineCapDataFlags);
SAL_INFO("cppcanvas.emf", "EMF+\t\tbaseCap: 0x" << std::hex << baseCap);
@@ -745,9 +745,9 @@ namespace cppcanvas
sal_Int32 lineEndCap, lineJoin, widthScale;
float fillHotSpotX, fillHotSpotY, lineHotSpotX, lineHotSpotY;
- s >> width >> height >> middleInset >> fillState >> lineStartCap
- >> lineEndCap >> lineJoin >> miterLimit >> widthScale
- >> fillHotSpotX >> fillHotSpotY >> lineHotSpotX >> lineHotSpotY;
+ s.ReadInt32( width ).ReadInt32( height ).ReadInt32( middleInset ).ReadInt32( fillState ).ReadInt32( lineStartCap )
+ .ReadInt32( lineEndCap ).ReadInt32( lineJoin ).ReadFloat( miterLimit ).ReadInt32( widthScale )
+ .ReadFloat( fillHotSpotX ).ReadFloat( fillHotSpotY ).ReadFloat( lineHotSpotX ).ReadFloat( lineHotSpotY );
SAL_INFO("cppcanvas.emf", "EMF+\t\tTODO - actually read EmfPlusCustomLineCapArrowData object (section 2.2.2.12)");
}
@@ -839,7 +839,7 @@ namespace cppcanvas
sal_uInt32 header, unknown, penFlags, unknown2;
int i;
- s >> header >> unknown >> penFlags >> unknown2 >> width;
+ s.ReadUInt32( header ).ReadUInt32( unknown ).ReadUInt32( penFlags ).ReadUInt32( unknown2 ).ReadFloat( width );
SAL_INFO("cppcanvas.emf", "EMF+\tpen");
SAL_INFO("cppcanvas.emf", "EMF+\theader: 0x" << std::hex << header << " unknown: 0x" << unknown <<
@@ -850,7 +850,7 @@ namespace cppcanvas
if (penFlags & 2)
{
- s >> startCap;
+ s.ReadInt32( startCap );
SAL_INFO("cppcanvas.emf", "EMF+\t\tstartCap: 0x" << std::hex << startCap);
}
else
@@ -858,37 +858,37 @@ namespace cppcanvas
if (penFlags & 4)
{
- s >> endCap;
+ s.ReadInt32( endCap );
SAL_INFO("cppcanvas.emf", "EMF+\t\tendCap: 0x" << std::hex << endCap);
}
else
endCap = 0;
if (penFlags & 8)
- s >> lineJoin;
+ s.ReadInt32( lineJoin );
else
lineJoin = 0;
if (penFlags & 16)
- s >> mitterLimit;
+ s.ReadFloat( mitterLimit );
else
mitterLimit = 0;
if (penFlags & 32)
{
- s >> dashStyle;
+ s.ReadInt32( dashStyle );
SAL_INFO("cppcanvas.emf", "EMF+\t\tdashStyle: 0x" << std::hex << dashStyle);
}
else
dashStyle = 0;
if (penFlags & 64)
- s >> dashCap;
+ s.ReadInt32( dashCap );
else
dashCap = 0;
if (penFlags & 128)
- s >> dashOffset;
+ s.ReadFloat( dashOffset );
else
dashOffset = 0;
@@ -896,7 +896,7 @@ namespace cppcanvas
{
dashStyle = EmfPlusLineStyleCustom;
- s >> dashPatternLen;
+ s.ReadInt32( dashPatternLen );
SAL_INFO("cppcanvas.emf", "EMF+\t\tdashPatternLen: " << dashPatternLen);
if( dashPatternLen<0 || sal_uInt32(dashPatternLen)>SAL_MAX_INT32/sizeof(float) )
@@ -904,7 +904,7 @@ namespace cppcanvas
dashPattern = new float [dashPatternLen];
for (i = 0; i < dashPatternLen; i++)
{
- s >> dashPattern [i];
+ s.ReadFloat( dashPattern [i] );
SAL_INFO("cppcanvas.emf", "EMF+\t\t\tdashPattern[" << i << "]: " << dashPattern[i]);
}
}
@@ -912,23 +912,23 @@ namespace cppcanvas
dashPatternLen = 0;
if (penFlags & 512)
- s >> alignment;
+ s.ReadInt32( alignment );
else
alignment = 0;
if (penFlags & 1024) {
- s >> compoundArrayLen;
+ s.ReadInt32( compoundArrayLen );
if( compoundArrayLen<0 || sal_uInt32(compoundArrayLen)>SAL_MAX_INT32/sizeof(float) )
compoundArrayLen = SAL_MAX_INT32/sizeof(float);
compoundArray = new float [compoundArrayLen];
for (i = 0; i < compoundArrayLen; i++)
- s >> compoundArray [i];
+ s.ReadFloat( compoundArray [i] );
} else
compoundArrayLen = 0;
if (penFlags & 2048)
{
- s >> customStartCapLen;
+ s.ReadInt32( customStartCapLen );
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomStartCapLen: " << customStartCapLen);
sal_uInt32 pos = s.Tell();
@@ -943,7 +943,7 @@ namespace cppcanvas
if (penFlags & 4096)
{
- s >> customEndCapLen;
+ s.ReadInt32( customEndCapLen );
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomEndCapLen: " << customEndCapLen);
sal_uInt32 pos = s.Tell();
@@ -974,12 +974,12 @@ namespace cppcanvas
{
sal_uInt32 header, unknown;
- s >> header >> type;
+ s.ReadUInt32( header ).ReadUInt32( type );
SAL_INFO("cppcanvas.emf", "EMF+\timage\nEMF+\theader: 0x" << std::hex << header << " type: " << type << std::dec );
if (type == 1) { // bitmap
- s >> width >> height >> stride >> pixelFormat >> unknown;
+ s.ReadInt32( width ).ReadInt32( height ).ReadInt32( stride ).ReadInt32( pixelFormat ).ReadUInt32( unknown );
SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: " << width << " height: " << height << " stride: " << stride << " pixelFormat: 0x" << std::hex << pixelFormat << std::dec);
if (width == 0) { // non native formats
GraphicFilter filter;
@@ -991,7 +991,7 @@ namespace cppcanvas
} else if (type == 2) {
sal_Int32 mfType, mfSize;
- s >> mfType >> mfSize;
+ s.ReadInt32( mfType ).ReadInt32( mfSize );
SAL_INFO("cppcanvas.emf", "EMF+\tmetafile type: " << mfType << " dataSize: " << mfSize << " real size calculated from record dataSize: " << dataSize - 16);
GraphicFilter filter;
@@ -1031,7 +1031,7 @@ namespace cppcanvas
sal_uInt32 reserved;
sal_uInt32 length;
- s >> header >> emSize >> sizeUnit >> fontFlags >> reserved >> length;
+ s.ReadUInt32( header ).ReadFloat( emSize ).ReadUInt32( sizeUnit ).ReadInt32( fontFlags ).ReadUInt32( reserved ).ReadUInt32( length );
OSL_ASSERT( ( header >> 12 ) == 0xdbc01 );
@@ -1043,7 +1043,7 @@ namespace cppcanvas
sal_Unicode *chars = (sal_Unicode *) alloca( sizeof( sal_Unicode ) * length );
for( sal_uInt32 i = 0; i < length; i++ )
- s >> chars[ i ];
+ s.ReadUInt16( chars[ i ] );
family = OUString( chars, length );
SAL_INFO("cppcanvas.emf", "EMF+\tfamily: " << OUStringToOString( family, RTL_TEXTENCODING_UTF8).getStr()); // TODO: can we just use family?
@@ -1056,14 +1056,14 @@ namespace cppcanvas
if (bCompressed) {
sal_Int16 ix, iy, iw, ih;
- s >> ix >> iy >> iw >> ih;
+ s.ReadInt16( ix ).ReadInt16( iy ).ReadInt16( iw ).ReadInt16( ih );
x = ix;
y = iy;
width = iw;
height = ih;
} else
- s >> x >> y >> width >> height;
+ s.ReadFloat( x ).ReadFloat( y ).ReadFloat( width ).ReadFloat( height );
}
void ImplRenderer::ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags)
@@ -1071,12 +1071,12 @@ namespace cppcanvas
if (flags & 0x4000) {
sal_Int16 ix, iy;
- s >> ix >> iy;
+ s.ReadInt16( ix ).ReadInt16( iy );
x = ix;
y = iy;
} else
- s >> x >> y;
+ s.ReadFloat( x ).ReadFloat( y );
}
void ImplRenderer::MapToDevice (double& x, double& y)
@@ -1518,7 +1518,7 @@ namespace cppcanvas
sal_uInt32 header, pathFlags;
sal_Int32 points;
- rObjectStream >> header >> points >> pathFlags;
+ rObjectStream.ReadUInt32( header ).ReadInt32( points ).ReadUInt32( pathFlags );
SAL_INFO("cppcanvas.emf", "EMF+\tpath");
SAL_INFO("cppcanvas.emf", "EMF+\theader: 0x" << std::hex << header << " points: " << std::dec << points << " additional flags: 0x" << std::hex << pathFlags << std::dec);
@@ -1627,7 +1627,7 @@ namespace cppcanvas
sal_uInt32 size, dataSize;
sal_uInt32 next;
- rMF >> type >> flags >> size >> dataSize;
+ rMF.ReadUInt16( type ).ReadUInt16( flags ).ReadUInt32( size ).ReadUInt32( dataSize );
next = rMF.Tell() + ( size - 12 );
@@ -1662,7 +1662,7 @@ namespace cppcanvas
case EmfPlusRecordTypeHeader:
sal_uInt32 header, version;
- rMF >> header >> version >> nHDPI >> nVDPI;
+ rMF.ReadUInt32( header ).ReadUInt32( version ).ReadInt32( nHDPI ).ReadInt32( nVDPI );
SAL_INFO("cppcanvas.emf", "EMF+ Header");
SAL_INFO("cppcanvas.emf", "EMF+\theader: 0x" << std::hex << header << " version: " << std::dec << version << " horizontal DPI: " << nHDPI << " vertical DPI: " << nVDPI << " dual: " << (flags & 1));
@@ -1683,7 +1683,7 @@ namespace cppcanvas
sal_uInt32 brushIndexOrColor;
float startAngle, sweepAngle;
- rMF >> brushIndexOrColor >> startAngle >> sweepAngle;
+ rMF.ReadUInt32( brushIndexOrColor ).ReadFloat( startAngle ).ReadFloat( sweepAngle );
SAL_INFO("cppcanvas.emf", "EMF+ FillPie colorOrIndex: " << brushIndexOrColor << " startAngle: " << startAngle << " sweepAngle: " << sweepAngle);
@@ -1726,7 +1726,7 @@ namespace cppcanvas
sal_uInt32 index = flags & 0xff;
sal_uInt32 brushIndexOrColor;
- rMF >> brushIndexOrColor;
+ rMF.ReadUInt32( brushIndexOrColor );
SAL_INFO("cppcanvas.emf", "EMF+ FillPath slot: " << index);
@@ -1742,7 +1742,7 @@ namespace cppcanvas
sal_uInt32 brushIndexOrColor = 1234567;
if ( type == EmfPlusRecordTypeFillEllipse )
- rMF >> brushIndexOrColor;
+ rMF.ReadUInt32( brushIndexOrColor );
SAL_INFO("cppcanvas.emf", "EMF+ " << (type == EmfPlusRecordTypeFillEllipse ? "Fill" : "Draw") << "Ellipse slot: " << (flags & 0xff));
@@ -1774,7 +1774,7 @@ namespace cppcanvas
bool isColor = (flags & 0x8000);
::basegfx::B2DPolygon polygon;
- rMF >> brushIndexOrColor >> rectangles;
+ rMF.ReadUInt32( brushIndexOrColor ).ReadInt32( rectangles );
SAL_INFO("cppcanvas.emf", "EMF+\t" << ((flags & 0x8000) ? "color" : "brush index") << ": 0x" << std::hex << brushIndexOrColor << std::dec);
@@ -1783,7 +1783,7 @@ namespace cppcanvas
/* 16bit integers */
sal_Int16 x, y, width, height;
- rMF >> x >> y >> width >> height;
+ rMF.ReadInt16( x ).ReadInt16( y ).ReadInt16( width ).ReadInt16( height );
polygon.append (Map (x, y));
polygon.append (Map (x + width, y));
@@ -1795,7 +1795,7 @@ namespace cppcanvas
/* Single's */
float x, y, width, height;
- rMF >> x >> y >> width >> height;
+ rMF.ReadFloat( x ).ReadFloat( y ).ReadFloat( width ).ReadFloat( height );
polygon.append (Map (x, y));
polygon.append (Map (x + width, y));
@@ -1817,8 +1817,8 @@ namespace cppcanvas
sal_uInt32 brushIndexOrColor;
sal_Int32 points;
- rMF >> brushIndexOrColor;
- rMF >> points;
+ rMF.ReadUInt32( brushIndexOrColor );
+ rMF.ReadInt32( points );
SAL_INFO("cppcanvas.emf", "EMF+ FillPolygon in slot: " << +index << " points: " << points);
SAL_INFO("cppcanvas.emf", "EMF+\t: " << ((flags & 0x8000) ? "color" : "brush index") << " 0x" << std::hex << brushIndexOrColor << std::dec);
@@ -1834,7 +1834,7 @@ namespace cppcanvas
{
sal_uInt32 points;
- rMF >> points;
+ rMF.ReadUInt32( points );
SAL_INFO("cppcanvas.emf", "EMF+ DrawLines in slot: " << (flags & 0xff) << " points: " << points);
@@ -1849,7 +1849,7 @@ namespace cppcanvas
{
sal_uInt32 penIndex;
- rMF >> penIndex;
+ rMF.ReadUInt32( penIndex );
SAL_INFO("cppcanvas.emf", "EMF+ DrawPath");
SAL_INFO("cppcanvas.emf", "EMF+\tpen: " << penIndex);
@@ -1867,7 +1867,7 @@ namespace cppcanvas
sal_uInt32 attrIndex;
sal_Int32 sourceUnit;
- rMF >> attrIndex >> sourceUnit;
+ rMF.ReadUInt32( attrIndex ).ReadInt32( sourceUnit );
SAL_INFO("cppcanvas.emf", "EMF+ " << (type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage") << "attributes index: " << attrIndex << "source unit: " << sourceUnit);
SAL_INFO("cppcanvas.emf", "EMF+\tTODO: use image attributes");
@@ -1887,7 +1887,7 @@ namespace cppcanvas
bool bValid = false;
if (type == EmfPlusRecordTypeDrawImagePoints) {
- rMF >> aCount;
+ rMF.ReadInt32( aCount );
if( aCount == 3) { // TODO: now that we now that this value is count we should support it better
float x1, y1, x2, y2, x3, y3;
@@ -1957,13 +1957,13 @@ namespace cppcanvas
sal_uInt32 formatId;
sal_uInt32 stringLength;
- rMF >> brushId >> formatId >> stringLength;
+ rMF.ReadUInt32( brushId ).ReadUInt32( formatId ).ReadUInt32( stringLength );
SAL_INFO("cppcanvas.emf", "EMF+ DrawString brushId: " << brushId << " formatId: " << formatId << " length: " << stringLength);
if (flags & 0x8000) {
float lx, ly, lw, lh;
- rMF >> lx >> ly >> lw >> lh;
+ rMF.ReadFloat( lx ).ReadFloat( ly ).ReadFloat( lw ).ReadFloat( lh );
SAL_INFO("cppcanvas.emf", "EMF+ DrawString layoutRect: " << lx << "," << ly << " - " << lw << "x" << lh);
@@ -2009,14 +2009,14 @@ namespace cppcanvas
}
break;
case EmfPlusRecordTypeSetPageTransform:
- rMF >> fPageScale;
+ rMF.ReadFloat( fPageScale );
SAL_INFO("cppcanvas.emf", "EMF+ SetPageTransform");
SAL_INFO("cppcanvas.emf", "EMF+\tscale: " << fPageScale << " unit: " << flags);
SAL_INFO("cppcanvas.emf", "EMF+\tTODO");
break;
case EmfPlusRecordTypeSetRenderingOrigin:
- rMF >> nOriginX >> nOriginY;
+ rMF.ReadInt32( nOriginX ).ReadInt32( nOriginY );
SAL_INFO("cppcanvas.emf", "EMF+ SetRenderingOrigin");
SAL_INFO("cppcanvas.emf", "EMF+\torigin [x,y]: " << nOriginX << "," << nOriginY);
break;
@@ -2044,7 +2044,7 @@ namespace cppcanvas
{
sal_uInt32 stackIndex;
- rMF >> stackIndex;
+ rMF.ReadUInt32( stackIndex );
SAL_INFO("cppcanvas.emf", "EMF+ Save stack index: " << stackIndex);
@@ -2056,7 +2056,7 @@ namespace cppcanvas
{
sal_uInt32 stackIndex;
- rMF >> stackIndex;
+ rMF.ReadUInt32( stackIndex );
SAL_INFO("cppcanvas.emf", "EMF+ Restore stack index: " << stackIndex);
@@ -2068,7 +2068,7 @@ namespace cppcanvas
{
sal_uInt32 stackIndex;
- rMF >> stackIndex;
+ rMF.ReadUInt32( stackIndex );
SAL_INFO("cppcanvas.emf", "EMF+ Begin Container No Params stack index: " << stackIndex);
@@ -2079,7 +2079,7 @@ namespace cppcanvas
{
sal_uInt32 stackIndex;
- rMF >> stackIndex;
+ rMF.ReadUInt32( stackIndex );
SAL_INFO("cppcanvas.emf", "EMF+ End Container stack index: " << stackIndex);
@@ -2189,7 +2189,7 @@ namespace cppcanvas
sal_uInt32 hasMatrix;
sal_uInt32 glyphsCount;
- rMF >> brushIndexOrColor >> optionFlags >> hasMatrix >> glyphsCount;
+ rMF.ReadUInt32( brushIndexOrColor ).ReadUInt32( optionFlags ).ReadUInt32( hasMatrix ).ReadUInt32( glyphsCount );
SAL_INFO("cppcanvas.emf", "EMF+\t: " << ((flags & 0x8000) ? "color" : "brush index") << " 0x" << std::hex << brushIndexOrColor << std::dec);
SAL_INFO("cppcanvas.emf", "EMF+\toption flags: 0x" << std::hex << optionFlags << std::dec);
@@ -2203,7 +2203,7 @@ namespace cppcanvas
OUString text = read_uInt16s_ToOUString(rMF, glyphsCount);
for( sal_uInt32 i=0; i<glyphsCount; i++) {
- rMF >> charsPosX[i] >> charsPosY[i];
+ rMF.ReadFloat( charsPosX[i] ).ReadFloat( charsPosY[i] );
SAL_INFO("cppcanvas.emf", "EMF+\tglyphPosition[" << i << "]: " << charsPosX[i] << "," << charsPosY[i]);
}
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index d5ec5425ccae..1804074410ae 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1787,9 +1787,9 @@ namespace cppcanvas
SvMemoryStream rMF ((void*) pAct->GetData (), pAct->GetDataSize (), STREAM_READ);
- rMF >> nFrameLeft >> nFrameTop >> nFrameRight >> nFrameBottom;
+ rMF.ReadInt32( nFrameLeft ).ReadInt32( nFrameTop ).ReadInt32( nFrameRight ).ReadInt32( nFrameBottom );
SAL_INFO ("cppcanvas.emf", "EMF+ picture frame: " << nFrameLeft << "," << nFrameTop << " - " << nFrameRight << "," << nFrameBottom);
- rMF >> nPixX >> nPixY >> nMmX >> nMmY;
+ rMF.ReadInt32( nPixX ).ReadInt32( nPixY ).ReadInt32( nMmX ).ReadInt32( nMmY );
SAL_INFO ("cppcanvas.emf", "EMF+ ref device pixel size: " << nPixX << "x" << nPixY << " mm size: " << nMmX << "x" << nMmY);
ReadXForm( rMF, aBaseTransform );
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index cfd9259a9b37..d4cd2274a7c0 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -812,7 +812,7 @@ void OTableEditorCtrl::InsertRows( long nRow )
OUString aFieldName;
::boost::shared_ptr<OTableRow> pRow;
sal_Int32 nSize = 0;
- (*aStreamRef) >> nSize;
+ (*aStreamRef).ReadInt32( nSize );
vInsertedUndoRedoRows.reserve(nSize);
for(sal_Int32 i=0;i < nSize;++i)
{
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index a53f69f0660d..ca3e35b7ad51 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -138,9 +138,9 @@ namespace dbaui
}
SvStream& ReadOTableRow( SvStream& _rStr, OTableRow& _rRow )
{
- _rStr >> _rRow.m_nPos;
+ _rStr.ReadInt32( _rRow.m_nPos );
sal_Int32 nValue = 0;
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
if ( nValue )
{
OFieldDescription* pFieldDesc = new OFieldDescription();
@@ -153,14 +153,14 @@ namespace dbaui
sValue = _rStr.ReadUniOrByteString(_rStr.GetStreamCharSet());
pFieldDesc->SetHelpText(sValue);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
Any aControlDefault;
switch ( nValue )
{
case 1:
{
double nControlDefault;
- _rStr >> nControlDefault;
+ _rStr.ReadDouble( nControlDefault );
aControlDefault <<= nControlDefault;
break;
}
@@ -172,25 +172,25 @@ namespace dbaui
pFieldDesc->SetControlDefault(aControlDefault);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetTypeValue(nValue);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetPrecision(nValue);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetScale(nValue);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetIsNullable(nValue);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetFormatKey(nValue);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetHorJustify((SvxCellHorJustify)nValue);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetAutoIncrement(nValue != 0);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetPrimaryKey(nValue != 0);
- _rStr >> nValue;
+ _rStr.ReadInt32( nValue );
pFieldDesc->SetCurrency(nValue != 0);
}
return _rStr;
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index b2131fd7c63b..1f4c05121f6b 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -167,7 +167,7 @@ bool IsUserWordbook( const OUString& rFile )
{
sal_uInt16 nLen;
pStream->Seek (nSniffPos);
- *pStream >> nLen;
+ pStream->ReadUInt16( nLen );
if ( nLen < MAX_HEADER_LENGTH )
{
pStream->Read(pMagicHeader, nLen);
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 24cc1a868fa1..29a0a87d67c1 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -405,10 +405,10 @@ EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobal
// First check what type of Object...
sal_uInt16 nWhich;
- rIStream >> nWhich;
+ rIStream.ReadUInt16( nWhich );
sal_uInt32 nStructSz;
- rIStream >> nStructSz;
+ rIStream.ReadUInt32( nStructSz );
if (nWhich != EE_FORMAT_BIN)
{
@@ -1272,13 +1272,13 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
void EditTextObjectImpl::CreateData( SvStream& rIStream )
{
- rIStream >> nVersion;
+ rIStream.ReadUInt16( nVersion );
// The text object was first created with the current setting of
// pTextObjectPool.
sal_Bool bOwnerOfCurrent = bOwnerOfPool;
sal_Bool b;
- rIStream >> b;
+ rIStream.ReadUChar( b );
bOwnerOfPool = b;
if ( bOwnerOfCurrent && !bOwnerOfPool )
@@ -1298,13 +1298,13 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
// CharSet, in which it was saved:
sal_uInt16 nCharSet;
- rIStream >> nCharSet;
+ rIStream.ReadUInt16( nCharSet );
rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( (rtl_TextEncoding)nCharSet );
// The number of paragraphs ...
sal_uInt16 nParagraphs;
- rIStream >> nParagraphs;
+ rIStream.ReadUInt16( nParagraphs );
// The individual paragraphs ...
for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ )
@@ -1318,7 +1318,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
// StyleName and Family...
pC->GetStyle() = rIStream.ReadUniOrByteString(eSrcEncoding);
sal_uInt16 nStyleFamily;
- rIStream >> nStyleFamily;
+ rIStream.ReadUInt16( nStyleFamily );
pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
// Paragraph attributes ...
@@ -1326,7 +1326,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
// The number of attributes ...
sal_uInt16 nTmp16;
- rIStream >> nTmp16;
+ rIStream.ReadUInt16( nTmp16 );
size_t nAttribs = nTmp16;
// And the individual attributes
@@ -1338,11 +1338,11 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
sal_uInt16 _nWhich, nStart, nEnd;
const SfxPoolItem* pItem;
- rIStream >> _nWhich;
+ rIStream.ReadUInt16( _nWhich );
_nWhich = pPool->GetNewWhich( _nWhich );
pItem = pPool->LoadSurrogate( rIStream, _nWhich, 0 );
- rIStream >> nStart;
- rIStream >> nEnd;
+ rIStream.ReadUInt16( nStart );
+ rIStream.ReadUInt16( nEnd );
if ( pItem )
{
if ( pItem->Which() == EE_FEATURE_NOTCONV )
@@ -1464,7 +1464,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
if ( nVersion >= 400 )
{
sal_uInt16 nTmpMetric;
- rIStream >> nTmpMetric;
+ rIStream.ReadUInt16( nTmpMetric );
if ( nVersion >= 401 )
{
// In the 400 there was a bug in text objects with the own Pool,
@@ -1477,23 +1477,23 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
if ( nVersion >= 600 )
{
- rIStream >> nUserType;
- rIStream >> nObjSettings;
+ rIStream.ReadUInt16( nUserType );
+ rIStream.ReadUInt32( nObjSettings );
}
if ( nVersion >= 601 )
{
sal_Bool bTmp;
- rIStream >> bTmp;
+ rIStream.ReadUChar( bTmp );
bVertical = bTmp;
}
if ( nVersion >= 602 )
{
- rIStream >> nScriptType;
+ rIStream.ReadUInt16( nScriptType );
sal_Bool bUnicodeStrings;
- rIStream >> bUnicodeStrings;
+ rIStream.ReadUChar( bUnicodeStrings );
if ( bUnicodeStrings )
{
for ( sal_uInt16 nPara = 0; nPara < nParagraphs; nPara++ )
@@ -1502,7 +1502,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
sal_uInt16 nL;
// Text
- rIStream >> nL;
+ rIStream.ReadUInt16( nL );
if ( nL )
{
rtl_uString *pStr = rtl_uString_alloc(nL);
@@ -1511,7 +1511,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
}
// StyleSheetName
- rIStream >> nL;
+ rIStream.ReadUInt16( nL );
if ( nL )
{
rtl_uString *pStr = rtl_uString_alloc(nL);
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index d7af9a2e584b..52d2f99a181f 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -67,18 +67,18 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer )
Color aColor;
ReadColor( rStream, aColor ); aFont.SetColor( aColor );
sal_uInt16 nTemp;
- rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp);
+ rStream.ReadUInt16( nTemp ); aFont.SetFamily((FontFamily)nTemp);
- rStream >> nTemp;
+ rStream.ReadUInt16( nTemp );
nTemp = (sal_uInt16)GetSOLoadTextEncoding((rtl_TextEncoding)nTemp);
aFont.SetCharSet((rtl_TextEncoding)nTemp);
- rStream >> nTemp; aFont.SetPitch((FontPitch)nTemp);
- rStream >> nTemp; aFont.SetAlign((FontAlign)nTemp);
- rStream >> nTemp; aFont.SetWeight((FontWeight)nTemp);
- rStream >> nTemp; aFont.SetUnderline((FontUnderline)nTemp);
- rStream >> nTemp; aFont.SetStrikeout((FontStrikeout)nTemp);
- rStream >> nTemp; aFont.SetItalic((FontItalic)nTemp);
+ rStream.ReadUInt16( nTemp ); aFont.SetPitch((FontPitch)nTemp);
+ rStream.ReadUInt16( nTemp ); aFont.SetAlign((FontAlign)nTemp);
+ rStream.ReadUInt16( nTemp ); aFont.SetWeight((FontWeight)nTemp);
+ rStream.ReadUInt16( nTemp ); aFont.SetUnderline((FontUnderline)nTemp);
+ rStream.ReadUInt16( nTemp ); aFont.SetStrikeout((FontStrikeout)nTemp);
+ rStream.ReadUInt16( nTemp ); aFont.SetItalic((FontItalic)nTemp);
// UNICODE: rStream >> aName; aFont.SetName( aName );
OUString aName = rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
@@ -88,14 +88,14 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer )
{
//#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nHeight(0), nWidth(0);
- rStream >> nHeight; rStream >> nWidth; Size aSize( nWidth, nHeight );
+ rStream.ReadInt32( nHeight ); rStream.ReadInt32( nWidth ); Size aSize( nWidth, nHeight );
aFont.SetSize( aSize );
}
sal_Bool bTemp;
- rStream >> bTemp; aFont.SetOutline( bTemp );
- rStream >> bTemp; aFont.SetShadow( bTemp );
- rStream >> bTemp; aFont.SetTransparent( bTemp );
+ rStream.ReadUChar( bTemp ); aFont.SetOutline( bTemp );
+ rStream.ReadUChar( bTemp ); aFont.SetShadow( bTemp );
+ rStream.ReadUChar( bTemp ); aFont.SetTransparent( bTemp );
return aFont;
}
@@ -115,7 +115,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich ),
pGraphicObject( NULL )
{
- rStrm >> nStyle;
+ rStrm.ReadUInt16( nStyle );
if( nStyle != BS_BMP )
aFont = CreateFont( rStrm, BULITEM_VERSION );
@@ -145,16 +145,16 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) :
//#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmp(0);
- rStrm >> nTmp; nWidth = nTmp;
- rStrm >> nStart;
- rStrm >> nJustify;
+ rStrm.ReadInt32( nTmp ); nWidth = nTmp;
+ rStrm.ReadUInt16( nStart );
+ rStrm.ReadUChar( nJustify );
char cTmpSymbol;
- rStrm >> cTmpSymbol;
+ rStrm.ReadChar( cTmpSymbol );
//convert single byte to unicode
cSymbol = OUString(&cTmpSymbol, 1, aFont.GetCharSet()).toChar();
- rStrm >> nScale;
+ rStrm.ReadUInt16( nScale );
// UNICODE: rStrm >> aPrevText;
aPrevText = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index cd86e0ebc47c..9887a5a72105 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -417,9 +417,9 @@ void SvxDateField::Load( SvPersistStream & rStm )
{
sal_uInt16 nType, nFormat;
- rStm >> nFixDate;
- rStm >> nType;
- rStm >> nFormat;
+ rStm.ReadUInt32( nFixDate );
+ rStm.ReadUInt16( nType );
+ rStm.ReadUInt16( nFormat );
eType = (SvxDateType)nType;
eFormat= (SvxDateFormat)nFormat;
@@ -564,7 +564,7 @@ static OUString read_unicode( SvPersistStream & rStm )
{
rtl_uString *pStr = NULL;
sal_uInt16 nL = 0;
- rStm >> nL;
+ rStm.ReadUInt16( nL );
if ( nL )
{
pStr = rtl_uString_alloc(nL);
@@ -579,7 +579,7 @@ void SvxURLField::Load( SvPersistStream & rStm )
{
sal_uInt16 nFormat = 0;
- rStm >> nFormat;
+ rStm.ReadUInt16( nFormat );
eFormat= (SvxURLFormat)nFormat;
aURL = read_unicode( rStm );
@@ -798,8 +798,8 @@ void SvxExtTimeField::Load( SvPersistStream & rStm )
sal_uInt16 nType, nFormat;
rStm.ReadInt64(m_nFixTime);
- rStm >> nType;
- rStm >> nFormat;
+ rStm.ReadUInt16( nType );
+ rStm.ReadUInt16( nFormat );
eType = (SvxTimeType) nType;
eFormat= (SvxTimeFormat) nFormat;
@@ -944,8 +944,8 @@ void SvxExtFileField::Load( SvPersistStream & rStm )
// UNICODE: rStm >> aFile;
aFile = rStm.ReadUniOrByteString(rStm.GetStreamCharSet());
- rStm >> nType;
- rStm >> nFormat;
+ rStm.ReadUInt16( nType );
+ rStm.ReadUInt16( nFormat );
eType = (SvxFileType) nType;
eFormat= (SvxFileFormat) nFormat;
@@ -1099,8 +1099,8 @@ void SvxAuthorField::Load( SvPersistStream & rStm )
aFirstName = read_unicode( rStm );
aShortName = read_unicode( rStm );
- rStm >> nType;
- rStm >> nFormat;
+ rStm.ReadUInt16( nType );
+ rStm.ReadUInt16( nFormat );
eType = (SvxAuthorType) nType;
eFormat= (SvxAuthorFormat) nFormat;
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index d07ffd293e4b..6eb012ad26e0 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -125,10 +125,10 @@ namespace
sal_uInt16 nOutline, nInline, nDistance;
sal_uInt16 nStyle = NONE;
Color aColor;
- ReadColor( stream, aColor ) >> nOutline >> nInline >> nDistance;
+ ReadColor( stream, aColor ).ReadUInt16( nOutline ).ReadUInt16( nInline ).ReadUInt16( nDistance );
if (version >= BORDER_LINE_WITH_STYLE_VERSION)
- stream >> nStyle;
+ stream.ReadUInt16( nStyle );
SvxBorderLine border(&aColor);
border.GuessLinesWidths(nStyle, nOutline, nInline, nDistance);
@@ -178,7 +178,7 @@ SvStream& SvxPaperBinItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
SfxPoolItem* SvxPaperBinItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 nBin;
- rStrm >> nBin;
+ rStrm.ReadSChar( nBin );
return new SvxPaperBinItem( Which(), nBin );
}
@@ -399,7 +399,7 @@ SfxPoolItem* SvxSizeItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
//#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nWidth(0), nHeight(0);
- rStrm >> nWidth >> nHeight;
+ rStrm.ReadInt32( nWidth ).ReadInt32( nHeight );
SvxSizeItem* pAttr = new SvxSizeItem( Which() );
pAttr->SetSize(Size(nWidth, nHeight));
@@ -739,15 +739,14 @@ SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) cons
if ( nVersion >= LRSPACE_AUTOFIRST_VERSION )
{
- rStrm >> left >> prpleft >> right >> prpright >> firstline >>
- prpfirstline >> txtleft >> autofirst;
+ rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline ).ReadUInt16( txtleft ).ReadSChar( autofirst );
sal_uInt32 nPos = rStrm.Tell();
sal_uInt32 nMarker;
- rStrm >> nMarker;
+ rStrm.ReadUInt32( nMarker );
if ( nMarker == BULLETLR_MARKER )
{
- rStrm >> firstline;
+ rStrm.ReadInt16( firstline );
if ( firstline < 0 )
left = left + static_cast<sal_uInt16>(firstline); // see below: txtleft = ...
}
@@ -756,18 +755,16 @@ SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) cons
}
else if ( nVersion == LRSPACE_TXTLEFT_VERSION )
{
- rStrm >> left >> prpleft >> right >> prpright >> firstline >>
- prpfirstline >> txtleft;
+ rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline ).ReadUInt16( txtleft );
}
else if ( nVersion == LRSPACE_16_VERSION )
{
- rStrm >> left >> prpleft >> right >> prpright >> firstline >>
- prpfirstline;
+ rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline );
}
else
{
sal_Int8 nL, nR, nFL;
- rStrm >> left >> nL >> right >> nR >> firstline >> nFL;
+ rStrm.ReadUInt16( left ).ReadSChar( nL ).ReadUInt16( right ).ReadSChar( nR ).ReadInt16( firstline ).ReadSChar( nFL );
prpleft = (sal_uInt16)nL;
prpright = (sal_uInt16)nR;
prpfirstline = (sal_uInt16)nFL;
@@ -787,10 +784,10 @@ SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) cons
if( nVersion >= LRSPACE_NEGATIVE_VERSION && ( autofirst & 0x80 ) )
{
sal_Int32 nMargin;
- rStrm >> nMargin;
+ rStrm.ReadInt32( nMargin );
pAttr->nLeftMargin = nMargin;
pAttr->nTxtLeft = firstline >= 0 ? nMargin : nMargin - firstline;
- rStrm >> nMargin;
+ rStrm.ReadInt32( nMargin );
pAttr->nRightMargin = nMargin;
}
return pAttr;
@@ -1042,11 +1039,11 @@ SfxPoolItem* SvxULSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) cons
sal_uInt16 upper, lower, nPL = 0, nPU = 0;
if ( nVersion == ULSPACE_16_VERSION )
- rStrm >> upper >> nPU >> lower >> nPL;
+ rStrm.ReadUInt16( upper ).ReadUInt16( nPU ).ReadUInt16( lower ).ReadUInt16( nPL );
else
{
sal_Int8 nU, nL;
- rStrm >> upper >> nU >> lower >> nL;
+ rStrm.ReadUInt16( upper ).ReadSChar( nU ).ReadUInt16( lower ).ReadSChar( nL );
nPL = (sal_uInt16)nL;
nPU = (sal_uInt16)nU;
}
@@ -1102,7 +1099,7 @@ SvStream& SvxPrintItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) c
SfxPoolItem* SvxPrintItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 bIsPrint;
- rStrm >> bIsPrint;
+ rStrm.ReadSChar( bIsPrint );
return new SvxPrintItem( Which(), sal_Bool( bIsPrint != 0 ) );
}
@@ -1157,7 +1154,7 @@ SvStream& SvxOpaqueItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxOpaqueItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 bIsOpaque;
- rStrm >> bIsOpaque;
+ rStrm.ReadSChar( bIsOpaque );
return new SvxOpaqueItem( Which(), sal_Bool( bIsOpaque != 0 ) );
}
@@ -1302,7 +1299,7 @@ SvStream& SvxProtectItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxProtectItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 cFlags;
- rStrm >> cFlags;
+ rStrm.ReadSChar( cFlags );
SvxProtectItem* pAttr = new SvxProtectItem( Which() );
pAttr->SetPosProtect( sal_Bool( ( cFlags & 0x01 ) != 0 ) );
pAttr->SetSizeProtect( sal_Bool( ( cFlags & 0x02 ) != 0 ) );
@@ -1570,10 +1567,10 @@ SfxPoolItem* SvxShadowItem::Create( SvStream& rStrm, sal_uInt16 ) const
Color aColor;
Color aFillColor;
sal_Int8 nStyle;
- rStrm >> cLoc >> _nWidth
- >> bTrans;
+ rStrm.ReadSChar( cLoc ).ReadUInt16( _nWidth )
+ .ReadUChar( bTrans );
ReadColor( rStrm, aColor );
- ReadColor( rStrm, aFillColor ) >> nStyle;
+ ReadColor( rStrm, aFillColor ).ReadSChar( nStyle );
aColor.SetTransparency(bTrans ? 0xff : 0);
return new SvxShadowItem( Which(), &aColor, _nWidth, (SvxShadowLocation)cLoc );
}
@@ -2305,7 +2302,7 @@ bool SvxBoxItem::HasMetrics() const
SfxPoolItem* SvxBoxItem::Create( SvStream& rStrm, sal_uInt16 nIVersion ) const
{
sal_uInt16 nDistance;
- rStrm >> nDistance;
+ rStrm.ReadUInt16( nDistance );
SvxBoxItem* pAttr = new SvxBoxItem( Which() );
sal_uInt16 aLineMap[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
@@ -2314,7 +2311,7 @@ SfxPoolItem* SvxBoxItem::Create( SvStream& rStrm, sal_uInt16 nIVersion ) const
sal_Int8 cLine;
while( true )
{
- rStrm >> cLine;
+ rStrm.ReadSChar( cLine );
if( cLine > 3 )
break;
@@ -2328,7 +2325,7 @@ SfxPoolItem* SvxBoxItem::Create( SvStream& rStrm, sal_uInt16 nIVersion ) const
for( sal_uInt16 i=0; i < 4; i++ )
{
sal_uInt16 nDist;
- rStrm >> nDist;
+ rStrm.ReadUInt16( nDist );
pAttr->SetDistance( nDist, aLineMap[i] );
}
}
@@ -2674,7 +2671,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 cFlags;
sal_uInt16 _nDefDist;
- rStrm >> cFlags >> _nDefDist;
+ rStrm.ReadSChar( cFlags ).ReadUInt16( _nDefDist );
SvxBoxInfoItem* pAttr = new SvxBoxInfoItem( Which() );
@@ -2686,13 +2683,13 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
while( true )
{
sal_Int8 cLine;
- rStrm >> cLine;
+ rStrm.ReadSChar( cLine );
if( cLine > 1 )
break;
short nOutline, nInline, nDistance;
Color aColor;
- ReadColor( rStrm, aColor ) >> nOutline >> nInline >> nDistance;
+ ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
SvxBorderLine aBorder( &aColor );
aBorder.GuessLinesWidths(NONE, nOutline, nInline, nDistance);
@@ -3063,9 +3060,9 @@ sal_uInt16 SvxFmtBreakItem::GetVersion( sal_uInt16 nFFVer ) const
SfxPoolItem* SvxFmtBreakItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
{
sal_Int8 eBreak, bDummy;
- rStrm >> eBreak;
+ rStrm.ReadSChar( eBreak );
if( FMTBREAK_NOAUTO > nVersion )
- rStrm >> bDummy;
+ rStrm.ReadSChar( bDummy );
return new SvxFmtBreakItem( (const SvxBreak)eBreak, Which() );
}
@@ -3096,7 +3093,7 @@ SvStream& SvxFmtKeepItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxFmtKeepItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 bIsKeep;
- rStrm >> bIsKeep;
+ rStrm.ReadSChar( bIsKeep );
return new SvxFmtKeepItem( sal_Bool( bIsKeep != 0 ), Which() );
}
@@ -3321,7 +3318,7 @@ SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const
short nOutline, nInline, nDistance;
Color aColor;
- ReadColor( rStrm, aColor ) >> nOutline >> nInline >> nDistance;
+ ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
if( nOutline )
{
SvxBorderLine aLine( &aColor );
@@ -3476,10 +3473,10 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion,
Color aTempFillColor;
sal_Int8 nStyle;
- rStream >> bTrans;
+ rStream.ReadUChar( bTrans );
ReadColor( rStream, aTempColor );
ReadColor( rStream, aTempFillColor );
- rStream >> nStyle;
+ rStream.ReadSChar( nStyle );
switch ( nStyle )
{
@@ -3532,7 +3529,7 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion,
sal_uInt16 nDoLoad = 0;
sal_Int8 nPos;
- rStream >> nDoLoad;
+ rStream.ReadUInt16( nDoLoad );
if ( nDoLoad & LOAD_GRAPHIC )
{
@@ -3567,7 +3564,7 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion,
maStrFilter = rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
}
- rStream >> nPos;
+ rStream.ReadSChar( nPos );
eGraphicPos = (SvxGraphicPosition)nPos;
}
@@ -4211,7 +4208,7 @@ SfxPoolItem* SvxFrameDirectionItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxFrameDirectionItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/ ) const
{
sal_uInt16 nValue;
- rStrm >> nValue;
+ rStrm.ReadUInt16( nValue );
return new SvxFrameDirectionItem( (SvxFrameDirection)nValue, Which() );
}
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index 038beffea56a..827edd7bcc86 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -184,7 +184,7 @@ SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const
SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, sal_uInt16 ) const
{
sal_uInt16 nVal;
- rStream >> nVal;
+ rStream.ReadUInt16( nVal );
return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() );
}
@@ -330,7 +330,7 @@ SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const
SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, sal_uInt16 ) const
{
sal_uInt16 nVal;
- rStream >> nVal;
+ rStream.ReadUInt16( nVal );
return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() );
}
@@ -422,7 +422,7 @@ SfxPoolItem* SvxJustifyMethodItem::Clone( SfxItemPool* ) const
SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, sal_uInt16 ) const
{
sal_uInt16 nVal;
- rStream >> nVal;
+ rStream.ReadUInt16( nVal );
return new SvxJustifyMethodItem( (SvxCellJustifyMethod)nVal, Which() );
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 528142cd9066..8a87a64642e3 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -181,36 +181,36 @@ SvxNumberFormat::SvxNumberFormat( SvStream &rStream )
{
sal_uInt16 nTmp16;
sal_Int32 nTmp32;
- rStream >> nTmp16; // Version number
+ rStream.ReadUInt16( nTmp16 ); // Version number
- rStream >> nTmp16; SetNumberingType( nTmp16 );
- rStream >> nTmp16; eNumAdjust = ( SvxAdjust )nTmp16;
- rStream >> nTmp16; nInclUpperLevels = nTmp16;
- rStream >> nStart;
- rStream >> nTmp16; cBullet = (sal_Unicode)nTmp16;
+ rStream.ReadUInt16( nTmp16 ); SetNumberingType( nTmp16 );
+ rStream.ReadUInt16( nTmp16 ); eNumAdjust = ( SvxAdjust )nTmp16;
+ rStream.ReadUInt16( nTmp16 ); nInclUpperLevels = nTmp16;
+ rStream.ReadUInt16( nStart );
+ rStream.ReadUInt16( nTmp16 ); cBullet = (sal_Unicode)nTmp16;
- rStream >> nFirstLineOffset;
- rStream >> nAbsLSpace;
- rStream >> nLSpace;
+ rStream.ReadInt16( nFirstLineOffset );
+ rStream.ReadInt16( nAbsLSpace );
+ rStream.ReadInt16( nLSpace );
- rStream >> nCharTextDistance;
+ rStream.ReadInt16( nCharTextDistance );
sPrefix = rStream.ReadUniOrByteString( rStream.GetStreamCharSet() );
sSuffix = rStream.ReadUniOrByteString( rStream.GetStreamCharSet() );
sCharStyleName = rStream.ReadUniOrByteString( rStream.GetStreamCharSet() );
sal_uInt16 hasGraphicBrush = 0;
- rStream >> hasGraphicBrush;
+ rStream.ReadUInt16( hasGraphicBrush );
if ( hasGraphicBrush )
{
pGraphicBrush = new SvxBrushItem( SID_ATTR_BRUSH );
pGraphicBrush = (SvxBrushItem*)(pGraphicBrush->Create( rStream, BRUSH_GRAPHIC_VERSION ));
}
else pGraphicBrush = 0;
- rStream >> nTmp16; eVertOrient = nTmp16;
+ rStream.ReadUInt16( nTmp16 ); eVertOrient = nTmp16;
sal_uInt16 hasBulletFont = 0;
- rStream >> hasBulletFont;
+ rStream.ReadUInt16( hasBulletFont );
if ( hasBulletFont )
{
pBulletFont = new Font( );
@@ -220,14 +220,14 @@ SvxNumberFormat::SvxNumberFormat( SvStream &rStream )
ReadPair( rStream, aGraphicSize );
ReadColor( rStream, nBulletColor );
- rStream >> nBulletRelSize;
- rStream >> nTmp16; SetShowSymbol( nTmp16 );
+ rStream.ReadUInt16( nBulletRelSize );
+ rStream.ReadUInt16( nTmp16 ); SetShowSymbol( nTmp16 );
- rStream >> nTmp16; mePositionAndSpaceMode = ( SvxNumPositionAndSpaceMode )nTmp16;
- rStream >> nTmp16; meLabelFollowedBy = ( LabelFollowedBy )nTmp16;
- rStream >> nTmp32; mnListtabPos = nTmp32;
- rStream >> nTmp32; mnFirstLineIndent = nTmp32;
- rStream >> nTmp32; mnIndentAt = nTmp32;
+ rStream.ReadUInt16( nTmp16 ); mePositionAndSpaceMode = ( SvxNumPositionAndSpaceMode )nTmp16;
+ rStream.ReadUInt16( nTmp16 ); meLabelFollowedBy = ( LabelFollowedBy )nTmp16;
+ rStream.ReadInt32( nTmp32 ); mnListtabPos = nTmp32;
+ rStream.ReadInt32( nTmp32 ); mnFirstLineIndent = nTmp32;
+ rStream.ReadInt32( nTmp32 ); mnIndentAt = nTmp32;
}
SvxNumberFormat::~SvxNumberFormat()
@@ -677,17 +677,17 @@ SvxNumRule::SvxNumRule(const SvxNumRule& rCopy)
SvxNumRule::SvxNumRule( SvStream &rStream )
{
sal_uInt16 nTmp16;
- rStream >> nTmp16; // NUM_ITEM_VERSION
- rStream >> nLevelCount;
+ rStream.ReadUInt16( nTmp16 ); // NUM_ITEM_VERSION
+ rStream.ReadUInt16( nLevelCount );
// first nFeatureFlags of old Versions
- rStream >> nTmp16; nFeatureFlags = nTmp16;
- rStream >> nTmp16; bContinuousNumbering = nTmp16;
- rStream >> nTmp16; eNumberingType = ( SvxNumRuleType )nTmp16;
+ rStream.ReadUInt16( nTmp16 ); nFeatureFlags = nTmp16;
+ rStream.ReadUInt16( nTmp16 ); bContinuousNumbering = nTmp16;
+ rStream.ReadUInt16( nTmp16 ); eNumberingType = ( SvxNumRuleType )nTmp16;
for (sal_uInt16 i = 0; i < SVX_MAX_NUM; i++)
{
- rStream >> nTmp16;
+ rStream.ReadUInt16( nTmp16 );
sal_Bool hasNumberingFormat = nTmp16 & 1;
aFmtsSet[i] = nTmp16 & 2; // fdo#68648 reset flag
if ( hasNumberingFormat ){
@@ -700,7 +700,7 @@ SvxNumRule::SvxNumRule( SvStream &rStream )
}
}
//second nFeatureFlags for new versions
- rStream >> nTmp16; nFeatureFlags = nTmp16;
+ rStream.ReadUInt16( nTmp16 ); nFeatureFlags = nTmp16;
}
SvxNumRule* SvxNumRule::Create( SvStream & rStream )
diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx
index 3cb1f4ce7882..0fcb3d31b32a 100644
--- a/editeng/source/items/optitems.cxx
+++ b/editeng/source/items/optitems.cxx
@@ -171,7 +171,7 @@ SfxItemPresentation SfxHyphenRegionItem::GetPresentation
SfxPoolItem* SfxHyphenRegionItem::Create(SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt8 _nMinLead, _nMinTrail;
- rStrm >> _nMinLead >> _nMinTrail;
+ rStrm.ReadUChar( _nMinLead ).ReadUChar( _nMinTrail );
SfxHyphenRegionItem* pAttr = new SfxHyphenRegionItem( Which() );
pAttr->GetMinLead() = _nMinLead;
pAttr->GetMinTrail() = _nMinTrail;
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 9bf4746439ee..3ecd59d08b45 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -260,11 +260,11 @@ SfxPoolItem* SvxLineSpacingItem::Create(SvStream& rStrm, sal_uInt16) const
sal_uInt16 nHeight;
sal_Int8 nRule, nInterRule;
- rStrm >> nPropSpace
- >> nInterSpace
- >> nHeight
- >> nRule
- >> nInterRule;
+ rStrm.ReadSChar( nPropSpace )
+ .ReadInt16( nInterSpace )
+ .ReadUInt16( nHeight )
+ .ReadSChar( nRule )
+ .ReadSChar( nInterRule );
SvxLineSpacingItem* pAttr = new SvxLineSpacingItem( nHeight, Which() );
pAttr->SetInterLineSpace( nInterSpace );
@@ -492,12 +492,12 @@ sal_uInt16 SvxAdjustItem::GetVersion( sal_uInt16 nFileVersion ) const
SfxPoolItem* SvxAdjustItem::Create(SvStream& rStrm, sal_uInt16 nVersion) const
{
char eAdjustment;
- rStrm >> eAdjustment;
+ rStrm.ReadChar( eAdjustment );
SvxAdjustItem *pRet = new SvxAdjustItem( (SvxAdjust)eAdjustment, Which() );
if( nVersion >= ADJUST_LASTBLOCK_VERSION )
{
sal_Int8 nFlags;
- rStrm >> nFlags;
+ rStrm.ReadSChar( nFlags );
pRet->bOneBlock = 0 != (nFlags & 0x0001);
pRet->bLastCenter = 0 != (nFlags & 0x0002);
pRet->bLastBlock = 0 != (nFlags & 0x0004);
@@ -543,7 +543,7 @@ SfxPoolItem* SvxWidowsItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxWidowsItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Int8 nLines;
- rStrm >> nLines;
+ rStrm.ReadSChar( nLines );
return new SvxWidowsItem( nLines, Which() );
}
@@ -614,7 +614,7 @@ SfxPoolItem* SvxOrphansItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxOrphansItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Int8 nLines;
- rStrm >> nLines;
+ rStrm.ReadSChar( nLines );
return new SvxOrphansItem( nLines, Which() );
}
@@ -811,7 +811,7 @@ SfxPoolItem* SvxHyphenZoneItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Int8 _bHyphen, _bHyphenPageEnd;
sal_Int8 _nMinLead, _nMinTrail, _nMaxHyphens;
- rStrm >> _bHyphen >> _bHyphenPageEnd >> _nMinLead >> _nMinTrail >> _nMaxHyphens;
+ rStrm.ReadSChar( _bHyphen ).ReadSChar( _bHyphenPageEnd ).ReadSChar( _nMinLead ).ReadSChar( _nMinTrail ).ReadSChar( _nMaxHyphens );
SvxHyphenZoneItem* pAttr = new SvxHyphenZoneItem( sal_False, Which() );
pAttr->SetHyphen( sal_Bool( _bHyphen != 0 ) );
pAttr->SetPageEnd( sal_Bool( _bHyphenPageEnd != 0 ) );
@@ -1141,7 +1141,7 @@ SfxItemPresentation SvxTabStopItem::GetPresentation
SfxPoolItem* SvxTabStopItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 nTabs;
- rStrm >> nTabs;
+ rStrm.ReadSChar( nTabs );
SvxTabStopItem* pAttr =
new SvxTabStopItem( 0, 0, SVX_TAB_ADJUST_DEFAULT, Which() );
@@ -1150,7 +1150,7 @@ SfxPoolItem* SvxTabStopItem::Create( SvStream& rStrm, sal_uInt16 ) const
sal_Int32 nPos(0);
sal_Int8 eAdjust;
unsigned char cDecimal, cFill;
- rStrm >> nPos >> eAdjust >> cDecimal >> cFill;
+ rStrm.ReadInt32( nPos ).ReadSChar( eAdjust ).ReadUChar( cDecimal ).ReadUChar( cFill );
if( !i || SVX_TAB_ADJUST_DEFAULT != eAdjust )
pAttr->Insert( SvxTabStop
( nPos, (SvxTabAdjust)eAdjust, sal_Unicode(cDecimal), sal_Unicode(cFill) ) );
@@ -1265,7 +1265,7 @@ SvStream& SvxFmtSplitItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxFmtSplitItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Int8 bIsSplit;
- rStrm >> bIsSplit;
+ rStrm.ReadSChar( bIsSplit );
return new SvxFmtSplitItem( sal_Bool( bIsSplit != 0 ), Which() );
}
@@ -1384,7 +1384,7 @@ SfxPoolItem* SvxScriptSpaceItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxScriptSpaceItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool bFlag;
- rStrm >> bFlag;
+ rStrm.ReadUChar( bFlag );
return new SvxScriptSpaceItem( bFlag, Which() );
}
@@ -1437,7 +1437,7 @@ SfxPoolItem* SvxHangingPunctuationItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxHangingPunctuationItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool nValue;
- rStrm >> nValue;
+ rStrm.ReadUChar( nValue );
return new SvxHangingPunctuationItem( nValue, Which() );
}
@@ -1490,7 +1490,7 @@ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool nValue;
- rStrm >> nValue;
+ rStrm.ReadUChar( nValue );
return new SvxForbiddenRuleItem( nValue, Which() );
}
@@ -1546,7 +1546,7 @@ SfxPoolItem* SvxParaVertAlignItem::Clone( SfxItemPool* ) const
SfxPoolItem* SvxParaVertAlignItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nVal;
- rStrm >> nVal;
+ rStrm.ReadUInt16( nVal );
return new SvxParaVertAlignItem( nVal, Which() );
}
@@ -1632,7 +1632,7 @@ SfxPoolItem* SvxParaGridItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxParaGridItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_Bool bFlag;
- rStrm >> bFlag;
+ rStrm.ReadUChar( bFlag );
return new SvxParaGridItem( bFlag, Which() );
}
diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx
index 82753f2f0b4a..493fcc1f0b46 100644
--- a/editeng/source/items/svdfield.cxx
+++ b/editeng/source/items/svdfield.cxx
@@ -39,7 +39,7 @@ bool SdrMeasureField::operator==(const SvxFieldData& rSrc) const
void SdrMeasureField::Load(SvPersistStream& rIn)
{
sal_uInt16 nFieldKind;
- rIn>>nFieldKind;
+ rIn.ReadUInt16( nFieldKind );
eMeasureFieldKind=(SdrMeasureFieldKind)nFieldKind;
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index ca05faec0fcd..19110d8028d4 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -402,9 +402,9 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 _eFamily, eFontPitch, eFontTextEncoding;
OUString aName, aStyle;
- rStrm >> _eFamily;
- rStrm >> eFontPitch;
- rStrm >> eFontTextEncoding;
+ rStrm.ReadUChar( _eFamily );
+ rStrm.ReadUChar( eFontPitch );
+ rStrm.ReadUChar( eFontTextEncoding );
// UNICODE: rStrm >> aName;
aName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
@@ -422,7 +422,7 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
// Check if we have stored unicode
sal_Size nStreamPos = rStrm.Tell();
sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER;
- rStrm >> nMagic;
+ rStrm.ReadUInt32( nMagic );
if ( nMagic == STORE_UNICODE_MAGIC_MARKER )
{
aName = rStrm.ReadUniOrByteString( RTL_TEXTENCODING_UNICODE );
@@ -504,7 +504,7 @@ SvStream& SvxPostureItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nPosture;
- rStrm >> nPosture;
+ rStrm.ReadUChar( nPosture );
return new SvxPostureItem( (const FontItalic)nPosture, Which() );
}
@@ -669,7 +669,7 @@ SvStream& SvxWeightItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nWeight;
- rStrm >> nWeight;
+ rStrm.ReadUChar( nWeight );
return new SvxWeightItem( (FontWeight)nWeight, Which() );
}
@@ -791,19 +791,19 @@ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
{
sal_uInt16 nsize, nprop = 0, nPropUnit = SFX_MAPUNIT_RELATIVE;
- rStrm >> nsize;
+ rStrm.ReadUInt16( nsize );
if( FONTHEIGHT_16_VERSION <= nVersion )
- rStrm >> nprop;
+ rStrm.ReadUInt16( nprop );
else
{
sal_uInt8 nP;
- rStrm >> nP;
+ rStrm .ReadUChar( nP );
nprop = (sal_uInt16)nP;
}
if( FONTHEIGHT_UNIT_VERSION <= nVersion )
- rStrm >> nPropUnit;
+ rStrm.ReadUInt16( nPropUnit );
SvxFontHeightItem* pItem = new SvxFontHeightItem( nsize, 100, Which() );
pItem->SetProp( nprop, (SfxMapUnit)nPropUnit );
@@ -1184,8 +1184,8 @@ SfxPoolItem* SvxFontWidthItem::Create( SvStream& rStrm,
sal_uInt16 nS;
sal_uInt16 nP;
- rStrm >> nS;
- rStrm >> nP;
+ rStrm.ReadUInt16( nS );
+ rStrm.ReadUInt16( nP );
SvxFontWidthItem* pItem = new SvxFontWidthItem( 0, nP, Which() );
pItem->SetWidthValue( nS );
return pItem;
@@ -1326,7 +1326,7 @@ SvStream& SvxTextLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nState;
- rStrm >> nState;
+ rStrm.ReadUChar( nState );
return new SvxTextLineItem( (FontUnderline)nState, Which() );
}
@@ -1454,7 +1454,7 @@ SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nState;
- rStrm >> nState;
+ rStrm.ReadUChar( nState );
return new SvxUnderlineItem( (FontUnderline)nState, Which() );
}
@@ -1487,7 +1487,7 @@ SfxPoolItem* SvxOverlineItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nState;
- rStrm >> nState;
+ rStrm.ReadUChar( nState );
return new SvxOverlineItem( (FontUnderline)nState, Which() );
}
@@ -1554,7 +1554,7 @@ SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*
SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 eCross;
- rStrm >> eCross;
+ rStrm.ReadUChar( eCross );
return new SvxCrossedOutItem( (FontStrikeout)eCross, Which() );
}
@@ -1651,7 +1651,7 @@ SvStream& SvxShadowedItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nState;
- rStrm >> nState;
+ rStrm.ReadUChar( nState );
return new SvxShadowedItem( nState, Which() );
}
@@ -1712,7 +1712,7 @@ SvStream& SvxAutoKernItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nState;
- rStrm >> nState;
+ rStrm.ReadUChar( nState );
return new SvxAutoKernItem( nState, Which() );
}
@@ -1774,7 +1774,7 @@ SvStream& SvxWordLineModeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersio
SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Bool bValue;
- rStrm >> bValue;
+ rStrm.ReadUChar( bValue );
return new SvxWordLineModeItem( bValue, Which() );
}
@@ -1835,7 +1835,7 @@ SvStream& SvxContourItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Bool bValue;
- rStrm >> bValue;
+ rStrm.ReadUChar( bValue );
return new SvxContourItem( bValue, Which() );
}
@@ -1896,7 +1896,7 @@ SvStream& SvxPropSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
SfxPoolItem* SvxPropSizeItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt16 nSize;
- rStrm >> nSize;
+ rStrm.ReadUInt16( nSize );
return new SvxPropSizeItem( nSize, Which() );
}
@@ -2093,7 +2093,7 @@ SfxPoolItem* SvxCharSetColorItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 cSet;
Color aColor;
- rStrm >> cSet;
+ rStrm.ReadUChar( cSet );
ReadColor( rStrm, aColor );
return new SvxCharSetColorItem( aColor, (rtl_TextEncoding)cSet, Which() );
}
@@ -2154,7 +2154,7 @@ bool SvxKerningItem::HasMetrics() const
SfxPoolItem* SvxKerningItem::Create(SvStream& rStrm, sal_uInt16) const
{
short nValue;
- rStrm >> nValue;
+ rStrm.ReadInt16( nValue );
return new SvxKerningItem( nValue, Which() );
}
@@ -2253,7 +2253,7 @@ SvStream& SvxCaseMapItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 cMap;
- rStrm >> cMap;
+ rStrm.ReadUChar( cMap );
return new SvxCaseMapItem( (const SvxCaseMap)cMap, Which() );
}
@@ -2394,7 +2394,7 @@ SfxPoolItem* SvxEscapementItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 _nProp;
short _nEsc;
- rStrm >> _nProp >> _nEsc;
+ rStrm.ReadUChar( _nProp ).ReadInt16( _nEsc );
return new SvxEscapementItem( _nEsc, _nProp, Which() );
}
@@ -2566,7 +2566,7 @@ SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt16 nValue;
- rStrm >> nValue;
+ rStrm.ReadUInt16( nValue );
return new SvxLanguageItem( (LanguageType)nValue, Which() );
}
@@ -2666,7 +2666,7 @@ SvStream& SvxNoLinebreakItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion
SfxPoolItem* SvxNoLinebreakItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_Bool bValue;
- rStrm >> bValue;
+ rStrm.ReadUChar( bValue );
return new SvxNoLinebreakItem( bValue, Which() );
}
@@ -2711,7 +2711,7 @@ SvStream& SvxNoHyphenItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
SfxPoolItem* SvxNoHyphenItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_Bool bValue;
- rStrm >> bValue;
+ rStrm.ReadUChar( bValue );
return new SvxNoHyphenItem( bValue, Which() );
}
@@ -2799,7 +2799,7 @@ SvStream& SvxBlinkItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) c
SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt8 nState;
- rStrm >> nState;
+ rStrm.ReadUChar( nState );
return new SvxBlinkItem( nState, Which() );
}
@@ -2862,7 +2862,7 @@ SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm,
SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nValue;
- rStrm >> nValue;
+ rStrm.ReadUInt16( nValue );
return new SvxEmphasisMarkItem( (FontEmphasisMark)nValue, Which() );
}
@@ -3104,7 +3104,7 @@ SfxPoolItem* SvxTwoLinesItem::Create( SvStream & rStrm, sal_uInt16 /*nVer*/) con
{
sal_Bool _bOn;
sal_Unicode cStart, cEnd;
- rStrm >> _bOn >> cStart >> cEnd;
+ rStrm.ReadUChar( _bOn ).ReadUInt16( cStart ).ReadUInt16( cEnd );
return new SvxTwoLinesItem( _bOn, cStart, cEnd, Which() );
}
@@ -3145,7 +3145,7 @@ SfxPoolItem* SvxCharRotateItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nVal;
sal_Bool b;
- rStrm >> nVal >> b;
+ rStrm.ReadUInt16( nVal ).ReadUChar( b );
return new SvxCharRotateItem( nVal, b, Which() );
}
@@ -3263,7 +3263,7 @@ SfxPoolItem* SvxCharScaleWidthItem::Clone( SfxItemPool* ) const
SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, sal_uInt16 ) const
{
sal_uInt16 nVal;
- rStrm >> nVal;
+ rStrm.ReadUInt16( nVal );
SvxCharScaleWidthItem* pItem = new SvxCharScaleWidthItem( nVal, Which() );
if ( Which() == EE_CHAR_FONTWIDTH )
@@ -3271,9 +3271,9 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, sal_uInt16 ) const
// Was a SvxFontWidthItem in 5.2
// sal_uInt16 nFixWidth, sal_uInt16 nPropWidth.
// nFixWidth has never been used...
- rStrm >> nVal;
+ rStrm.ReadUInt16( nVal );
sal_uInt16 nTest;
- rStrm >> nTest;
+ rStrm.ReadUInt16( nTest );
if ( nTest == 0x1234 )
pItem->SetValue( nVal );
else
@@ -3373,7 +3373,7 @@ SfxPoolItem* SvxCharReliefItem::Clone( SfxItemPool * ) const
SfxPoolItem* SvxCharReliefItem::Create(SvStream & rStrm, sal_uInt16) const
{
sal_uInt16 nVal;
- rStrm >> nVal;
+ rStrm.ReadUInt16( nVal );
return new SvxCharReliefItem( (FontRelief)nVal, Which() );
}
diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx
index 93ec06b3a531..4d2a48e2d5f4 100644
--- a/extensions/source/scanner/scanunx.cxx
+++ b/extensions/source/scanner/scanunx.cxx
@@ -63,7 +63,7 @@ css::awt::Size BitmapTransporter::getSize() throw()
if( nLen > 15 )
{
m_aStream.Seek( 4 );
- m_aStream >> aRet.Width >> aRet.Height;
+ m_aStream.ReadInt32( aRet.Width ).ReadInt32( aRet.Height );
}
else
aRet.Width = aRet.Height = 0;
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index ff2f3e74e01b..5f3b43dc2659 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -566,11 +566,11 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
// read header of the Windows-BMP file:
aTemp.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
aTemp.Seek(18);
- aTemp >> nWidth >> nHeight;
+ aTemp.ReadUInt32( nWidth ).ReadUInt32( nHeight );
aTemp.SeekRel(2);
- aTemp >> nBitsPerPixel;
+ aTemp.ReadUInt16( nBitsPerPixel );
aTemp.SeekRel(8);
- aTemp >> nResX >> nResY;
+ aTemp.ReadUInt32( nResX ).ReadUInt32( nResY );
aTemp.SeekRel(8);
nNumColors=1<<nBitsPerPixel;
@@ -584,7 +584,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
for (i=0; i<nNumColors; i++)
{
- aTemp >> nb >> ng >> nr; aTemp.SeekRel(1);
+ aTemp.ReadUChar( nb ).ReadUChar( ng ).ReadUChar( nr ); aTemp.SeekRel(1);
aPal[ (sal_uInt16) i ] = BitmapColor( nr, ng, nb );
}
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 70cdef846230..18896b063a79 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -498,10 +498,10 @@ GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Boo
sal_uInt32 nOrigPos = nPSStreamPos = rStream.Tell();
sal_uInt16 nOldFormat = rStream.GetNumberFormatInt();
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- rStream >> nSignature;
+ rStream.ReadUInt32( nSignature );
if ( nSignature == 0xc6d3d0c5 )
{
- rStream >> nPSStreamPos >> nPSSize >> nPosWMF >> nSizeWMF;
+ rStream.ReadUInt32( nPSStreamPos ).ReadUInt32( nPSSize ).ReadUInt32( nPosWMF ).ReadUInt32( nSizeWMF );
// first we try to get the metafile grafix
@@ -516,7 +516,7 @@ GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Boo
}
else
{
- rStream >> nPosTIFF >> nSizeTIFF;
+ rStream.ReadUInt32( nPosTIFF ).ReadUInt32( nSizeTIFF );
// else we have to get the tiff grafix
@@ -584,7 +584,7 @@ GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Boo
{
while ( bIsValid && ( nBitsLeft != 7 ) )
{
- rStream >> nByte;
+ rStream.ReadChar( nByte );
switch ( nByte )
{
case 0x0a :
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index d85eb5d6dfb1..25feb0c196ca 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -728,7 +728,7 @@ Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex)
sal_uInt16 OS2METReader::ReadBigEndianWord()
{
sal_uInt8 nLo,nHi;
- *pOS2MET >> nHi >> nLo;
+ pOS2MET->ReadUChar( nHi ).ReadUChar( nLo );
return (((sal_uInt16)nHi)<<8)|(((sal_uInt16)nLo)&0x00ff);
}
@@ -736,7 +736,7 @@ sal_uLong OS2METReader::ReadBigEndian3BytesLong()
{
sal_uInt16 nLo;
sal_uInt8 nHi;
- *pOS2MET >> nHi;
+ pOS2MET->ReadUChar( nHi );
nLo=ReadBigEndianWord();
return ((((sal_uLong)nHi)<<16)&0x00ff0000)|((sal_uLong)nLo);
}
@@ -745,7 +745,7 @@ sal_uLong OS2METReader::ReadLittleEndian3BytesLong()
{
sal_uInt8 nHi,nMed,nLo;
- *pOS2MET >> nLo >> nMed >> nHi;
+ pOS2MET->ReadUChar( nLo ).ReadUChar( nMed ).ReadUChar( nHi );
return ((((sal_uLong)nHi)&0xff)<<16)|((((sal_uLong)nMed)&0xff)<<8)|(((sal_uLong)nLo)&0xff);
}
@@ -753,8 +753,8 @@ long OS2METReader::ReadCoord(sal_Bool b32)
{
sal_Int32 l;
- if (b32) *pOS2MET >> l;
- else { short s;*pOS2MET >> s; l=(sal_Int32)s; }
+ if (b32) pOS2MET->ReadInt32( l );
+ else { short s;pOS2MET->ReadInt16( s ); l=(sal_Int32)s; }
return l;
}
@@ -827,8 +827,8 @@ void OS2METReader::ReadRelLine(sal_Bool bGivenPos, sal_uInt16 nOrderLen)
*pOS2MET >> nunsignedbyte; aP0.Y()+=(sal_Int8)nunsignedbyte;
#else
sal_Int8 nsignedbyte;
- *pOS2MET >> nsignedbyte; aP0.X()+=(long)nsignedbyte;
- *pOS2MET >> nsignedbyte; aP0.Y()-=(long)nsignedbyte;
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.X()+=(long)nsignedbyte;
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.Y()-=(long)nsignedbyte;
#endif
aCalcBndRect.Union(Rectangle(aP0,Size(1,1)));
aPolygon.SetPoint(aP0,i);
@@ -850,7 +850,7 @@ void OS2METReader::ReadBox(sal_Bool bGivenPos)
Point P0;
long nHRound,nVRound;
- *pOS2MET >> nFlags;
+ pOS2MET->ReadUChar( nFlags );
pOS2MET->SeekRel(1);
if ( bGivenPos )
@@ -912,7 +912,7 @@ void OS2METReader::ReadBitBlt()
long nt;
pOS2MET->SeekRel(4);
- *pOS2MET >> nID;
+ pOS2MET->ReadUInt32( nID );
pOS2MET->SeekRel(4);
aP1=ReadPoint(); aP2=ReadPoint();
if (aP1.X() > aP2.X()) { nt=aP1.X(); aP1.X()=aP2.X(); aP2.X()=nt; }
@@ -954,7 +954,7 @@ void OS2METReader::ReadChrStr(sal_Bool bGivenPos, sal_Bool bMove, sal_Bool bExtr
pOS2MET->SeekRel(2);
ReadPoint( sal_False );
ReadPoint( sal_False );
- *pOS2MET >> nLen;
+ pOS2MET->ReadUInt16( nLen );
}
else
{
@@ -967,7 +967,7 @@ void OS2METReader::ReadChrStr(sal_Bool bGivenPos, sal_Bool bMove, sal_Bool bExtr
}
pChr = new char[nLen+1];
for (i=0; i<nLen; i++)
- *pOS2MET >> pChr[i];
+ pOS2MET->ReadChar( pChr[i] );
pChr[nLen] = 0;
OUString aStr( (const sal_Char*)pChr, strlen(pChr), osl_getThreadTextEncoding() );
SetRasterOp(aAttr.eChrMix);
@@ -1062,8 +1062,8 @@ void OS2METReader::ReadFullArc(sal_Bool bGivenPos, sal_uInt16 nOrderSize)
if (nQ<0) nQ=-nQ;
if (nR<0) nR=-nR;
if (nS<0) nS=-nS;
- if (nOrderSize>=4) *pOS2MET >> nMul;
- else { *pOS2MET >> nMulS; nMul=((sal_uLong)nMulS)<<8; }
+ if (nOrderSize>=4) pOS2MET->ReadUInt32( nMul );
+ else { pOS2MET->ReadUInt16( nMulS ); nMul=((sal_uLong)nMulS)<<8; }
if (nMul!=0x00010000) {
nP=(nP*nMul)>>16;
nQ=(nQ*nMul)>>16;
@@ -1112,8 +1112,8 @@ void OS2METReader::ReadPartialArc(sal_Bool bGivenPos, sal_uInt16 nOrderSize)
if (nQ<0) nQ=-nQ;
if (nR<0) nR=-nR;
if (nS<0) nS=-nS;
- if (nOrderSize>=12) *pOS2MET >> nMul;
- else { *pOS2MET >> nMulS; nMul=((sal_uLong)nMulS)<<8; }
+ if (nOrderSize>=12) pOS2MET->ReadUInt32( nMul );
+ else { pOS2MET->ReadUInt16( nMulS ); nMul=((sal_uLong)nMulS)<<8; }
if (nMul!=0x00010000) {
nP=(nP*nMul)>>16;
nQ=(nQ*nMul)>>16;
@@ -1121,7 +1121,7 @@ void OS2METReader::ReadPartialArc(sal_Bool bGivenPos, sal_uInt16 nOrderSize)
nS=(nS*nMul)>>16;
}
- *pOS2MET >> nStart >> nSweep;
+ pOS2MET->ReadInt32( nStart ).ReadInt32( nSweep );
fStart=((double)nStart)/65536.0/180.0*3.14159265359;
fEnd=fStart+((double)nSweep)/65536.0/180.0*3.14159265359;
aPStart=Point(aCenter.X()+(sal_Int32)( cos(fStart)*nP),
@@ -1149,9 +1149,9 @@ void OS2METReader::ReadPolygons()
Point aPoint;
sal_uInt8 nFlags;
- *pOS2MET >> nFlags >> nNumPolys;
+ pOS2MET->ReadUChar( nFlags ).ReadUInt32( nNumPolys );
for (i=0; i<nNumPolys; i++) {
- *pOS2MET >> nNumPoints;
+ pOS2MET->ReadUInt32( nNumPoints );
if (i==0) nNumPoints++;
aPoly.SetSize((short)nNumPoints);
for (j=0; j<nNumPoints; j++) {
@@ -1432,7 +1432,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
OSArea * p=new OSArea;
p->bClosed=sal_False;
p->pSucc=pAreaStack; pAreaStack=p;
- *pOS2MET >> (p->nFlags);
+ pOS2MET->ReadUChar( p->nFlags );
p->aCol=aAttr.aPatCol;
p->aBgCol=aAttr.aPatBgCol;
p->eMix=aAttr.ePatMix;
@@ -1479,7 +1479,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
OSPath * p=new OSPath;
p->pSucc=pPathStack; pPathStack=p;
pOS2MET->SeekRel(2);
- *pOS2MET >> p->nID;
+ pOS2MET->ReadUInt32( p->nID );
p->bClosed=sal_False;
p->bStroke=sal_False;
break;
@@ -1508,8 +1508,8 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uInt16 nDummy;
OSPath* p = pPathList;
- *pOS2MET >> nDummy
- >> nID;
+ pOS2MET->ReadUInt16( nDummy )
+ .ReadUInt32( nID );
if ( ! ( nDummy & 0x20 ) ) // #30933# i do not know the exact meaning of this bit,
{ // but if set it seems to be better not to fill this path
@@ -1561,7 +1561,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uInt16 i,nC;
OSPath* p=pPathList;
pOS2MET->SeekRel(2);
- *pOS2MET >> nID;
+ pOS2MET->ReadUInt32( nID );
while (p!=NULL && p->nID!=nID)
p=p->pSucc;
@@ -1585,7 +1585,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uInt32 nID;
OSPath * p=pPathList;
pOS2MET->SeekRel(2);
- *pOS2MET >> nID;
+ pOS2MET->ReadUInt32( nID );
if (nID==0) p=NULL;
while (p!=NULL && p->nID!=nID) p=p->pSucc;
if (p!=NULL) pVirDev->SetClipRegion(Region(p->aPPoly));
@@ -1629,7 +1629,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uLong nVal;
Color aCol;
RasterOp eROP;
- *pOS2MET >> nA >> nP >> nFlags;
+ pOS2MET->ReadUChar( nA ).ReadUChar( nP ).ReadUChar( nFlags );
if (nOrderID==GOrdPIvAtr) {
pAttrStack->nIvAttrA=nA;
pAttrStack->nIvAttrP=nP;
@@ -1675,7 +1675,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
}
}
else {
- *pOS2MET >> nMix;
+ pOS2MET->ReadUChar( nMix );
if (nMix==0) {
switch (nP) {
case 1: aAttr.eLinBgMix=aDefAttr.eLinBgMix; break;
@@ -1703,7 +1703,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uInt8 nFlags;
sal_uLong nVal;
Color aCol;
- *pOS2MET >> nFlags;
+ pOS2MET->ReadUChar( nFlags );
if ((nFlags&0x80)!=0) {
aAttr.aLinCol=aDefAttr.aLinCol;
aAttr.aChrCol=aDefAttr.aChrCol;
@@ -1732,9 +1732,9 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uInt16 nVal;
Color aCol;
if (nOrderID==GOrdPColor || nOrderID==GOrdSColor) {
- *pOS2MET >> nbyte; nVal=((sal_uInt16)nbyte)|0xff00;
+ pOS2MET->ReadUChar( nbyte ); nVal=((sal_uInt16)nbyte)|0xff00;
}
- else *pOS2MET >> nVal;
+ else pOS2MET->ReadUInt16( nVal );
if (nVal==0x0000 || nVal==0xff00) {
aAttr.aLinCol=aDefAttr.aLinCol;
aAttr.aChrCol=aDefAttr.aChrCol;
@@ -1757,7 +1757,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdSBgCol: {
sal_uInt16 nVal;
Color aCol;
- *pOS2MET >> nVal;
+ pOS2MET->ReadUInt16( nVal );
if (nVal==0x0000 || nVal==0xff00) {
aAttr.aLinBgCol=aDefAttr.aLinBgCol;
aAttr.aChrBgCol=aDefAttr.aChrBgCol;
@@ -1780,7 +1780,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uInt8 nFlags;
sal_uLong nVal;
Color aCol;
- *pOS2MET >> nFlags;
+ pOS2MET->ReadUChar( nFlags );
if ((nFlags&0x80)!=0) {
aAttr.aLinBgCol=aDefAttr.aLinBgCol;
aAttr.aChrBgCol=aDefAttr.aChrBgCol;
@@ -1804,7 +1804,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPMixMd: PushAttr(nOrderID);
case GOrdSMixMd: {
sal_uInt8 nMix;
- *pOS2MET >> nMix;
+ pOS2MET->ReadUChar( nMix );
if (nMix==0) {
aAttr.eLinMix=aDefAttr.eLinMix;
aAttr.eChrMix=aDefAttr.eChrMix;
@@ -1821,7 +1821,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPBgMix: PushAttr(nOrderID);
case GOrdSBgMix: {
sal_uInt8 nMix;
- *pOS2MET >> nMix;
+ pOS2MET->ReadUChar( nMix );
if (nMix==0) {
aAttr.eLinBgMix=aDefAttr.eLinBgMix;
aAttr.eChrBgMix=aDefAttr.eChrBgMix;
@@ -1842,7 +1842,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPPtSym: PushAttr(nOrderID);
case GOrdSPtSym: {
sal_uInt8 nPatt;
- *pOS2MET >> nPatt;
+ pOS2MET->ReadUChar( nPatt );
aAttr.bFill = ( nPatt != 0x0f );
break;
}
@@ -1862,7 +1862,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPLnTyp: PushAttr(nOrderID);
case GOrdSLnTyp: {
sal_uInt8 nType;
- *pOS2MET >> nType;
+ pOS2MET->ReadUChar( nType );
switch (nType) {
case 0: aAttr.eLinStyle=aDefAttr.eLinStyle; break;
case 1: case 4: aAttr.eLinStyle=PEN_DOT; break;
@@ -1876,7 +1876,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPLnWdt: PushAttr(nOrderID);
case GOrdSLnWdt: {
sal_uInt8 nbyte;
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if (nbyte==0) aAttr.nLinWidth=aDefAttr.nLinWidth;
else aAttr.nLinWidth=(sal_uInt16)nbyte-1;
break;
@@ -1890,7 +1890,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
{
sal_uInt8 nFlags;
- *pOS2MET >> nFlags;
+ pOS2MET->ReadUChar( nFlags );
if ( nFlags & 0x80 )
aAttr.nStrLinWidth = aDefAttr.nStrLinWidth;
else
@@ -1913,7 +1913,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPChSet: PushAttr(nOrderID);
case GOrdSChSet: {
- sal_uInt8 nbyte; *pOS2MET >> nbyte;
+ sal_uInt8 nbyte; pOS2MET->ReadUChar( nbyte );
aAttr.nChrSet=((sal_uLong)nbyte)&0xff;
break;
}
@@ -1944,7 +1944,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
pOS2MET->SeekRel(4); nLen-=4;
}
if (nLen>=2) {
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if ((nbyte&0x80)==0 && aAttr.aChrCellSize==Size(0,0))
aAttr.aChrCellSize=aDefAttr.aChrCellSize;
}
@@ -1965,7 +1965,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPMkPrc: PushAttr(nOrderID);
case GOrdSMkPrc: {
sal_uInt8 nbyte;
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if (nbyte==0) aAttr.nMrkPrec=aDefAttr.nMrkPrec;
else aAttr.nMrkPrec=nbyte;
break;
@@ -1974,7 +1974,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPMkSet: PushAttr(nOrderID);
case GOrdSMkSet: {
sal_uInt8 nbyte;
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if (nbyte==0) aAttr.nMrkSet=aDefAttr.nMrkSet;
else aAttr.nMrkSet=nbyte;
break;
@@ -1983,7 +1983,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdPMkSym: PushAttr(nOrderID);
case GOrdSMkSym: {
sal_uInt8 nbyte;
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if (nbyte==0) aAttr.nMrkSymbol=aDefAttr.nMrkSymbol;
else aAttr.nMrkSymbol=nbyte;
break;
@@ -1997,7 +1997,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
aAttr.aMrkCellSize.Height()=ReadCoord(bCoord32);
if (bCoord32) nLen-=8; else nLen-=4;
if (nLen>=2) {
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if ((nbyte&0x80)==0 && aAttr.aMrkCellSize==Size(0,0))
aAttr.aMrkCellSize=aDefAttr.aMrkCellSize;
}
@@ -2041,7 +2041,7 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
case 0x00f7: { // 'Specify GVM Subset'
sal_uInt8 nbyte;
pOS2MET->SeekRel(6);
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if (nbyte==0x05) bCoord32=sal_True;
else if (nbyte==0x04) bCoord32=sal_False;
else {
@@ -2058,7 +2058,7 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
long x1,y1,x2,y2,nt,xr,yr;
pOS2MET->SeekRel(2);
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if (nbyte==0x05)
b32=sal_True;
@@ -2071,7 +2071,7 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
ErrorCode=2;
}
- *pOS2MET >> nUnitType;
+ pOS2MET->ReadUChar( nUnitType );
xr=ReadCoord(b32);
yr=ReadCoord(b32);
@@ -2142,7 +2142,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
case 0x0096: { // Image IDE-Size
sal_uInt8 nbyte;
- *pOS2MET >> nbyte; p->nBitsPerPixel=nbyte;
+ pOS2MET->ReadUChar( nbyte ); p->nBitsPerPixel=nbyte;
break;
}
@@ -2223,11 +2223,11 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
nMaxPos=nPos+(sal_uLong)nFieldSize;
pOS2MET->SeekRel(2); nPos+=2;
while (nPos<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nByte; nLen =((sal_uInt16)nByte) & 0x00ff;
- *pOS2MET >> nTripType;
+ pOS2MET->ReadUChar( nByte ); nLen =((sal_uInt16)nByte) & 0x00ff;
+ pOS2MET->ReadUChar( nTripType );
switch (nTripType) {
case 0x02:
- *pOS2MET >> nTripType2;
+ pOS2MET->ReadUChar( nTripType2 );
switch (nTripType2) {
case 0x84: // Font name
break;
@@ -2245,10 +2245,10 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
}
break;
case 0x24: // Icid
- *pOS2MET >> nTripType2;
+ pOS2MET->ReadUChar( nTripType2 );
switch (nTripType2) {
case 0x05: //Icid
- *pOS2MET >> nByte;
+ pOS2MET->ReadUChar( nByte );
pF->nID=((sal_uLong)nByte)&0xff;
break;
}
@@ -2258,7 +2258,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
case 0x1f: { // Font Attributes
FontWeight eWeight;
sal_uInt8 nbyte;
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
switch (nbyte) {
case 1: eWeight=WEIGHT_THIN; break;
case 2: eWeight=WEIGHT_ULTRALIGHT; break;
@@ -2304,12 +2304,12 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
nMaxPos=nPos+(sal_uLong)nFieldSize;
pOS2MET->SeekRel(3); nPos+=3;
while (nPos<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nElemLen=((sal_uInt16)nbyte) & 0x00ff;
+ pOS2MET->ReadUChar( nbyte ); nElemLen=((sal_uInt16)nbyte) & 0x00ff;
if (nElemLen>11) {
pOS2MET->SeekRel(4);
nStartIndex=ReadBigEndianWord();
pOS2MET->SeekRel(3);
- *pOS2MET >> nbyte; nBytesPerCol=((sal_uInt16)nbyte) & 0x00ff;
+ pOS2MET->ReadUChar( nbyte ); nBytesPerCol=((sal_uInt16)nbyte) & 0x00ff;
nEndIndex=nStartIndex+(nElemLen-11)/nBytesPerCol;
for (i=nStartIndex; i<nEndIndex; i++) {
if (nBytesPerCol > 3) pOS2MET->SeekRel(nBytesPerCol-3);
@@ -2338,7 +2338,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
sal_uInt8 i,nbyte,nbyte2;
pB->nID=0;
for (i=0; i<4; i++) {
- *pOS2MET >> nbyte >> nbyte2;
+ pOS2MET->ReadUChar( nbyte ).ReadUChar( nbyte2 );
nbyte=((nbyte-0x30)<<4)|(nbyte2-0x30);
pB->nID=(pB->nID>>8)|(((sal_uLong)nbyte)<<24);
}
@@ -2384,15 +2384,15 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
nPos=pOS2MET->Tell();
nMaxPos=nPos+(sal_uLong)nFieldSize;
while (nPos<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nDataID=((sal_uInt16)nbyte)&0x00ff;
+ pOS2MET->ReadUChar( nbyte ); nDataID=((sal_uInt16)nbyte)&0x00ff;
if (nDataID==0x00fe) {
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
nDataID=(nDataID<<8)|(((sal_uInt16)nbyte)&0x00ff);
nDataLen=ReadBigEndianWord();
nPos+=4;
}
else {
- *pOS2MET >> nbyte; nDataLen=((sal_uInt16)nbyte)&0x00ff;
+ pOS2MET->ReadUChar( nbyte ); nDataLen=((sal_uInt16)nbyte)&0x00ff;
nPos+=2;
}
ReadImageData(nDataID, nDataLen);
@@ -2427,7 +2427,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
pOS2MET->Seek(0);
// "Segment header":
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
if (nbyte==0x70) { // header exists
pOS2MET->SeekRel(15); // but we don't need it
}
@@ -2435,9 +2435,9 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
// loop through Order:
while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nOrderID=((sal_uInt16)nbyte) & 0x00ff;
+ pOS2MET->ReadUChar( nbyte ); nOrderID=((sal_uInt16)nbyte) & 0x00ff;
if (nOrderID==0x00fe) {
- *pOS2MET >> nbyte;
+ pOS2MET->ReadUChar( nbyte );
nOrderID=(nOrderID << 8) | (((sal_uInt16)nbyte) & 0x00ff);
}
if (nOrderID>0x00ff || nOrderID==GOrdPolygn) {
@@ -2446,13 +2446,13 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
// In reality there are files in which the length is stored as little endian word
// (at least for nOrderID==GOrdPolygn)
// So we throw a coin or what else can we do?
- *pOS2MET >> nbyte; nOrderLen=(sal_uInt16)nbyte&0x00ff;
- *pOS2MET >> nbyte; if (nbyte!=0) nOrderLen=nOrderLen<<8|(((sal_uInt16)nbyte)&0x00ff);
+ pOS2MET->ReadUChar( nbyte ); nOrderLen=(sal_uInt16)nbyte&0x00ff;
+ pOS2MET->ReadUChar( nbyte ); if (nbyte!=0) nOrderLen=nOrderLen<<8|(((sal_uInt16)nbyte)&0x00ff);
}
else if (nOrderID==GOrdSTxAlg || nOrderID==GOrdPTxAlg) nOrderLen=2;
else if ((nOrderID&0xff88)==0x0008) nOrderLen=1;
else if (nOrderID==0x0000 || nOrderID==0x00ff) nOrderLen=0;
- else { *pOS2MET >> nbyte; nOrderLen=((sal_uInt16)nbyte) & 0x00ff; }
+ else { pOS2MET->ReadUChar( nbyte ); nOrderLen=((sal_uInt16)nbyte) & 0x00ff; }
nPos=pOS2MET->Tell();
ReadOrder(nOrderID, nOrderLen);
if (nPos+nOrderLen < pOS2MET->Tell()) {
@@ -2479,8 +2479,8 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
nMaxPos=pOS2MET->Tell()+(sal_uLong)nFieldSize;
while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==0) {
- *pOS2MET >> nbyte; nDscID =((sal_uInt16)nbyte) & 0x00ff;
- *pOS2MET >> nbyte; nDscLen=((sal_uInt16)nbyte) & 0x00ff;
+ pOS2MET->ReadUChar( nbyte ); nDscID =((sal_uInt16)nbyte) & 0x00ff;
+ pOS2MET->ReadUChar( nbyte ); nDscLen=((sal_uInt16)nbyte) & 0x00ff;
nPos=pOS2MET->Tell();
ReadDsc(nDscID, nDscLen);
pOS2MET->Seek(nPos+nDscLen);
@@ -2597,13 +2597,13 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
nFieldSize=ReadBigEndianWord();
- *pOS2MET >> nMagicByte;
+ pOS2MET->ReadUChar( nMagicByte );
if (nMagicByte!=0xd3) {
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=7;
break;
}
- *pOS2MET >> nFieldType;
+ pOS2MET->ReadUInt16( nFieldType );
pOS2MET->SeekRel(3);
nPos+=8; nFieldSize-=8;
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index ee9feb034890..a314f2b35f64 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -157,7 +157,7 @@ sal_Bool PBMReader::ImplReadHeader()
sal_uInt8 nMax, nCount = 0;
sal_Bool bFinished = sal_False;
- mrPBM >> nID[ 0 ] >> nID[ 1 ];
+ mrPBM.ReadUChar( nID[ 0 ] ).ReadUChar( nID[ 1 ] );
if ( nID[ 0 ] != 'P' )
return sal_False;
mnMaxVal = mnWidth = mnHeight = 0;
@@ -190,7 +190,7 @@ sal_Bool PBMReader::ImplReadHeader()
if ( mrPBM.GetError() )
return sal_False;
- mrPBM >> nDat;
+ mrPBM.ReadUChar( nDat );
if ( nDat == '#' )
{
@@ -268,7 +268,7 @@ sal_Bool PBMReader::ImplReadBody()
if ( --nShift < 0 )
{
- mrPBM >> nDat;
+ mrPBM.ReadUChar( nDat );
nShift = 7;
}
mpAcc->SetPixelIndex( nHeight, nWidth, nDat >> nShift );
@@ -289,7 +289,7 @@ sal_Bool PBMReader::ImplReadBody()
if ( mrPBM.IsEof() || mrPBM.GetError() )
return sal_False;
- mrPBM >> nDat;
+ mrPBM.ReadUChar( nDat );
mpAcc->SetPixelIndex( nHeight, nWidth++, nDat);
if ( nWidth == mnWidth )
@@ -310,7 +310,7 @@ sal_Bool PBMReader::ImplReadBody()
sal_uInt8 nR, nG, nB;
sal_uLong nRed, nGreen, nBlue;
- mrPBM >> nR >> nG >> nB;
+ mrPBM.ReadUChar( nR ).ReadUChar( nG ).ReadUChar( nB );
nRed = 255 * nR / mnMaxVal;
nGreen = 255 * nG / mnMaxVal;
nBlue = 255 * nB / mnMaxVal;
@@ -334,7 +334,7 @@ sal_Bool PBMReader::ImplReadBody()
if ( mrPBM.IsEof() || mrPBM.GetError() )
return sal_False;
- mrPBM >> nDat;
+ mrPBM.ReadUChar( nDat );
if ( nDat == '#' )
{
@@ -395,7 +395,7 @@ sal_Bool PBMReader::ImplReadBody()
if ( mrPBM.IsEof() || mrPBM.GetError() )
return sal_False;
- mrPBM >> nDat;
+ mrPBM.ReadUChar( nDat );
if ( nDat == '#' )
{
@@ -471,7 +471,7 @@ sal_Bool PBMReader::ImplReadBody()
if ( mrPBM.IsEof() || mrPBM.GetError() )
return sal_False;
- mrPBM >> nDat;
+ mrPBM.ReadUChar( nDat );
if ( nDat == '#' )
{
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index b5be77d85f42..02b4db2701d6 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -188,7 +188,7 @@ void PCDReader::ReadOrientation()
if ( bStatus == sal_False )
return;
m_rPCD.Seek( 194635 );
- m_rPCD >> nOrientation;
+ m_rPCD.ReadUChar( nOrientation );
nOrientation &= 0x03;
}
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 54579ff0aa74..5fbbe06574eb 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -152,15 +152,15 @@ void PCXReader::ImplReadHeader()
sal_uInt16 nushort;
sal_uInt16 nMinX,nMinY,nMaxX,nMaxY;
- m_rPCX >> nbyte >> nVersion >> nEncoding;
+ m_rPCX.ReadUChar( nbyte ).ReadUChar( nVersion ).ReadUChar( nEncoding );
if ( nbyte!=0x0a || (nVersion != 0 && nVersion != 2 && nVersion != 3 && nVersion != 5) || nEncoding > 1 )
{
nStatus = sal_False;
return;
}
- m_rPCX >> nbyte; nBitsPerPlanePix = (sal_uLong)nbyte;
- m_rPCX >> nMinX >> nMinY >> nMaxX >> nMaxY;
+ m_rPCX.ReadUChar( nbyte ); nBitsPerPlanePix = (sal_uLong)nbyte;
+ m_rPCX.ReadUInt16( nMinX ).ReadUInt16( nMinY ).ReadUInt16( nMaxX ).ReadUInt16( nMaxY );
if ((nMinX > nMaxX) || (nMinY > nMaxY))
{
@@ -171,17 +171,17 @@ void PCXReader::ImplReadHeader()
nWidth = nMaxX-nMinX+1;
nHeight = nMaxY-nMinY+1;
- m_rPCX >> nResX;
- m_rPCX >> nResY;
+ m_rPCX.ReadUInt16( nResX );
+ m_rPCX.ReadUInt16( nResY );
if ( nResX >= nWidth || nResY >= nHeight || ( nResX != nResY ) )
nResX = nResY = 0;
ImplReadPalette( 16 );
m_rPCX.SeekRel( 1 );
- m_rPCX >> nbyte; nPlanes = (sal_uLong)nbyte;
- m_rPCX >> nushort; nBytesPerPlaneLin = (sal_uLong)nushort;
- m_rPCX >> nPaletteInfo;
+ m_rPCX.ReadUChar( nbyte ); nPlanes = (sal_uLong)nbyte;
+ m_rPCX.ReadUInt16( nushort ); nBytesPerPlaneLin = (sal_uLong)nushort;
+ m_rPCX.ReadUInt16( nPaletteInfo );
m_rPCX.SeekRel( 58 );
@@ -245,11 +245,11 @@ void PCXReader::ImplReadBody()
}
while ( nx > 0 )
{
- m_rPCX >> nDat;
+ m_rPCX.ReadUChar( nDat );
if ( ( nDat & 0xc0 ) == 0xc0 )
{
nCount =( (sal_uLong)nDat ) & 0x003f;
- m_rPCX >> nDat;
+ m_rPCX.ReadUChar( nDat );
if ( nCount < nx )
{
nx -= nCount;
@@ -387,7 +387,7 @@ void PCXReader::ImplReadPalette( sal_uLong nCol )
sal_uInt8* pPtr = pPalette;
for ( sal_uLong i = 0; i < nCol; i++ )
{
- m_rPCX >> r >> g >> b;
+ m_rPCX.ReadUChar( r ).ReadUChar( g ).ReadUChar( b );
*pPtr++ = r;
*pPtr++ = g;
*pPtr++ = b;
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index d5aa1ef5569f..920248ddb5a6 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -89,7 +89,7 @@ namespace PictReaderInternal {
// count the no of bits in pattern which are set to 1:
nBitCount=0;
for (ny=0; ny<8; ny++) {
- stream >> ((char&)nbyte[ny]);
+ stream.ReadChar( (char&)nbyte[ny] );
for (nx=0; nx<8; nx++) {
if ( (nbyte[ny] & (1<<nx)) != 0 ) nBitCount++;
}
@@ -358,7 +358,7 @@ Point PictReader::ReadPoint()
{
short nx,ny;
- *pPict >> ny >> nx;
+ pPict->ReadInt16( ny ).ReadInt16( nx );
return Point( (long)nx - aBoundingRect.Left(),
(long)ny - aBoundingRect.Top() );
@@ -368,7 +368,7 @@ Point PictReader::ReadDeltaH(Point aBase)
{
signed char ndh;
- *pPict >> ((char&)ndh);
+ pPict->ReadChar( (char&)ndh );
return Point( aBase.X() + (long)ndh, aBase.Y() );
}
@@ -377,7 +377,7 @@ Point PictReader::ReadDeltaV(Point aBase)
{
signed char ndv;
- *pPict >> ((char&)ndv);
+ pPict->ReadChar( (char&)ndv );
return Point( aBase.X(), aBase.Y() + (long)ndv );
}
@@ -386,7 +386,7 @@ Point PictReader::ReadUnsignedDeltaH(Point aBase)
{
sal_uInt8 ndh;
- *pPict >> ndh;
+ pPict->ReadUChar( ndh );
return Point( aBase.X() + (long)ndh, aBase.Y() );
}
@@ -395,7 +395,7 @@ Point PictReader::ReadUnsignedDeltaV(Point aBase)
{
sal_uInt8 ndv;
- *pPict >> ndv;
+ pPict->ReadUChar( ndv );
return Point( aBase.X(), aBase.Y() + (long)ndv );
}
@@ -404,7 +404,7 @@ Size PictReader::ReadSize()
{
short nx,ny;
- *pPict >> ny >> nx;
+ pPict->ReadInt16( ny ).ReadInt16( nx );
return Size( (long)nx, (long)ny );
}
@@ -414,7 +414,7 @@ Color PictReader::ReadColor()
sal_uInt32 nCol;
Color aCol;
- *pPict >> nCol;
+ pPict->ReadUInt32( nCol );
switch (nCol)
{
case 33: aCol=Color( COL_BLACK ); break;
@@ -435,7 +435,7 @@ Color PictReader::ReadRGBColor()
{
sal_uInt16 nR, nG, nB;
- *pPict >> nR >> nG >> nB;
+ pPict->ReadUInt16( nR ).ReadUInt16( nG ).ReadUInt16( nB );
return Color( (sal_uInt8) ( nR >> 8 ), (sal_uInt8) ( nG >> 8 ), (sal_uInt8) ( nB >> 8 ) );
}
@@ -455,7 +455,7 @@ sal_uLong PictReader::ReadPolygon(Polygon & rPoly)
sal_uInt16 nSize,i;
sal_uLong nDataSize;
- *pPict >> nSize;
+ pPict->ReadUInt16( nSize );
pPict->SeekRel(8);
nDataSize=(sal_uLong)nSize;
nSize=(nSize-10)/4;
@@ -475,7 +475,7 @@ sal_uLong PictReader::ReadPixPattern(PictReader::Pattern &pattern)
sal_uInt16 nPatType;
Bitmap aBMP;
- *pPict >> nPatType;
+ pPict->ReadUInt16( nPatType );
if (nPatType==1) {
pattern.read(*pPict);
nDataSize=ReadPixMapEtc(aBMP,sal_False,sal_True,NULL,NULL,sal_False,sal_False);
@@ -486,7 +486,7 @@ sal_uLong PictReader::ReadPixPattern(PictReader::Pattern &pattern)
pattern.read(*pPict);
// RGBColor
sal_uInt16 nR, nG, nB;
- *pPict >> nR >> nG >> nB;
+ pPict->ReadUInt16( nR ).ReadUInt16( nG ).ReadUInt16( nB );
Color col((sal_uInt8) ( nR >> 8 ), (sal_uInt8) ( nG >> 8 ), (sal_uInt8) ( nB >> 8 ) );
pattern.setColor(col);
nDataSize=16;
@@ -570,7 +570,7 @@ sal_uLong PictReader::ReadAndDrawSameArc(PictDrawingMethod eMethod)
short nstartAngle, narcAngle;
double fAng1, fAng2;
- *pPict >> nstartAngle >> narcAngle;
+ pPict->ReadInt16( nstartAngle ).ReadInt16( narcAngle );
if (IsInvisible(eMethod)) return 4;
DrawingMethod(eMethod);
@@ -588,7 +588,7 @@ sal_uLong PictReader::ReadAndDrawRgn(PictDrawingMethod eMethod)
{
sal_uInt16 nSize;
- *pPict >> nSize;
+ pPict->ReadUInt16( nSize );
// read the DATA
//
// a region data is a mask and is probably coded as
@@ -675,7 +675,7 @@ sal_uLong PictReader::ReadAndDrawText()
sal_uInt32 nLen, nDataLen;
sal_Char sText[256];
- *pPict >> nByteLen; nLen=((sal_uLong)nByteLen)&0x000000ff;
+ pPict->ReadChar( nByteLen ); nLen=((sal_uLong)nByteLen)&0x000000ff;
nDataLen = nLen + 1;
pPict->Read( &sText, nLen );
@@ -715,15 +715,14 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
}
// Read PixMap or Bitmap structure;
- *pPict >> nRowBytes >> nBndY >> nBndX >> nHeight >> nWidth;
+ pPict->ReadUInt16( nRowBytes ).ReadUInt16( nBndY ).ReadUInt16( nBndX ).ReadUInt16( nHeight ).ReadUInt16( nWidth );
nHeight = nHeight - nBndY;
nWidth = nWidth - nBndX;
if ( ( nRowBytes & 0x8000 ) != 0 )
{ // it is a PixMap
nRowBytes &= 0x3fff;
- *pPict >> nVersion >> nPackType >> nPackSize >> nHRes >> nVRes >> nPixelType >>
- nPixelSize >> nCmpCount >> nCmpSize >> nPlaneBytes;
+ pPict->ReadUInt16( nVersion ).ReadUInt16( nPackType ).ReadUInt32( nPackSize ).ReadUInt32( nHRes ).ReadUInt32( nVRes ).ReadUInt16( nPixelType ). ReadUInt16( nPixelSize ).ReadUInt16( nCmpCount ).ReadUInt16( nCmpSize ).ReadUInt32( nPlaneBytes );
pPict->SeekRel( 8 );
nDataSize += 46;
@@ -741,7 +740,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
if ( bColorTable )
{
pPict->SeekRel( 6 );
- *pPict >> nColTabSize;
+ pPict->ReadUInt16( nColTabSize );
if ( ++nColTabSize > 256 )
BITMAPERROR;
@@ -751,7 +750,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
for ( i = 0; i < nColTabSize; i++ )
{
pPict->SeekRel(2);
- *pPict >> nRed >> nDummy >> nGreen >> nDummy >> nBlue >> nDummy;
+ pPict->ReadUChar( nRed ).ReadUChar( nDummy ).ReadUChar( nGreen ).ReadUChar( nDummy ).ReadUChar( nBlue ).ReadUChar( nDummy );
pAcc->SetPaletteColor( (sal_uInt16) i, BitmapColor( nRed, nGreen, nBlue ) );
}
nDataSize += 8 + nColTabSize * 8;
@@ -778,7 +777,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
if ( pSrcRect != 0)
{
sal_uInt16 nTop, nLeft, nBottom, nRight;
- *pPict >> nTop >> nLeft >> nBottom >> nRight;
+ pPict->ReadUInt16( nTop ).ReadUInt16( nLeft ).ReadUInt16( nBottom ).ReadUInt16( nRight );
*pSrcRect = Rectangle( (sal_uLong)nLeft, (sal_uLong)nTop, (sal_uLong)nRight, (sal_uLong)nBottom );
nDataSize += 8;
}
@@ -804,7 +803,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
if ( bMaskRgn )
{
sal_uInt16 nSize;
- *pPict >> nSize;
+ pPict->ReadUInt16( nSize );
pPict->SeekRel( nSize - 2 );
nDataSize += (sal_uLong)nSize;
}
@@ -832,7 +831,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
{
for ( i = 0; i < nRowBytes; i++ )
{
- *pPict >> nDat;
+ pPict->ReadUChar( nDat );
if ( nx < nWidth )
SETBYTE;
}
@@ -842,25 +841,25 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
{
if ( nRowBytes > 250 )
{
- *pPict >> nByteCount;
+ pPict->ReadUInt16( nByteCount );
nDataSize += 2 + (sal_uLong)nByteCount;
}
else
{
- *pPict >> nByteCountAsByte;
+ pPict->ReadUChar( nByteCountAsByte );
nByteCount = ( (sal_uInt16)nByteCountAsByte ) & 0x00ff;
nDataSize += 1 + (sal_uLong)nByteCount;
}
while ( nByteCount )
{
- *pPict >> nFlagCounterByte;
+ pPict->ReadUChar( nFlagCounterByte );
if ( ( nFlagCounterByte & 0x80 ) == 0 )
{
nCount = ( (sal_uInt16)nFlagCounterByte ) + 1;
for ( i = 0; i < nCount; i++ )
{
- *pPict >> nDat;
+ pPict->ReadUChar( nDat );
if ( nx < nWidth )
SETBYTE;
}
@@ -869,7 +868,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
else
{
nCount = ( 1 - ( ( (sal_uInt16)nFlagCounterByte ) | 0xff00 ) );
- *pPict >> nDat;
+ pPict->ReadUChar( nDat );
for ( i = 0; i < nCount; i++ )
{
if ( nx < nWidth )
@@ -897,7 +896,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
{
for ( i = 0; i < nWidth; i++ )
{
- *pPict >> nD;
+ pPict->ReadUInt16( nD );
nRed = (sal_uInt8)( nD >> 7 );
nGreen = (sal_uInt8)( nD >> 2 );
nBlue = (sal_uInt8)( nD << 3 );
@@ -910,18 +909,18 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
nSrcBitsPos = pPict->Tell();
if ( nRowBytes > 250 )
{
- *pPict >> nByteCount;
+ pPict->ReadUInt16( nByteCount );
nByteCount += 2;
}
else
{
- *pPict >> nByteCountAsByte;
+ pPict->ReadUChar( nByteCountAsByte );
nByteCount = ( (sal_uInt16)nByteCountAsByte ) & 0x00ff;
nByteCount++;
}
while ( nx != nWidth )
{
- *pPict >> nFlagCounterByte;
+ pPict->ReadUChar( nFlagCounterByte );
if ( (nFlagCounterByte & 0x80) == 0)
{
nCount=((sal_uInt16)nFlagCounterByte)+1;
@@ -929,7 +928,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
nCount = nWidth - nx; // I don't want to change this until I have a bugdoc for
for (i=0; i<nCount; i++) // this case. Have a look at 32bit, there I changed the
{ // encoding, so that it is used a straight forward array
- *pPict >> nD;
+ pPict->ReadUInt16( nD );
nRed = (sal_uInt8)( nD >> 7 );
nGreen = (sal_uInt8)( nD >> 2 );
nBlue = (sal_uInt8)( nD << 3 );
@@ -941,7 +940,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
nCount=(1-(((sal_uInt16)nFlagCounterByte)|0xff00));
if ( nCount + nx > nWidth )
nCount = nWidth - nx;
- *pPict >> nD;
+ pPict->ReadUInt16( nD );
nRed = (sal_uInt8)( nD >> 7 );
nGreen = (sal_uInt8)( nD >> 2 );
nBlue = (sal_uInt8)( nD << 3 );
@@ -975,7 +974,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
{
for ( nx = 0; nx < nWidth; nx++ )
{
- *pPict >> nDummy >> nRed >> nGreen >> nBlue;
+ pPict->ReadUChar( nDummy ).ReadUChar( nRed ).ReadUChar( nGreen ).ReadUChar( nBlue );
pAcc->SetPixel( ny, nx, BitmapColor( nRed, nGreen, nBlue) );
}
nDataSize += ( (sal_uLong)nWidth ) * 4;
@@ -988,7 +987,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
{
for ( nx = 0; nx < nWidth; nx++ )
{
- *pPict >> nRed >> nGreen >> nBlue;
+ pPict->ReadUChar( nRed ).ReadUChar( nGreen ).ReadUChar( nBlue );
pAcc->SetPixel( ny, nx, BitmapColor( nRed, nGreen, nBlue ) );
}
nDataSize += ( (sal_uLong)nWidth ) * 3;
@@ -1004,19 +1003,19 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
nSrcBitsPos = pPict->Tell();
if ( nRowBytes > 250 )
{
- *pPict >> nByteCount;
+ pPict->ReadUInt16( nByteCount );
nByteCount += 2;
}
else
{
- *pPict >> nByteCountAsByte;
+ pPict->ReadUChar( nByteCountAsByte );
nByteCount = (sal_uInt8)nByteCountAsByte;
nByteCount++;
}
i = 0;
while( i < (sal_uInt32)( nWidth * nCmpCount ) )
{
- *pPict >> nFlagCounterByte;
+ pPict->ReadUChar( nFlagCounterByte );
if ( ( nFlagCounterByte & 0x80 ) == 0)
{
nCount = ( (sal_uInt16)nFlagCounterByte ) + 1;
@@ -1024,7 +1023,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
nCount = (sal_uInt16)( nWidth * nCmpCount - i );
while( nCount-- )
{
- *pPict >> nDat;
+ pPict->ReadUChar( nDat );
pScanline[ i++ ] = nDat;
}
}
@@ -1033,7 +1032,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, sal_Bool bBaseAddr, sal_Bo
nCount = ( 1 - ( ( (sal_uInt16)nFlagCounterByte ) | 0xff00 ) );
if ( ( i + nCount ) > (sal_uInt32)( nWidth * nCmpCount ) )
nCount = (sal_uInt16)( nWidth * nCmpCount - i );
- *pPict >> nDat;
+ pPict->ReadUChar( nDat );
while( nCount-- )
pScanline[ i++ ] = nDat;
}
@@ -1115,7 +1114,7 @@ void PictReader::ReadHeader()
// 2 bytes to store size ( version 1 ) ignored
pPict->SeekRel( 2 );
- *pPict >> y1 >> x1 >> y2 >> x2; // frame rectangle of the picture
+ pPict->ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 ); // frame rectangle of the picture
if (x1 > x2 || y1 > y2) continue; // bad bdbox
if (x1 < -2048 || x2 > 2048 || y1 < -2048 || y2 > 2048 || // origin|dest is very small|large
(x1 == x2 && y1 == y2) ) // 1 pixel pict is dubious
@@ -1158,14 +1157,14 @@ void PictReader::ReadHeader()
short nExtVer, nReserved;
// 3 Bytes ignored : end of version arg 0x02FF (ie: 0xFF), HeaderOp : 0x0C00
pPict->SeekRel( 3 );
- *pPict >> nExtVer >> nReserved;
+ pPict->ReadInt16( nExtVer ).ReadInt16( nReserved );
if (pPict->IsEof() || pPict->GetError()) continue;
if ( nExtVer == -2 ) // extended version 2 picture
{
sal_Int32 nHResFixed, nVResFixed;
- *pPict >> nHResFixed >> nVResFixed;
- *pPict >> y1 >> x1 >> y2 >> x2; // reading the optimal bounding rect
+ pPict->ReadInt32( nHResFixed ).ReadInt32( nVResFixed );
+ pPict->ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 ); // reading the optimal bounding rect
if (x1 > x2 || y1 > y2) continue; // bad bdbox
if (st < 2 && actualConfid != 20) { confidence[st] = actualConfid; continue; }
@@ -1212,7 +1211,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0001: { // Clip
Rectangle aRect;
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT );
nDataSize=nUSHORT;
ReadRectangle(aRect);
// checkme: do we really want to extend the rectangle here ?
@@ -1231,7 +1230,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
break;
case 0x0003: // TxFont
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT );
if (nUSHORT <= 1) aActFont.SetFamily(FAMILY_SWISS);
else if (nUSHORT <= 12) aActFont.SetFamily(FAMILY_DECORATIVE);
else if (nUSHORT <= 20) aActFont.SetFamily(FAMILY_ROMAN);
@@ -1246,7 +1245,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0004: { // TxFace
char nFace;
- *pPict >> nFace;
+ pPict->ReadChar( nFace );
if ( (nFace & 0x01)!=0 ) aActFont.SetWeight(WEIGHT_BOLD);
else aActFont.SetWeight(WEIGHT_NORMAL);
if ( (nFace & 0x02)!=0 ) aActFont.SetItalic(ITALIC_NORMAL);
@@ -1276,7 +1275,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
break;
}
case 0x0008: // PnMode
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT );
// internal code for postscript command (Quickdraw Reference Drawing B-30,B-34)
if (nUSHORT==23) eActROP = ROP_1;
else {
@@ -1316,7 +1315,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x000d: // TxSize
{
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT );
aActFont.SetSize( Size( 0, (long)nUSHORT ) );
eActMethod=PDM_UNDEFINED;
nDataSize=2;
@@ -1443,7 +1442,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0025: // Reserved (n Bytes)
case 0x0026: // Reserved (n Bytes)
case 0x0027: // Reserved (n Bytes)
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT );
nDataSize=2+nUSHORT;
break;
@@ -1471,8 +1470,8 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x002c: { // fontName
char sFName[ 256 ], nByteLen;
sal_uInt16 nLen;
- *pPict >> nUSHORT; nDataSize=nUSHORT+2;
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT ); nDataSize=nUSHORT+2;
+ pPict->ReadUInt16( nUSHORT );
if (nUSHORT <= 1) aActFont.SetFamily(FAMILY_SWISS);
else if (nUSHORT <= 12) aActFont.SetFamily(FAMILY_DECORATIVE);
else if (nUSHORT <= 20) aActFont.SetFamily(FAMILY_ROMAN);
@@ -1481,7 +1480,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
else if (nUSHORT <= 1023) aActFont.SetFamily(FAMILY_SWISS);
else aActFont.SetFamily(FAMILY_ROMAN);
aActFont.SetCharSet(GetTextEncoding(nUSHORT));
- *pPict >> nByteLen; nLen=((sal_uInt16)nByteLen)&0x00ff;
+ pPict->ReadChar( nByteLen ); nLen=((sal_uInt16)nByteLen)&0x00ff;
pPict->Read( &sFName, nLen );
sFName[ nLen ] = 0;
OUString aString( (const sal_Char*)&sFName, strlen(sFName), osl_getThreadTextEncoding() );
@@ -1494,12 +1493,12 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
break;
case 0x002e: // glyphState
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT );
nDataSize=2+nUSHORT;
break;
case 0x002f: // Reserved (n Bytes)
- *pPict >> nUSHORT;
+ pPict->ReadUInt16( nUSHORT );
nDataSize=2+nUSHORT;
break;
@@ -1626,7 +1625,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0075: // Reserved (Polygon-Size)
case 0x0076: // Reserved (Polygon-Size)
case 0x0077: // Reserved (Polygon-Size)
- *pPict >> nUSHORT; nDataSize=nUSHORT;
+ pPict->ReadUInt16( nUSHORT ); nDataSize=nUSHORT;
break;
case 0x0078: // frameSamePoly
@@ -1654,7 +1653,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0085: // Reserved (Region-Size)
case 0x0086: // Reserved (Region-Size)
case 0x0087: // Reserved (Region-Size)
- *pPict >> nUSHORT; nDataSize=nUSHORT;
+ pPict->ReadUInt16( nUSHORT ); nDataSize=nUSHORT;
break;
case 0x0088: // frameSameRgn
@@ -1693,7 +1692,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x0095: // Reserved (n Bytes)
case 0x0096: // Reserved (n Bytes)
case 0x0097: // Reserved (n Bytes)
- *pPict >> nUSHORT; nDataSize=2+nUSHORT;
+ pPict->ReadUInt16( nUSHORT ); nDataSize=2+nUSHORT;
break;
case 0x0098: { // PackBitsRect
@@ -1732,7 +1731,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x009d: // Reserved (n Bytes)
case 0x009e: // Reserved (n Bytes)
case 0x009f: // Reserved (n Bytes)
- *pPict >> nUSHORT; nDataSize=2+nUSHORT;
+ pPict->ReadUInt16( nUSHORT ); nDataSize=2+nUSHORT;
break;
case 0x00a0: // ShortComment
@@ -1740,13 +1739,13 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
break;
case 0x00a1: // LongComment
- pPict->SeekRel(2); *pPict >> nUSHORT; nDataSize=4+nUSHORT;
+ pPict->SeekRel(2); pPict->ReadUInt16( nUSHORT ); nDataSize=4+nUSHORT;
break;
default: // 0x00a2 bis 0xffff (most times reserved)
- if (nOpcode<=0x00af) { *pPict >> nUSHORT; nDataSize=2+nUSHORT; }
+ if (nOpcode<=0x00af) { pPict->ReadUInt16( nUSHORT ); nDataSize=2+nUSHORT; }
else if (nOpcode<=0x00cf) { nDataSize=0; }
- else if (nOpcode<=0x00fe) { sal_uInt32 nTemp; *pPict >> nTemp ; nDataSize = nTemp; nDataSize+=4; }
+ else if (nOpcode<=0x00fe) { sal_uInt32 nTemp; pPict->ReadUInt32( nTemp ) ; nDataSize = nTemp; nDataSize+=4; }
// Osnola: checkme: in the Quickdraw Ref examples ( for pict v2)
// 0x00ff(EndOfPict) is also not followed by any data...
else if (nOpcode==0x00ff) { nDataSize=IsVersion2 ? 2 : 0; } // OpEndPic
@@ -1757,7 +1756,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
else if (nOpcode<=0x7eff) { nDataSize=24; }
else if (nOpcode<=0x7fff) { nDataSize=254; }
else if (nOpcode<=0x80ff) { nDataSize=0; }
- else { sal_uInt32 nTemp; *pPict >> nTemp ; nDataSize = nTemp; nDataSize+=4; }
+ else { sal_uInt32 nTemp; pPict->ReadUInt32( nTemp ) ; nDataSize = nTemp; nDataSize+=4; }
}
if (nDataSize==0xffffffff) {
@@ -1817,10 +1816,10 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
}
if (IsVersion2 )
- *pPict >> nOpcode;
+ pPict->ReadUInt16( nOpcode );
else
{
- *pPict >> nOneByteOpcode;
+ pPict->ReadUChar( nOneByteOpcode );
nOpcode=(sal_uInt16)nOneByteOpcode;
}
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 86bb59c07a3a..33219a75927e 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -178,9 +178,7 @@ sal_Bool PSDReader::ImplReadHeader()
if ( !mpFileHeader )
return sal_False;
- m_rPSD >> mpFileHeader->nSignature >> mpFileHeader->nVersion >> mpFileHeader->nPad1 >>
- mpFileHeader->nPad2 >> mpFileHeader->nChannels >> mpFileHeader->nRows >>
- mpFileHeader->nColumns >> mpFileHeader->nDepth >> mpFileHeader->nMode;
+ m_rPSD.ReadUInt32( mpFileHeader->nSignature ).ReadUInt16( mpFileHeader->nVersion ).ReadUInt32( mpFileHeader->nPad1 ). ReadUInt16( mpFileHeader->nPad2 ).ReadUInt16( mpFileHeader->nChannels ).ReadUInt32( mpFileHeader->nRows ). ReadUInt32( mpFileHeader->nColumns ).ReadUInt16( mpFileHeader->nDepth ).ReadUInt16( mpFileHeader->nMode );
if ( ( mpFileHeader->nSignature != 0x38425053 ) || ( mpFileHeader->nVersion != 1 ) )
return sal_False;
@@ -197,7 +195,7 @@ sal_Bool PSDReader::ImplReadHeader()
mnDestBitDepth = ( nDepth == 16 ) ? 8 : nDepth;
- m_rPSD >> nColorLength;
+ m_rPSD.ReadUInt32( nColorLength );
if ( mpFileHeader->nMode == PSD_CMYK )
{
switch ( mpFileHeader->nChannels )
@@ -277,7 +275,7 @@ sal_Bool PSDReader::ImplReadHeader()
default:
return sal_False;
}
- m_rPSD >> nResourceLength;
+ m_rPSD.ReadUInt32( nResourceLength );
sal_uInt32 nLayerPos = m_rPSD.Tell() + nResourceLength;
// this is a loop over the resource entries to get the resolution info
@@ -287,14 +285,14 @@ sal_Bool PSDReader::ImplReadHeader()
sal_uInt32 nType, nPStringLen, nResEntryLen;
sal_uInt16 nUniqueID;
- m_rPSD >> nType >> nUniqueID >> n8;
+ m_rPSD.ReadUInt32( nType ).ReadUInt16( nUniqueID ).ReadUChar( n8 );
nPStringLen = n8;
if ( nType != 0x3842494d )
break;
if ( ! ( nPStringLen & 1 ) )
nPStringLen++;
m_rPSD.SeekRel( nPStringLen ); // skipping the pstring
- m_rPSD >> nResEntryLen;
+ m_rPSD.ReadUInt32( nResEntryLen );
if ( nResEntryLen & 1 )
nResEntryLen++; // the resource entries are padded
sal_uInt32 nCurrentPos = m_rPSD.Tell();
@@ -306,18 +304,18 @@ sal_Bool PSDReader::ImplReadHeader()
{
sal_Int16 nUnit;
- m_rPSD >> mnXResFixed >> nUnit >> nUnit
- >> mnYResFixed >> nUnit >> nUnit;
+ m_rPSD.ReadUInt32( mnXResFixed ).ReadInt16( nUnit ).ReadInt16( nUnit )
+ .ReadUInt32( mnYResFixed ).ReadInt16( nUnit ).ReadInt16( nUnit );
}
break;
}
m_rPSD.Seek( nCurrentPos + nResEntryLen ); // set the stream to the next
} // resource entry
m_rPSD.Seek( nLayerPos );
- m_rPSD >> nLayerMaskLength;
+ m_rPSD.ReadUInt32( nLayerMaskLength );
m_rPSD.SeekRel( nLayerMaskLength );
- m_rPSD >> nCompression;
+ m_rPSD.ReadUInt16( nCompression );
if ( nCompression == 0 )
{
mbCompression = sal_False;
@@ -353,13 +351,13 @@ sal_Bool PSDReader::ImplReadBody()
if ( nBitCount == -1 )
{
if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- m_rPSD >> nRunCount;
+ m_rPSD.ReadChar( nRunCount );
}
if ( nRunCount & 0x80 ) // a run length packet
{
if ( nBitCount == -1 ) // bits left in nDat?
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
nDat ^= 0xff;
nBitCount = 7;
}
@@ -382,7 +380,7 @@ sal_Bool PSDReader::ImplReadBody()
{
if ( nBitCount == -1 ) // bits left in nDat ?
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
nDat ^= 0xff;
nBitCount = 7;
}
@@ -406,13 +404,13 @@ sal_Bool PSDReader::ImplReadBody()
while ( nY < mpFileHeader->nRows )
{
if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- m_rPSD >> nRunCount;
+ m_rPSD.ReadChar( nRunCount );
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
mpWriteAcc->SetPixelIndex( nY, nX, nDat );
@@ -429,9 +427,9 @@ sal_Bool PSDReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
mpWriteAcc->SetPixelIndex( nY, nX, nDat );
if ( ++nX == mpFileHeader->nColumns )
{
@@ -455,13 +453,13 @@ sal_Bool PSDReader::ImplReadBody()
while ( nY < mpFileHeader->nRows )
{
if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- m_rPSD >> nRunCount;
+ m_rPSD.ReadChar( nRunCount );
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rPSD >> nRed;
+ m_rPSD.ReadUChar( nRed );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (sal_uInt8)0, (sal_uInt8)0 ) );
@@ -478,9 +476,9 @@ sal_Bool PSDReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rPSD >> nRed;
+ m_rPSD.ReadUChar( nRed );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (sal_uInt8)0, (sal_uInt8)0 ) );
if ( ++nX == mpFileHeader->nColumns )
{
@@ -496,12 +494,12 @@ sal_Bool PSDReader::ImplReadBody()
while ( nY < mpFileHeader->nRows )
{
if ( mbCompression )
- m_rPSD >> nRunCount;
+ m_rPSD.ReadChar( nRunCount );
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rPSD >> nGreen;
+ m_rPSD.ReadUChar( nGreen );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
aBitmapColor = mpReadAcc->GetPixel( nY, nX );
@@ -519,9 +517,9 @@ sal_Bool PSDReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rPSD >> nGreen;
+ m_rPSD.ReadUChar( nGreen );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
aBitmapColor = mpReadAcc->GetPixel( nY, nX );
mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), nGreen, aBitmapColor.GetBlue() ) );
if ( ++nX == mpFileHeader->nColumns )
@@ -538,12 +536,12 @@ sal_Bool PSDReader::ImplReadBody()
while ( nY < mpFileHeader->nRows )
{
if ( mbCompression )
- m_rPSD >> nRunCount;
+ m_rPSD.ReadChar( nRunCount );
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rPSD >> nBlue;
+ m_rPSD.ReadUChar( nBlue );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
aBitmapColor = mpReadAcc->GetPixel( nY, nX );
@@ -561,9 +559,9 @@ sal_Bool PSDReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rPSD >> nBlue;
+ m_rPSD.ReadUChar( nBlue );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
aBitmapColor = mpReadAcc->GetPixel( nY, nX );
mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), aBitmapColor.GetGreen(), nBlue ) );
if ( ++nX == mpFileHeader->nColumns )
@@ -584,14 +582,14 @@ sal_Bool PSDReader::ImplReadBody()
while ( nY < mpFileHeader->nRows )
{
if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- m_rPSD >> nRunCount;
+ m_rPSD.ReadChar( nRunCount );
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
@@ -618,10 +616,10 @@ sal_Bool PSDReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
nBlack = (sal_uInt8)mpReadAcc->GetPixel( nY, nX ).GetRed() + nDat;
if ( nBlack > nBlackMax )
nBlackMax = nBlack;
@@ -670,17 +668,17 @@ sal_Bool PSDReader::ImplReadBody()
while ( nY < mpFileHeader->nRows )
{
if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets
- m_rPSD >> nRunCount;
+ m_rPSD.ReadChar( nRunCount );
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
if ( nDat )
nDat = 0;
else
nDat = 1;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
{
mpMaskWriteAcc->SetPixelIndex( nY, nX, nDat );
@@ -697,13 +695,13 @@ sal_Bool PSDReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rPSD >> nDat;
+ m_rPSD.ReadUChar( nDat );
if ( nDat )
nDat = 0;
else
nDat = 1;
if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped
- m_rPSD >> nDummy;
+ m_rPSD.ReadUChar( nDummy );
mpMaskWriteAcc->SetPixelIndex( nY, nX, nDat );
if ( ++nX == mpFileHeader->nColumns )
{
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index a1771e1d95ec..dcaaf4ce06f8 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -88,7 +88,7 @@ sal_Bool RASReader::ReadRAS(Graphic & rGraphic)
return sal_False;
m_rRAS.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- m_rRAS >> nMagicNumber;
+ m_rRAS.ReadUInt32( nMagicNumber );
if ( nMagicNumber != SUNRASTER_MAGICNUMBER )
return sal_False;
@@ -120,9 +120,9 @@ sal_Bool RASReader::ReadRAS(Graphic & rGraphic)
mpAcc->SetPaletteEntryCount( mnDstColors );
sal_uInt16 i;
sal_uInt8 nRed[256], nGreen[256], nBlue[256];
- for ( i = 0; i < mnDstColors; i++ ) m_rRAS >> nRed[ i ];
- for ( i = 0; i < mnDstColors; i++ ) m_rRAS >> nGreen[ i ];
- for ( i = 0; i < mnDstColors; i++ ) m_rRAS >> nBlue[ i ];
+ for ( i = 0; i < mnDstColors; i++ ) m_rRAS.ReadUChar( nRed[ i ] );
+ for ( i = 0; i < mnDstColors; i++ ) m_rRAS.ReadUChar( nGreen[ i ] );
+ for ( i = 0; i < mnDstColors; i++ ) m_rRAS.ReadUChar( nBlue[ i ] );
for ( i = 0; i < mnDstColors; i++ )
{
mpAcc->SetPaletteColor( i, BitmapColor( nRed[ i ], nGreen[ i ], nBlue[ i ] ) );
@@ -173,8 +173,7 @@ sal_Bool RASReader::ReadRAS(Graphic & rGraphic)
sal_Bool RASReader::ImplReadHeader()
{
- m_rRAS >> mnWidth >> mnHeight >> mnDepth >> mnImageDatSize >>
- mnType >> mnColorMapType >> mnColorMapSize;
+ m_rRAS.ReadUInt32( mnWidth ).ReadUInt32( mnHeight ).ReadUInt32( mnDepth ).ReadUInt32( mnImageDatSize ). ReadUInt32( mnType ).ReadUInt32( mnColorMapType ).ReadUInt32( mnColorMapSize );
if ( mnWidth == 0 || mnHeight == 0 )
mbStatus = sal_False;
@@ -310,7 +309,7 @@ sal_uInt8 RASReader::ImplGetByte()
sal_uInt8 nRetVal;
if ( mnType != RAS_TYPE_BYTE_ENCODED )
{
- m_rRAS >> nRetVal;
+ m_rRAS.ReadUChar( nRetVal );
return nRetVal;
}
else
@@ -322,14 +321,14 @@ sal_uInt8 RASReader::ImplGetByte()
}
else
{
- m_rRAS >> nRetVal;
+ m_rRAS.ReadUChar( nRetVal );
if ( nRetVal != 0x80 )
return nRetVal;
- m_rRAS >> nRetVal;
+ m_rRAS.ReadUChar( nRetVal );
if ( nRetVal == 0 )
return 0x80;
mnRepCount = nRetVal ;
- m_rRAS >> mnRepVal;
+ m_rRAS.ReadUChar( mnRepVal );
return mnRepVal;
}
}
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 8672029454e0..5f9c434a3cb2 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -177,10 +177,7 @@ sal_Bool TGAReader::ImplReadHeader()
if ( mpFileHeader == NULL )
return sal_False;
- m_rTGA >> mpFileHeader->nImageIDLength >> mpFileHeader->nColorMapType >> mpFileHeader->nImageType >>
- mpFileHeader->nColorMapFirstEntryIndex >> mpFileHeader->nColorMapLength >> mpFileHeader->nColorMapEntrySize >>
- mpFileHeader->nColorMapXOrigin >> mpFileHeader->nColorMapYOrigin >> mpFileHeader->nImageWidth >>
- mpFileHeader->nImageHeight >> mpFileHeader->nPixelDepth >> mpFileHeader->nImageDescriptor;
+ m_rTGA.ReadUChar( mpFileHeader->nImageIDLength ).ReadUChar( mpFileHeader->nColorMapType ).ReadUChar( mpFileHeader->nImageType ). ReadUInt16( mpFileHeader->nColorMapFirstEntryIndex ).ReadUInt16( mpFileHeader->nColorMapLength ).ReadUChar( mpFileHeader->nColorMapEntrySize ). ReadUInt16( mpFileHeader->nColorMapXOrigin ).ReadUInt16( mpFileHeader->nColorMapYOrigin ).ReadUInt16( mpFileHeader->nImageWidth ). ReadUInt16( mpFileHeader->nImageHeight ).ReadUChar( mpFileHeader->nPixelDepth ).ReadUChar( mpFileHeader->nImageDescriptor );
if ( !m_rTGA.good())
return sal_False;
@@ -199,9 +196,7 @@ sal_Bool TGAReader::ImplReadHeader()
sal_uLong nTemp = m_rTGA.Tell();
m_rTGA.Seek( nTemp - SizeOfTGAFileFooter );
- m_rTGA >> mpFileFooter->nExtensionFileOffset >> mpFileFooter->nDeveloperDirectoryOffset >>
- mpFileFooter->nSignature[0] >> mpFileFooter->nSignature[1] >> mpFileFooter->nSignature[2] >>
- mpFileFooter->nSignature[3] >> mpFileFooter->nPadByte >> mpFileFooter->nStringTerminator;
+ m_rTGA.ReadUInt32( mpFileFooter->nExtensionFileOffset ).ReadUInt32( mpFileFooter->nDeveloperDirectoryOffset ). ReadUInt32( mpFileFooter->nSignature[0] ).ReadUInt32( mpFileFooter->nSignature[1] ).ReadUInt32( mpFileFooter->nSignature[2] ). ReadUInt32( mpFileFooter->nSignature[3] ).ReadUChar( mpFileFooter->nPadByte ).ReadUChar( mpFileFooter->nStringTerminator );
if ( !m_rTGA.good())
@@ -217,7 +212,7 @@ sal_Bool TGAReader::ImplReadHeader()
if ( mpExtension )
{
m_rTGA.Seek( mpFileFooter->nExtensionFileOffset );
- m_rTGA >> mpExtension->nExtensionSize;
+ m_rTGA.ReadUInt16( mpExtension->nExtensionSize );
if ( !m_rTGA.good())
return sal_False;
if ( mpExtension->nExtensionSize >= SizeOfTGAExtension )
@@ -228,14 +223,14 @@ sal_Bool TGAReader::ImplReadHeader()
m_rTGA.Read( mpExtension->sAuthorComment, 324 );
m_rTGA.Read( mpExtension->sDateTimeStamp, 12 );
m_rTGA.Read( mpExtension->sJobNameID, 12 );
- m_rTGA >> mpExtension->sJobNameID[ 0 ] >> mpExtension->sJobNameID[ 1 ] >> mpExtension->sJobNameID[ 2 ];
+ m_rTGA.ReadChar( mpExtension->sJobNameID[ 0 ] ).ReadChar( mpExtension->sJobNameID[ 1 ] ).ReadChar( mpExtension->sJobNameID[ 2 ] );
m_rTGA.Read( mpExtension->sSoftwareID, 41 );
- m_rTGA >> mpExtension->nSoftwareVersionNumber >> mpExtension->nSoftwareVersionLetter
- >> mpExtension->nKeyColor >> mpExtension->nPixelAspectRatioNumerator
- >> mpExtension->nPixelAspectRatioDeNumerator >> mpExtension->nGammaValueNumerator
- >> mpExtension->nGammaValueDeNumerator >> mpExtension->nColorCorrectionOffset
- >> mpExtension->nPostageStampOffset >> mpExtension->nScanLineOffset
- >> mpExtension->nAttributesType;
+ m_rTGA.ReadUInt16( mpExtension->nSoftwareVersionNumber ).ReadUChar( mpExtension->nSoftwareVersionLetter )
+ .ReadUInt32( mpExtension->nKeyColor ).ReadUInt16( mpExtension->nPixelAspectRatioNumerator )
+ .ReadUInt16( mpExtension->nPixelAspectRatioDeNumerator ).ReadUInt16( mpExtension->nGammaValueNumerator )
+ .ReadUInt16( mpExtension->nGammaValueDeNumerator ).ReadUInt32( mpExtension->nColorCorrectionOffset )
+ .ReadUInt32( mpExtension->nPostageStampOffset ).ReadUInt32( mpExtension->nScanLineOffset )
+ .ReadUChar( mpExtension->nAttributesType );
if ( !m_rTGA.good())
return sal_False;
@@ -319,12 +314,12 @@ sal_Bool TGAReader::ImplReadBody()
case 16 :
while ( nYCount < mpFileHeader->nImageHeight )
{
- m_rTGA >> nRunCount;
+ m_rTGA.ReadUChar( nRunCount );
if ( !m_rTGA.good())
return sal_False;
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rTGA >> nRGB16;
+ m_rTGA.ReadUInt16( nRGB16 );
if ( nRGB16 >= mpFileHeader->nColorMapLength )
return sal_False;
nRed = (sal_uInt8)( mpColorMap[ nRGB16 ] >> 16 );
@@ -353,7 +348,7 @@ sal_Bool TGAReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rTGA >> nRGB16;
+ m_rTGA.ReadUInt16( nRGB16 );
if ( !m_rTGA.good())
return sal_False;
if ( nRGB16 >= mpFileHeader->nColorMapLength )
@@ -385,12 +380,12 @@ sal_Bool TGAReader::ImplReadBody()
case 8 :
while ( nYCount < mpFileHeader->nImageHeight )
{
- m_rTGA >> nRunCount;
+ m_rTGA.ReadUChar( nRunCount );
if ( !m_rTGA.good())
return sal_False;
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rTGA >> nDummy;
+ m_rTGA.ReadUChar( nDummy );
if ( !m_rTGA.good())
return sal_False;
if ( nDummy >= mpFileHeader->nColorMapLength )
@@ -417,7 +412,7 @@ sal_Bool TGAReader::ImplReadBody()
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rTGA >> nDummy;
+ m_rTGA.ReadUChar( nDummy );
if ( !m_rTGA.good())
return sal_False;
if ( nDummy >= mpFileHeader->nColorMapLength )
@@ -452,12 +447,12 @@ sal_Bool TGAReader::ImplReadBody()
{
while ( nYCount < mpFileHeader->nImageHeight )
{
- m_rTGA >> nRunCount;
+ m_rTGA.ReadUChar( nRunCount );
if ( !m_rTGA.good())
return sal_False;
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rTGA >> nBlue >> nGreen >> nRed >> nDummy;
+ m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed ).ReadUChar( nDummy );
if ( !m_rTGA.good())
return sal_False;
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
@@ -481,7 +476,7 @@ sal_Bool TGAReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rTGA >> nBlue >> nGreen >> nRed >> nDummy;
+ m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed ).ReadUChar( nDummy );
if ( !m_rTGA.good())
return sal_False;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
@@ -507,12 +502,12 @@ sal_Bool TGAReader::ImplReadBody()
case 24 :
while ( nYCount < mpFileHeader->nImageHeight )
{
- m_rTGA >> nRunCount;
+ m_rTGA.ReadUChar( nRunCount );
if ( !m_rTGA.good())
return sal_False;
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rTGA >> nBlue >> nGreen >> nRed;
+ m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed );
if ( !m_rTGA.good())
return sal_False;
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
@@ -536,7 +531,7 @@ sal_Bool TGAReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rTGA >> nBlue >> nGreen >> nRed;
+ m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed );
if ( !m_rTGA.good())
return sal_False;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
@@ -561,12 +556,12 @@ sal_Bool TGAReader::ImplReadBody()
case 16 :
while ( nYCount < mpFileHeader->nImageHeight )
{
- m_rTGA >> nRunCount;
+ m_rTGA.ReadUChar( nRunCount );
if ( !m_rTGA.good())
return sal_False;
if ( nRunCount & 0x80 ) // a run length packet
{
- m_rTGA >> nRGB16;
+ m_rTGA.ReadUInt16( nRGB16 );
if ( !m_rTGA.good())
return sal_False;
nRed = (sal_uInt8)( nRGB16 >> 7 ) & 0xf8;
@@ -593,7 +588,7 @@ sal_Bool TGAReader::ImplReadBody()
{
for ( sal_uInt16 i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ )
{
- m_rTGA >> nRGB16;
+ m_rTGA.ReadUInt16( nRGB16 );
if ( !m_rTGA.good())
return sal_False;
nRed = (sal_uInt8)( nRGB16 >> 7 ) & 0xf8;
@@ -637,7 +632,7 @@ sal_Bool TGAReader::ImplReadBody()
case 16 :
for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
{
- m_rTGA >> nRGB16;
+ m_rTGA.ReadUInt16( nRGB16 );
if ( !m_rTGA.good())
return sal_False;
if ( nRGB16 >= mpFileHeader->nColorMapLength )
@@ -653,7 +648,7 @@ sal_Bool TGAReader::ImplReadBody()
case 8 :
for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
{
- m_rTGA >> nDummy;
+ m_rTGA.ReadUChar( nDummy );
if ( !m_rTGA.good())
return sal_False;
if ( nDummy >= mpFileHeader->nColorMapLength )
@@ -674,7 +669,7 @@ sal_Bool TGAReader::ImplReadBody()
{
for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
{
- m_rTGA >> nBlue >> nGreen >> nRed >> nDummy;
+ m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed ).ReadUChar( nDummy );
if ( !m_rTGA.good())
return sal_False;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
@@ -686,7 +681,7 @@ sal_Bool TGAReader::ImplReadBody()
case 24 :
for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
{
- m_rTGA >> nBlue >> nGreen >> nRed;
+ m_rTGA.ReadUChar( nBlue ).ReadUChar( nGreen ).ReadUChar( nRed );
if ( !m_rTGA.good())
return sal_False;
mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) );
@@ -697,7 +692,7 @@ sal_Bool TGAReader::ImplReadBody()
case 16 :
for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd )
{
- m_rTGA >> nRGB16;
+ m_rTGA.ReadUInt16( nRGB16 );
if ( !m_rTGA.good())
return sal_False;
nRed = (sal_uInt8)( nRGB16 >> 7 ) & 0xf8;
@@ -763,7 +758,7 @@ sal_Bool TGAReader::ImplReadPalette()
for ( sal_uLong i = 0; i < nColors; i++ )
{
sal_uInt16 nTemp;
- m_rTGA >> nTemp;
+ m_rTGA.ReadUInt16( nTemp );
if ( !m_rTGA.good() )
return sal_False;
mpColorMap[ i ] = ( ( nTemp & 0x7c00 ) << 9 ) + ( ( nTemp & 0x01e0 ) << 6 ) +
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index ebabcecaea9c..e7cd5de7427d 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -773,7 +773,7 @@ sal_Bool CCIDecompressor::ReadEOL( sal_uInt32 /*nMaxFillBits*/ )
{
while ( nInputBitsBufSize < 12 )
{
- *pIStream >> nByte;
+ pIStream->ReadUChar( nByte );
if ( pIStream->IsEof() )
return sal_False;
if ( pIStream->Tell() > nMaxPos )
@@ -804,7 +804,7 @@ sal_Bool CCIDecompressor::Read2DTag()
// read abit and return sal_True if it's 0, otherwise return sal_False
if (nInputBitsBufSize==0) {
- *pIStream >> nByte;
+ pIStream->ReadUChar( nByte );
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
nInputBitsBuf=(sal_uLong)nByte;
@@ -822,7 +822,7 @@ sal_uInt8 CCIDecompressor::ReadBlackOrWhite()
// read a bit and deliver 0x00 if it's 0, otherwise 0xff
if (nInputBitsBufSize==0) {
- *pIStream >> nByte;
+ pIStream->ReadUChar( nByte );
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
nInputBitsBuf=(sal_uLong)nByte;
@@ -841,7 +841,7 @@ sal_uInt16 CCIDecompressor::ReadCodeAndDecode(const CCILookUpTableEntry * pLookU
while (nInputBitsBufSize<nMaxCodeBits)
{
sal_uInt8 nByte(0);
- *pIStream >> nByte;
+ pIStream->ReadUChar( nByte );
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
nInputBitsBuf=(nInputBitsBuf<<8) | (sal_uLong)nByte;
@@ -929,7 +929,7 @@ void CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
// fetch next 13 bits into nCodem but dont remove them from
// the input buffer:
while (nInputBitsBufSize<13) {
- *pIStream >> nByte;
+ pIStream->ReadUChar( nByte );
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
nByte = pByteSwap[ nByte ];
nInputBitsBuf=(nInputBitsBuf<<8) | (sal_uLong)nByte;
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index f235a3585f2b..8deea2c16589 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -191,45 +191,45 @@ sal_uLong TIFFReader::ReadIntData()
case 1 :
case 2 :
case 7 :
- *pTIFF >> nBYTE;
+ pTIFF->ReadUChar( nBYTE );
nUINT32a = (sal_uLong)nBYTE;
break;
case 3 :
- *pTIFF >> nUINT16;
+ pTIFF->ReadUInt16( nUINT16 );
nUINT32a = (sal_uLong)nUINT16;
break;
case 9 :
case 4 :
- *pTIFF >> nUINT32a;
+ pTIFF->ReadUInt32( nUINT32a );
break;
case 5 :
- *pTIFF >> nUINT32a >> nUINT32b;
+ pTIFF->ReadUInt32( nUINT32a ).ReadUInt32( nUINT32b );
if ( nUINT32b != 0 )
nUINT32a /= nUINT32b;
break;
case 6 :
- *pTIFF >> nCHAR;
+ pTIFF->ReadChar( nCHAR );
nUINT32a = (sal_Int32)nCHAR;
break;
case 8 :
- *pTIFF >> nINT16;
+ pTIFF->ReadInt16( nINT16 );
nUINT32a = (sal_Int32)nINT16;
break;
case 10 :
- *pTIFF >> nUINT32a >> nINT32;
+ pTIFF->ReadUInt32( nUINT32a ).ReadInt32( nINT32 );
if ( nINT32 != 0 )
nUINT32a /= nINT32;
break;
case 11 :
- *pTIFF >> nFLOAT;
+ pTIFF->ReadFloat( nFLOAT );
nUINT32a = (sal_Int32)nFLOAT;
break;
case 12 :
- *pTIFF >> nDOUBLE;
+ pTIFF->ReadDouble( nDOUBLE );
nUINT32a = (sal_Int32)nDOUBLE;
break;
default:
- *pTIFF >> nUINT32a;
+ pTIFF->ReadUInt32( nUINT32a );
break;
}
return nUINT32a;
@@ -244,9 +244,9 @@ double TIFFReader::ReadDoubleData()
if ( nDataType == 5 )
{
- *pTIFF >> nulong;
+ pTIFF->ReadUInt32( nulong );
nd = (double)nulong;
- *pTIFF >> nulong;
+ pTIFF->ReadUInt32( nulong );
if ( nulong != 0 )
nd /= (double)nulong;
}
@@ -449,17 +449,17 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
pColorMap[ i ] = 0;
for ( i = 0; i < nNumColors; i++ )
{
- *pTIFF >> nVal;
+ pTIFF->ReadUInt16( nVal );
pColorMap[ i ] |= ( ( (sal_uLong)nVal ) << 8 ) & 0x00ff0000;
}
for ( i = 0; i < nNumColors; i++ )
{
- *pTIFF >> nVal;
+ pTIFF->ReadUInt16( nVal );
pColorMap[ i ] |= ( (sal_uLong)nVal ) & 0x0000ff00;
}
for ( i = 0; i < nNumColors; i++ )
{
- *pTIFF >> nVal;
+ pTIFF->ReadUInt16( nVal );
pColorMap[ i ] |= ( ( (sal_uLong)nVal ) >> 8 ) & 0x000000ff;
}
}
@@ -621,7 +621,7 @@ sal_Bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
pdst=pMap[ np ];
do
{
- *pTIFF >> nRecHeader;
+ pTIFF->ReadUChar( nRecHeader );
if ((nRecHeader&0x80)==0)
{
nRecCount=0x00000001+((sal_uLong)nRecHeader);
@@ -642,7 +642,7 @@ sal_Bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
// return;
}
- *pTIFF >> nRecData;
+ pTIFF->ReadUChar( nRecData );
for ( i = 0; i < nRecCount; i++ )
*(pdst++) = nRecData;
nRowBytesLeft -= nRecCount;
@@ -1082,13 +1082,13 @@ void TIFFReader::ReadHeader()
sal_uInt8 nbyte1, nbyte2;
sal_uInt16 nushort;
- *pTIFF >> nbyte1;
+ pTIFF->ReadUChar( nbyte1 );
if ( nbyte1 == 'I' )
pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
else
pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- *pTIFF >> nbyte2 >> nushort;
+ pTIFF->ReadUChar( nbyte2 ).ReadUInt16( nushort );
if ( nbyte1 != nbyte2 || ( nbyte1 != 'I' && nbyte1 != 'M' ) || nushort != 0x002a )
bStatus = sal_False;
}
@@ -1127,7 +1127,7 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
ReadHeader();
// read first IFD:
- *pTIFF >> nFirstIfd;
+ pTIFF->ReadUInt32( nFirstIfd );
if( !nFirstIfd || pTIFF->GetError() )
bStatus = sal_False;
@@ -1148,17 +1148,17 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
};
nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
- *pTIFF >> nNumTags;
+ pTIFF->ReadUInt16( nNumTags );
// loop through tags:
for( i = 0; i < nNumTags; i++ )
{
- *pTIFF >> nTagType >> nDataType >> nDataLen >> nOffset;
+ pTIFF->ReadUInt16( nTagType ).ReadUInt16( nDataType ).ReadUInt32( nDataLen ).ReadUInt32( nOffset );
if( DataTypeSize() * nDataLen > 4 )
nMaxPos = std::max( nOrigPos + nOffset + DataTypeSize() * nDataLen, nMaxPos );
}
- *pTIFF >> nOffset;
+ pTIFF->ReadUInt32( nOffset );
if ( pTIFF->IsEof() )
nOffset = 0;
@@ -1207,17 +1207,17 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
pStripByteCounts = NULL;
pMap[ 0 ] = pMap[ 1 ] = pMap[ 2 ] = pMap[ 3 ] = NULL;
- *pTIFF >> nNumTags;
+ pTIFF->ReadUInt16( nNumTags );
nPos = pTIFF->Tell();
// Schleife ueber Tags:
for( i = 0; i < nNumTags; i++ )
{
- *pTIFF >> nTagType >> nDataType >> nDataLen;
+ pTIFF->ReadUInt16( nTagType ).ReadUInt16( nDataType ).ReadUInt32( nDataLen );
if( DataTypeSize() * nDataLen > 4 )
{
- *pTIFF >> nOffset;
+ pTIFF->ReadUInt32( nOffset );
pTIFF->Seek( nOrigPos + nOffset );
}
ReadTagData( nTagType, nDataLen );
@@ -1229,7 +1229,7 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
if ( bStatus == sal_False )
break;
}
- *pTIFF >> nNextIfd;
+ pTIFF->ReadUInt32( nNextIfd );
if ( pTIFF->IsEof() )
nNextIfd = 0;
}
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx b/filter/source/graphicfilter/itiff/lzwdecom.cxx
index 2fdb054cd1d4..1766e5bea132 100644
--- a/filter/source/graphicfilter/itiff/lzwdecom.cxx
+++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx
@@ -56,7 +56,7 @@ void LZWDecompressor::StartDecompression(SvStream & rIStream)
nOutBufDataLen=0;
- *pIStream >> nInputBitsBuf;
+ pIStream->ReadUChar( nInputBitsBuf );
nInputBitsBufSize=8;
@@ -124,7 +124,7 @@ sal_uInt16 LZWDecompressor::GetNextCode()
{
nCode=(nCode<<nInputBitsBufSize) | nInputBitsBuf;
nBits = nBits - nInputBitsBufSize;
- *pIStream >> nInputBitsBuf;
+ pIStream->ReadUChar( nInputBitsBuf );
if ( bInvert )
nInputBitsBuf = ( ( nInputBitsBuf & 1 ) << 7 ) | ( ( nInputBitsBuf & 2 ) << 5 ) | ( ( nInputBitsBuf & 4 ) << 3 ) | ( ( nInputBitsBuf & 8 ) << 1 ) | ( ( nInputBitsBuf & 16 ) >> 1 ) | ( ( nInputBitsBuf & 32 ) >> 3 ) | ( ( nInputBitsBuf & 64 ) >> 5 ) | ( (nInputBitsBuf & 128 ) >> 7 );
nInputBitsBufSize=8;
diff --git a/filter/source/msfilter/dffpropset.cxx b/filter/source/msfilter/dffpropset.cxx
index 695ecde7f4d6..4af0a0c169fa 100644
--- a/filter/source/msfilter/dffpropset.cxx
+++ b/filter/source/msfilter/dffpropset.cxx
@@ -1110,8 +1110,8 @@ void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly )
{
sal_uInt16 nTmp;
sal_uInt32 nRecType, nContent;
- rIn >> nTmp
- >> nContent;
+ rIn.ReadUInt16( nTmp )
+ .ReadUInt32( nContent );
nRecType = nTmp & 0x3fff;
@@ -1168,7 +1168,7 @@ void DffPropSet::ReadPropSet( SvStream& rIn, bool bSetUninitializedOnly )
sal_Int16 nNumElem, nNumElemReserved, nSize;
rIn.Seek( nComplexDataFilePos );
- rIn >> nNumElem >> nNumElemReserved >> nSize;
+ rIn. ReadInt16( nNumElem ).ReadInt16( nNumElemReserved ).ReadInt16( nSize );
if ( nNumElemReserved >= nNumElem )
{
// the size of these array elements is nowhere defined,
@@ -1306,7 +1306,7 @@ OUString DffPropSet::GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const
for( sal_Int32 nCharIdx = 0; nCharIdx < nStrLen; ++nCharIdx )
{
sal_uInt16 nChar = 0;
- rStrm >> nChar;
+ rStrm.ReadUInt16( nChar );
if( nChar > 0 )
aBuffer.append( static_cast< sal_Unicode >( nChar ) );
else
diff --git a/filter/source/msfilter/dffrecordheader.cxx b/filter/source/msfilter/dffrecordheader.cxx
index 3d9bae91cefa..232e2cf7c0e0 100644
--- a/filter/source/msfilter/dffrecordheader.cxx
+++ b/filter/source/msfilter/dffrecordheader.cxx
@@ -23,12 +23,12 @@ SvStream& ReadDffRecordHeader( SvStream& rIn, DffRecordHeader& rRec )
{
rRec.nFilePos = rIn.Tell();
sal_uInt16 nTmp(0);
- rIn >> nTmp;
+ rIn.ReadUInt16( nTmp );
rRec.nImpVerInst = nTmp;
rRec.nRecVer = sal::static_int_cast< sal_uInt8 >(nTmp & 0x000F);
rRec.nRecInstance = nTmp >> 4;
- rIn >> rRec.nRecType;
- rIn >> rRec.nRecLen;
+ rIn.ReadUInt16( rRec.nRecType );
+ rIn.ReadUInt32( rRec.nRecLen );
// preserving overflow, optimally we would check
// the record size against the parent header
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index bda2c1fd4489..25a853a74445 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4277,15 +4277,15 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM
pMergePicStreamBSE->Seek( pBlibEntry->mnPictureOffset );
sal_uInt16 n16;
// record version and instance
- *pMergePicStreamBSE >> n16;
+ pMergePicStreamBSE->ReadUInt16( n16 );
rSt.WriteUInt16( n16 );
// record type
- *pMergePicStreamBSE >> n16;
+ pMergePicStreamBSE->ReadUInt16( n16 );
rSt.WriteUInt16( sal_uInt16( ESCHER_BlipFirst + nBlibType ) );
DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherGraphicProvider::WriteBlibStoreContainer: BLIP record types differ" );
sal_uInt32 n32;
// record size
- *pMergePicStreamBSE >> n32;
+ pMergePicStreamBSE->ReadUInt32( n32 );
nBlipSize -= 8;
rSt.WriteUInt32( nBlipSize );
DBG_ASSERT( nBlipSize == n32, "EscherGraphicProvider::WriteBlibStoreContainer: BLIP sizes differ" );
@@ -5122,7 +5122,7 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom )
mpOutStrm->Seek( mnStrmStartOfs );
while ( mpOutStrm->Tell() < nCurPos )
{
- *mpOutStrm >> nType >> nSize;
+ mpOutStrm->ReadUInt32( nType ).ReadUInt32( nSize );
sal_uInt32 nEndOfRecord = mpOutStrm->Tell() + nSize;
bool bContainer = (nType & 0x0F) == 0x0F;
/* Expand the record, if the insertion position is inside, or if the
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index d270b0ee016d..052a8f24c308 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -369,12 +369,12 @@ DffPropertyReader::~DffPropertyReader()
SvStream& operator>>( SvStream& rIn, SvxMSDffConnectorRule& rRule )
{
- rIn >> rRule.nRuleId
- >> rRule.nShapeA
- >> rRule.nShapeB
- >> rRule.nShapeC
- >> rRule.ncptiA
- >> rRule.ncptiB;
+ rIn.ReadUInt32( rRule.nRuleId )
+ .ReadUInt32( rRule.nShapeA )
+ .ReadUInt32( rRule.nShapeB )
+ .ReadUInt32( rRule.nShapeC )
+ .ReadUInt32( rRule.ncptiA )
+ .ReadUInt32( rRule.ncptiB );
return rIn;
}
@@ -1064,13 +1064,13 @@ void GetShadeColors( const SvxMSDffManager& rManager, const DffPropertyReader& r
if ( rProperties.SeekToContent( DFF_Prop_fillShadeColors, rIn ) )
{
sal_uInt16 i = 0, nNumElem = 0, nNumElemReserved = 0, nSize = 0;
- rIn >> nNumElem >> nNumElemReserved >> nSize;
+ rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemReserved ).ReadUInt16( nSize );
for ( ; i < nNumElem; i++ )
{
sal_Int32 nColor;
sal_Int32 nDist;
- rIn >> nColor >> nDist;
+ rIn.ReadInt32( nColor ).ReadInt32( nDist );
rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( nColor, DFF_Prop_fillColor ), 1.0 - ( nDist / 65536.0 ) ) );
}
}
@@ -1870,7 +1870,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
{
sal_uInt16 nNumElemMem = 0;
sal_uInt16 nElemSize = 8;
- rIn >> nNumElem >> nNumElemMem >> nElemSize;
+ rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
}
sal_Int16 nP1, nP2, nP3;
sal_uInt16 nFlags;
@@ -1878,7 +1878,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
uno::Sequence< OUString > aEquations( nNumElem );
for ( sal_uInt16 i = 0; i < nNumElem; i++ )
{
- rIn >> nFlags >> nP1 >> nP2 >> nP3;
+ rIn.ReadUInt16( nFlags ).ReadInt16( nP1 ).ReadInt16( nP2 ).ReadInt16( nP3 );
aEquations[ i ] = EnhancedCustomShape2d::GetEquation( nFlags, nP1, nP2, nP3 );
}
// pushing the whole Equations element
@@ -1899,7 +1899,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( SeekToContent( DFF_Prop_Handles, rIn ) )
{
sal_uInt16 nNumElemMem = 0;
- rIn >> nNumElem >> nNumElemMem >> nElemSize;
+ rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
}
if ( nElemSize == 36 )
{
@@ -1909,15 +1909,15 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
PropVec aHandlePropVec;
sal_uInt32 nFlags;
sal_Int32 nPositionX, nPositionY, nCenterX, nCenterY, nRangeXMin, nRangeXMax, nRangeYMin, nRangeYMax;
- rIn >> nFlags
- >> nPositionX
- >> nPositionY
- >> nCenterX
- >> nCenterY
- >> nRangeXMin
- >> nRangeXMax
- >> nRangeYMin
- >> nRangeYMax;
+ rIn.ReadUInt32( nFlags )
+ .ReadInt32( nPositionX )
+ .ReadInt32( nPositionY )
+ .ReadInt32( nCenterX )
+ .ReadInt32( nCenterY )
+ .ReadInt32( nRangeXMin )
+ .ReadInt32( nRangeXMax )
+ .ReadInt32( nRangeYMin )
+ .ReadInt32( nRangeYMax );
if ( nPositionX == 2 ) // replacing center position with absolute value
nPositionX = nCoordWidth / 2;
@@ -2141,7 +2141,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( SeekToContent( DFF_Prop_pVertices, rIn ) )
{
sal_uInt16 nNumElemMemVert = 0;
- rIn >> nNumElemVert >> nNumElemMemVert >> nElemSizeVert;
+ rIn.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
}
if ( nNumElemVert )
{
@@ -2152,13 +2152,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
{
if ( nElemSizeVert == 8 )
{
- rIn >> nX
- >> nY;
+ rIn.ReadInt32( nX )
+ .ReadInt32( nY );
}
else
{
- rIn >> nTmpA
- >> nTmpB;
+ rIn.ReadInt16( nTmpA )
+ .ReadInt16( nTmpB );
nX = nTmpA;
nY = nTmpB;
@@ -2184,7 +2184,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
{
sal_uInt16 nNumElemMemSeg = 0;
sal_uInt16 nElemSizeSeg = 2;
- rIn >> nNumElemSeg >> nNumElemMemSeg >> nElemSizeSeg;
+ rIn.ReadUInt16( nNumElemSeg ).ReadUInt16( nNumElemMemSeg ).ReadUInt16( nElemSizeSeg );
}
if ( nNumElemSeg )
{
@@ -2193,7 +2193,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aSegments.realloc( nNumElemSeg );
for ( i = 0; i < nNumElemSeg; i++ )
{
- rIn >> nTmp;
+ rIn.ReadUInt16( nTmp );
nCommand = EnhancedCustomShapeSegmentCommand::UNKNOWN;
nCnt = (sal_Int16)( nTmp & 0x1fff );//Last 13 bits for segment points number
switch( nTmp >> 13 )//First 3 bits for command type
@@ -2311,7 +2311,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( SeekToContent( DFF_Prop_textRectangles, rIn ) )
{
sal_uInt16 nNumElemMem = 0;
- rIn >> nNumElem >> nNumElemMem >> nElemSize;
+ rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
}
if ( nElemSize == 16 )
{
@@ -2319,10 +2319,10 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrames( nNumElem );
for ( sal_uInt16 i = 0; i < nNumElem; i++ )
{
- rIn >> nLeft
- >> nTop
- >> nRight
- >> nBottom;
+ rIn.ReadInt32( nLeft )
+ .ReadInt32( nTop )
+ .ReadInt32( nRight )
+ .ReadInt32( nBottom );
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].TopLeft.First, nLeft );
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].TopLeft.Second, nTop );
@@ -2344,7 +2344,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
sal_uInt16 nElemSizeVert = 8;
if ( SeekToContent( DFF_Prop_connectorPoints, rIn ) )
- rIn >> nNumElemVert >> nNumElemMemVert >> nElemSizeVert;
+ rIn.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
sal_Int32 nX, nY;
sal_Int16 nTmpA, nTmpB;
@@ -2353,13 +2353,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
{
if ( nElemSizeVert == 8 )
{
- rIn >> nX
- >> nY;
+ rIn.ReadInt32( nX )
+ .ReadInt32( nY );
}
else
{
- rIn >> nTmpA
- >> nTmpB;
+ rIn.ReadInt16( nTmpA )
+ .ReadInt16( nTmpB );
nX = nTmpA;
nY = nTmpB;
@@ -3162,7 +3162,7 @@ sal_Bool SvxMSDffManager::SeekToShape( SvStream& rSt, void* /* pClientData */, s
DffRecordHeader aShapeHd;
if ( SeekToRec( rSt, DFF_msofbtSp, aEscherObjListHd.GetRecEndFilePos(), &aShapeHd ) )
{
- rSt >> nShapeId;
+ rSt.ReadUInt32( nShapeId );
if ( nId == nShapeId )
{
aEscherObjListHd.SeekToBegOfRecord( rSt );
@@ -4087,10 +4087,10 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
sal_uInt16 nPID;
while( 5 < nBytesLeft )
{
- rSt >> nPID;
+ rSt.ReadUInt16( nPID );
if ( rSt.GetError() != 0 )
break;
- rSt >> nUDData;
+ rSt.ReadUInt32( nUDData );
if ( rSt.GetError() != 0 )
break;
if ( nPID == 447 ) //
@@ -4104,8 +4104,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aObjData.bShapeType = maShapeRecords.SeekToContent( rSt, DFF_msofbtSp, SEEK_FROM_BEGINNING );
if ( aObjData.bShapeType )
{
- rSt >> aObjData.nShapeId
- >> aObjData.nSpFlags;
+ rSt.ReadUInt32( aObjData.nShapeId )
+ .ReadUInt32( aObjData.nSpFlags );
aObjData.eShapeType = (MSO_SPT)maShapeRecords.Current()->nRecInstance;
}
else
@@ -4148,7 +4148,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( aObjData.bChildAnchor )
{
sal_Int32 l, o, r, u;
- rSt >> l >> o >> r >> u;
+ rSt.ReadInt32( l ).ReadInt32( o ).ReadInt32( r ).ReadInt32( u );
Scale( l );
Scale( o );
Scale( r );
@@ -4744,12 +4744,12 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS
sal_Int32 l, t, r, b;
if ( aShapeAtom.nRecLen == 16 )
{
- rSt >> l >> t >> r >> b;
+ rSt.ReadInt32( l ).ReadInt32( t ).ReadInt32( r ).ReadInt32( b );
}
else
{
sal_Int16 ls, ts, rs, bs;
- rSt >> ts >> ls >> rs >> bs; // the order of coordinates is a bit strange...
+ rSt.ReadInt16( ts ).ReadInt16( ls ).ReadInt16( rs ).ReadInt16( bs ); // the order of coordinates is a bit strange...
l = ls, t = ts, r = rs, b = bs;
}
Scale( l );
@@ -4772,7 +4772,7 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS
else if ( aShapeAtom.nRecType == DFF_msofbtChildAnchor )
{
sal_Int32 l, o, r, u;
- rSt >> l >> o >> r >> u;
+ rSt.ReadInt32( l ).ReadInt32( o ).ReadInt32( r ).ReadInt32( u );
Scale( l );
Scale( o );
Scale( r );
@@ -4816,7 +4816,7 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
if ( aShapeAtom.nRecType == DFF_msofbtChildAnchor )
{
sal_Int32 l, o, r, u;
- rSt >> l >> o >> r >> u;
+ rSt.ReadInt32( l ).ReadInt32( o ).ReadInt32( r ).ReadInt32( u );
Scale( l );
Scale( o );
Scale( r );
@@ -4902,10 +4902,10 @@ SdrObject* SvxMSDffManager::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;
@@ -5289,7 +5289,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
delete pTextImpRec->pWrapPolygon;
pTextImpRec->pWrapPolygon = NULL;
sal_uInt16 nNumElemVert, nNumElemMemVert, nElemSizeVert;
- rSt >> nNumElemVert >> nNumElemMemVert >> nElemSizeVert;
+ rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
if (nNumElemVert && ((nElemSizeVert == 8) || (nElemSizeVert == 4)))
{
pTextImpRec->pWrapPolygon = new Polygon(nNumElemVert);
@@ -5297,11 +5297,11 @@ SdrObject* SvxMSDffManager::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;
}
@@ -5581,10 +5581,10 @@ void SvxMSDffManager::GetFidclData( sal_uInt32 nOffsDggL )
if ( SeekToRec( rStCtrl, DFF_msofbtDgg, aRecHd.GetRecEndFilePos(), &aDggAtomHd ) )
{
aDggAtomHd.SeekToContent( rStCtrl );
- rStCtrl >> mnCurMaxShapeId
- >> mnIdClusters
- >> nDummy
- >> mnDrawingsSaved;
+ rStCtrl.ReadUInt32( mnCurMaxShapeId )
+ .ReadUInt32( mnIdClusters )
+ .ReadUInt32( nDummy )
+ .ReadUInt32( mnDrawingsSaved );
if ( mnIdClusters-- > 2 )
{
@@ -5599,8 +5599,8 @@ void SvxMSDffManager::GetFidclData( sal_uInt32 nOffsDggL )
maFidcls.resize(mnIdClusters);
for (sal_uInt32 i = 0; i < mnIdClusters; ++i)
{
- rStCtrl >> maFidcls[ i ].dgid
- >> maFidcls[ i ].cspidCur;
+ rStCtrl.ReadUInt32( maFidcls[ i ].dgid )
+ .ReadUInt32( maFidcls[ i ].cspidCur );
}
}
}
@@ -5788,9 +5788,9 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream& rSt, sal_uLong nLe
if( bOk )
{
rSt.SeekRel( nSkipBLIPLen );
- rSt >> nBLIPLen;
+ rSt.ReadUInt32( nBLIPLen );
rSt.SeekRel( nSkipBLIPPos );
- rSt >> nBLIPPos;
+ rSt.ReadUInt32( nBLIPPos );
bOk = rSt.GetError() == 0;
nLength -= nSkipBLIPLen+ 4 + nSkipBLIPPos + 4;
@@ -5933,7 +5933,7 @@ sal_Bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
{
// we've found the FSP gefunden: note Shape Type and Id!
eShapeType = (MSO_SPT)nInst;
- rSt >> aInfo.nShapeId;
+ rSt.ReadUInt32( aInfo.nShapeId );
rSt.SeekRel( nLength - 4 );
nReadSpCont += nLength;
}
@@ -5948,8 +5948,8 @@ sal_Bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
long nStartShapePropTbl = rSt.Tell();
do
{
- rSt >> nPropId
- >> nPropVal;
+ rSt.ReadUInt16( nPropId )
+ .ReadUInt32( nPropVal );
nPropRead += 6;
switch( nPropId )
@@ -6031,7 +6031,7 @@ sal_Bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
}
else if( ( DFF_msofbtClientTextbox == nFbt ) && ( 4 == nLength ) ) // Text-Box-Story-Entry found
{
- rSt >> aInfo.nTxBxComp;
+ rSt.ReadUInt32( aInfo.nTxBxComp );
// Add internal drawing container id to text id.
// Note: The text id uses the first two bytes, while the internal
// drawing container id used the second two bytes.
@@ -6234,7 +6234,7 @@ sal_Bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData,
// read in size of metafile in EMUS
sal_Int32 width, height;
- rBLIPStream >> width >> height;
+ rBLIPStream.ReadInt32( width ).ReadInt32( height );
aMtfSize100.Width() = width;
aMtfSize100.Height() = height;
@@ -6385,7 +6385,7 @@ bool SvxMSDffManager::ReadCommonRecordHeader(SvStream& rSt,
sal_uInt8& rVer, sal_uInt16& rInst, sal_uInt16& rFbt, sal_uInt32& rLength)
{
sal_uInt16 nTmp(0);
- rSt >> nTmp >> rFbt >> rLength;
+ rSt.ReadUInt16( nTmp ).ReadUInt16( rFbt ).ReadUInt32( rLength );
rVer = sal::static_int_cast< sal_uInt8 >(nTmp & 15);
rInst = nTmp >> 4;
if (!rSt.good())
@@ -6619,9 +6619,9 @@ sal_Bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
sal_uInt32 nBytesRead = 0;
do
{
- rStm >> nType;
- rStm >> nRecType;
- rStm >> nStrLen;
+ rStm.ReadUInt32( nType );
+ rStm.ReadUInt32( nRecType );
+ rStm.ReadUInt32( nStrLen );
if( nStrLen )
{
if( 0x10000L > nStrLen )
@@ -6634,9 +6634,9 @@ sal_Bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
else
break;
}
- rStm >> nDummy0;
- rStm >> nDummy1;
- rStm >> nDataLen;
+ rStm.ReadUInt32( nDummy0 );
+ rStm.ReadUInt32( nDummy1 );
+ rStm.ReadUInt32( nDataLen );
nBytesRead += 6 * sizeof( sal_uInt32 ) + nStrLen + nDataLen;
@@ -6849,7 +6849,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
{
// TODO/LATER: perhaps we need to retrieve VisArea and Metafile from the storage also
SotStorageStreamRef xStr = rSrcStg.OpenSotStream( OUString( "package_stream" ), STREAM_STD_READ );
- *xStr >> *xMemStream;
+ xStr->ReadStream( *xMemStream );
}
else
{
@@ -7019,7 +7019,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
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;
}
@@ -7068,7 +7068,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
else if( pDataStrm )
{
sal_uInt32 nLen, nDummy;
- *pDataStrm >> nLen >> nDummy;
+ pDataStrm->ReadUInt32( nLen ).ReadUInt32( nDummy );
if( SVSTREAM_OK != pDataStrm->GetError() ||
// Id in BugDoc - exist there other Ids?
// The ConvertToOle2 - does not check for consistent
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index c4a6c7f13fc7..4fcb0392409d 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -198,13 +198,13 @@ bool TBCHeader::Read( SvStream &rS )
{
OSL_TRACE("TBCHeader::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
- rS >> bSignature >> bVersion >> bFlagsTCR >> tct >> tcid >> tbct >> bPriority;
+ rS.ReadSChar( bSignature ).ReadSChar( bVersion ).ReadUChar( bFlagsTCR ).ReadUChar( tct ).ReadUInt16( tcid ).ReadUInt32( tbct ).ReadUChar( bPriority );
// bit 4 ( from lsb )
if ( bFlagsTCR & 0x10 )
{
width.reset( new sal_uInt16 );
height.reset( new sal_uInt16 );
- rS >> *width >> *height;
+ rS.ReadUInt16( *width ).ReadUInt16( *height );
}
return true;
}
@@ -378,7 +378,7 @@ WString::Read( SvStream &rS )
OSL_TRACE("WString::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
sal_uInt8 nChars = 0;
- rS >> nChars;
+ rS.ReadUChar( nChars );
sString = read_uInt16s_ToOUString(rS, nChars);
return true;
}
@@ -395,12 +395,12 @@ TBCExtraInfo::Read( SvStream &rS )
if( !wstrHelpFile.Read( rS ) )
return false;
- rS >> idHelpContext;
+ rS.ReadInt32( idHelpContext );
if ( !wstrTag.Read( rS ) || !wstrOnAction.Read( rS ) || !wstrParam.Read( rS ) )
return false;
- rS >> tbcu >> tbmg;
+ rS.ReadSChar( tbcu ).ReadSChar( tbmg );
return true;
}
@@ -437,7 +437,7 @@ bool TBCGeneralInfo::Read( SvStream &rS )
{
OSL_TRACE("TBCGeneralInfo::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
- rS >> bFlags;
+ rS.ReadUChar( bFlags );
if ( ( bFlags & 0x1 ) && !customText.Read( rS ) )
return false;
@@ -517,7 +517,7 @@ TBCMenuSpecific::Read( SvStream &rS)
{
OSL_TRACE("TBCMenuSpecific::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
- rS >> tbid;
+ rS.ReadInt32( tbid );
if ( tbid == 1 )
{
name.reset( new WString() );
@@ -552,7 +552,7 @@ bool TBCBSpecific::Read( SvStream &rS)
{
OSL_TRACE("TBCBSpecific::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
- rS >> bFlags;
+ rS.ReadUChar( bFlags );
// bFlags determines what we read next
@@ -568,7 +568,7 @@ bool TBCBSpecific::Read( SvStream &rS)
if ( bFlags & 0x10 )
{
iBtnFace.reset( new sal_uInt16 );
- rS >> *iBtnFace.get();
+ rS.ReadUInt16( *iBtnFace.get() );
}
// if bFlags.fAccelerator equals 1 ( 0x04 )
if ( bFlags & 0x04 )
@@ -659,7 +659,7 @@ TBCCDData::~TBCCDData()
bool TBCCDData::Read( SvStream &rS)
{
nOffSet = rS.Tell();
- rS >> cwstrItems;
+ rS.ReadInt16( cwstrItems );
if ( cwstrItems )
{
for( sal_Int32 index=0; index < cwstrItems; ++index )
@@ -670,7 +670,7 @@ bool TBCCDData::Read( SvStream &rS)
wstrList.push_back( aString );
}
}
- rS >> cwstrMRU >> iSel >> cLines >> dxWidth;
+ rS.ReadInt16( cwstrMRU ).ReadInt16( iSel ).ReadInt16( cLines ).ReadInt16( dxWidth );
return wstrEdit.Read( rS );
}
@@ -711,7 +711,7 @@ bool TBCBitMap::Read( SvStream& rS)
{
OSL_TRACE("TBCBitMap::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
- rS >> cbDIB;
+ rS.ReadInt32( cbDIB );
// cbDIB = sizeOf(biHeader) + sizeOf(colors) + sizeOf(bitmapData) + 10
return ReadDIB(mBitMap, rS, false);
}
@@ -737,7 +737,7 @@ bool TB::Read(SvStream &rS)
{
OSL_TRACE("TB::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
- rS >> bSignature >> bVersion >> cCL >> ltbid >> ltbtr >> cRowsDefault >> bFlags;
+ rS.ReadUChar( bSignature ).ReadUChar( bVersion ).ReadInt16( cCL ).ReadInt32( ltbid ).ReadUInt32( ltbtr ).ReadUInt16( cRowsDefault ).ReadUInt16( bFlags );
name.Read( rS );
return true;
@@ -770,7 +770,7 @@ bool TBVisualData::Read( SvStream& rS )
{
OSL_TRACE("TBVisualData::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
- rS >> tbds >> tbv >> tbdsDock >> iRow;
+ rS.ReadSChar( tbds ).ReadSChar( tbv ).ReadSChar( tbdsDock ).ReadSChar( iRow );
rcDock.Read( rS );
rcFloat.Read( rS );
return true;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index da8cf92ea580..3362dbd483f0 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -162,14 +162,14 @@ SvStream& ReadPptCurrentUserAtom( SvStream& rIn, PptCurrentUserAtom& rAtom )
{
sal_uInt32 nLen;
sal_uInt16 nUserNameLen, nPad;
- rIn >> nLen
- >> rAtom.nMagic
- >> rAtom.nCurrentUserEdit
- >> nUserNameLen
- >> rAtom.nDocFileVersion
- >> rAtom.nMajorVersion
- >> rAtom.nMinorVersion
- >> nPad;
+ rIn.ReadUInt32( nLen )
+ .ReadUInt32( rAtom.nMagic )
+ .ReadUInt32( rAtom.nCurrentUserEdit )
+ .ReadUInt16( nUserNameLen )
+ .ReadUInt16( rAtom.nDocFileVersion )
+ .ReadUChar( rAtom.nMajorVersion )
+ .ReadUChar( rAtom.nMinorVersion )
+ .ReadUInt16( nPad );
rAtom.aCurrentUser = SvxMSDffManager::MSDFFReadZString( rIn, nUserNameLen, true );
}
aHd.SeekToEndOfRecord( rIn );
@@ -185,10 +185,10 @@ SvStream& ReadPptSlidePersistAtom( SvStream& rIn, PptSlidePersistAtom& rAtom )
{
DffRecordHeader aHd;
ReadDffRecordHeader( rIn, aHd )
- >> rAtom.nPsrReference
- >> rAtom.nFlags
- >> rAtom.nNumberTexts
- >> rAtom.nSlideId;
+ .ReadUInt32( rAtom.nPsrReference )
+ .ReadUInt32( rAtom.nFlags )
+ .ReadUInt32( rAtom.nNumberTexts )
+ .ReadUInt32( rAtom.nSlideId );
aHd.SeekToEndOfRecord( rIn );
return rIn;
}
@@ -204,16 +204,16 @@ sal_uInt16 PptSlidePersistList::FindPage(sal_uInt32 nId) const
SvStream& ReadPptInteractiveInfoAtom( SvStream& rIn, PptInteractiveInfoAtom& rAtom )
{
- rIn >> rAtom.nSoundRef
- >> rAtom.nExHyperlinkId
- >> rAtom.nAction
- >> rAtom.nOleVerb
- >> rAtom.nJump
- >> rAtom.nFlags
- >> rAtom.nHyperlinkType
- >> rAtom.nUnknown1
- >> rAtom.nUnknown2
- >> rAtom.nUnknown3;
+ rIn.ReadUInt32( rAtom.nSoundRef )
+ .ReadUInt32( rAtom.nExHyperlinkId )
+ .ReadUChar( rAtom.nAction )
+ .ReadUChar( rAtom.nOleVerb )
+ .ReadUChar( rAtom.nJump )
+ .ReadUChar( rAtom.nFlags )
+ .ReadUChar( rAtom.nHyperlinkType )
+ .ReadUChar( rAtom.nUnknown1 )
+ .ReadUChar( rAtom.nUnknown2 )
+ .ReadUChar( rAtom.nUnknown3 );
return rIn;
}
@@ -223,12 +223,12 @@ SvStream& ReadPptExOleObjAtom( SvStream& rIn, PptExOleObjAtom& rAtom )
sal_uInt32 nDummy2;
sal_uInt32 nDummy4;
- rIn >> rAtom.nAspect
- >> nDummy1
- >> rAtom.nId
- >> nDummy2
- >> rAtom.nPersistPtr
- >> nDummy4;
+ rIn.ReadUInt32( rAtom.nAspect )
+ .ReadUInt32( nDummy1 )
+ .ReadUInt32( rAtom.nId )
+ .ReadUInt32( nDummy2 )
+ .ReadUInt32( rAtom.nPersistPtr )
+ .ReadUInt32( nDummy4 );
return rIn;
}
@@ -258,17 +258,17 @@ SvStream& ReadPptDocumentAtom(SvStream& rIn, PptDocumentAtom& rAtom)
sal_Int8 nEmbeddedTrueType, nTitlePlaceHoldersOmitted, nRightToLeft, nShowComments;
ReadDffRecordHeader( rIn, aHd )
- >> nSlideX >> nSlideY
- >> nNoticeX >> nNoticeY
- >> nDummy >> nDummy // skip ZoomRation
- >> rAtom.nNotesMasterPersist
- >> rAtom.nHandoutMasterPersist
- >> rAtom.n1stPageNumber
- >> nSlidePageFormat
- >> nEmbeddedTrueType
- >> nTitlePlaceHoldersOmitted
- >> nRightToLeft
- >> nShowComments;
+ .ReadInt32( nSlideX ).ReadInt32( nSlideY )
+ .ReadInt32( nNoticeX ).ReadInt32( nNoticeY )
+ .ReadInt32( nDummy ).ReadInt32( nDummy ) // skip ZoomRation
+ .ReadUInt32( rAtom.nNotesMasterPersist )
+ .ReadUInt32( rAtom.nHandoutMasterPersist )
+ .ReadUInt16( rAtom.n1stPageNumber )
+ .ReadUInt16( nSlidePageFormat )
+ .ReadSChar( nEmbeddedTrueType )
+ .ReadSChar( nTitlePlaceHoldersOmitted )
+ .ReadSChar( nRightToLeft )
+ .ReadSChar( nShowComments );
rAtom.aSlidesPageSize.Width() = nSlideX;
rAtom.aSlidesPageSize.Height() = nSlideY;
rAtom.aNotesPageSize.Width() = nNoticeX;
@@ -291,7 +291,7 @@ void PptSlideLayoutAtom::Clear()
SvStream& ReadPptSlideLayoutAtom( SvStream& rIn, PptSlideLayoutAtom& rAtom )
{
- rIn >> rAtom.eLayout;
+ rIn.ReadInt32( rAtom.eLayout );
rIn.Read( rAtom.aPlaceholderId, 8 );
return rIn;
}
@@ -301,9 +301,9 @@ SvStream& ReadPptSlideAtom( SvStream& rIn, PptSlideAtom& rAtom )
DffRecordHeader aHd;
ReadDffRecordHeader( rIn, aHd );
ReadPptSlideLayoutAtom( rIn, rAtom.aLayout );
- rIn >> rAtom.nMasterId
- >> rAtom.nNotesId
- >> rAtom.nFlags;
+ rIn.ReadUInt32( rAtom.nMasterId )
+ .ReadUInt32( rAtom.nNotesId )
+ .ReadUInt16( rAtom.nFlags );
aHd.SeekToEndOfRecord( rIn );
return rIn;
}
@@ -318,8 +318,8 @@ SvStream& ReadPptNotesAtom( SvStream& rIn, PptNotesAtom& rAtom )
{
DffRecordHeader aHd;
ReadDffRecordHeader( rIn, aHd )
- >> rAtom.nSlideId
- >> rAtom.nFlags;
+ .ReadUInt32( rAtom.nSlideId )
+ .ReadUInt16( rAtom.nFlags );
aHd.SeekToEndOfRecord( rIn );
return rIn;
}
@@ -366,10 +366,10 @@ SvStream& ReadPptFontEntityAtom( SvStream& rIn, PptFontEntityAtom& rAtom )
sal_uInt8 lfCharset, lfPitchAndFamily;
- rIn >> lfCharset
- >> rAtom.lfClipPrecision
- >> rAtom.lfQuality
- >> lfPitchAndFamily;
+ rIn.ReadUChar( lfCharset )
+ .ReadUChar( rAtom.lfClipPrecision )
+ .ReadUChar( rAtom.lfQuality )
+ .ReadUChar( lfPitchAndFamily );
switch( lfCharset )
{
@@ -445,13 +445,13 @@ class PptFontCollection: public boost::ptr_vector<PptFontEntityAtom> {
SvStream& ReadPptUserEditAtom( SvStream& rIn, PptUserEditAtom& rAtom )
{
ReadDffRecordHeader( rIn, rAtom.aHd )
- >> rAtom.nLastSlideID
- >> rAtom.nVersion
- >> rAtom.nOffsetLastEdit
- >> rAtom.nOffsetPersistDirectory
- >> rAtom.nDocumentRef
- >> rAtom.nMaxPersistWritten
- >> rAtom.eLastViewType;
+ .ReadInt32( rAtom.nLastSlideID )
+ .ReadUInt32( rAtom.nVersion )
+ .ReadUInt32( rAtom.nOffsetLastEdit )
+ .ReadUInt32( rAtom.nOffsetPersistDirectory )
+ .ReadUInt32( rAtom.nDocumentRef )
+ .ReadUInt32( rAtom.nMaxPersistWritten )
+ .ReadInt16( rAtom.eLastViewType );
rAtom.aHd.SeekToEndOfRecord(rIn);
return rIn;
}
@@ -464,9 +464,9 @@ void PptOEPlaceholderAtom::Clear()
SvStream& ReadPptOEPlaceholderAtom( SvStream& rIn, PptOEPlaceholderAtom& rAtom )
{
- rIn >> rAtom.nPlacementId
- >> rAtom.nPlaceholderId
- >> rAtom.nPlaceholderSize;
+ rIn.ReadUInt32( rAtom.nPlacementId )
+ .ReadUChar( rAtom.nPlaceholderId )
+ .ReadUChar( rAtom.nPlaceholderSize );
return rIn;
}
@@ -577,12 +577,12 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd,
sal_Int32 l, t, r, b;
if ( rHd.nRecLen == 16 )
{
- rSt >> l >> t >> r >> b;
+ rSt.ReadInt32( l ).ReadInt32( t ).ReadInt32( r ).ReadInt32( b );
}
else
{
sal_Int16 ls, ts, rs, bs;
- rSt >> ts >> ls >> rs >> bs; // the order of coordinates is a bit strange...
+ rSt.ReadInt16( ts ).ReadInt16( ls ).ReadInt16( rs ).ReadInt16( bs ); // the order of coordinates is a bit strange...
l = ls, t = ts, r = rs, b = bs;
}
Scale( l );
@@ -600,12 +600,12 @@ void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic
{
sal_uInt16 nX, nGlobalColorsCount, nFillColorsCount;
- rSt >> nX
- >> nGlobalColorsCount
- >> nFillColorsCount
- >> nX
- >> nX
- >> nX;
+ rSt.ReadUInt16( nX )
+ .ReadUInt16( nGlobalColorsCount )
+ .ReadUInt16( nFillColorsCount )
+ .ReadUInt16( nX )
+ .ReadUInt16( nX )
+ .ReadUInt16( nX );
if ( ( nGlobalColorsCount <= 64 ) && ( nFillColorsCount <= 64 ) )
{
@@ -631,17 +631,17 @@ void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic
sal_uInt32 nIndex, nPos = rSt.Tell();
sal_uInt8 nDummy, nRed, nGreen, nBlue;
sal_uInt16 nChanged;
- rSt >> nChanged;
+ rSt.ReadUInt16( nChanged );
if ( nChanged & 1 )
{
sal_uInt32 nColor = 0;
- rSt >> nDummy
- >> nRed
- >> nDummy
- >> nGreen
- >> nDummy
- >> nBlue
- >> nIndex;
+ rSt.ReadUChar( nDummy )
+ .ReadUChar( nRed )
+ .ReadUChar( nDummy )
+ .ReadUChar( nGreen )
+ .ReadUChar( nDummy )
+ .ReadUChar( nBlue )
+ .ReadUInt32( nIndex );
if ( nIndex < 8 )
{
@@ -652,12 +652,12 @@ void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic
}
nColor = nRed | ( nGreen << 8 ) | ( nBlue << 16 );
*pCurrentNew++ = nColor;
- rSt >> nDummy
- >> nRed
- >> nDummy
- >> nGreen
- >> nDummy
- >> nBlue;
+ rSt.ReadUChar( nDummy )
+ .ReadUChar( nRed )
+ .ReadUChar( nDummy )
+ .ReadUChar( nGreen )
+ .ReadUChar( nDummy )
+ .ReadUChar( nBlue );
nColor = nRed | ( nGreen << 8 ) | ( nBlue << 16 );
*pCurrentOriginal++ = nColor;
(*pCount)++;
@@ -1184,14 +1184,14 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( aSecPropSet.SeekToContent( DFF_Prop_tableRowProperties, rSt ) )
{
sal_Int16 i, nRowCount = 0;
- rSt >> nRowCount >> i >> i;
+ rSt.ReadInt16( nRowCount ).ReadInt16( i ).ReadInt16( i );
if ( nRowCount )
{
sal_uInt32* pTableArry = new sal_uInt32[ nRowCount + 2 ];
pTableArry[ 0 ] = nTableProperties;
pTableArry[ 1 ] = nRowCount;
for ( i = 0; i < nRowCount; i++ )
- rSt >> pTableArry[ i + 2 ];
+ rSt.ReadUInt32( pTableArry[ i + 2 ] );
rData.pTableRowProperties = pTableArry;
}
}
@@ -1344,14 +1344,14 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
while ( bOk && ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nPibLen ) )
{
sal_uInt32 nOfs(0);
- rStCtrl >> nOfs;
+ rStCtrl.ReadUInt32( nOfs );
sal_uInt32 nAnz = nOfs;
nOfs &= 0x000FFFFF;
nAnz >>= 20;
while ( bOk && ( rStCtrl.GetError() == 0 ) && ( nAnz > 0 ) && ( nOfs <= nPersistPtrAnz ) )
{
sal_uInt32 nPt(0);
- rStCtrl >> nPt;
+ rStCtrl.ReadUInt32( nPt );
if ( !pPersistPtr[ nOfs ] )
{
pPersistPtr[ nOfs ] = nPt;
@@ -1942,7 +1942,7 @@ SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( sal_uInt32 nPersistPtr,
sal_uInt32 nLen = aHd.nRecLen - 4;
if ( (sal_Int32)nLen > 0 )
{
- rStCtrl >> nOleId;
+ rStCtrl.ReadUInt32( nOleId );
pRet = new SvMemoryStream;
ZCodec aZCodec( 0x8000, 0x8000 );
aZCodec.BeginCompression();
@@ -1975,9 +1975,9 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
if ( SeekToRec( rStCtrl, PPT_PST_VBAInfoAtom, pHd->GetRecEndFilePos(), pHd ) )
{
sal_uInt32 nPersistPtr, nIDoNotKnow1, nIDoNotKnow2;
- rStCtrl >> nPersistPtr
- >> nIDoNotKnow1
- >> nIDoNotKnow2;
+ rStCtrl.ReadUInt32( nPersistPtr )
+ .ReadUInt32( nIDoNotKnow1 )
+ .ReadUInt32( nIDoNotKnow2 );
sal_uInt32 nOleId;
SvMemoryStream* pBas = ImportExOleObjStg( nPersistPtr, nOleId );
@@ -2093,7 +2093,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
ReadDffRecordHeader( rStCtrl, aHd );
if ( aHd.nRecType == DFF_PST_ExOleObjStg )
{
- rStCtrl >> nId;
+ rStCtrl.ReadUInt32( nId );
aOleObjectList.push_back(
new PPTOleEntry( aAt.nId, aHd.nFilePos, pShell, nRecType, aAt.nAspect ) );
}
@@ -2651,17 +2651,17 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage,
case PPT_PST_CommentAtom10 :
{
- rStCtrl >> nIndex
- >> aDateTime.Year
- >> aDateTime.Month
- >> aDateTime.Day // DayOfWeek
- >> aDateTime.Day
- >> aDateTime.Hours
- >> aDateTime.Minutes
- >> aDateTime.Seconds
- >> aDateTime.NanoSeconds
- >> nPosX
- >> nPosY;
+ rStCtrl.ReadInt32( nIndex )
+ .ReadInt16( aDateTime.Year )
+ .ReadUInt16( aDateTime.Month )
+ .ReadUInt16( aDateTime.Day ) // DayOfWeek
+ .ReadUInt16( aDateTime.Day )
+ .ReadUInt16( aDateTime.Hours )
+ .ReadUInt16( aDateTime.Minutes )
+ .ReadUInt16( aDateTime.Seconds )
+ .ReadUInt32( aDateTime.NanoSeconds )
+ .ReadInt32( nPosX )
+ .ReadInt32( nPosY );
aDateTime.NanoSeconds *= ::Time::nanoPerMilli;
}
@@ -2783,7 +2783,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
if ( aShapeHd.nRecType == DFF_msofbtSp )
{
sal_uInt32 nSpFlags;
- rStCtrl >> nSpFlags >> nSpFlags;
+ rStCtrl.ReadUInt32( nSpFlags ).ReadUInt32( nSpFlags );
if ( nSpFlags & SP_FBACKGROUND )
{
aEscherObjListHd.SeekToBegOfRecord( rStCtrl );
@@ -3096,7 +3096,7 @@ void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader& rHd, HeaderF
switch ( aHd.nRecType )
{
case PPT_PST_HeadersFootersAtom :
- rStCtrl >> rE.nAtom;
+ rStCtrl.ReadUInt32( rE.nAtom );
break;
case PPT_PST_CString :
@@ -3138,18 +3138,18 @@ PPTExtParaLevel::PPTExtParaLevel()
SvStream& ReadPPTExtParaLevel( SvStream& rIn, PPTExtParaLevel& rLevel )
{
rLevel.mbSet = sal_True;
- rIn >> rLevel.mnExtParagraphMask;
+ rIn.ReadUInt32( rLevel.mnExtParagraphMask );
if ( rLevel.mnExtParagraphMask & 0x00800000 )
- rIn >> rLevel.mnBuBlip;
+ rIn.ReadUInt16( rLevel.mnBuBlip );
if ( rLevel.mnExtParagraphMask & 0x02000000 )
- rIn >> rLevel.mnHasAnm;
+ rIn.ReadUInt16( rLevel.mnHasAnm );
if ( rLevel.mnExtParagraphMask & 0x01000000 )
- rIn >> rLevel.mnAnmScheme;
+ rIn.ReadUInt32( rLevel.mnAnmScheme );
if ( rLevel.mnExtParagraphMask & 0x04000000 )
- rIn >> rLevel.mpfPP10Ext;
- rIn >> rLevel.mnExtCharacterMask;
+ rIn.ReadUInt32( rLevel.mpfPP10Ext );
+ rIn.ReadUInt32( rLevel.mnExtCharacterMask );
if ( rLevel.mnExtCharacterMask & 0x100000 )
- rIn >> rLevel.mcfPP10Ext;
+ rIn.ReadUInt32( rLevel.mcfPP10Ext );
return rIn;
}
@@ -3211,7 +3211,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
ReadDffRecordHeader( rSt, aBuGraAtomHd );
if ( aBuGraAtomHd.nRecType == PPT_PST_ExtendedBuGraAtom )
{
- rSt >> nType;
+ rSt.ReadUInt16( nType );
Graphic aGraphic;
if ( rMan.GetBLIPDirect( rSt, aGraphic, NULL ) )
{
@@ -3288,7 +3288,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
if ( aHd.nRecInstance < PPT_STYLESHEETENTRYS )
{
sal_uInt16 nDepth, i = 0;
- rSt >> nDepth;
+ rSt.ReadUInt16( nDepth );
if ( i <= 5 )
{
@@ -3777,35 +3777,35 @@ void PPTCharSheet::Read( SvStream& rIn, sal_Bool /*bMasterStyle*/, sal_uInt32 nL
// Zeichenattribute
sal_uInt32 nCMask;
sal_uInt16 nVal16;
- rIn >> nCMask;
+ rIn.ReadUInt32( nCMask );
if ( nCMask & 0x0000FFFF )
{
sal_uInt16 nBitAttr;
maCharLevel[ nLevel ].mnFlags &= ~( (sal_uInt16)nCMask );
- rIn >> nBitAttr; // Bit attributes (bold, underlined, ...)
+ rIn.ReadUInt16( nBitAttr ); // Bit attributes (bold, underlined, ...)
maCharLevel[ nLevel ].mnFlags |= nBitAttr;
}
if ( nCMask & ( 1 << PPT_CharAttr_Font ) ) // 0x00010000
- rIn >> maCharLevel[ nLevel ].mnFont;
+ rIn.ReadUInt16( maCharLevel[ nLevel ].mnFont );
if ( nCMask & ( 1 << PPT_CharAttr_AsianOrComplexFont ) ) // 0x00200000
- rIn >> maCharLevel[ nLevel ].mnAsianOrComplexFont;
+ rIn.ReadUInt16( maCharLevel[ nLevel ].mnAsianOrComplexFont );
if ( nCMask & ( 1 << PPT_CharAttr_ANSITypeface ) ) // 0x00400000
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
if ( nCMask & ( 1 << PPT_CharAttr_Symbol ) ) // 0x00800000
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
if ( nCMask & ( 1 << PPT_CharAttr_FontHeight ) ) // 0x00020000
- rIn >> maCharLevel[ nLevel ].mnFontHeight;
+ rIn.ReadUInt16( maCharLevel[ nLevel ].mnFontHeight );
if ( nCMask & ( 1 << PPT_CharAttr_FontColor ) ) // 0x00040000
{
- rIn >> maCharLevel[ nLevel ].mnFontColor;
+ rIn.ReadUInt32( maCharLevel[ nLevel ].mnFontColor );
if( ! (maCharLevel[ nLevel ].mnFontColor & 0xff000000 ) )
maCharLevel[ nLevel ].mnFontColor = PPT_COLSCHEME_HINTERGRUND;
}
if ( nCMask & ( 1 << PPT_CharAttr_Escapement ) ) // 0x00080000
- rIn >> maCharLevel[ nLevel ].mnEscapement;
+ rIn.ReadUInt16( maCharLevel[ nLevel ].mnEscapement );
if ( nCMask & 0x00100000 ) // 0x00100000
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
nCMask >>= 24;
while( nCMask )
@@ -3813,7 +3813,7 @@ void PPTCharSheet::Read( SvStream& rIn, sal_Bool /*bMasterStyle*/, sal_uInt32 nL
if ( nCMask & 1 )
{
OSL_FAIL( "PPTCharSheet::Read - unknown attribute, send me this document (SJ)" );
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
}
nCMask >>= 1;
}
@@ -3878,90 +3878,90 @@ void PPTParaSheet::Read( SdrPowerPointImport&
// Absatzattribute
sal_uInt16 nVal16, i, nMask16;
sal_uInt32 nVal32, nPMask;
- rIn >> nPMask;
+ rIn.ReadUInt32( nPMask );
nMask16 = (sal_uInt16)nPMask & 0xf;
if ( nMask16 )
{
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnBuFlags &=~ nMask16;
nVal16 &= nMask16;
maParaLevel[ nLevel ].mnBuFlags |= nVal16;
}
if ( nPMask & 0x0080 )
- rIn >> maParaLevel[ nLevel ].mnBulletChar;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletChar );
if ( nPMask & 0x0010 )
- rIn >> maParaLevel[ nLevel ].mnBulletFont;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletFont );
if ( nPMask & 0x0040 )
{
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnBulletHeight = nVal16;
}
if ( nPMask & 0x0020 )
{
- rIn >> nVal32;
+ rIn.ReadUInt32( nVal32 );
maParaLevel[ nLevel ].mnBulletColor = nVal32;
}
if ( bFirst )
{
if ( nPMask & 0xF00 )
{ // AbsJust!
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnAdjust = nVal16 & 3;
}
if ( nPMask & 0x1000 )
- rIn >> maParaLevel[ nLevel ].mnLineFeed;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnLineFeed );
if ( nPMask & 0x2000 )
- rIn >> maParaLevel[ nLevel ].mnUpperDist;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnUpperDist );
if ( nPMask & 0x4000 )
- rIn >> maParaLevel[ nLevel ].mnLowerDist;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnLowerDist );
if ( nPMask & 0x8000 )
- rIn >> maParaLevel[ nLevel ].mnTextOfs;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnTextOfs );
if ( nPMask & 0x10000 )
- rIn >> maParaLevel[ nLevel ].mnBulletOfs;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletOfs );
if ( nPMask & 0x20000 )
- rIn >> maParaLevel[ nLevel ].mnDefaultTab;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnDefaultTab );
if ( nPMask & 0x200000 )
{
// number of tabulators
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
for ( i = 0; i < nVal16; i++ )
- rIn >> nVal32; // reading the tabulators
+ rIn.ReadUInt32( nVal32 ); // reading the tabulators
}
if ( nPMask & 0x40000 )
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
if ( nPMask & 0x80000 )
- rIn >> maParaLevel[ nLevel ].mnAsianLineBreak;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnAsianLineBreak );
if ( nPMask & 0x100000 )
- rIn >> maParaLevel[ nLevel ].mnBiDi;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnBiDi );
}
else
{
if ( nPMask & 0x800 )
{
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
maParaLevel[ nLevel ].mnAdjust = nVal16 & 3;
}
if ( nPMask & 0x1000 )
- rIn >> maParaLevel[ nLevel ].mnLineFeed;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnLineFeed );
if ( nPMask & 0x2000 )
- rIn >> maParaLevel[ nLevel ].mnUpperDist;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnUpperDist );
if ( nPMask & 0x4000 )
- rIn >> maParaLevel[ nLevel ].mnLowerDist;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnLowerDist );
if ( nPMask & 0x8000 )
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
if ( nPMask & 0x100 )
- rIn >> maParaLevel[ nLevel ].mnTextOfs;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnTextOfs );
if ( nPMask & 0x200 )
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
if ( nPMask & 0x400 )
- rIn >> maParaLevel[ nLevel ].mnBulletOfs;
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletOfs );
if ( nPMask & 0x10000 )
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
if ( nPMask & 0xe0000 )
{
sal_uInt16 nFlagsToModifyMask = (sal_uInt16)( ( nPMask >> 17 ) & 7 );
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
// bits that are not involved to zero
nVal16 &= nFlagsToModifyMask;
// bits that are to change to zero
@@ -3972,12 +3972,12 @@ void PPTParaSheet::Read( SdrPowerPointImport&
if ( nPMask & 0x100000 )
{
// number of tabulators
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
for ( i = 0; i < nVal16; i++ )
- rIn >> nVal32; // reading the tabulators
+ rIn.ReadUInt32( nVal32 ); // reading the tabulators
}
if ( nPMask & 0x200000 )
- rIn >> maParaLevel[ nLevel ].mnBiDi; // #88602#
+ rIn.ReadUInt16( maParaLevel[ nLevel ].mnBiDi ); // #88602#
}
nPMask >>= 22;
@@ -3991,7 +3991,7 @@ void PPTParaSheet::Read( SdrPowerPointImport&
OSL_FAIL( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
}
#endif
- rIn >> nVal16;
+ rIn.ReadUInt16( nVal16 );
}
nPMask >>= 1;
}
@@ -4050,7 +4050,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
if ( aTxMasterStyleHd.nRecType == PPT_PST_TxMasterStyleAtom )
{
sal_uInt16 nLevelAnz;
- rIn >> nLevelAnz;
+ rIn.ReadUInt16( nLevelAnz );
sal_uInt16 nLev = 0;
sal_Bool bFirst = sal_True;
@@ -4141,7 +4141,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
}
}
sal_uInt16 nLevelAnz;
- rIn >> nLevelAnz;
+ rIn.ReadUInt16( nLevelAnz );
if ( nLevelAnz > 5 )
{
OSL_FAIL( "PPTStyleSheet::Ppt-TextStylesheet hat mehr als 5 Ebenen! (SJ)" );
@@ -4164,7 +4164,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
bFirst = sal_False;
sal_uInt16 nDontKnow;
- rIn >> nDontKnow;
+ rIn.ReadUInt16( nDontKnow );
}
mpParaSheet[ nInstance ]->Read( rManager, rIn, sal_True, nLev, bFirst );
mpCharSheet[ nInstance ]->Read( rIn, sal_True, nLev, bFirst );
@@ -4235,7 +4235,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
if ( aTxMasterStyleHd2.nRecType == PPT_PST_TxMasterStyleAtom )
{
sal_uInt16 nLevelAnz;
- rIn >> nLevelAnz;
+ rIn.ReadUInt16( nLevelAnz );
sal_uInt16 nLev = 0;
sal_Bool bFirst = sal_True;
@@ -4526,33 +4526,33 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerP
{
sal_Int16 nTCount;
sal_Int32 i;
- rIn >> mpImplRuler->nFlags;
+ rIn.ReadInt32( mpImplRuler->nFlags );
// number of indent levels, unused now
if ( mpImplRuler->nFlags & 2 )
- rIn >> nTCount;
+ rIn.ReadInt16( nTCount );
if ( mpImplRuler->nFlags & 1 )
- rIn >> mpImplRuler->nDefaultTab;
+ rIn.ReadUInt16( mpImplRuler->nDefaultTab );
if ( mpImplRuler->nFlags & 4 )
{
- rIn >> nTCount;
+ rIn.ReadInt16( nTCount );
if ( nTCount )
{
mpImplRuler->nTabCount = (sal_uInt16)nTCount;
mpImplRuler->pTab = new PPTTabEntry[ mpImplRuler->nTabCount ];
for ( i = 0; i < nTCount; i++ )
{
- rIn >> mpImplRuler->pTab[ i ].nOffset
- >> mpImplRuler->pTab[ i ].nStyle;
+ rIn.ReadUInt16( mpImplRuler->pTab[ i ].nOffset )
+ .ReadUInt16( mpImplRuler->pTab[ i ].nStyle );
}
}
}
for ( i = 0; i < 5; i++ )
{
if ( mpImplRuler->nFlags & ( 8 << i ) )
- rIn >> mpImplRuler->nTextOfs[ i ];
+ rIn.ReadUInt16( mpImplRuler->nTextOfs[ i ] );
if ( mpImplRuler->nFlags & ( 256 << i ) )
- rIn >> mpImplRuler->nBulletOfs[ i ];
+ rIn.ReadUInt16( mpImplRuler->nBulletOfs[ i ] );
if( mpImplRuler->nBulletOfs[ i ] > 0x7fff)
{
// workaround
@@ -4624,12 +4624,12 @@ sal_Bool PPTTextCharacterStyleAtomInterpreter::Read( SvStream& rIn, const DffRec
{
rRecHd.SeekToContent( rIn );
- rIn >> nFlags1
- >> nFlags2
- >> nFlags3
- >> n1
- >> nFontHeight
- >> nFontColor;
+ rIn.ReadUInt16( nFlags1 )
+ .ReadUInt16( nFlags2 )
+ .ReadUInt16( nFlags3 )
+ .ReadInt32( n1 )
+ .ReadUInt16( nFontHeight )
+ .ReadInt32( nFontColor );
return sal_True;
}
@@ -4653,40 +4653,40 @@ sal_Bool PPTTextParagraphStyleAtomInterpreter::Read( SvStream& rIn, const DffRec
sal_uInt32 nDummy32, nFlags, nRecEndPos = rRecHd.GetRecEndFilePos();
sal_uInt16 nDummy16;
- rIn >> nDummy16
- >> nFlags;
+ rIn.ReadUInt16( nDummy16 )
+ .ReadUInt32( nFlags );
if ( nFlags & 0xf && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // BuFlags
+ rIn.ReadUInt16( nDummy16 ); // BuFlags
if ( nFlags & 0x80 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // BuChar
+ rIn.ReadUInt16( nDummy16 ); // BuChar
if ( nFlags & 0x10 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // nBuFont;
+ rIn.ReadUInt16( nDummy16 ); // nBuFont;
if ( nFlags & 0x40 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // nBuHeight;
+ rIn.ReadUInt16( nDummy16 ); // nBuHeight;
if ( nFlags & 0x0020 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy32; // nBuColor;
+ rIn.ReadUInt32( nDummy32 ); // nBuColor;
if ( nFlags & 0x800 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // AbsJust!
+ rIn.ReadUInt16( nDummy16 ); // AbsJust!
if ( nFlags & 0x400 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nFlags & 0x200 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nFlags & 0x100 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nFlags & 0x1000 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // LineFeed
+ rIn.ReadUInt16( nDummy16 ); // LineFeed
if ( nFlags & 0x2000 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // nUpperDist
+ rIn.ReadUInt16( nDummy16 ); // nUpperDist
if ( nFlags & 0x4000 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16; // nLowerDist
+ rIn.ReadUInt16( nDummy16 ); // nLowerDist
if ( nFlags & 0x8000 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nFlags & 0x10000 && ( rIn.Tell() < nRecEndPos ) )
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nFlags & 0xe0000 && ( rIn.Tell() < nRecEndPos ) )
{
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nFlags & 0x20000 )
bForbiddenRules = ( nDummy16 & 1 ) == 1;
if ( nFlags & 0x40000 )
@@ -4700,7 +4700,7 @@ sal_Bool PPTTextParagraphStyleAtomInterpreter::Read( SvStream& rIn, const DffRec
{
if ( nFlags & nMask )
{
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
nFlags ^= nMask;
}
nMask <<= 1;
@@ -4746,10 +4746,10 @@ sal_Bool PPTTextSpecInfoAtomInterpreter::Read( SvStream& rIn, const DffRecordHea
if ( nRecordType == PPT_PST_TextSpecInfoAtom )
{
- rIn >> nCharCount;
+ rIn.ReadUInt32( nCharCount );
nCharIdx += nCharCount;
}
- rIn >> nFlags;
+ rIn.ReadUInt32( nFlags );
PPTTextSpecInfo* pEntry = new PPTTextSpecInfo( nCharIdx );
if ( pTextSpecDefault )
@@ -4765,9 +4765,9 @@ sal_Bool PPTTextSpecInfoAtomInterpreter::Read( SvStream& rIn, const DffRecordHea
switch( nFlags & i )
{
case 0 : break;
- case 1 : rIn >> pEntry->nDontKnow; break;
- case 2 : rIn >> nLang; break;
- case 4 : rIn >> nLang; break;
+ case 1 : rIn.ReadUInt16( pEntry->nDontKnow ); break;
+ case 2 : rIn.ReadUInt16( nLang ); break;
+ case 4 : rIn.ReadUInt16( nLang ); break;
default :
{
rIn.SeekRel( 2 );
@@ -4801,23 +4801,23 @@ PPTTextSpecInfoAtomInterpreter::~PPTTextSpecInfoAtomInterpreter()
void StyleTextProp9::Read( SvStream& rIn )
{
- rIn >> mnExtParagraphMask;
+ rIn.ReadUInt32( mnExtParagraphMask );
if ( mnExtParagraphMask & 0x800000 )
- rIn >> mnBuBlip;
+ rIn.ReadUInt16( mnBuBlip );
if ( mnExtParagraphMask & 0x2000000 )
- rIn >> mnHasAnm;
+ rIn.ReadUInt16( mnHasAnm );
if ( mnExtParagraphMask & 0x1000000 )
- rIn >> mnAnmScheme;
+ rIn.ReadUInt32( mnAnmScheme );
if ( mnExtParagraphMask & 0x4000000 )
- rIn >> mpfPP10Ext;
- rIn >> mnExtCharacterMask;
+ rIn.ReadUInt32( mpfPP10Ext );
+ rIn.ReadUInt32( mnExtCharacterMask );
if ( mnExtCharacterMask & 0x100000 )
- rIn >> mncfPP10Ext;
- rIn >> mnSpecialInfoMask;
+ rIn.ReadUInt32( mncfPP10Ext );
+ rIn.ReadUInt32( mnSpecialInfoMask );
if ( mnSpecialInfoMask & 0x20 )
- rIn >> mnPP10Ext;
+ rIn.ReadUInt32( mnPP10Ext );
if ( mnSpecialInfoMask & 0x40 )
- rIn >> mfBidi;
+ rIn.ReadUInt16( mfBidi );
}
PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
@@ -4846,8 +4846,8 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
ImplPPTParaPropSet& aSet = *aParaPropSet.pParaSet;
if ( bTextPropAtom )
{
- rIn >> nCharCount
- >> aParaPropSet.pParaSet->mnDepth; // indent depth
+ rIn.ReadUInt32( nCharCount )
+ .ReadUInt16( aParaPropSet.pParaSet->mnDepth ); // indent depth
aParaPropSet.pParaSet->mnDepth = // taking care of about using not more than 9 outliner levels
std::min(sal_uInt16(8),
@@ -4855,22 +4855,22 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
nCharCount--;
- rIn >> nMask;
+ rIn.ReadUInt32( nMask );
aSet.mnAttrSet = nMask & 0x207df7;
sal_uInt16 nBulFlg = 0;
if ( nMask & 0xF )
- rIn >> nBulFlg; // Bullet-HardAttr-Flags
+ rIn.ReadUInt16( nBulFlg ); // Bullet-HardAttr-Flags
aSet.mpArry[ PPT_ParaAttr_BulletOn ] = ( nBulFlg & 1 ) ? 1 : 0;
aSet.mpArry[ PPT_ParaAttr_BuHardFont ] = ( nBulFlg & 2 ) ? 1 : 0;
aSet.mpArry[ PPT_ParaAttr_BuHardColor ] = ( nBulFlg & 4 ) ? 1 : 0;
if ( nMask & 0x0080 ) // buChar
- rIn >> aSet.mpArry[ PPT_ParaAttr_BulletChar ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_BulletChar ] );
if ( nMask & 0x0010 ) // buTypeface
- rIn >> aSet.mpArry[ PPT_ParaAttr_BulletFont ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_BulletFont ] );
if ( nMask & 0x0040 ) // buSize
{
- rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_BulletHeight ] );
if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
&& ( nBulFlg & ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
aSet.mnAttrSet ^= 0x40;
@@ -4878,7 +4878,7 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
if ( nMask & 0x0020 ) // buColor
{
sal_uInt32 nVal32, nHiByte;
- rIn >> nVal32;
+ rIn.ReadUInt32( nVal32 );
nHiByte = nVal32 >> 24;
if ( nHiByte <= 8 )
nVal32 = nHiByte | PPT_COLSCHEME;
@@ -4886,42 +4886,42 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
}
if ( nMask & 0x0800 ) // pfAlignment
{
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
aSet.mpArry[ PPT_ParaAttr_Adjust ] = nDummy16 & 3;
}
if ( nMask & 0x1000 ) // pfLineSpacing
- rIn >> aSet.mpArry[ PPT_ParaAttr_LineFeed ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_LineFeed ] );
if ( nMask & 0x2000 ) // pfSpaceBefore
- rIn >> aSet.mpArry[ PPT_ParaAttr_UpperDist ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_UpperDist ] );
if ( nMask & 0x4000 ) // pfSpaceAfter
- rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_LowerDist ] );
if ( nMask & 0x100 ) // pfLeftMargin
{
- rIn >> aSet.mpArry[ PPT_ParaAttr_TextOfs ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_TextOfs ] );
aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
}
if ( nMask & 0x400 ) // pfIndent
{
- rIn >> aSet.mpArry[ PPT_ParaAttr_BulletOfs ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_BulletOfs ] );
aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
}
if ( nMask & 0x8000 ) // pfDefaultTabSize
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nMask & 0x100000 ) // pfTabStops
{
sal_uInt16 i, nDistance, nAlignment, nNumberOfTabStops = 0;
- rIn >> nNumberOfTabStops;
+ rIn.ReadUInt16( nNumberOfTabStops );
for ( i = 0; i < nNumberOfTabStops; i++ )
{
- rIn >> nDistance
- >> nAlignment;
+ rIn.ReadUInt16( nDistance )
+ .ReadUInt16( nAlignment );
}
}
if ( nMask & 0x10000 ) // pfBaseLine
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nMask & 0xe0000 ) // pfCharWrap, pfWordWrap, pfOverflow
{
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
if ( nMask & 0x20000 )
aSet.mpArry[ PPT_ParaAttr_AsianLB_1 ] = nDummy16 & 1;
if ( nMask & 0x40000 )
@@ -4931,7 +4931,7 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
aSet.mnAttrSet |= ( ( nMask >> 17 ) & 7 ) << PPT_ParaAttr_AsianLB_1;
}
if ( nMask & 0x200000 ) // pfTextDirection
- rIn >> aSet.mpArry[ PPT_ParaAttr_BiDi ];
+ rIn.ReadUInt16( aSet.mpArry[ PPT_ParaAttr_BiDi ] );
}
else
nCharCount = nStringLen;
@@ -4988,9 +4988,9 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aChar
sal_Int32 nCharsToRead;
sal_uInt16 nStringLen = aString.getLength();
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
nCharCount = nDummy16;
- rIn >> nDummy16;
+ rIn.ReadUInt16( nDummy16 );
nCharsToRead = nStringLen - ( nCharAnzRead + nCharCount );
if ( nCharsToRead < 0 )
{
@@ -5004,41 +5004,41 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aChar
ImplPPTCharPropSet& aSet = *aCharPropSet.pCharSet;
// character attributes
- rIn >> nMask;
+ rIn.ReadUInt32( nMask );
if ( (sal_uInt16)nMask )
{
aSet.mnAttrSet |= (sal_uInt16)nMask;
- rIn >> aSet.mnFlags;
+ rIn.ReadUInt16( aSet.mnFlags );
}
if ( nMask & 0x10000 ) // cfTypeface
{
- rIn >> aSet.mnFont;
+ rIn.ReadUInt16( aSet.mnFont );
aSet.mnAttrSet |= 1 << PPT_CharAttr_Font;
}
if ( nMask & 0x200000 ) // cfFEOldTypeface
{
- rIn >> aSet.mnAsianOrComplexFont;
+ rIn.ReadUInt16( aSet.mnAsianOrComplexFont );
aSet.mnAttrSet |= 1 << PPT_CharAttr_AsianOrComplexFont;
}
if ( nMask & 0x400000 ) // cfANSITypeface
{
- rIn >> aSet.mnANSITypeface;
+ rIn.ReadUInt16( aSet.mnANSITypeface );
aSet.mnAttrSet |= 1 << PPT_CharAttr_ANSITypeface;
}
if ( nMask & 0x800000 ) // cfSymbolTypeface
{
- rIn >> aSet.mnSymbolFont;
+ rIn.ReadUInt16( aSet.mnSymbolFont );
aSet.mnAttrSet |= 1 << PPT_CharAttr_Symbol;
}
if ( nMask & 0x20000 ) // cfSize
{
- rIn >> aSet.mnFontHeight;
+ rIn.ReadUInt16( aSet.mnFontHeight );
aSet.mnAttrSet |= 1 << PPT_CharAttr_FontHeight;
}
if ( nMask & 0x40000 ) // cfColor
{
sal_uInt32 nVal;
- rIn >> nVal;
+ rIn.ReadUInt32( nVal );
if ( !( nVal & 0xff000000 ) )
nVal = PPT_COLSCHEME_HINTERGRUND;
aSet.mnColor = nVal;
@@ -5046,7 +5046,7 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aChar
}
if ( nMask & 0x80000 ) // cfPosition
{
- rIn >> aSet.mnEscapement;
+ rIn.ReadUInt16( aSet.mnEscapement );
aSet.mnAttrSet |= 1 << PPT_CharAttr_Escapement;
}
if ( nExtParaPos )
@@ -6411,7 +6411,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_OutlineTextRefAtom, aClientTextBoxHd.GetRecEndFilePos(), &aTextHd ) )
{
sal_uInt32 nRefNum;
- rIn >> nRefNum;
+ rIn.ReadUInt32( nRefNum );
if ( rSdrPowerPointImport.SeekToRec( rIn, PPT_PST_TextRulerAtom, aClientTextBoxHd.GetRecEndFilePos() ) )
nTextRulerAtomOfs = rIn.Tell();
@@ -6451,8 +6451,8 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
while ( pHd )
{
pHd->SeekToContent( rIn );
- rIn >> nTmpSlideId
- >> nTmpRef; // this seems to be the instance
+ rIn.ReadUInt32( nTmpSlideId )
+ .ReadUInt32( nTmpRef ); // this seems to be the instance
if ( ( nTmpSlideId == nSlideId ) && ( pHd->nRecInstance == nRefNum ) )
{
@@ -6529,7 +6529,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
// TextHeaderAtom is always the first Atom
sal_uInt16 nInstance;
- rIn >> nInstance; // this number tells us the TxMasterStyleAtom Instance
+ rIn.ReadUInt16( nInstance ); // this number tells us the TxMasterStyleAtom Instance
if ( nInstance > 8 )
nInstance = 4;
aTextHd.SeekToEndOfRecord( rIn );
@@ -6624,9 +6624,9 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
case PPT_PST_DateTimeMCAtom :
{
pEntry = new PPTFieldEntry;
- rIn >> pEntry->nPos
- >> nVal
- >> nVal;
+ rIn.ReadUInt16( pEntry->nPos )
+ .ReadUInt16( nVal )
+ .ReadUInt16( nVal );
pEntry->SetDateTime( nVal & 0xff );
}
break;
@@ -6634,7 +6634,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
case PPT_PST_FooterMCAtom :
{
pEntry = new PPTFieldEntry;
- rIn >> pEntry->nPos;
+ rIn.ReadUInt16( pEntry->nPos );
pEntry->pField1 = new SvxFieldItem( SvxFooterField(), EE_FEATURE_FIELD );
}
break;
@@ -6642,7 +6642,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
case PPT_PST_HeaderMCAtom :
{
pEntry = new PPTFieldEntry;
- rIn >> pEntry->nPos;
+ rIn.ReadUInt16( pEntry->nPos );
pEntry->pField1 = new SvxFieldItem( SvxHeaderField(), EE_FEATURE_FIELD );
}
break;
@@ -6650,7 +6650,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
case PPT_PST_GenericDateMCAtom :
{
pEntry = new PPTFieldEntry;
- rIn >> pEntry->nPos;
+ rIn.ReadUInt16( pEntry->nPos );
pEntry->pField1 = new SvxFieldItem( SvxDateTimeField(), EE_FEATURE_FIELD );
if ( rPersistEntry.pHeaderFooterEntry ) // sj: #i34111# on master pages it is possible
{ // that there is no HeaderFooterEntry available
@@ -6668,8 +6668,8 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
pEntry = new PPTFieldEntry;
if ( aTextHd.nRecLen >= 4 )
{
- rIn >> pEntry->nPos
- >> nVal;
+ rIn.ReadUInt16( pEntry->nPos )
+ .ReadUInt16( nVal );
// evaluate ID
//SvxFieldItem* pFieldItem = NULL;
@@ -6701,7 +6701,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
for (int nLen = 0; nLen < 64; ++nLen)
{
sal_Unicode n(0);
- rIn >> n;
+ rIn.ReadUInt16( n );
// Collect quoted characters into aStr
if ( n == '\'')
@@ -6758,8 +6758,8 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
else
{
sal_uInt32 nStartPos, nEndPos;
- rIn >> nStartPos
- >> nEndPos;
+ rIn.ReadUInt32( nStartPos )
+ .ReadUInt32( nEndPos );
if ( nEndPos )
{
pEntry = new PPTFieldEntry;
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index ce48dfb75f4d..c14663a62a00 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -143,7 +143,7 @@ OUString SAL_CALL FilterDetect::detect( com::sun::star::uno::Sequence< com::sun:
if ( nUniPos == 0 ) // No BOM detected, try to guess UTF-16 endianness
{
sal_uInt16 sHeader = 0;
- *pInStream >> sHeader;
+ pInStream->ReadUInt16( sHeader );
if ( sHeader == 0x003C )
bTryUtf16 = true;
else if ( sHeader == 0x3C00 )
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 8ca2ca85501e..08b812970535 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -64,7 +64,7 @@ sal_Bool SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, sal_uLong nBegP
while( bOnlySpace && rOutStm.Tell() < nPos )
{
char c;
- rOutStm >> c;
+ rOutStm.ReadChar( c );
if( !isspace( c ) )
bOnlySpace = sal_False;
}
@@ -82,12 +82,12 @@ void SvMetaObject::Back2Delemitter( SvStream & rOutStm )
sal_uLong nPos = rOutStm.Tell();
rOutStm.SeekRel( -1 );
char c = 0;
- rOutStm >> c;
+ rOutStm.ReadChar( c );
while( isspace( c ) && rOutStm.Tell() != 1 )
{
rOutStm.SeekRel( -2 );
- rOutStm >> c;
+ rOutStm.ReadChar( c );
}
if( c == ';' || c == ',' )
@@ -119,7 +119,7 @@ void SvMetaName::Load( SvPersistStream & rStm )
{
SvMetaObject::Load( rStm );
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask >= 0x20 )
{
@@ -347,7 +347,7 @@ void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
while( bOnlySpace && rOutStm.Tell() < nPos )
{
char c;
- rOutStm >> c;
+ rOutStm.ReadChar( c );
if( !isspace( c ) )
bOnlySpace = sal_False;
}
@@ -402,7 +402,7 @@ void SvMetaReference::Load( SvPersistStream & rStm )
SvMetaName::Load( rStm );
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask >= 0x2 )
{
rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -445,7 +445,7 @@ void SvMetaExtern::Load( SvPersistStream & rStm )
SvMetaReference::Load( rStm );
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask >= 0x20 )
{
rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index b315190773d2..40ae0ddd68ce 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -77,7 +77,7 @@ SvStream& WriteSvBOOL(SvStream & rStm, const SvBOOL & rb )
SvStream& operator >> (SvStream & rStm, SvBOOL & rb )
{
sal_uInt8 n;
- rStm >> n;
+ rStm.ReadUChar( n );
rb.nVal = (n & 0x01) ? sal_True : sal_False;
rb.bSet = (n & 0x02) ? sal_True : sal_False;
if( n & ~0x03 )
@@ -112,11 +112,11 @@ SvStream& WriteSvVersion(SvStream & rStm, const SvVersion & r )
SvStream& operator >> (SvStream & rStm, SvVersion & r )
{
sal_uInt8 n;
- rStm >> n;
+ rStm.ReadUChar( n );
if( n == 0 )
{ // not compressed
- rStm >> r.nMajorVersion;
- rStm >> r.nMinorVersion;
+ rStm.ReadUInt16( r.nMajorVersion );
+ rStm.ReadUInt16( r.nMinorVersion );
}
else
{ // compressed
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 72985e968cfd..170053a857ed 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -49,7 +49,7 @@ void SvMetaModule::Load( SvPersistStream & rStm )
sal_uInt16 nVer;
- rStm >> nVer; // version
+ rStm.ReadUInt16( nVer ); // version
DBG_ASSERT( (nVer & ~IDL_WRITE_MASK) == MODULE_VER, "false version" );
rStm >> aClassList;
@@ -63,7 +63,7 @@ void SvMetaModule::Load( SvPersistStream & rStm )
// read compiler data
sal_uInt16 nCmpLen;
- rStm >> nCmpLen;
+ rStm.ReadUInt16( nCmpLen );
DBG_ASSERT( (nVer & IDL_WRITE_MASK) == IDL_WRITE_COMPILER,
"no idl compiler format" );
rStm >> aBeginName;
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 74977a1e75c5..55592dc6ee54 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -36,7 +36,7 @@ SvClassElement::SvClassElement()
void SvClassElement::Load( SvPersistStream & rStm )
{
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask >= 0x08 )
{
rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -79,7 +79,7 @@ void SvMetaClass::Load( SvPersistStream & rStm )
SvMetaType::Load( rStm );
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask >= 0x20 )
{
rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 612bd60a116c..563511e11b49 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -64,7 +64,7 @@ void SvMetaSlot::Load( SvPersistStream & rStm )
SvMetaAttribute::Load( rStm );
sal_uInt16 nMask;
- rStm >> nMask;
+ rStm.ReadUInt16( nMask );
TEST_READ
if( nMask & 0x0001 )
@@ -106,7 +106,7 @@ void SvMetaSlot::Load( SvPersistStream & rStm )
if( nMask & 0x8000 ) rStm >> aAsynchron;
nMask = 0;
- rStm >> nMask;
+ rStm.ReadUInt16( nMask );
TEST_READ
if( nMask & 0x0001 ) rStm >> aRecordPerItem;
@@ -149,7 +149,7 @@ void SvMetaSlot::Load( SvPersistStream & rStm )
if( nMask & 0x8000 ) rStm >> aImageRotation;
nMask = 0;
- rStm >> nMask;
+ rStm.ReadUInt16( nMask );
TEST_READ
if( nMask & 0x0001 ) rStm >> aUnoName;
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index b9f54cc535cd..b964f0f7ad54 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -54,7 +54,7 @@ void SvMetaAttribute::Load( SvPersistStream & rStm )
SvMetaReference::Load( rStm );
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask & 0x01 )
{
SvMetaType * pType;
@@ -789,7 +789,7 @@ void SvMetaType::Load( SvPersistStream & rStm )
SvMetaExtern::Load( rStm );
sal_uInt16 nMask;
- rStm >> nMask;
+ rStm.ReadUInt16( nMask );
if( nMask & 0x0001 ) rStm >> aIn;
if( nMask & 0x0002 ) rStm >> aOut;
if( nMask & 0x0004 ) rStm >> aCall0;
@@ -804,10 +804,10 @@ void SvMetaType::Load( SvPersistStream & rStm )
if( nMask & 0x0800 )
{
sal_uInt16 nT;
- rStm >> nT;
+ rStm.ReadUInt16( nT );
nType = nT;
}
- if( nMask & 0x1000 ) rStm >> cParserChar;
+ if( nMask & 0x1000 ) rStm.ReadChar( cParserChar );
if( nMask & 0x2000 ) rStm >> aCName;
if( nMask & 0x4000 ) rStm >> aBasicName;
if( nMask & 0x8000 ) rStm >> aBasicPostfix;
@@ -1765,7 +1765,7 @@ void SvMetaEnumValue::Load( SvPersistStream & rStm )
SvMetaName::Load( rStm );
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask >= 0x02 )
{
rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -1821,7 +1821,7 @@ void SvMetaTypeEnum::Load( SvPersistStream & rStm )
SvMetaType::Load( rStm );
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask >= 0x04 )
{
rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index c1152e6d94b7..a903329dcc3e 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -87,7 +87,7 @@ sal_Bool SvIdlDataBase::IsBinaryFormat( SvStream & rStm )
{
sal_uInt32 nSig = 0;
sal_uLong nPos = rStm.Tell();
- rStm >> nSig;
+ rStm.ReadUInt32( nSig );
rStm.Seek( nPos );
return nSig == DATABASE_SIGNATURE;
@@ -101,8 +101,8 @@ void SvIdlDataBase::Load( SvStream & rStm )
sal_uInt16 nVersion = 0;
sal_uInt32 nSig = 0;
- aPStm >> nSig;
- aPStm >> nVersion;
+ aPStm.ReadUInt32( nSig );
+ aPStm.ReadUInt16( nVersion );
if( nSig != DATABASE_SIGNATURE )
{
aPStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -117,7 +117,7 @@ void SvIdlDataBase::Load( SvStream & rStm )
aPStm >> aTypeList;
aPStm >> aAttrList;
aPStm >> aModuleList;
- aPStm >> nUniqueId;
+ aPStm.ReadUInt32( nUniqueId );
if( aPStm.IsEof() )
aPStm.SetError( SVSTREAM_GENERALERROR );
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index cfd4836aa82d..670416376293 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -300,20 +300,42 @@ public:
{ eLineDelimiter = eLineEnd; }
LineEnd GetLineDelimiter() const { return eLineDelimiter; }
- SvStream& operator>>( sal_uInt16& rUInt16 );
- SvStream& operator>>( sal_uInt32& rUInt32 );
- SvStream& operator>>( sal_uInt64& rUInt64 );
- SvStream& operator>>( sal_Int16& rInt16 );
- SvStream& operator>>( sal_Int32& rInt32 );
+ SvStream& operator>>( sal_uInt16& rUInt16 )
+ { return ReadUInt16(rUInt16); }
+ SvStream& operator>>( sal_uInt32& rUInt32 )
+ { return ReadUInt32(rUInt32); }
+ SvStream& operator>>( sal_uInt64& rUInt64 )
+ { return ReadUInt64(rUInt64); }
+ SvStream& operator>>( sal_Int16& rInt16 )
+ { return ReadInt16(rInt16); }
+ SvStream& operator>>( sal_Int32& rInt32 )
+ { return ReadInt32(rInt32); }
SvStream& operator>>( sal_Int64& rInt64 ) SAL_DELETED_FUNCTION;
+ SvStream& operator>>( signed char& rChar )
+ { return ReadSChar(rChar); }
+ SvStream& operator>>( char& rChar )
+ { return ReadChar(rChar); }
+ SvStream& operator>>( unsigned char& rChar )
+ { return ReadUChar(rChar); }
+ SvStream& operator>>( float& rFloat )
+ { return ReadFloat(rFloat); }
+ SvStream& operator>>( double& rDouble )
+ { return ReadDouble(rDouble); }
+ SvStream& operator>>( SvStream& rStream )
+ { return ReadStream(rStream); }
+
+ SvStream& ReadUInt16( sal_uInt16& rUInt16 );
+ SvStream& ReadUInt32( sal_uInt32& rUInt32 );
+ SvStream& ReadUInt64( sal_uInt64& rUInt64 );
+ SvStream& ReadInt16( sal_Int16& rInt16 );
+ SvStream& ReadInt32( sal_Int32& rInt32 );
SvStream& ReadInt64(sal_Int64 & rInt64);
-
- SvStream& operator>>( signed char& rChar );
- SvStream& operator>>( char& rChar );
- SvStream& operator>>( unsigned char& rChar );
- SvStream& operator>>( float& rFloat );
- SvStream& operator>>( double& rDouble );
- SvStream& operator>>( SvStream& rStream );
+ SvStream& ReadSChar( signed char& rChar );
+ SvStream& ReadChar( char& rChar );
+ SvStream& ReadUChar( unsigned char& rChar );
+ SvStream& ReadFloat( float& rFloat );
+ SvStream& ReadDouble( double& rDouble );
+ SvStream& ReadStream( SvStream& rStream );
SvStream& WriteUInt16( sal_uInt16 nUInt16 );
SvStream& WriteUInt32( sal_uInt32 nUInt32 );
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 2e83a06ad66c..0afa14d1eadd 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -145,7 +145,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
rpStream->Seek (nSniffPos );
- *rpStream >> nLen;
+ rpStream->ReadUInt16( nLen );
if (nLen >= MAX_HEADER_LENGTH)
return -1;
@@ -167,14 +167,14 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, sal_Bool &bNe
DIC_VERSION_6 == nDicVersion)
{
// The language of the dictionary
- *rpStream >> nLng;
+ rpStream->ReadUInt16( nLng );
if (VERS2_NOLANGUAGE == nLng)
nLng = LANGUAGE_NONE;
// Negative Flag
sal_Char nTmp;
- *rpStream >> nTmp;
+ rpStream->ReadChar( nTmp );
bNeg = (sal_Bool)nTmp;
}
}
@@ -300,7 +300,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
// Read the first word
if (!pStream->IsEof())
{
- *pStream >> nLen;
+ pStream->ReadUInt16( nLen );
if (0 != (nErr = pStream->GetError()))
return nErr;
if ( nLen < BUFSIZE )
@@ -326,7 +326,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
addEntry_Impl( xEntry , sal_True ); //! don't launch events here
}
- *pStream >> nLen;
+ pStream->ReadUInt16( nLen );
if (pStream->IsEof())
break;
if (0 != (nErr = pStream->GetError()))
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index f5b33585f456..72697f9dabdd 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -144,18 +144,18 @@ private:
while( !m_InputStream.IsEof())
{
- m_InputStream >> nDelim;
+ m_InputStream.ReadUChar( nDelim );
if( nDelim == 0x40 )
{
- m_InputStream >> nDummy >> nOpcode;
+ m_InputStream.ReadUChar( nDummy ).ReadUInt16( nOpcode );
switch( nOpcode )
{
case 0xC00B: // Dictionary Word
- m_InputStream >> nLen >> nDummy;
+ m_InputStream.ReadUChar( nLen ).ReadUChar( nDummy );
while( nLen > 0 && !m_InputStream.IsEof() )
{
sal_uInt8 nChar;
- m_InputStream >> nChar;
+ m_InputStream.ReadUChar( nChar );
if( CheckValidData( nChar ) )
{
sBuf.appendAscii( (sal_Char*)(&nChar),1 );
@@ -170,13 +170,13 @@ private:
break;
case 0x0242: // Non Dictionary word
- m_InputStream >> nData;
+ m_InputStream.ReadUChar( nData );
if( nData == 0x02 )
{
- m_InputStream >> nLen >> nDummy;
+ m_InputStream.ReadUChar( nLen ).ReadUChar( nDummy );
while( nLen > 0 && !m_InputStream.IsEof() )
{
- m_InputStream >> nData;
+ m_InputStream.ReadUChar( nData );
if( CheckValidData( nData ) )
{
sBuf.appendAscii( (sal_Char*)(&nData),1 );
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index edc075e86787..fd4a8a009c7c 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -106,13 +106,13 @@ void LwpDrawObj::ReadObjHeaderRecord()
m_pStream->SeekRel(1);
//record Length
- *m_pStream >> m_aObjHeader.nRecLen;
+ m_pStream->ReadUInt16( m_aObjHeader.nRecLen );
//boundrect
- *m_pStream >> m_aObjHeader.nLeft;
- *m_pStream >> m_aObjHeader.nTop;
- *m_pStream >> m_aObjHeader.nRight;
- *m_pStream >> m_aObjHeader.nBottom;
+ m_pStream->ReadInt16( m_aObjHeader.nLeft );
+ m_pStream->ReadInt16( m_aObjHeader.nTop );
+ m_pStream->ReadInt16( m_aObjHeader.nRight );
+ m_pStream->ReadInt16( m_aObjHeader.nBottom );
//nextObj, prevObj
m_pStream->SeekRel(4);
@@ -128,29 +128,29 @@ void LwpDrawObj::ReadClosedObjStyle()
m_pStream->SeekRel(8);
}
- *m_pStream >> m_aClosedObjStyleRec.nLineWidth;
- *m_pStream >> m_aClosedObjStyleRec.nLineStyle;
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.nLineWidth );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.nLineStyle );
// pen color
- *m_pStream >> m_aClosedObjStyleRec.aPenColor.nR;
- *m_pStream >> m_aClosedObjStyleRec.aPenColor.nG;
- *m_pStream >> m_aClosedObjStyleRec.aPenColor.nB;
- *m_pStream >> m_aClosedObjStyleRec.aPenColor.unused;
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aPenColor.nR );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aPenColor.nG );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aPenColor.nB );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aPenColor.unused );
// foreground color
- *m_pStream >> m_aClosedObjStyleRec.aForeColor.nR;
- *m_pStream >> m_aClosedObjStyleRec.aForeColor.nG;
- *m_pStream >> m_aClosedObjStyleRec.aForeColor.nB;
- *m_pStream >> m_aClosedObjStyleRec.aForeColor.unused;
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aForeColor.nR );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aForeColor.nG );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aForeColor.nB );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aForeColor.unused );
// background color
- *m_pStream >> m_aClosedObjStyleRec.aBackColor.nR;
- *m_pStream >> m_aClosedObjStyleRec.aBackColor.nG;
- *m_pStream >> m_aClosedObjStyleRec.aBackColor.nB;
- *m_pStream >> m_aClosedObjStyleRec.aBackColor.unused;
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aBackColor.nR );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aBackColor.nG );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aBackColor.nB );
+ m_pStream->ReadUChar( m_aClosedObjStyleRec.aBackColor.unused );
// fill style
- *m_pStream >> m_aClosedObjStyleRec.nFillType;
+ m_pStream->ReadUInt16( m_aClosedObjStyleRec.nFillType );
m_pStream->Read(m_aClosedObjStyleRec.pFillPattern,
sizeof(m_aClosedObjStyleRec.pFillPattern));
}
@@ -421,18 +421,18 @@ LwpDrawLine::LwpDrawLine(SvStream * pStream, DrawingOffsetAndScale* pTransData)
*/
void LwpDrawLine::Read()
{
- *m_pStream >> m_aLineRec.nStartX;
- *m_pStream >> m_aLineRec.nStartY;
- *m_pStream >> m_aLineRec.nEndX;
- *m_pStream >> m_aLineRec.nEndY;
- *m_pStream >> m_aLineRec.nLineWidth;
- *m_pStream >> m_aLineRec.nLineEnd;
- *m_pStream >> m_aLineRec.nLineStyle;
+ m_pStream->ReadInt16( m_aLineRec.nStartX );
+ m_pStream->ReadInt16( m_aLineRec.nStartY );
+ m_pStream->ReadInt16( m_aLineRec.nEndX );
+ m_pStream->ReadInt16( m_aLineRec.nEndY );
+ m_pStream->ReadUChar( m_aLineRec.nLineWidth );
+ m_pStream->ReadUChar( m_aLineRec.nLineEnd );
+ m_pStream->ReadUChar( m_aLineRec.nLineStyle );
- *m_pStream >> m_aLineRec.aPenColor.nR;
- *m_pStream >> m_aLineRec.aPenColor.nG;
- *m_pStream >> m_aLineRec.aPenColor.nB;
- *m_pStream >> m_aLineRec.aPenColor.unused;
+ m_pStream->ReadUChar( m_aLineRec.aPenColor.nR );
+ m_pStream->ReadUChar( m_aLineRec.aPenColor.nG );
+ m_pStream->ReadUChar( m_aLineRec.aPenColor.nB );
+ m_pStream->ReadUChar( m_aLineRec.aPenColor.unused );
}
OUString LwpDrawLine::RegisterStyle()
@@ -496,21 +496,21 @@ LwpDrawPolyLine::~LwpDrawPolyLine()
*/
void LwpDrawPolyLine::Read()
{
- *m_pStream >> m_aPolyLineRec.nLineWidth;
- *m_pStream >> m_aPolyLineRec.nLineEnd;
- *m_pStream >> m_aPolyLineRec.nLineStyle;
- *m_pStream >> m_aPolyLineRec.aPenColor.nR;
- *m_pStream >> m_aPolyLineRec.aPenColor.nG;
- *m_pStream >> m_aPolyLineRec.aPenColor.nB;
- *m_pStream >> m_aPolyLineRec.aPenColor.unused;
- *m_pStream >> m_aPolyLineRec.nNumPoints;
+ m_pStream->ReadUChar( m_aPolyLineRec.nLineWidth );
+ m_pStream->ReadUChar( m_aPolyLineRec.nLineEnd );
+ m_pStream->ReadUChar( m_aPolyLineRec.nLineStyle );
+ m_pStream->ReadUChar( m_aPolyLineRec.aPenColor.nR );
+ m_pStream->ReadUChar( m_aPolyLineRec.aPenColor.nG );
+ m_pStream->ReadUChar( m_aPolyLineRec.aPenColor.nB );
+ m_pStream->ReadUChar( m_aPolyLineRec.aPenColor.unused );
+ m_pStream->ReadUInt16( m_aPolyLineRec.nNumPoints );
m_pVector= new SdwPoint [m_aPolyLineRec.nNumPoints];
for (sal_uInt16 nC = 0; nC < m_aPolyLineRec.nNumPoints; nC++)
{
- *m_pStream >> m_pVector[nC].x;
- *m_pStream >> m_pVector[nC].y;
+ m_pStream->ReadInt16( m_pVector[nC].x );
+ m_pStream->ReadInt16( m_pVector[nC].y );
}
}
@@ -583,14 +583,14 @@ LwpDrawPolygon::~LwpDrawPolygon()
void LwpDrawPolygon::Read()
{
this->ReadClosedObjStyle();
- *m_pStream >> m_nNumPoints;
+ m_pStream->ReadUInt16( m_nNumPoints );
m_pVector = new SdwPoint [m_nNumPoints];
for (sal_uInt16 nC = 0; nC < m_nNumPoints; nC++)
{
- *m_pStream >> m_pVector[nC].x;
- *m_pStream >> m_pVector[nC].y;
+ m_pStream->ReadInt16( m_pVector[nC].x );
+ m_pStream->ReadInt16( m_pVector[nC].y );
}
}
@@ -669,8 +669,8 @@ void LwpDrawRectangle::Read()
for (sal_uInt8 nC = 0; nC < nPointsCount; nC++)
{
- *m_pStream >> m_aVector[nC].x;
- *m_pStream >> m_aVector[nC].y;
+ m_pStream->ReadInt16( m_aVector[nC].x );
+ m_pStream->ReadInt16( m_aVector[nC].y );
}
}
@@ -828,8 +828,8 @@ void LwpDrawEllipse::Read()
for (sal_uInt8 nC = 0; nC < 13; nC++)
{
- *m_pStream >> m_aVector[nC].x;
- *m_pStream >> m_aVector[nC].y;
+ m_pStream->ReadInt16( m_aVector[nC].x );
+ m_pStream->ReadInt16( m_aVector[nC].y );
}
}
@@ -897,18 +897,18 @@ void LwpDrawArc::Read()
{
m_pStream->SeekRel(16);// arcRect, startPt, endPt
- *m_pStream >> m_aArcRec.nLineWidth;
- *m_pStream >> m_aArcRec.nLineStyle;
- *m_pStream >> m_aArcRec.aPenColor.nR;
- *m_pStream >> m_aArcRec.aPenColor.nG;
- *m_pStream >> m_aArcRec.aPenColor.nB;
- *m_pStream >> m_aArcRec.aPenColor.unused;
- *m_pStream >> m_aArcRec.nLineEnd;
+ m_pStream->ReadUChar( m_aArcRec.nLineWidth );
+ m_pStream->ReadUChar( m_aArcRec.nLineStyle );
+ m_pStream->ReadUChar( m_aArcRec.aPenColor.nR );
+ m_pStream->ReadUChar( m_aArcRec.aPenColor.nG );
+ m_pStream->ReadUChar( m_aArcRec.aPenColor.nB );
+ m_pStream->ReadUChar( m_aArcRec.aPenColor.unused );
+ m_pStream->ReadUChar( m_aArcRec.nLineEnd );
for (sal_uInt8 nC = 0; nC < 4; nC++)
{
- *m_pStream >> m_aVector[nC].x;
- *m_pStream >> m_aVector[nC].y;
+ m_pStream->ReadInt16( m_aVector[nC].x );
+ m_pStream->ReadInt16( m_aVector[nC].y );
}
}
@@ -1019,32 +1019,32 @@ void LwpDrawTextBox::SetFontStyle(XFFont* pFont, SdwTextBoxRecord* pRec)
*/
void LwpDrawTextBox::Read()
{
- *m_pStream >> m_aVector.x;
- *m_pStream >> m_aVector.y;
- *m_pStream >> m_aTextRec.nTextWidth;
+ m_pStream->ReadInt16( m_aVector.x );
+ m_pStream->ReadInt16( m_aVector.y );
+ m_pStream->ReadInt16( m_aTextRec.nTextWidth );
if (m_aTextRec.nTextWidth == 0)
m_aTextRec.nTextWidth = 1;
- *m_pStream >> m_aTextRec.nTextHeight;
+ m_pStream->ReadInt16( m_aTextRec.nTextHeight );
m_pStream->Read(m_aTextRec.tmpTextFaceName, DRAW_FACESIZE);
m_pStream->SeekRel(1);// PitchAndFamily
- *m_pStream >> m_aTextRec.nTextSize;
+ m_pStream->ReadInt16( m_aTextRec.nTextSize );
if (m_aTextRec.nTextSize < 0)
m_aTextRec.nTextSize = -m_aTextRec.nTextSize;
//color
- *m_pStream >> m_aTextRec.aTextColor.nR;
- *m_pStream >> m_aTextRec.aTextColor.nG;
- *m_pStream >> m_aTextRec.aTextColor.nB;
- *m_pStream >> m_aTextRec.aTextColor.unused;
+ m_pStream->ReadUChar( m_aTextRec.aTextColor.nR );
+ m_pStream->ReadUChar( m_aTextRec.aTextColor.nG );
+ m_pStream->ReadUChar( m_aTextRec.aTextColor.nB );
+ m_pStream->ReadUChar( m_aTextRec.aTextColor.unused );
- *m_pStream >> m_aTextRec.nTextAttrs;
- *m_pStream >> m_aTextRec.nTextCharacterSet;
- *m_pStream >> m_aTextRec.nTextRotation;
- *m_pStream >> m_aTextRec.nTextExtraSpacing;
+ m_pStream->ReadUInt16( m_aTextRec.nTextAttrs );
+ m_pStream->ReadUInt16( m_aTextRec.nTextCharacterSet );
+ m_pStream->ReadInt16( m_aTextRec.nTextRotation );
+ m_pStream->ReadInt16( m_aTextRec.nTextExtraSpacing );
// some draw files in version 1.2 have an extra byte following '\0'.
// can't rely on that, so read in the whole string into memory.
@@ -1187,37 +1187,37 @@ void LwpDrawTextArt::Read()
{
for (sal_uInt8 nC = 0; nC < 4; nC++)
{
- *m_pStream >> m_aVector[nC].x;
- *m_pStream >> m_aVector[nC].y;
+ m_pStream->ReadInt16( m_aVector[nC].x );
+ m_pStream->ReadInt16( m_aVector[nC].y );
}
this->ReadClosedObjStyle();
m_aTextArtRec.aTextColor = m_aClosedObjStyleRec.aForeColor;
- *m_pStream >> m_aTextArtRec.nIndex;
- *m_pStream >> m_aTextArtRec.nRotation;
+ m_pStream->ReadUChar( m_aTextArtRec.nIndex );
+ m_pStream->ReadInt16( m_aTextArtRec.nRotation );
sal_uInt16 nPointNumber;
sal_Int16 nX, nY;
- *m_pStream >> nPointNumber;
+ m_pStream->ReadUInt16( nPointNumber );
m_aTextArtRec.aPath[0].n = nPointNumber;
m_aTextArtRec.aPath[0].pPts = new SdwPoint [nPointNumber*3+1];
sal_uInt16 nPt = 0;
for ( nPt = 0; nPt <= nPointNumber*3; nPt++)
{
- *m_pStream >> nX;
- *m_pStream >> nY;
+ m_pStream->ReadInt16( nX );
+ m_pStream->ReadInt16( nY );
m_aTextArtRec.aPath[0].pPts[nPt].x = nX;
m_aTextArtRec.aPath[0].pPts[nPt].y = nY;
}
- *m_pStream >> nPointNumber;
+ m_pStream->ReadUInt16( nPointNumber );
m_aTextArtRec.aPath[1].n = nPointNumber;
m_aTextArtRec.aPath[1].pPts = new SdwPoint [nPointNumber*3+1];
for (nPt = 0; nPt <= nPointNumber*3; nPt++)
{
- *m_pStream >> nX;
- *m_pStream >> nY;
+ m_pStream->ReadInt16( nX );
+ m_pStream->ReadInt16( nY );
m_aTextArtRec.aPath[1].pPts[nPt].x = nX;
m_aTextArtRec.aPath[1].pPts[nPt].y = nY;
}
@@ -1227,15 +1227,15 @@ void LwpDrawTextArt::Read()
m_pStream->Read(m_aTextArtRec.tmpTextFaceName, DRAW_FACESIZE);
m_pStream->SeekRel(1);// PitchAndFamily
- *m_pStream >> m_aTextArtRec.nTextSize;
+ m_pStream->ReadInt16( m_aTextArtRec.nTextSize );
if (m_aTextArtRec.nTextSize < 0)
m_aTextArtRec.nTextSize = -m_aTextArtRec.nTextSize;
- *m_pStream >> m_aTextArtRec.nTextAttrs;
- *m_pStream >> m_aTextArtRec.nTextCharacterSet;
+ m_pStream->ReadUInt16( m_aTextArtRec.nTextAttrs );
+ m_pStream->ReadUInt16( m_aTextArtRec.nTextCharacterSet );
m_aTextArtRec.nTextRotation = 0;
- *m_pStream >> m_aTextArtRec.nTextExtraSpacing;
+ m_pStream->ReadInt16( m_aTextArtRec.nTextExtraSpacing );
const sal_uInt16 nTextArtFixedLength = 105;
m_aTextArtRec.nTextLen = m_aObjHeader.nRecLen - nTextArtFixedLength
@@ -1347,8 +1347,8 @@ LwpDrawBitmap::~LwpDrawBitmap()
*/
void LwpDrawBitmap::Read()
{
- *m_pStream >> m_aBmpRec.nTranslation;
- *m_pStream >> m_aBmpRec.nRotation;
+ m_pStream->ReadUInt16( m_aBmpRec.nTranslation );
+ m_pStream->ReadUInt16( m_aBmpRec.nRotation );
// 20 == length of draw-specific fields.
// 14 == length of bmp file header.
@@ -1356,17 +1356,17 @@ void LwpDrawBitmap::Read()
m_pImageData = new sal_uInt8 [m_aBmpRec.nFileSize];
BmpInfoHeader2 aInfoHeader2;
- *m_pStream >> aInfoHeader2.nHeaderLen;
+ m_pStream->ReadUInt32( aInfoHeader2.nHeaderLen );
sal_uInt32 N;
sal_uInt32 rgbTableSize;
if (aInfoHeader2.nHeaderLen == sizeof(BmpInfoHeader))
{
- *m_pStream >> aInfoHeader2.nWidth;
- *m_pStream >> aInfoHeader2.nHeight;
- *m_pStream >> aInfoHeader2.nPlanes;
- *m_pStream >> aInfoHeader2.nBitCount;
+ m_pStream->ReadUInt32( aInfoHeader2.nWidth );
+ m_pStream->ReadUInt32( aInfoHeader2.nHeight );
+ m_pStream->ReadUInt16( aInfoHeader2.nPlanes );
+ m_pStream->ReadUInt16( aInfoHeader2.nBitCount );
N = aInfoHeader2.nPlanes * aInfoHeader2.nBitCount;
if (N == 24)
@@ -1380,10 +1380,10 @@ void LwpDrawBitmap::Read()
}
else
{
- *m_pStream >> aInfoHeader2.nWidth;
- *m_pStream >> aInfoHeader2.nHeight;
- *m_pStream >> aInfoHeader2.nPlanes;
- *m_pStream >> aInfoHeader2.nBitCount;
+ m_pStream->ReadUInt32( aInfoHeader2.nWidth );
+ m_pStream->ReadUInt32( aInfoHeader2.nHeight );
+ m_pStream->ReadUInt16( aInfoHeader2.nPlanes );
+ m_pStream->ReadUInt16( aInfoHeader2.nBitCount );
N = aInfoHeader2.nPlanes * aInfoHeader2.nBitCount;
if (N == 24)
{
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index 8e55ebbbf52a..9a1ff67ddd04 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -348,7 +348,7 @@ using namespace OpenStormBento;
sal_uInt32 nTag;
pStream->Seek(0x10);
- *pStream >> nTag;
+ pStream->ReadUInt32( nTag );
if (nTag != 0x3750574c) // "LWP7"
{
// small file, needs decompression
diff --git a/lotuswordpro/source/filter/lwpsvstream.cxx b/lotuswordpro/source/filter/lwpsvstream.cxx
index e59179c6e944..a1bdc9927809 100644
--- a/lotuswordpro/source/filter/lwpsvstream.cxx
+++ b/lotuswordpro/source/filter/lwpsvstream.cxx
@@ -73,37 +73,37 @@ sal_Int32 LwpSvStream::Read(void* buf, sal_Int32 nBytesToRead)
LwpSvStream& LwpSvStream::operator>>( sal_uInt8& rUInt8 )
{
- *m_pStream >> rUInt8;
+ m_pStream->ReadUChar( rUInt8 );
return *this;
}
LwpSvStream& LwpSvStream::operator>>( sal_uInt16& rUInt16 )
{
- *m_pStream >> rUInt16;
+ m_pStream->ReadUInt16( rUInt16 );
return *this;
}
LwpSvStream& LwpSvStream::operator>>( sal_uInt32& rUInt32 )
{
- *m_pStream >> rUInt32;
+ m_pStream->ReadUInt32( rUInt32 );
return *this;
}
LwpSvStream& LwpSvStream::operator>>( sal_Int8& rInt8 )
{
- *m_pStream >> rInt8;
+ m_pStream->ReadSChar( rInt8 );
return *this;
}
LwpSvStream& LwpSvStream::operator>>( sal_Int16& rInt16 )
{
- *m_pStream >> rInt16;
+ m_pStream->ReadInt16( rInt16 );
return *this;
}
LwpSvStream& LwpSvStream::operator>>( sal_Int32& rInt32 )
{
- *m_pStream >> rInt32;
+ m_pStream->ReadInt32( rInt32 );
return *this;
}
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 );
diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx
index ce28ab43f854..1a0d943e47a4 100644
--- a/sd/source/core/sdiocmpt.cxx
+++ b/sd/source/core/sdiocmpt.cxx
@@ -41,7 +41,7 @@ old_SdrDownCompat::~old_SdrDownCompat()
void old_SdrDownCompat::Read()
{
- rStream >> nSubRecSiz;
+ rStream.ReadUInt32( nSubRecSiz );
}
void old_SdrDownCompat::Write()
@@ -113,7 +113,7 @@ SdIOCompat::SdIOCompat(SvStream& rNewStream, sal_uInt16 nNewMode, sal_uInt16 nVe
{
DBG_ASSERT(nVer == SDIOCOMPAT_VERSIONDONTKNOW,
"referring to the version while reading is silly!");
- rNewStream >> nVersion;
+ rNewStream.ReadUInt16( nVersion );
}
}
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 99ec203736ad..b2760c6cdbbb 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1430,8 +1430,8 @@ sal_Bool PPTWriter::ImplWriteAtomEnding()
sal_uInt32 n1, n2;
mpVBA->Seek( 0 );
- *mpVBA >> n1
- >> n2;
+ mpVBA->ReadUInt32( n1 )
+ .ReadUInt32( n2 );
mpStrm->WriteUInt32( mnVBAOleOfs );
sal_uInt32 nOldPos = mpStrm->Tell();
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 354a20adeaa5..6dfa1050da07 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2565,20 +2565,20 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
xCompObj->Seek( 0 );
sal_Int16 nVersion, nByteOrder;
sal_Int32 nWinVersion, nVal, nStringLen;
- *xCompObj >> nVersion
- >> nByteOrder
- >> nWinVersion
- >> nVal;
+ xCompObj->ReadInt16( nVersion )
+ .ReadInt16( nByteOrder )
+ .ReadInt32( nWinVersion )
+ .ReadInt32( nVal );
xCompObj->SeekRel( 16 ); // skipping clsid
- *xCompObj >> nStringLen;
+ xCompObj->ReadInt32( nStringLen );
if ( ( xCompObj->Tell() + nStringLen ) < nStreamLen )
{
xCompObj->SeekRel( nStringLen ); // now skipping the UserName;
- *xCompObj >> nStringLen;
+ xCompObj->ReadInt32( nStringLen );
if ( ( xCompObj->Tell() + nStringLen ) < nStreamLen )
{
xCompObj->SeekRel( nStringLen ); // now skipping the clipboard formatname
- *xCompObj >> nStringLen;
+ xCompObj->ReadInt32( nStringLen );
if ( ( nStringLen > 1 ) && ( ( xCompObj->Tell() + nStringLen ) < nStreamLen ) )
{ // i think that the OleIdentifier will follow
OString aTemp = read_uInt8s_ToOString(*xCompObj, nStringLen - 1);
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 9004f17299a8..37ce783a90fa 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -249,14 +249,14 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign)
rDesign.m_aDesignName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rIn >> nTemp16;
+ rIn.ReadUInt16( nTemp16 );
rDesign.m_eMode = (HtmlPublishMode)nTemp16;
- rIn >> rDesign.m_bContentPage;
- rIn >> rDesign.m_bNotes;
- rIn >> rDesign.m_nResolution;
+ rIn.ReadUChar( rDesign.m_bContentPage );
+ rIn.ReadUChar( rDesign.m_bNotes );
+ rIn.ReadUInt16( rDesign.m_nResolution );
rDesign.m_aCompression = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rIn >> nTemp16;
+ rIn.ReadUInt16( nTemp16 );
rDesign.m_eFormat = (PublishingFormat)nTemp16;
rDesign.m_aAuthor = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
@@ -266,30 +266,30 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign)
RTL_TEXTENCODING_UTF8);
rDesign.m_aMisc = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rIn >> rDesign.m_bDownload;
- rIn >> rDesign.m_bCreated; // not used
- rIn >> rDesign.m_nButtonThema;
- rIn >> rDesign.m_bUserAttr;
+ rIn.ReadUChar( rDesign.m_bDownload );
+ rIn.ReadUChar( rDesign.m_bCreated ); // not used
+ rIn.ReadInt16( rDesign.m_nButtonThema );
+ rIn.ReadUChar( rDesign.m_bUserAttr );
ReadColor( rIn, rDesign.m_aBackColor );
ReadColor( rIn, rDesign.m_aTextColor );
ReadColor( rIn, rDesign.m_aLinkColor );
ReadColor( rIn, rDesign.m_aVLinkColor );
ReadColor( rIn, rDesign.m_aALinkColor );
- rIn >> rDesign.m_bUseAttribs;
- rIn >> rDesign.m_bUseColor;
+ rIn.ReadUChar( rDesign.m_bUseAttribs );
+ rIn.ReadUChar( rDesign.m_bUseColor );
- rIn >> nTemp16;
+ rIn.ReadUInt16( nTemp16 );
rDesign.m_eScript = (PublishingScript)nTemp16;
rDesign.m_aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
rDesign.m_aCGI = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rIn >> rDesign.m_bAutoSlide;
- rIn >> rDesign.m_nSlideDuration;
- rIn >> rDesign.m_bEndless;
- rIn >> rDesign.m_bSlideSound;
- rIn >> rDesign.m_bHiddenSlides;
+ rIn.ReadUChar( rDesign.m_bAutoSlide );
+ rIn.ReadUInt32( rDesign.m_nSlideDuration );
+ rIn.ReadUChar( rDesign.m_bEndless );
+ rIn.ReadUChar( rDesign.m_bSlideSound );
+ rIn.ReadUChar( rDesign.m_bHiddenSlides );
return rIn;
}
@@ -1521,7 +1521,7 @@ sal_Bool SdPublishingDlg::Load()
return( sal_False );
sal_uInt16 aCheck;
- *pStream >> aCheck;
+ pStream->ReadUInt16( aCheck );
if(aCheck != nMagic)
return sal_False;
@@ -1529,7 +1529,7 @@ sal_Bool SdPublishingDlg::Load()
SdIOCompat aIO(*pStream, STREAM_READ);
sal_uInt16 nDesigns;
- *pStream >> nDesigns;
+ pStream->ReadUInt16( nDesigns );
for( sal_uInt16 nIndex = 0;
pStream->GetError() == SVSTREAM_OK && nIndex < nDesigns;
diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx
index d5124155c8a2..fc30f643cf85 100644
--- a/sd/source/filter/ppt/ppt97animations.cxx
+++ b/sd/source/filter/ppt/ppt97animations.cxx
@@ -41,20 +41,20 @@ using namespace ::com::sun::star;
void Ppt97AnimationInfoAtom::ReadStream( SvStream& rIn )
{
- rIn >> nDimColor;
- rIn >> nFlags;
- rIn >> nSoundRef;
- rIn >> nDelayTime;
- rIn >> nOrderID;
- rIn >> nSlideCount;
- rIn >> nBuildType;
- rIn >> nFlyMethod;
- rIn >> nFlyDirection;
- rIn >> nAfterEffect;
- rIn >> nSubEffect;
- rIn >> nOLEVerb;
- rIn >> nUnknown1;
- rIn >> nUnknown2;
+ rIn.ReadUInt32( nDimColor );
+ rIn.ReadUInt32( nFlags );
+ rIn.ReadUInt32( nSoundRef );
+ rIn.ReadInt32( nDelayTime );
+ rIn.ReadUInt16( nOrderID );
+ rIn.ReadUInt16( nSlideCount );
+ rIn.ReadUChar( nBuildType );
+ rIn.ReadUChar( nFlyMethod );
+ rIn.ReadUChar( nFlyDirection );
+ rIn.ReadUChar( nAfterEffect );
+ rIn.ReadUChar( nSubEffect );
+ rIn.ReadUChar( nOLEVerb );
+ rIn.ReadUChar( nUnknown1 );
+ rIn.ReadUChar( nUnknown2 );
}
//---------------------------------------------------------------------------------------
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 5398d39eba9c..02157f410397 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -275,12 +275,12 @@ sal_Bool ImplSdPPTImport::Import()
{
if ( pSection->GetProperty( PID_SLIDECOUNT, aPropItem ) )
{
- aPropItem >> nType;
+ aPropItem.ReadUInt32( nType );
if ( ( nType == VT_I4 ) || ( nType == VT_UI4 ) )
{
// examine PID_HEADINGPAIR to get the correct entry for PID_DOCPARTS
sal_uInt32 nSlideCount, nVecCount;
- aPropItem >> nSlideCount;
+ aPropItem.ReadUInt32( nSlideCount );
if ( nSlideCount && pSection->GetProperty( PID_HEADINGPAIR, aPropItem ) )
{
sal_uInt32 nSlideTitleIndex = 0, nSlideTitleCount = 0;
@@ -288,8 +288,8 @@ sal_Bool ImplSdPPTImport::Import()
OUString aUString;
- aPropItem >> nType
- >> nVecCount;
+ aPropItem.ReadUInt32( nType )
+ .ReadUInt32( nVecCount );
if ( ( nType == ( VT_VARIANT | VT_VECTOR ) ) && ( nVecCount ^ 1 ) )
{
@@ -299,10 +299,10 @@ sal_Bool ImplSdPPTImport::Import()
{
if ( !aPropItem.Read( aUString, VT_EMPTY, sal_False ) )
break;
- aPropItem >> nType;
+ aPropItem.ReadUInt32( nType );
if ( ( nType != VT_I4 ) && ( nType != VT_UI4 ) )
break;
- aPropItem >> nTemp;
+ aPropItem.ReadUInt32( nTemp );
if ( aUString == "Slide Titles" || aUString == "Folientitel" )
{
nSlideTitleCount = nTemp;
@@ -313,15 +313,15 @@ sal_Bool ImplSdPPTImport::Import()
}
if ( ( nSlideCount == nSlideTitleCount ) && pSection->GetProperty( PID_DOCPARTS, aPropItem ) )
{
- aPropItem >> nType
- >> nVecCount;
+ aPropItem.ReadUInt32( nType )
+ .ReadUInt32( nVecCount );
if ( ( nVecCount >= ( nSlideTitleIndex + nSlideTitleCount ) )
&& ( nType == ( VT_LPSTR | VT_VECTOR ) ) )
{
for ( i = 0; i != nSlideTitleIndex; i++ )
{
- aPropItem >> nTemp;
+ aPropItem.ReadUInt32( nTemp );
aPropItem.SeekRel( nTemp );
}
for ( i = 0; i < nSlideTitleCount; i++ )
@@ -365,11 +365,11 @@ sal_Bool ImplSdPPTImport::Import()
if ( pSection->GetProperty( iter->second, aPropItem ) )
{
aPropItem.Seek( STREAM_SEEK_TO_BEGIN );
- aPropItem >> nType;
+ aPropItem.ReadUInt32( nType );
if ( nType == VT_BLOB )
{
- aPropItem >> nPropSize
- >> nPropCount;
+ aPropItem.ReadUInt32( nPropSize )
+ .ReadUInt32( nPropCount );
if ( ! ( nPropCount % 6 ) )
{
@@ -382,22 +382,22 @@ sal_Bool ImplSdPPTImport::Import()
{
pHyperlink = new SdHyperlinkEntry;
pHyperlink->nIndex = 0;
- aPropItem >> nType;
+ aPropItem.ReadUInt32( nType );
if ( nType != VT_I4 )
break;
- aPropItem >> pHyperlink->nPrivate1
- >> nType;
+ aPropItem.ReadInt32( pHyperlink->nPrivate1 )
+ .ReadUInt32( nType );
if ( nType != VT_I4 )
break;
- aPropItem >> pHyperlink->nPrivate2
- >> nType;
+ aPropItem.ReadInt32( pHyperlink->nPrivate2 )
+ .ReadUInt32( nType );
if ( nType != VT_I4 )
break;
- aPropItem >> pHyperlink->nPrivate3
- >> nType;
+ aPropItem.ReadInt32( pHyperlink->nPrivate3 )
+ .ReadUInt32( nType );
if ( nType != VT_I4 )
break;
- aPropItem >> pHyperlink->nInfo;
+ aPropItem.ReadInt32( pHyperlink->nInfo );
if ( !aPropItem.Read( pHyperlink->aTarget, VT_EMPTY ) )
break;
@@ -524,7 +524,7 @@ sal_Bool ImplSdPPTImport::Import()
if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlinkAtom, nExObjHyperListLen, NULL, 0 ) )
break;
rStCtrl.SeekRel( 8 );
- rStCtrl >> pPtr->nIndex;
+ rStCtrl.ReadUInt32( pPtr->nIndex );
aHyperE.SeekToEndOfRecord( rStCtrl );
}
}
@@ -1282,7 +1282,7 @@ sal_Bool ImplSdPPTImport::Import()
for ( sal_uInt32 nS = 0; nS < nSCount; nS++ )
{
sal_uInt32 nPageNumber;
- rStCtrl >> nPageNumber;
+ rStCtrl.ReadUInt32( nPageNumber );
sal_uInt16 nPage = pPageList->FindPage( nPageNumber );
if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND )
{
@@ -1318,15 +1318,15 @@ sal_Bool ImplSdPPTImport::Import()
sal_uInt32 nPenColor = 0x1000000;
sal_Int32 nRestartTime = 0x7fffffff;
sal_Int16 nEndSlide = 0;
- rStCtrl >> nPenColor
- >> nRestartTime
- >> nStartSlide
- >> nEndSlide;
+ rStCtrl.ReadUInt32( nPenColor )
+ .ReadInt32( nRestartTime )
+ .ReadUInt16( nStartSlide )
+ .ReadInt16( nEndSlide );
sal_Unicode nChar;
for ( sal_uInt32 i2 = 0; i2 < 32; i2++ )
{
- rStCtrl >> nChar;
+ rStCtrl.ReadUInt16( nChar );
if ( nChar )
aCustomShow.append( nChar );
else
@@ -1335,7 +1335,7 @@ sal_Bool ImplSdPPTImport::Import()
break;
}
}
- rStCtrl >> nFlags;
+ rStCtrl.ReadUInt32( nFlags );
}
// set the current custom show
if ( !aCustomShow.isEmpty() )
@@ -1533,13 +1533,13 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
sal_Int8 nDirection, nTransitionType, nByteDummy, nSpeed;
sal_Int16 nBuildFlags;
sal_Int32 nSlideTime, nSoundRef;
- rStCtrl >> nSlideTime // time to show (in Ticks)
- >> nSoundRef // Index of SoundCollection
- >> nDirection // direction of fade effect
- >> nTransitionType // fade effect
- >> nBuildFlags // Buildflags (s.u.)
- >> nSpeed // speed (slow, medium, fast)
- >> nByteDummy >> nByteDummy >> nByteDummy;
+ rStCtrl.ReadInt32( nSlideTime ) // time to show (in Ticks)
+ .ReadInt32( nSoundRef ) // Index of SoundCollection
+ .ReadSChar( nDirection ) // direction of fade effect
+ .ReadSChar( nTransitionType ) // fade effect
+ .ReadInt16( nBuildFlags ) // Buildflags (s.u.)
+ .ReadSChar( nSpeed ) // speed (slow, medium, fast)
+ .ReadSChar( nByteDummy ).ReadSChar( nByteDummy ).ReadSChar( nByteDummy );
switch ( nTransitionType )
{
@@ -1993,7 +1993,7 @@ OUString ImplSdPPTImport::ReadMedia( sal_uInt32 nMediaRef ) const
if ( SeekToRec( rStCtrl, PPT_PST_ExMediaAtom, aExVideoHd.GetRecEndFilePos(), &aExMediaAtomHd ) )
{
sal_uInt32 nRef;
- rStCtrl >> nRef;
+ rStCtrl.ReadUInt32( nRef );
if ( nRef == nMediaRef )
{
aExVideoHd.SeekToContent( rStCtrl );
@@ -2651,7 +2651,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( SeekToRec( rSt, PPT_PST_ExObjRefAtom, nHdRecEnd, &aObjRefAtomHd ) )
{
sal_uInt32 nRef;
- rSt >> nRef;
+ rSt.ReadUInt32( nRef );
OUString aMediaURL( ReadMedia( nRef ) );
if ( aMediaURL.isEmpty() )
aMediaURL = ReadSound( nRef );
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index d761e2b961ae..e61122ee2e3e 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -108,14 +108,14 @@ const transition* transition::find( const OUString& rName )
SvStream& operator>>(SvStream& rIn, AnimationNode& rNode )
{
- rIn >> rNode.mnU1;
- rIn >> rNode.mnRestart;
- rIn >> rNode.mnGroupType;
- rIn >> rNode.mnFill;
- rIn >> rNode.mnU3;
- rIn >> rNode.mnU4;
- rIn >> rNode.mnDuration;
- rIn >> rNode.mnNodeType;
+ rIn.ReadInt32( rNode.mnU1 );
+ rIn.ReadInt32( rNode.mnRestart );
+ rIn.ReadInt32( rNode.mnGroupType );
+ rIn.ReadInt32( rNode.mnFill );
+ rIn.ReadInt32( rNode.mnU3 );
+ rIn.ReadInt32( rNode.mnU4 );
+ rIn.ReadInt32( rNode.mnDuration );
+ rIn.ReadInt32( rNode.mnNodeType );
return rIn;
}
@@ -1444,7 +1444,7 @@ int AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference<
float fInterval;
sal_Int32 nTextUnitEffect, nU1, nU2, nU3;
- mrStCtrl >> fInterval >> nTextUnitEffect >> nU1 >> nU2 >> nU3;
+ mrStCtrl.ReadFloat( fInterval ).ReadInt32( nTextUnitEffect ).ReadInt32( nU1 ).ReadInt32( nU2 ).ReadInt32( nU3 );
Reference< XIterateContainer > xIter( xNode, UNO_QUERY );
if( xIter.is() )
@@ -1600,8 +1600,8 @@ void AnimationImporter::importAnimateFilterContainer( const Atom* pAtom, const R
case DFF_msofbtAnimateFilterData:
{
sal_uInt32 transition;
- mrStCtrl >> nBits;
- mrStCtrl >> transition;
+ mrStCtrl.ReadUInt32( nBits );
+ mrStCtrl.ReadUInt32( transition );
if( nBits & 1 )
xFilter->setMode( transition == 0 );
@@ -1706,7 +1706,7 @@ void AnimationImporter::importAnimateAttributeTargetContainer( const Atom* pAtom
sal_uInt32 nAccumulate;
sal_uInt32 nTransformType;
- mrStCtrl >> nBits >> nAdditive >> nAccumulate >> nTransformType;
+ mrStCtrl.ReadUInt32( nBits ).ReadUInt32( nAdditive ).ReadUInt32( nAccumulate ).ReadUInt32( nTransformType );
// nBits %0001: additive, %0010: accumulate, %0100: attributeName, %1000: transformtype
// nAdditive 0 = base, 1 = sum, 2 = replace, 3 = multiply, 4 = none
@@ -1892,10 +1892,10 @@ void AnimationImporter::importAnimateColorContainer( const Atom* pAtom, const Re
sal_Int32 nByMode, nByA, nByB, nByC;
sal_Int32 nFromMode, nFromA, nFromB, nFromC;
sal_Int32 nToMode, nToA, nToB, nToC;
- mrStCtrl >> nBits;
- mrStCtrl >> nByMode >> nByA >> nByB >> nByC;
- mrStCtrl >> nFromMode >> nFromA >> nFromB >> nFromC;
- mrStCtrl >> nToMode >> nToA >> nToB >> nToC;
+ mrStCtrl.ReadUInt32( nBits );
+ mrStCtrl.ReadInt32( nByMode ).ReadInt32( nByA ).ReadInt32( nByB ).ReadInt32( nByC );
+ mrStCtrl.ReadInt32( nFromMode ).ReadInt32( nFromA ).ReadInt32( nFromB ).ReadInt32( nFromC );
+ mrStCtrl.ReadInt32( nToMode ).ReadInt32( nToA ).ReadInt32( nToB ).ReadInt32( nToC );
if( nBits & 1 )
{
@@ -1961,7 +1961,7 @@ void AnimationImporter::importAnimateSetContainer( const Atom* pAtom, const Refe
case DFF_msofbtAnimateSetData:
{
sal_Int32 nU1, nU2;
- mrStCtrl >> nU1 >> nU2;
+ mrStCtrl.ReadInt32( nU1 ).ReadInt32( nU2 );
dump( " set_1=\"%ld\"", nU1 ),
dump( " set_2=\"%ld\"", nU2 );
@@ -2020,7 +2020,7 @@ void AnimationImporter::importAnimateContainer( const Atom* pAtom, const Referen
case DFF_msofbtAnimateData:
{
sal_uInt32 nCalcmode, nBits, nValueType;
- mrStCtrl >> nCalcmode >> nBits >> nValueType;
+ mrStCtrl.ReadUInt32( nCalcmode ).ReadUInt32( nBits ).ReadUInt32( nValueType );
if( nBits & 0x08 )
{
@@ -2101,7 +2101,7 @@ void AnimationImporter::importAnimateMotionContainer( const Atom* pAtom, const R
sal_uInt32 nBits, nOrigin;
float fByX, fByY, fFromX, fFromY, fToX, fToY;
- mrStCtrl >> nBits >> fByX >> fByY >> fFromX >> fFromY >> fToX >> fToY >> nOrigin;
+ mrStCtrl.ReadUInt32( nBits ).ReadFloat( fByX ).ReadFloat( fByY ).ReadFloat( fFromX ).ReadFloat( fFromY ).ReadFloat( fToX ).ReadFloat( fToY ).ReadUInt32( nOrigin );
#ifdef DBG_ANIM_LOG
if( nBits & 1 )
@@ -2185,8 +2185,8 @@ void AnimationImporter::importCommandContainer( const Atom* pAtom, const Referen
sal_Int32 nCommandType;
// looks like U1 is a bitset, bit 1 enables the type and bit 2 enables
// a propertyvalue that follows
- mrStCtrl >> nBits;
- mrStCtrl >> nCommandType;
+ mrStCtrl.ReadInt32( nBits );
+ mrStCtrl.ReadInt32( nCommandType );
if( nBits & 1 )
{
@@ -2398,7 +2398,7 @@ void AnimationImporter::importAnimateScaleContainer( const Atom* pAtom, const Re
float fByX, fByY, fFromX, fFromY, fToX, fToY;
// nBits %001: by, %010: from, %100: to, %1000: zoomContents(bool)
- mrStCtrl >> nBits >> fByX >> fByY >> fFromX >> fFromY >> fToX >> fToY >> nZoomContents;
+ mrStCtrl.ReadUInt32( nBits ).ReadFloat( fByX ).ReadFloat( fByY ).ReadFloat( fFromX ).ReadFloat( fFromY ).ReadFloat( fToX ).ReadFloat( fToY ).ReadUInt32( nZoomContents );
ValuePair aPair;
// 'from' value
@@ -2499,7 +2499,7 @@ void AnimationImporter::importAnimateRotationContainer( const Atom* pAtom, const
float fBy, fFrom, fTo;
// nBits %001: by, %010: from, %100: to, %1000: zoomContents(bool)
- mrStCtrl >> nBits >> fBy >> fFrom >> fTo >> nU1;
+ mrStCtrl.ReadUInt32( nBits ).ReadFloat( fBy ).ReadFloat( fFrom ).ReadFloat( fTo ).ReadUInt32( nU1 );
if( nBits & 1 )
xTransform->setBy( makeAny( (double) fBy ) );
@@ -2590,13 +2590,13 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc
while( pValueAtom && pValueAtom->seekToContent() )
{
sal_uInt32 nType;
- mrStCtrl >> nType;
+ mrStCtrl.ReadUInt32( nType );
switch( nType )
{
case 0:
{
float fRepeat;
- mrStCtrl >> fRepeat;
+ mrStCtrl.ReadFloat( fRepeat );
xNode->setRepeatCount( (fRepeat < ((float)3.40282346638528860e+38)) ? makeAny( (double)fRepeat ) : makeAny( Timing_INDEFINITE ) );
#ifdef DBG_ANIM_LOG
@@ -2615,7 +2615,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc
case 3:
{
float faccelerate;
- mrStCtrl >> faccelerate;
+ mrStCtrl.ReadFloat( faccelerate );
xNode->setAcceleration( faccelerate );
dump( " accelerate=\"%g\"", (double)faccelerate );
}
@@ -2624,7 +2624,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc
case 4:
{
float fdecelerate;
- mrStCtrl >> fdecelerate;
+ mrStCtrl.ReadFloat( fdecelerate );
xNode->setDecelerate( fdecelerate );
dump( " decelerate=\"%g\"", (double)fdecelerate );
}
@@ -2633,7 +2633,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc
case 5:
{
sal_Int32 nAutoreverse;
- mrStCtrl >> nAutoreverse;
+ mrStCtrl.ReadInt32( nAutoreverse );
xNode->setAutoReverse( nAutoreverse != 0 );
dump( " autoreverse=\"%#lx\"", nAutoreverse );
}
@@ -2642,7 +2642,7 @@ void AnimationImporter::importAnimationValues( const Atom* pAtom, const Referenc
default:
{
sal_uInt32 nUnknown;
- mrStCtrl >> nUnknown;
+ mrStCtrl.ReadUInt32( nUnknown );
#ifdef DBG_ANIM_LOG
fprintf(mpFile, " attribute_%d=\"%#lx\"", nType, nUnknown );
#endif
@@ -2683,7 +2683,7 @@ void AnimationImporter::importAnimateKeyPoints( const Atom* pAtom, const Referen
{
if( pIter->seekToContent() )
{
- mrStCtrl >> nTemp;
+ mrStCtrl.ReadInt32( nTemp );
double fTemp = (double)nTemp / 1000.0;
aKeyTimes[nKeyTime] = fTemp;
@@ -2803,7 +2803,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny )
if ( nRecLen >= 1 )
{
sal_Int8 nType;
- mrStCtrl >> nType;
+ mrStCtrl.ReadSChar( nType );
switch( nType )
{
case DFF_ANIM_PROP_TYPE_BYTE :
@@ -2811,7 +2811,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny )
if ( nRecLen == 2 )
{
sal_uInt8 nByte;
- mrStCtrl >> nByte;
+ mrStCtrl.ReadUChar( nByte );
rAny <<= nByte;
bOk = true;
@@ -2824,7 +2824,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny )
if ( nRecLen == 5 )
{
sal_uInt32 nInt32;
- mrStCtrl >> nInt32;
+ mrStCtrl.ReadUInt32( nInt32 );
rAny <<= nInt32;
bOk = true;
@@ -2837,7 +2837,7 @@ bool AnimationImporter::importAttributeValue( const Atom* pAtom, Any& rAny )
if( nRecLen == 5 )
{
float fFloat;
- mrStCtrl >> fFloat;
+ mrStCtrl.ReadFloat( fFloat );
rAny <<= (double)fFloat;
bOk = true;
@@ -2900,10 +2900,10 @@ void AnimationImporter::importAnimationEvents( const Atom* pAtom, const Referenc
case DFF_msofbtAnimTrigger:
{
sal_Int32 nU1, nTrigger, nU3, nBegin;
- mrStCtrl >> nU1;
- mrStCtrl >> nTrigger;
- mrStCtrl >> nU3;
- mrStCtrl >> nBegin;
+ mrStCtrl.ReadInt32( nU1 );
+ mrStCtrl.ReadInt32( nTrigger );
+ mrStCtrl.ReadInt32( nU3 );
+ mrStCtrl.ReadInt32( nBegin );
switch( nTrigger )
{
@@ -2995,11 +2995,11 @@ void AnimationImporter::importAnimationActions( const Atom* pAtom, const Referen
if( pActionAtom && pActionAtom->seekToContent() )
{
sal_Int32 nConcurrent, nNextAction, nEndSync, nU4, nU5;
- mrStCtrl >> nConcurrent;
- mrStCtrl >> nNextAction;
- mrStCtrl >> nEndSync;
- mrStCtrl >> nU4;
- mrStCtrl >> nU5;
+ mrStCtrl.ReadInt32( nConcurrent );
+ mrStCtrl.ReadInt32( nNextAction );
+ mrStCtrl.ReadInt32( nEndSync );
+ mrStCtrl.ReadInt32( nU4 );
+ mrStCtrl.ReadInt32( nU5 );
if( nEndSync == 1 )
xNode->setEndSync( makeAny( AnimationEndSync::ALL ) );
@@ -3040,11 +3040,11 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
{
sal_Int32 nRefType,nRefId;
sal_Int32 begin,end;
- mrStCtrl >> nRefMode;
- mrStCtrl >> nRefType;
- mrStCtrl >> nRefId;
- mrStCtrl >> begin;
- mrStCtrl >> end;
+ mrStCtrl.ReadInt32( nRefMode );
+ mrStCtrl.ReadInt32( nRefType );
+ mrStCtrl.ReadInt32( nRefId );
+ mrStCtrl.ReadInt32( begin );
+ mrStCtrl.ReadInt32( end );
switch( nRefType )
{
@@ -3128,7 +3128,7 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
case 0x2b01:
{
sal_Int32 nU1;
- mrStCtrl >> nU1;
+ mrStCtrl.ReadInt32( nU1 );
}
break;
default:
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 42fc3f816241..894efb4b4c21 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -84,13 +84,13 @@ sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAl
if ( nStringType == VT_EMPTY )
{
nType = VT_NULL; // Initialize in case stream fails.
- *this >> nType;
+ ReadUInt32( nType );
}
else
nType = nStringType & VT_TYPEMASK;
nItemSize = 0; // Initialize in case stream fails.
- *this >> nItemSize;
+ ReadUInt32( nItemSize );
switch( nType )
{
@@ -108,7 +108,7 @@ sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAl
{
sal_Unicode* pWString = (sal_Unicode*)pString;
for ( i = 0; i < nItemSize; i++ )
- *this >> pWString[ i ];
+ ReadUInt16( pWString[ i ] );
rString = OUString(pWString, lcl_getMaxSafeStrLen(nItemSize));
}
else
@@ -147,7 +147,7 @@ sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAl
{
sal_Unicode* pString = new sal_Unicode[ nItemSize ];
for ( i = 0; i < nItemSize; i++ )
- *this >> pString[ i ];
+ ReadUInt16( pString[ i ] );
if ( pString[ i - 1 ] == 0 )
{
if ( (sal_uInt16)nItemSize > 1 )
@@ -280,10 +280,10 @@ sal_Bool Section::GetDictionary( Dictionary& rDict )
sal_uInt32 nDictCount, nId, nSize, nPos;
SvMemoryStream aStream( (sal_Int8*)iter->mpBuf, iter->mnSize, STREAM_READ );
aStream.Seek( STREAM_SEEK_TO_BEGIN );
- aStream >> nDictCount;
+ aStream.ReadUInt32( nDictCount );
for ( sal_uInt32 i = 0; i < nDictCount; i++ )
{
- aStream >> nId >> nSize;
+ aStream.ReadUInt32( nId ).ReadUInt32( nSize );
if ( nSize )
{
OUString aString;
@@ -298,7 +298,7 @@ sal_Bool Section::GetDictionary( Dictionary& rDict )
aStream.Seek( nPos );
sal_Unicode* pWString = (sal_Unicode*)pString;
for ( i = 0; i < nSize; i++ )
- aStream >> pWString[ i ];
+ aStream.ReadUInt16( pWString[ i ] );
aString = OUString(pWString, lcl_getMaxSafeStrLen(nSize));
}
else
@@ -331,22 +331,22 @@ void Section::Read( SvStorageStream *pStrm )
pStrm->Seek( nSecOfs );
mnTextEnc = RTL_TEXTENCODING_MS_1252;
- *pStrm >> nSecSize >> nPropCount;
+ pStrm->ReadUInt32( nSecSize ).ReadUInt32( nPropCount );
while( nPropCount-- && ( pStrm->GetError() == ERRCODE_NONE ) )
{
- *pStrm >> nPropId >> nPropOfs;
+ pStrm->ReadUInt32( nPropId ).ReadUInt32( nPropOfs );
nCurrent = pStrm->Tell();
pStrm->Seek( nPropOfs + nSecOfs );
if ( nPropId ) // do not read dictionary
{
- *pStrm >> nPropType;
+ pStrm->ReadUInt32( nPropType );
nPropSize = 4;
if ( nPropType & VT_VECTOR )
{
- *pStrm >> nVectorCount;
+ pStrm->ReadUInt32( nVectorCount );
nPropType &=~VT_VECTOR;
nPropSize += 4;
}
@@ -360,7 +360,7 @@ void Section::Read( SvStorageStream *pStrm )
{
if ( bVariant )
{
- *pStrm >> nPropType;
+ pStrm->ReadUInt32( nPropType );
nPropSize += 4;
}
switch( nPropType )
@@ -392,18 +392,18 @@ void Section::Read( SvStorageStream *pStrm )
break;
case VT_BSTR :
- *pStrm >> nTemp;
+ pStrm->ReadUInt32( nTemp );
nPropSize += ( nTemp + 4 );
break;
case VT_LPSTR :
- *pStrm >> nTemp;
+ pStrm->ReadUInt32( nTemp );
nPropSize += ( nTemp + 4 );
break;
case VT_LPWSTR :
{
- *pStrm >> nTemp;
+ pStrm->ReadUInt32( nTemp );
// looks like these are aligned to 4 bytes
sal_uInt32 nLength = nPropOfs + nSecOfs + nPropSize + ( nTemp << 1 ) + 4;
nPropSize += ( nTemp << 1 ) + 4 + (nLength % 4);
@@ -413,7 +413,7 @@ void Section::Read( SvStorageStream *pStrm )
case VT_BLOB_OBJECT :
case VT_BLOB :
case VT_CF :
- *pStrm >> nTemp;
+ pStrm->ReadUInt32( nTemp );
nPropSize += ( nTemp + 4 );
break;
@@ -457,10 +457,10 @@ void Section::Read( SvStorageStream *pStrm )
if ( GetProperty( 1, aPropItem ) )
{
sal_uInt16 nCodePage;
- aPropItem >> nPropType;
+ aPropItem.ReadUInt32( nPropType );
if ( nPropType == VT_I2 )
{
- aPropItem >> nCodePage;
+ aPropItem.ReadUInt16( nCodePage );
if ( nCodePage == 1200 )
{
@@ -483,10 +483,10 @@ void Section::Read( SvStorageStream *pStrm )
else
{
sal_uInt32 nDictCount, nSize;
- *pStrm >> nDictCount;
+ pStrm->ReadUInt32( nDictCount );
for ( i = 0; i < nDictCount; i++ )
{
- *pStrm >> nSize >> nSize;
+ pStrm->ReadUInt32( nSize ).ReadUInt32( nSize );
pStrm->SeekRel( nSize );
}
nSize = pStrm->Tell();
@@ -572,12 +572,12 @@ void PropRead::Read()
sal_uInt32 nSections;
sal_uInt32 nSectionOfs;
sal_uInt32 nCurrent;
- *mpSvStream >> mnByteOrder >> mnFormat >> mnVersionLo >> mnVersionHi;
+ mpSvStream->ReadUInt16( mnByteOrder ).ReadUInt16( mnFormat ).ReadUInt16( mnVersionLo ).ReadUInt16( mnVersionHi );
if ( mnByteOrder == 0xfffe )
{
sal_uInt8* pSectCLSID = new sal_uInt8[ 16 ];
mpSvStream->Read( mApplicationCLSID, 16 );
- *mpSvStream >> nSections;
+ mpSvStream->ReadUInt32( nSections );
if ( nSections > 2 ) // sj: PowerPoint documents are containing max 2 sections
{
mbStatus = sal_False;
@@ -585,7 +585,7 @@ void PropRead::Read()
else for ( sal_uInt32 i = 0; i < nSections; i++ )
{
mpSvStream->Read( pSectCLSID, 16 );
- *mpSvStream >> nSectionOfs;
+ mpSvStream->ReadUInt32( nSectionOfs );
nCurrent = mpSvStream->Tell();
mpSvStream->Seek( nSectionOfs );
Section aSection( pSectCLSID );
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index 0559dda21ba4..af3a252f66ef 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -76,7 +76,7 @@ void MorphDlg::LoadSettings()
{
SdIOCompat aCompat( *xIStm, STREAM_READ );
- *xIStm >> nSteps >> bOrient >> bAttrib;
+ xIStm->ReadUInt16( nSteps ).ReadUChar( bOrient ).ReadUChar( bAttrib );
}
else
{
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 85fac7688b9b..bd159e99555b 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -308,7 +308,7 @@ void SdVectorizeDlg::LoadSettings()
if( xIStm.Is() )
{
SdIOCompat aCompat( *xIStm, STREAM_READ );
- *xIStm >> nLayers >> nReduce >> nFillHoles >> bFillHoles;
+ xIStm->ReadUInt16( nLayers ).ReadUInt16( nReduce ).ReadUInt16( nFillHoles ).ReadUChar( bFillHoles );
}
else
{
diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx
index f962b9c82c03..8ade5b964c12 100644
--- a/sd/source/ui/unoidl/sddetect.cxx
+++ b/sd/source/ui/unoidl/sddetect.cxx
@@ -394,7 +394,7 @@ OUString SAL_CALL SdFilterDetect::detect( Sequence< beans::PropertyValue >& lDes
{
sal_uInt8 n8;
pStm->Seek( STREAM_SEEK_TO_BEGIN );
- *pStm >> n8;
+ pStm->ReadUChar( n8 );
if ( ( n8 & 0xf0 ) == 0 ) // we are supporting binary cgm format only, so
{ // this is a small test to exclude cgm text
SfxFilterMatcher aMatch(OUString("simpress"));
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 963df13d3ee5..6f158a7fa65e 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1368,7 +1368,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
OUString aTmpName = aTempFile.GetURL();
SvFileStream aTmpStream( aTmpName, SFX_STREAM_READWRITE );
- *pStream >> aTmpStream;
+ pStream->ReadStream( aTmpStream );
aTmpStream.Close();
// Open data as Storage
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 1c6745ebbfa0..5338ec9c59c9 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -313,7 +313,7 @@ OUString SfxOleStringHelper::ImplLoadString8( SvStream& rStrm ) const
OUString aValue;
// read size field (signed 32-bit)
sal_Int32 nSize(0);
- rStrm >> nSize;
+ rStrm.ReadInt32( nSize );
// size field includes trailing NUL character
DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF),
OStringBuffer("SfxOleStringHelper::ImplLoadString8 - invalid string of len ").
@@ -334,7 +334,7 @@ OUString SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const
OUString aValue;
// read size field (signed 32-bit), may be buffer size or character count
sal_Int32 nSize(0);
- rStrm >> nSize;
+ rStrm.ReadInt32( nSize );
DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF), "SfxOleStringHelper::ImplLoadString16 - invalid string" );
// size field includes trailing NUL character
if( (0 < nSize) && (nSize <= 0xFFFF) )
@@ -345,7 +345,7 @@ OUString SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const
sal_uInt16 cChar;
for( sal_Int32 nIdx = 0; nIdx < nSize; ++nIdx )
{
- rStrm >> cChar;
+ rStrm.ReadUInt16( cChar );
aBuffer.push_back( static_cast< sal_Unicode >( cChar ) );
}
// stream is always padded to 32-bit boundary, skip 2 bytes on odd character count
@@ -427,7 +427,7 @@ void SfxOleCodePageProperty::ImplLoad( SvStream& rStrm )
{
// property type is signed int16, but we use always unsigned int16 for codepages
sal_uInt16 nCodePage;
- rStrm >> nCodePage;
+ rStrm.ReadUInt16( nCodePage );
SetCodePage( nCodePage );
}
@@ -447,7 +447,7 @@ SfxOleInt32Property::SfxOleInt32Property( sal_Int32 nPropId, sal_Int32 nValue )
void SfxOleInt32Property::ImplLoad( SvStream& rStrm )
{
- rStrm >> mnValue;
+ rStrm.ReadInt32( mnValue );
}
void SfxOleInt32Property::ImplSave( SvStream& rStrm )
@@ -465,7 +465,7 @@ SfxOleDoubleProperty::SfxOleDoubleProperty( sal_Int32 nPropId, double fValue ) :
void SfxOleDoubleProperty::ImplLoad( SvStream& rStrm )
{
- rStrm >> mfValue;
+ rStrm.ReadDouble( mfValue );
}
void SfxOleDoubleProperty::ImplSave( SvStream& rStrm )
@@ -484,7 +484,7 @@ SfxOleBoolProperty::SfxOleBoolProperty( sal_Int32 nPropId, bool bValue ) :
void SfxOleBoolProperty::ImplLoad( SvStream& rStrm )
{
sal_Int16 nValue(0);
- rStrm >> nValue;
+ rStrm.ReadInt16( nValue );
mbValue = nValue != 0;
}
@@ -574,7 +574,7 @@ SfxOleFileTimeProperty::SfxOleFileTimeProperty( sal_Int32 nPropId, const util::D
void SfxOleFileTimeProperty::ImplLoad( SvStream& rStrm )
{
sal_uInt32 nLower(0), nUpper(0);
- rStrm >> nLower >> nUpper;
+ rStrm.ReadUInt32( nLower ).ReadUInt32( nUpper );
::DateTime aDateTime = DateTime::CreateFromWin32FileDateTime( nLower, nUpper );
// note: editing duration is stored as offset to TIMESTAMP_INVALID_DATETIME
// of course we should not convert the time zone of a duration!
@@ -624,7 +624,7 @@ SfxOleDateProperty::SfxOleDateProperty( sal_Int32 nPropId ) :
void SfxOleDateProperty::ImplLoad( SvStream& rStrm )
{
double fValue(0.0);
- rStrm >> fValue;
+ rStrm.ReadDouble( fValue );
//stored as number of days (not seconds) since December 31, 1899
::Date aDate(31, 12, 1899);
long nDays = fValue;
@@ -748,7 +748,7 @@ void SfxOleDictionaryProperty::ImplLoad( SvStream& rStrm )
for( sal_Int32 nIdx = 0; (nIdx < nNameCount) && (rStrm.GetErrorCode() == SVSTREAM_OK) && !rStrm.IsEof(); ++nIdx )
{
sal_Int32 nPropId(0);
- rStrm >> nPropId;
+ rStrm.ReadInt32( nPropId );
// name always stored as byte string
maPropNameMap[ nPropId ] = LoadString8( rStrm );
}
@@ -1006,7 +1006,7 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
mnStartPos = rStrm.Tell();
sal_uInt32 nSize(0);
sal_Int32 nPropCount(0);
- rStrm >> nSize >> nPropCount;
+ rStrm.ReadUInt32( nSize ).ReadInt32( nPropCount );
// read property ID/position pairs
typedef ::std::map< sal_Int32, sal_uInt32 > SfxOlePropPosMap;
@@ -1015,7 +1015,7 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
{
sal_Int32 nPropId(0);
sal_uInt32 nPropPos(0);
- rStrm >> nPropId >> nPropPos;
+ rStrm.ReadInt32( nPropId ).ReadUInt32( nPropPos );
aPropPosMap[ nPropId ] = nPropPos;
}
@@ -1025,7 +1025,7 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
{
// codepage property must be of type signed int-16
sal_Int32 nPropType(0);
- rStrm >> nPropType;
+ rStrm.ReadInt32( nPropType );
if( nPropType == PROPTYPE_INT16 )
LoadObject( rStrm, maCodePageProp );
// remove property position
@@ -1041,7 +1041,7 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
{
// dictionary property contains number of pairs in property type field
sal_Int32 nNameCount(0);
- rStrm >> nNameCount;
+ rStrm.ReadInt32( nNameCount );
maDictProp.SetNameCount( nNameCount );
LoadObject( rStrm, maDictProp );
}
@@ -1099,7 +1099,7 @@ void SfxOleSection::LoadProperty( SvStream& rStrm, sal_Int32 nPropId )
{
// property data type
sal_Int32 nPropType(0);
- rStrm >> nPropType;
+ rStrm.ReadInt32( nPropType );
// create empty property object
SfxOlePropertyRef xProp;
switch( nPropType )
@@ -1227,7 +1227,9 @@ void SfxOlePropertySet::ImplLoad( SvStream& rStrm )
sal_uInt16 nOsType;
SvGlobalName aGuid;
sal_Int32 nSectCount(0);
- rStrm >> nByteOrder >> nVersion >> nOsMinor >> nOsType >> aGuid >> nSectCount;
+ rStrm.ReadUInt16( nByteOrder ).ReadUInt16( nVersion ).ReadUInt16( nOsMinor ).ReadUInt16( nOsType );
+ rStrm >> aGuid;
+ rStrm.ReadInt32( nSectCount );
// read sections
sal_Size nSectPosPos = rStrm.Tell();
@@ -1237,7 +1239,8 @@ void SfxOlePropertySet::ImplLoad( SvStream& rStrm )
rStrm.Seek( nSectPosPos );
SvGlobalName aSectGuid;
sal_uInt32 nSectPos;
- rStrm >> aSectGuid >> nSectPos;
+ rStrm >> aSectGuid;
+ rStrm.ReadUInt32( nSectPos );
nSectPosPos = rStrm.Tell();
// read section
rStrm.Seek( static_cast< sal_Size >( nSectPos ) );
diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx
index 52834c660a2b..445b5c2c5743 100644
--- a/sfx2/source/doc/zoomitem.cxx
+++ b/sfx2/source/doc/zoomitem.cxx
@@ -76,7 +76,7 @@ SfxPoolItem* SvxZoomItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) con
sal_uInt16 nValue;
sal_uInt16 nValSet;
sal_Int8 nType;
- rStrm >> nValue >> nValSet >> nType;
+ rStrm.ReadUInt16( nValue ).ReadUInt16( nValSet ).ReadSChar( nType );
SvxZoomItem* pNew = new SvxZoomItem( (SvxZoomType)nType, nValue, Which() );
pNew->SetValueSet( nValSet );
return pNew;
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index 9eddbc9eb619..42113063819b 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -109,7 +109,7 @@ SvStream& ReadFileList( SvStream& rIStm, FileList& rFileList )
while (!rIStm.IsEof())
{
// read first character of filepath; c==0 > reach end of stream
- rIStm >> c;
+ rIStm.ReadUInt16( c );
if (!c)
break;
@@ -117,7 +117,7 @@ SvStream& ReadFileList( SvStream& rIStm, FileList& rFileList )
while (c && !rIStm.IsEof())
{
sBuf.append((sal_Unicode)c);
- rIStm >> c;
+ rIStm.ReadUInt16( c );
}
// append the filepath
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 3ebc7290083a..e2aae4b3b0f6 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -37,17 +37,17 @@ static const sal_uInt8 cStgSignature[ 8 ] = { 0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A
SvStream& ReadClsId( SvStream& r, ClsId& rId )
{
- r >> rId.n1
- >> rId.n2
- >> rId.n3
- >> rId.n4
- >> rId.n5
- >> rId.n6
- >> rId.n7
- >> rId.n8
- >> rId.n9
- >> rId.n10
- >> rId.n11;
+ r.ReadInt32( rId.n1 )
+ .ReadInt16( rId.n2 )
+ .ReadInt16( rId.n3 )
+ .ReadUChar( rId.n4 )
+ .ReadUChar( rId.n5 )
+ .ReadUChar( rId.n6 )
+ .ReadUChar( rId.n7 )
+ .ReadUChar( rId.n8 )
+ .ReadUChar( rId.n9 )
+ .ReadUChar( rId.n10 )
+ .ReadUChar( rId.n11 );
return r;
}
@@ -132,21 +132,21 @@ bool StgHeader::Load( SvStream& r )
r.Seek( 0L );
r.Read( cSignature, 8 );
ReadClsId( r, aClsId ); // 08 Class ID
- r >> nVersion // 1A version number
- >> nByteOrder // 1C Unicode byte order indicator
- >> nPageSize // 1E 1 << nPageSize = block size
- >> nDataPageSize; // 20 1 << this size == data block size
+ r.ReadInt32( nVersion ) // 1A version number
+ .ReadUInt16( nByteOrder ) // 1C Unicode byte order indicator
+ .ReadInt16( nPageSize ) // 1E 1 << nPageSize = block size
+ .ReadInt16( nDataPageSize ); // 20 1 << this size == data block size
r.SeekRel( 10 );
- r >> nFATSize // 2C total number of FAT pages
- >> nTOCstrm // 30 starting page for the TOC stream
- >> nReserved // 34
- >> nThreshold // 38 minimum file size for big data
- >> nDataFAT // 3C page # of 1st data FAT block
- >> nDataFATSize // 40 # of data FATpages
- >> nMasterChain // 44 chain to the next master block
- >> nMaster; // 48 # of additional master blocks
+ r.ReadInt32( nFATSize ) // 2C total number of FAT pages
+ .ReadInt32( nTOCstrm ) // 30 starting page for the TOC stream
+ .ReadInt32( nReserved ) // 34
+ .ReadInt32( nThreshold ) // 38 minimum file size for big data
+ .ReadInt32( nDataFAT ) // 3C page # of 1st data FAT block
+ .ReadInt32( nDataFATSize ) // 40 # of data FATpages
+ .ReadInt32( nMasterChain ) // 44 chain to the next master block
+ .ReadInt32( nMaster ); // 48 # of additional master blocks
for( short i = 0; i < cFATPagesInHeader; i++ )
- r >> nMasterFAT[ i ];
+ r.ReadInt32( nMasterFAT[ i ] );
return (r.GetErrorCode() == ERRCODE_NONE) && Check();
}
@@ -369,22 +369,22 @@ bool StgEntry::Load( const void* pFrom, sal_uInt32 nBufSize )
SvMemoryStream r( (sal_Char*) pFrom, nBufSize, STREAM_READ );
for( short i = 0; i < 32; i++ )
- r >> nName[ i ]; // 00 name as WCHAR
- r >> nNameLen // 40 size of name in bytes including 00H
- >> cType // 42 entry type
- >> cFlags // 43 0 or 1 (tree balance?)
- >> nLeft // 44 left node entry
- >> nRight // 48 right node entry
- >> nChild; // 4C 1st child entry if storage
+ r.ReadUInt16( nName[ i ] ); // 00 name as WCHAR
+ r.ReadUInt16( nNameLen ) // 40 size of name in bytes including 00H
+ .ReadUChar( cType ) // 42 entry type
+ .ReadUChar( cFlags ) // 43 0 or 1 (tree balance?)
+ .ReadInt32( nLeft ) // 44 left node entry
+ .ReadInt32( nRight ) // 48 right node entry
+ .ReadInt32( nChild ); // 4C 1st child entry if storage
ReadClsId( r, aClsId ); // 50 class ID (optional)
- r >> nFlags // 60 state flags(?)
- >> nMtime[ 0 ] // 64 modification time
- >> nMtime[ 1 ] // 64 modification time
- >> nAtime[ 0 ] // 6C creation and access time
- >> nAtime[ 1 ] // 6C creation and access time
- >> nPage1 // 74 starting block (either direct or translated)
- >> nSize // 78 file size
- >> nUnknown; // 7C unknown
+ r.ReadInt32( nFlags ) // 60 state flags(?)
+ .ReadInt32( nMtime[ 0 ] ) // 64 modification time
+ .ReadInt32( nMtime[ 1 ] ) // 64 modification time
+ .ReadInt32( nAtime[ 0 ] ) // 6C creation and access time
+ .ReadInt32( nAtime[ 1 ] ) // 6C creation and access time
+ .ReadInt32( nPage1 ) // 74 starting block (either direct or translated)
+ .ReadInt32( nSize ) // 78 file size
+ .ReadInt32( nUnknown ); // 7C unknown
sal_uInt16 n = nNameLen;
if( n )
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 3bae8d637d33..98cdcad38072 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -106,12 +106,12 @@ bool StgCompObjStream::Load()
return false;
Seek( 8L ); // skip the first part
sal_Int32 nMarker = 0;
- *this >> nMarker;
+ ReadInt32( nMarker );
if( nMarker == -1L )
{
ReadClsId( *this, aClsId );
sal_Int32 nLen1 = 0;
- *this >> nLen1;
+ ReadInt32( nLen1 );
if ( nLen1 > 0 )
{
// higher bits are ignored
@@ -174,7 +174,7 @@ bool StgOleStream::Load()
sal_Int32 version = 0;
Seek( 0L );
- *this >> version >> nFlags;
+ ReadInt32( version ).ReadUInt32( nFlags );
return GetError() == SVSTREAM_OK;
}
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index f412319bfa55..03e4a06efd58 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -29,7 +29,7 @@ sal_uLong ReadClipboardFormat( SvStream & rStm )
{
sal_uInt32 nFormat = 0;
sal_Int32 nLen = 0;
- rStm >> nLen;
+ rStm.ReadInt32( nLen );
if( rStm.IsEof() )
rStm.SetError( SVSTREAM_GENERALERROR );
if( nLen > 0 )
@@ -47,10 +47,10 @@ sal_uLong ReadClipboardFormat( SvStream & rStm )
else if( nLen == -1L )
// Windows clipboard format
// SV und Win stimmen ueberein (bis einschl. FORMAT_GDIMETAFILE)
- rStm >> nFormat;
+ rStm.ReadUInt32( nFormat );
else if( nLen == -2L )
{
- rStm >> nFormat;
+ rStm.ReadUInt32( nFormat );
// Mac clipboard format
// ??? not implemented
rStm.SetError( SVSTREAM_GENERALERROR );
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index ec0c48d742e0..51e36cf714c8 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1645,7 +1645,7 @@ UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, bool
if ( pStream )
{
rStream.Seek(0);
- rStream >> *pStream;
+ rStream.ReadStream( *pStream );
pStream->Flush();
DELETEZ( pStream );
}
@@ -2309,7 +2309,7 @@ sal_Int16 UCBStorage_Impl::Commit()
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( m_pTempFile->GetURL(), STREAM_STD_READ );
m_pSource->SetStreamSize(0);
// m_pSource->Seek(0);
- *pStream >> *m_pSource;
+ pStream->ReadStream( *m_pSource );
DELETEZ( pStream );
m_pSource->Seek(0);
}
@@ -3101,7 +3101,7 @@ bool UCBStorage::IsStorageFile( SvStream* pFile )
pFile->Seek(0);
sal_uInt32 nBytes(0);
- *pFile >> nBytes;
+ pFile->ReadUInt32( nBytes );
// search for the magic bytes
bool bRet = ( nBytes == 0x04034b50 );
@@ -3112,7 +3112,7 @@ bool UCBStorage::IsStorageFile( SvStream* pFile )
if ( bRet )
{
nBytes = 0;
- *pFile >> nBytes;
+ pFile->ReadUInt32( nBytes );
bRet = ( nBytes == 0x04034b50 );
}
}
@@ -3133,13 +3133,13 @@ bool UCBStorage::IsDiskSpannedFile( SvStream* pFile )
pFile->Seek(0);
sal_uInt32 nBytes;
- *pFile >> nBytes;
+ pFile->ReadUInt32( nBytes );
// disk spanned file have an additional header in front of the usual one
bool bRet = ( nBytes == 0x08074b50 );
if ( bRet )
{
- *pFile >> nBytes;
+ pFile->ReadUInt32( nBytes );
bRet = ( nBytes == 0x04034b50 );
}
@@ -3157,7 +3157,7 @@ OUString UCBStorage::GetLinkedFile( SvStream &rStream )
rStream.Seek(0);
sal_uInt32 nBytes;
- rStream >> nBytes;
+ rStream.ReadUInt32( nBytes );
if( nBytes == 0x04034b50 )
{
OString aTmp = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream);
diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx
index a017963d41bf..c35903c7c3ea 100644
--- a/starmath/source/eqnolefilehdr.cxx
+++ b/starmath/source/eqnolefilehdr.cxx
@@ -42,7 +42,7 @@ sal_Bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
//
EQNOLEFILEHDR aHdr;
aHdr.Read(pS);
- *pS >> nVer;
+ pS->ReadUChar( nVer );
if (!pS->GetError())
{
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 688a91408ebf..b90b79d3303a 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -564,11 +564,11 @@ int MathType::Parse(SotStorage *pStor)
EQNOLEFILEHDR aHdr;
aHdr.Read(pS);
- *pS >> nVersion;
- *pS >> nPlatform;
- *pS >> nProduct;
- *pS >> nProdVersion;
- *pS >> nProdSubVersion;
+ pS->ReadUChar( nVersion );
+ pS->ReadUChar( nPlatform );
+ pS->ReadUChar( nProduct );
+ pS->ReadUChar( nProdVersion );
+ pS->ReadUChar( nProdSubVersion );
if (nVersion > 3) // allow only supported versions of MathType to be parsed
return 0;
@@ -636,15 +636,15 @@ static void lcl_AppendDummyTerm(OUString &rRet)
void MathType::HandleNudge()
{
sal_uInt8 nXNudge;
- *pS >> nXNudge;
+ pS->ReadUChar( nXNudge );
sal_uInt8 nYNudge;
- *pS >> nYNudge;
+ pS->ReadUChar( nYNudge );
if (nXNudge == 128 && nYNudge == 128)
{
sal_uInt16 nXLongNudge;
sal_uInt16 nYLongNudge;
- *pS >> nXLongNudge;
- *pS >> nYLongNudge;
+ pS->ReadUInt16( nXLongNudge );
+ pS->ReadUInt16( nYLongNudge );
}
}
/*Fabously complicated as many tokens have to be reordered and generally
@@ -669,7 +669,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
do
{
nTag = 0;
- *pS >> nTag;
+ pS->ReadUChar( nTag );
nRecord = nTag&0x0F;
/*MathType strings can of course include words which
@@ -1719,31 +1719,31 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
HandleEmblishments();
break;
case RULER:
- *pS >> nTabStops;
+ pS->ReadUChar( nTabStops );
for (i=0;i<nTabStops;i++)
{
- *pS >> nTabType;
- *pS >> nTabOffset;
+ pS->ReadUChar( nTabType );
+ pS->ReadUInt16( nTabOffset );
}
SAL_WARN("starmath", "Not seen in the wild Equation Ruler Field");
break;
case FONT:
{
MathTypeFont aFont;
- *pS >> aFont.nTface;
+ pS->ReadUChar( aFont.nTface );
/*
The typeface number is the negative (which makes it
positive) of the typeface value (unbiased) that appears in
CHAR records that might follow a given FONT record
*/
aFont.nTface = 128-aFont.nTface;
- *pS >> aFont.nStyle;
+ pS->ReadUChar( aFont.nStyle );
aUserStyles.insert(aFont);
std::vector<sal_Char> aSeq;
while(true)
{
sal_Char nChar8(0);
- *pS >> nChar8;
+ pS->ReadChar( nChar8 );
if (nChar8 == 0)
break;
aSeq.push_back(nChar8);
@@ -2654,8 +2654,8 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
int MathType::HandlePile(int &rSetAlign,int nLevel,sal_uInt8 nSelector,
sal_uInt8 nVariation)
{
- *pS >> nHAlign;
- *pS >> nVAlign;
+ pS->ReadUChar( nHAlign );
+ pS->ReadUChar( nVAlign );
HandleAlign(nHAlign,nVAlign,rSetAlign);
@@ -2676,11 +2676,11 @@ int MathType::HandleMatrix(int nLevel,sal_uInt8 nSelector,
sal_uInt8 nVariation)
{
sal_uInt8 nH_just,nV_just,nRows,nCols;
- *pS >> nVAlign;
- *pS >> nH_just;
- *pS >> nV_just;
- *pS >> nRows;
- *pS >> nCols;
+ pS->ReadUChar( nVAlign );
+ pS->ReadUChar( nH_just );
+ pS->ReadUChar( nV_just );
+ pS->ReadUChar( nRows );
+ pS->ReadUChar( nCols );
int nBytes = ((nRows+1)*2)/8;
if (((nRows+1)*2)%8)
nBytes++;
@@ -2705,9 +2705,9 @@ int MathType::HandleTemplate(int nLevel,sal_uInt8 &rSelector,
sal_uInt8 &rVariation, sal_Int32 &rLastTemplateBracket)
{
sal_uInt8 nOption; //This appears utterly unused
- *pS >> rSelector;
- *pS >> rVariation;
- *pS >> nOption;
+ pS->ReadUChar( rSelector );
+ pS->ReadUChar( rVariation );
+ pS->ReadUChar( nOption );
OSL_ENSURE(rSelector < 48,"Selector out of range");
if ((rSelector >= 21) && (rSelector <=26))
{
@@ -2756,7 +2756,7 @@ void MathType::HandleEmblishments()
sal_uInt8 nEmbel;
do
{
- *pS >> nEmbel;
+ pS->ReadUChar( nEmbel );
switch (nEmbel)
{
case 0x02:
@@ -2834,21 +2834,21 @@ void MathType::HandleEmblishments()
void MathType::HandleSetSize()
{
sal_uInt8 nTemp;
- *pS >> nTemp;
+ pS->ReadUChar( nTemp );
switch (nTemp)
{
case 101:
- *pS >> nLSize;
+ pS->ReadInt16( nLSize );
nLSize = -nLSize;
break;
case 100:
- *pS >> nTemp;
+ pS->ReadUChar( nTemp );
nLSize = nTemp;
- *pS >> nDSize;
+ pS->ReadInt16( nDSize );
break;
default:
nLSize = nTemp;
- *pS >> nTemp;
+ pS->ReadUChar( nTemp );
nDSize = nTemp-128;
break;
}
@@ -2867,15 +2867,15 @@ int MathType::HandleChar(sal_Int32 &rTextStart,int &rSetSize,int nLevel,
}
sal_uInt8 nOldTypeFace = nTypeFace;
- *pS >> nTypeFace;
+ pS->ReadUChar( nTypeFace );
if (nVersion < 3)
{
sal_uInt8 nChar8;
- *pS >> nChar8;
+ pS->ReadUChar( nChar8 );
nChar = nChar8;
}
else
- *pS >> nChar;
+ pS->ReadUInt16( nChar );
/*
bad character, old mathtype < 3 has these
diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index 26f8233cbfc2..20c9fa9749de 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -201,7 +201,7 @@ SfxMiniRecordReader::SfxMiniRecordReader
// Header lesen
DBG( DbgOutf( "SfxFileRec: searching record at %ul", pStream->Tell() ) );
sal_uInt32 nHeader;
- *pStream >> nHeader;
+ pStream->ReadUInt32( nHeader );
// Headerdaten von Basisklasse extrahieren lassen
SetHeader_Impl( nHeader );
@@ -264,13 +264,13 @@ inline bool SfxSingleRecordReader::ReadHeader_Impl( sal_uInt16 nTypes )
// Basisklassen-Header einlesen
sal_uInt32 nHeader=0;
- *_pStream >> nHeader;
+ _pStream->ReadUInt32( nHeader );
if ( !SetHeader_Impl( nHeader ) )
bRet = false;
else
{
// eigenen Header einlesen
- *_pStream >> nHeader;
+ _pStream->ReadUInt32( nHeader );
_nRecordVer = sal::static_int_cast< sal_uInt8 >(SFX_REC_VER(nHeader));
_nRecordTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_TAG(nHeader));
@@ -308,7 +308,7 @@ bool SfxSingleRecordReader::FindHeader_Impl
// Header lesen
sal_uInt32 nHeader;
DBG( DbgOutf( "SfxFileRec: searching record at %ul", _pStream->Tell() ) );
- *_pStream >> nHeader;
+ _pStream->ReadUInt32( nHeader );
if ( !SetHeader_Impl( nHeader ) )
// EOR => Such-Schleife abbreichen
break;
@@ -317,7 +317,7 @@ bool SfxSingleRecordReader::FindHeader_Impl
if ( _nPreTag == SFX_REC_PRETAG_EXT )
{
// Extended Header lesen
- *_pStream >> nHeader;
+ _pStream->ReadUInt32( nHeader );
_nRecordTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_TAG(nHeader));
// richtigen Record gefunden?
@@ -566,8 +566,8 @@ bool SfxMultiRecordReader::ReadHeader_Impl()
{
// eigenen Header lesen
- *_pStream >> _nContentCount;
- *_pStream >> _nContentSize; // Fix: jedes einzelnen, Var|Mix: Tabellen-Pos.
+ _pStream->ReadUInt16( _nContentCount );
+ _pStream->ReadUInt32( _nContentSize ); // Fix: jedes einzelnen, Var|Mix: Tabellen-Pos.
// mu\s noch eine Tabelle mit Content-Offsets geladen werden?
if ( _nRecordType != SFX_REC_TYPE_FIXSIZE )
@@ -665,7 +665,7 @@ bool SfxMultiRecordReader::GetContent()
{
_nContentVer = sal::static_int_cast< sal_uInt8 >(
SFX_REC_CONTENT_VER(_pContentOfs[_nContentNo]));
- *_pStream >> _nContentTag;
+ _pStream->ReadUInt16( _nContentTag );
}
// ContentNo weiterz"ahlen
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index 341697aa2478..157a4f6043bc 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -128,7 +128,7 @@ SfxEnumItem::SfxEnumItem(sal_uInt16 const nWhich, SvStream & rStream)
: SfxEnumItemInterface(nWhich)
{
m_nValue = 0;
- rStream >> m_nValue;
+ rStream.ReadUInt16( m_nValue );
}
TYPEINIT1(SfxEnumItem, SfxEnumItemInterface)
@@ -170,7 +170,7 @@ SfxBoolItem::SfxBoolItem(sal_uInt16 const nWhich, SvStream & rStream)
: SfxPoolItem(nWhich)
{
sal_Bool tmp = false;
- rStream >> tmp;
+ rStream.ReadUChar( tmp );
m_bValue = tmp;
}
diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx
index 779e60a4726e..ec155e0d16ee 100644
--- a/svl/source/items/cintitem.cxx
+++ b/svl/source/items/cintitem.cxx
@@ -88,7 +88,7 @@ SfxPoolItem * CntByteItem::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntByteItem, 0);
short nTheValue = 0;
- rStream >> nTheValue;
+ rStream.ReadInt16( nTheValue );
return new CntByteItem(Which(), sal_uInt8(nTheValue));
}
@@ -141,7 +141,7 @@ CntUInt16Item::CntUInt16Item(sal_uInt16 which, SvStream & rStream) :
{
DBG_CTOR(CntUInt16Item, 0);
sal_uInt16 nTheValue = 0;
- rStream >> nTheValue;
+ rStream.ReadUInt16( nTheValue );
m_nValue = nTheValue;
}
@@ -260,7 +260,7 @@ CntInt32Item::CntInt32Item(sal_uInt16 which, SvStream & rStream) :
{
DBG_CTOR(CntInt32Item, 0);
//fdo#39428 SvStream no longer supports operator>>(long&)
- rStream >> m_nValue;
+ rStream.ReadInt32( m_nValue );
}
// virtual
@@ -376,7 +376,7 @@ CntUInt32Item::CntUInt32Item(sal_uInt16 which, SvStream & rStream) :
{
DBG_CTOR(CntUInt32Item, 0);
sal_uInt32 nTheValue = 0;
- rStream >> nTheValue;
+ rStream.ReadUInt32( nTheValue );
m_nValue = nTheValue;
}
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index 1b5f04e4fef1..e35cdc60a254 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -40,7 +40,7 @@ CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uIn
: SfxPoolItem( which ), _nColor( COL_TRANSPARENT ), _nStyle( 0 )
{
sal_uInt32 nMagic = 0;
- rStream >> nMagic;
+ rStream.ReadUInt32( nMagic );
if ( nMagic == CNTWALLPAPERITEM_STREAM_MAGIC )
{
// Okay, data were stored by CntWallpaperItem.
@@ -49,7 +49,7 @@ CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uIn
// !!! Color stream operators do not work - they discard any
// transparency info !!!
_nColor.Read( rStream, true );
- rStream >> _nStyle;
+ rStream.ReadUInt16( _nStyle );
}
else
{
diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx
index 061f45913006..d829aac1f00f 100644
--- a/svl/source/items/ctypeitm.cxx
+++ b/svl/source/items/ctypeitm.cxx
@@ -68,11 +68,11 @@ SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
// into account:
OUString aValue = readUnicodeString(rStream, nItemVersion >= 1);
sal_uInt32 nMagic = 0;
- rStream >> nMagic;
+ rStream.ReadUInt32( nMagic );
if (nMagic == CNTSTRINGITEM_STREAM_MAGIC)
{
sal_Bool bEncrypted = sal_False;
- rStream >> bEncrypted;
+ rStream.ReadUChar( bEncrypted );
DBG_ASSERT(!bEncrypted,
"CntContentTypeItem::Create() reads encrypted data");
}
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index 37d4df9b6881..fc6ab6a760b7 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -34,7 +34,7 @@ TYPEINIT1_AUTOFACTORY(SfxByteItem, CntByteItem);
SfxPoolItem * SfxByteItem::Create(SvStream & rStream, sal_uInt16) const
{
short nValue = 0;
- rStream >> nValue;
+ rStream.ReadInt16( nValue );
return new SfxByteItem(Which(), sal_uInt8(nValue));
}
@@ -51,7 +51,7 @@ SfxInt16Item::SfxInt16Item(sal_uInt16 which, SvStream & rStream):
{
DBG_CTOR(SfxInt16Item, 0);
short nTheValue = 0;
- rStream >> nTheValue;
+ rStream.ReadInt16( nTheValue );
m_nValue = nTheValue;
}
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 268af3877be7..842fc4060786 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -1588,7 +1588,7 @@ SvStream &SfxItemSet::Load
// Anzahl der zu ladenden Items laden und dann ebensoviele Items
sal_uInt16 nCount = 0;
- rStream >> nCount;
+ rStream.ReadUInt16( nCount );
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
// Surrogat/Item laden und (Surrogat) aufl"osen lassen
diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx
index eeb25ec8bfe9..71116aa88844 100644
--- a/svl/source/items/lckbitem.cxx
+++ b/svl/source/items/lckbitem.cxx
@@ -41,7 +41,7 @@ SfxLockBytesItem::SfxLockBytesItem( sal_uInt16 nW, SvStream &rStream )
_xVal = new SvLockBytes( new SvMemoryStream(), true );
SvStream aLockBytesStream( _xVal );
- rStream >> aLockBytesStream;
+ rStream.ReadStream( aLockBytesStream );
}
// -----------------------------------------------------------------------
@@ -82,7 +82,7 @@ SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, sal_uInt16 ) const
sal_uLong nActRead = 0;
sal_Char cTmpBuf[MAX_BUF];
SvMemoryStream aNewStream;
- rStream >> nSize;
+ rStream.ReadUInt32( nSize );
do {
sal_uLong nToRead;
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index d1d4b5147471..c5a6f28760f3 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -104,20 +104,20 @@ int SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const
SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
{
if( SVX_MACROTBL_VERSION40 <= nVersion )
- rStrm >> nVersion;
+ rStrm.ReadUInt16( nVersion );
short nMacro;
- rStrm >> nMacro;
+ rStrm.ReadInt16( nMacro );
for( short i = 0; i < nMacro; ++i )
{
sal_uInt16 nCurKey, eType = STARBASIC;
OUString aLibName, aMacName;
- rStrm >> nCurKey;
+ rStrm.ReadUInt16( nCurKey );
aLibName = SfxPoolItem::readByteString(rStrm);
aMacName = SfxPoolItem::readByteString(rStrm);
if( SVX_MACROTBL_VERSION40 <= nVersion )
- rStrm >> eType;
+ rStrm.ReadUInt16( eType );
aSvxMacroTable.insert( SvxMacroTable::value_type(nCurKey, SvxMacro( aMacName, aLibName, (ScriptType)eType ) ));
}
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 055698eab6f0..45c1e4c82d51 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -384,7 +384,7 @@ void SfxItemPool_Impl::readTheItems (
// Ref-Count und Item laden
sal_uInt16 nRef(0);
- rStream >> nRef;
+ rStream.ReadUInt16( nRef );
pItem = pDefItem->Create(rStream, nVer);
pNewArr->push_back( (SfxPoolItem*) pItem );
@@ -513,7 +513,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// Format-Version laden
CHECK_FILEFORMAT2( rStream,
SFX_ITEMPOOL_TAG_STARTPOOL_5, SFX_ITEMPOOL_TAG_STARTPOOL_4 );
- rStream >> pImp->nMajorVer >> pImp->nMinorVer;
+ rStream.ReadUChar( pImp->nMajorVer ).ReadUChar( pImp->nMinorVer );
// Format-Version in Master-Pool "ubertragen
pImp->mpMaster->pImp->nMajorVer = pImp->nMajorVer;
@@ -557,7 +557,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
}
// Header-lesen
- rStream >> pImp->nLoadingVersion;
+ rStream.ReadUInt16( pImp->nLoadingVersion );
aExternName = SfxPoolItem::readByteString(rStream);
bool bOwnPool = aExternName == pImp->aName;
@@ -586,7 +586,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
{
// Header f"ur einzelne Version einlesen
sal_uInt16 nVersion(0), nHStart(0), nHEnd(0);
- rStream >> nVersion >> nHStart >> nHEnd;
+ rStream.ReadUInt16( nVersion ).ReadUInt16( nHStart ).ReadUInt16( nHEnd );
sal_uInt16 nCount = nHEnd - nHStart + 1;
// Is new version is known?
@@ -596,7 +596,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
sal_uInt16 *pMap = new sal_uInt16[nCount];
memset(pMap, 0, nCount * sizeof(sal_uInt16));
for ( sal_uInt16 n = 0; n < nCount; ++n )
- rStream >> pMap[n];
+ rStream.ReadUInt16( pMap[n] );
SetVersionMap( nVersion, nHStart, nHEnd, pMap );
}
}
@@ -614,7 +614,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
sal_uInt32 nCount(0);
sal_uInt16 nVersion(0), nWhich(0);
//!sal_uInt16 nSlotId = aWhichIdsRec.GetContentTag();
- rStream >> nWhich;
+ rStream.ReadUInt16( nWhich );
if ( pImp->nLoadingVersion != pImp->nVersion )
// Which-Id aus File-Version in Pool-Version verschieben
nWhich = GetNewWhich( nWhich );
@@ -623,8 +623,8 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( !IsInRange(nWhich) )
continue;
- rStream >> nVersion;
- rStream >> nCount;
+ rStream.ReadUInt16( nVersion );
+ rStream.ReadUInt32( nCount );
//!SFX_ASSERTWARNING( !nSlotId || !HasMap() ||
//! ( nSlotId == GetSlotId( nWhich, sal_False ) ) ||
//! !GetSlotId( nWhich, sal_False ),
@@ -667,7 +667,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// SlotId, Which-Id und Item-Version besorgen
sal_uInt16 nVersion(0), nWhich(0);
//!sal_uInt16 nSlotId = aDefsRec.GetContentTag();
- rStream >> nWhich;
+ rStream.ReadUInt16( nWhich );
if ( pImp->nLoadingVersion != pImp->nVersion )
// Which-Id aus File-Version in Pool-Version verschieben
nWhich = GetNewWhich( nWhich );
@@ -676,7 +676,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( !IsInRange(nWhich) )
continue;
- rStream >> nVersion;
+ rStream.ReadUInt16( nVersion );
//!SFX_ASSERTWARNING( !HasMap() || ( nSlotId == GetSlotId( nWhich, sal_False ) ),
//! nWhich, "Slot/Which mismatch" );
@@ -726,12 +726,12 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
{
// Header des Secondary lesen
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_STARTPOOL_4 );
- rStream >> pImp->nMajorVer >> pImp->nMinorVer;
+ rStream.ReadUChar( pImp->nMajorVer ).ReadUChar( pImp->nMinorVer );
}
sal_uInt32 nAttribSize(0);
OUString aExternName;
if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 2 )
- rStream >> pImp->nLoadingVersion;
+ rStream.ReadUInt16( pImp->nLoadingVersion );
aExternName = SfxPoolItem::readByteString(rStream);
bool bOwnPool = aExternName == pImp->aName;
pImp->bStreaming = true;
@@ -754,14 +754,14 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
}
// Size-Table liegt hinter den eigentlichen Attributen
- rStream >> nAttribSize;
+ rStream.ReadUInt32( nAttribSize );
// Size-Table einlesen
sal_uLong nStartPos = rStream.Tell();
rStream.SeekRel( nAttribSize );
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_SIZES );
sal_uInt32 nSizeTableLen(0);
- rStream >> nSizeTableLen;
+ rStream.ReadUInt32( nSizeTableLen );
sal_Char *pBuf = new sal_Char[nSizeTableLen];
rStream.Read( pBuf, nSizeTableLen );
sal_uLong nEndOfSizes = rStream.Tell();
@@ -773,18 +773,18 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Version-Map finden (letztes sal_uLong der Size-Table gibt Pos an)
rStream.Seek( nEndOfSizes - sizeof(sal_uInt32) );
sal_uInt32 nVersionMapPos(0);
- rStream >> nVersionMapPos;
+ rStream.ReadUInt32( nVersionMapPos );
rStream.Seek( nVersionMapPos );
// Versions-Maps einlesen
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_VERSIONMAP );
sal_uInt16 nVerCount(0);
- rStream >> nVerCount;
+ rStream.ReadUInt16( nVerCount );
for ( sal_uInt16 nVerNo = 0; nVerNo < nVerCount; ++nVerNo )
{
// Header f"ur einzelne Version einlesen
sal_uInt16 nVersion(0), nHStart(0), nHEnd(0);
- rStream >> nVersion >> nHStart >> nHEnd;
+ rStream.ReadUInt16( nVersion ).ReadUInt16( nHStart ).ReadUInt16( nHEnd );
sal_uInt16 nCount = nHEnd - nHStart + 1;
sal_uInt16 nBytes = (nCount)*sizeof(sal_uInt16);
@@ -795,7 +795,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
sal_uInt16 *pMap = new sal_uInt16[nCount];
memset(pMap, 0, nCount * sizeof(sal_uInt16));
for ( sal_uInt16 n = 0; n < nCount; ++n )
- rStream >> pMap[n];
+ rStream.ReadUInt16( pMap[n] );
SetVersionMap( nVersion, nHStart, nHEnd, pMap );
}
else
@@ -810,17 +810,17 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
bool bSecondaryLoaded = false;
long nSecondaryEnd = 0;
sal_uInt16 nWhich(0), nSlot(0);
- while ( rStream >> nWhich, nWhich )
+ while ( rStream.ReadUInt16( nWhich ), nWhich )
{
// ggf. Which-Id aus alter Version verschieben?
if ( pImp->nLoadingVersion != pImp->nVersion )
nWhich = GetNewWhich( nWhich );
- rStream >> nSlot;
+ rStream.ReadUInt16( nSlot );
sal_uInt16 nRef(0), nCount(0), nVersion(0);
sal_uInt32 nAttrSize(0);
- rStream >> nVersion >> nCount;
+ rStream.ReadUInt16( nVersion ).ReadUInt16( nCount );
//!SFX_ASSERTWARNING( !nSlot || !HasMap() ||
//! ( nSlot == GetSlotId( nWhich, sal_False ) ) ||
@@ -857,7 +857,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
for ( sal_uInt16 j = 0; j < nCount; ++j )
{
sal_uLong nPos = nLastPos;
- rStream >> nRef;
+ rStream.ReadUInt16( nRef );
SfxPoolItem *pItem = 0;
if ( nRef )
@@ -881,7 +881,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// restliche gespeicherte Laenge skippen (neueres Format)
nLastPos = rStream.Tell();
- aSizeTable >> nAttrSize;
+ aSizeTable.ReadUInt32( nAttrSize );
SFX_ASSERT( ( nPos + nAttrSize) >= nLastPos,
nPos,
"too many bytes read - version mismatch?" );
@@ -941,18 +941,18 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_DEFAULTS );
sal_uLong nLastPos = rStream.Tell();
- while ( rStream >> nWhich, nWhich )
+ while ( rStream.ReadUInt16( nWhich ), nWhich )
{
// ggf. Which-Id aus alter Version verschieben?
if ( pImp->nLoadingVersion != pImp->nVersion )
nWhich = GetNewWhich( nWhich );
- rStream >> nSlot;
+ rStream.ReadUInt16( nSlot );
sal_uLong nPos = nLastPos;
sal_uInt32 nSize(0);
sal_uInt16 nVersion(0);
- rStream >> nVersion;
+ rStream.ReadUInt16( nVersion );
SfxPoolItem *pItem =
( *( pImp->ppStaticDefaults + GetIndex_Impl(nWhich) ) )
@@ -961,7 +961,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
*( pImp->ppPoolDefaults + GetIndex_Impl(nWhich) ) = pItem;
nLastPos = rStream.Tell();
- aSizeTable >> nSize;
+ aSizeTable.ReadUInt32( nSize );
SFX_ASSERT( ( nPos + nSize) >= nLastPos, nPos,
"too many bytes read - version mismatch?" );
if ( nLastPos < (nPos + nSize) )
@@ -1037,7 +1037,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
{
// Read the first surrogate
sal_uInt32 nSurrogat(0);
- rStream >> nSurrogat;
+ rStream.ReadUInt32( nSurrogat );
// Is item stored directly?
if ( SFX_ITEMS_DIRECT == nSurrogat )
@@ -1509,7 +1509,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
{
sal_uInt16 nWhich(0), nSlot(0); // nSurrogate;
- rStream >> nWhich >> nSlot;
+ rStream.ReadUInt16( nWhich ).ReadUInt16( nSlot );
bool bDontPut = (SfxItemPool*)-1 == pRefPool;
if ( bDontPut || !pRefPool )
@@ -1525,10 +1525,10 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
// WID in der Version nicht vorhanden => ueberspringen
sal_uInt32 nSurro(0);
sal_uInt16 nVersion(0), nLen(0);
- rStream >> nSurro;
+ rStream.ReadUInt32( nSurro );
if ( SFX_ITEMS_DIRECT == nSurro )
{
- rStream >> nVersion >> nLen;
+ rStream.ReadUInt16( nVersion ).ReadUInt16( nLen );
rStream.SeekRel( nLen );
}
return 0;
@@ -1564,7 +1564,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
// bDirekt bzw. nicht IsPoolable() => Item direkt laden
sal_uInt16 nVersion(0);
sal_uInt32 nLen(0);
- rStream >> nVersion >> nLen;
+ rStream.ReadUInt16( nVersion ).ReadUInt32( nLen );
sal_uLong nIStart = rStream.Tell();
// Which-Id in dieser Version bekannt?
diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx
index 9e3154413045..80ac48a7418e 100644
--- a/svl/source/items/rngitem.cxx
+++ b/svl/source/items/rngitem.cxx
@@ -98,8 +98,8 @@ SfxPoolItem* SfxRangeItem::Clone(SfxItemPool *) const
SfxPoolItem* SfxRangeItem::Create(SvStream &rStream, sal_uInt16) const
{
sal_uInt16 nVon(0), nBis(0);
- rStream >> nVon;
- rStream >> nBis;
+ rStream.ReadUInt16( nVon );
+ rStream.ReadUInt16( nBis );
return new SfxRangeItem( Which(), nVon, nBis );
}
@@ -123,10 +123,10 @@ SfxUShortRangesItem::SfxUShortRangesItem( sal_uInt16 nWID, SvStream &rStream )
: SfxPoolItem( nWID )
{
sal_uInt16 nCount(0);
- rStream >> nCount;
+ rStream.ReadUInt16( nCount );
_pRanges = new sal_uInt16[nCount + 1];
for ( sal_uInt16 n = 0; n < nCount; ++n )
- rStream >> _pRanges[n];
+ rStream.ReadUInt16( _pRanges[n] );
_pRanges[nCount] = 0;
}
@@ -189,9 +189,9 @@ SfxPoolItem* SfxUShortRangesItem::Create( SvStream &rStream, sal_uInt16 ) const
SvStream& SfxUShortRangesItem::Store( SvStream &rStream, sal_uInt16 ) const
{
sal_uInt16 nCount = Count_Impl( _pRanges );
- rStream >> nCount;
+ rStream.ReadUInt16( nCount );
for ( sal_uInt16 n = 0; _pRanges[n]; ++n )
- rStream >> _pRanges[n];
+ rStream.ReadUInt16( _pRanges[n] );
return rStream;
}
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 01a8768ce241..751ff5c812a0 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -79,7 +79,7 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, SvStream& rStream ) :
{
//fdo#39428 SvStream no longer supports operator>>(long&)
sal_Int32 nEntryCount;
- rStream >> nEntryCount;
+ rStream.ReadInt32( nEntryCount );
if( nEntryCount )
pImp = new SfxImpStringList;
diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx
index 4bf43b3bb9e2..9bceaf6559d1 100644
--- a/svl/source/items/visitem.cxx
+++ b/svl/source/items/visitem.cxx
@@ -34,7 +34,7 @@ SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream):
{
DBG_CTOR(SfxVisibilityItem, 0);
sal_Bool bValue = 0;
- rStream >> bValue;
+ rStream.ReadUChar( bValue );
m_nValue.bVisible = bValue;
}
diff --git a/svl/source/numbers/numhead.cxx b/svl/source/numbers/numhead.cxx
index d14b17427e70..37d481ee7c8a 100644
--- a/svl/source/numbers/numhead.cxx
+++ b/svl/source/numbers/numhead.cxx
@@ -31,19 +31,19 @@ ImpSvNumMultipleReadHeader::ImpSvNumMultipleReadHeader(SvStream& rNewStream) :
rStream( rNewStream )
{
sal_uInt32 nDataSize;
- rStream >> nDataSize;
+ rStream.ReadUInt32( nDataSize );
sal_uLong nDataPos = rStream.Tell();
nEntryEnd = nDataPos;
rStream.SeekRel(nDataSize);
sal_uInt16 nID;
- rStream >> nID;
+ rStream.ReadUInt16( nID );
if (nID != SV_NUMID_SIZES)
{
OSL_FAIL("SV_NUMID_SIZES not found");
}
sal_uInt32 nSizeTableLen;
- rStream >> nSizeTableLen;
+ rStream.ReadUInt32( nSizeTableLen );
pBuf = new char[nSizeTableLen];
rStream.Read( pBuf, nSizeTableLen );
pMemStream = new SvMemoryStream( pBuf, nSizeTableLen, STREAM_READ );
@@ -80,7 +80,7 @@ void ImpSvNumMultipleReadHeader::StartEntry()
{
sal_uLong nPos = rStream.Tell();
sal_uInt32 nEntrySize;
- (*pMemStream) >> nEntrySize;
+ (*pMemStream).ReadUInt32( nEntrySize );
nEntryEnd = nPos + nEntrySize;
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index e24ac9c75888..4490b9f93865 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -689,11 +689,11 @@ bool SvNumberFormatter::Load( SvStream& rStream )
ImpSvNumMultipleReadHeader aHdr( rStream );
sal_uInt16 nVersion;
- rStream >> nVersion;
+ rStream.ReadUInt16( nVersion );
SvNumberformat* pEntry;
sal_uInt32 nPos;
sal_uInt16 nSysOnStore, eLge, eDummy; // Dummy for compatible format
- rStream >> nSysOnStore >> eLge; // system language from document
+ rStream.ReadUInt16( nSysOnStore ).ReadUInt16( eLge ); // system language from document
SAL_WARN_IF( nVersion < SV_NUMBERFORMATTER_VERSION_CALENDAR, "svl.numbers", "SvNumberFormatter::Load: where does this unsupported old data come from?!?");
@@ -701,10 +701,10 @@ bool SvNumberFormatter::Load( SvStream& rStream )
LanguageType eLnge = (LanguageType) eLge;
ImpChangeSysCL( eLnge, true );
- rStream >> nPos;
+ rStream.ReadUInt32( nPos );
while (nPos != NUMBERFORMAT_ENTRY_NOT_FOUND)
{
- rStream >> eDummy >> eLge;
+ rStream.ReadUInt16( eDummy ).ReadUInt16( eLge );
eLnge = (LanguageType) eLge;
ImpGenerateCL( eLnge, true ); // create new standard formats if necessary
@@ -743,7 +743,7 @@ bool SvNumberFormatter::Load( SvStream& rStream )
SAL_WARN( "svl.numbers", "SvNumberFormatter::Load: dup position");
delete pEntry;
}
- rStream >> nPos;
+ rStream.ReadUInt32( nPos );
}
// as of SV_NUMBERFORMATTER_VERSION_YEAR2000
@@ -753,7 +753,7 @@ bool SvNumberFormatter::Load( SvStream& rStream )
if ( aHdr.BytesLeft() >= sizeof(sal_uInt16) )
{
sal_uInt16 nY2k;
- rStream >> nY2k;
+ rStream.ReadUInt16( nY2k );
if ( nVersion < SV_NUMBERFORMATTER_VERSION_TWODIGITYEAR && nY2k < 100 )
{
nY2k += 1901; // was before src513e: 29, now: 1930
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index d6cca2fee76d..21e88751e2b7 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -182,11 +182,11 @@ void ImpSvNumberformatInfo::Load(SvStream& rStream, sal_uInt16 nAnz)
for (sal_uInt16 i = 0; i < nAnz; ++i)
{
sStrArray[i] = SvNumberformat::LoadString( rStream );
- rStream >> nTypeArray[i];
+ rStream.ReadInt16( nTypeArray[i] );
}
sal_Bool bStreamThousand;
- rStream >> eScannedType >> bStreamThousand >> nThousand
- >> nCntPre >> nCntPost >> nCntExp;
+ rStream.ReadInt16( eScannedType ).ReadUChar( bStreamThousand ).ReadUInt16( nThousand )
+ .ReadUInt16( nCntPre ).ReadUInt16( nCntPost ).ReadUInt16( nCntExp );
bThousand = bStreamThousand;
}
@@ -452,7 +452,7 @@ void ImpSvNumFor::Load(SvStream& rStream, ImpSvNumberformatScan& rSc,
OUString& rLoadedColorName )
{
sal_uInt16 nAnz;
- rStream >> nAnz; //! Not nAnzStrings right away due to Enlarge
+ rStream.ReadUInt16( nAnz ); //! Not nAnzStrings right away due to Enlarge
Enlarge( nAnz );
aI.Load( rStream, nAnz );
sColorName = rStream.ReadUniOrByteString( rStream.GetStreamCharSet() );
@@ -527,12 +527,12 @@ void ImpSvNumFor::SaveNewCurrencyMap( SvStream& rStream ) const
void ImpSvNumFor::LoadNewCurrencyMap( SvStream& rStream )
{
sal_uInt16 nCnt;
- rStream >> nCnt;
+ rStream.ReadUInt16( nCnt );
for ( sal_uInt16 j=0; j<nCnt; j++ )
{
sal_uInt16 nPos;
short nType;
- rStream >> nPos >> nType;
+ rStream.ReadUInt16( nPos ).ReadInt16( nType );
if ( nPos < nAnzStrings )
{
aI.nTypeArray[nPos] = nType;
@@ -1703,8 +1703,8 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
sal_uInt16 nOp1, nOp2;
sFormatstring = SvNumberformat::LoadString( rStream );
sal_Bool bStreamStandard, bStreamUsed;
- rStream >> eType >> fLimit1 >> fLimit2
- >> nOp1 >> nOp2 >> bStreamStandard >> bStreamUsed;
+ rStream.ReadInt16( eType ).ReadDouble( fLimit1 ).ReadDouble( fLimit2 )
+ .ReadUInt16( nOp1 ).ReadUInt16( nOp2 ).ReadUChar( bStreamStandard ).ReadUChar( bStreamUsed );
bStandard = bStreamStandard;
bIsUsed = bStreamUsed;
NfHackConversion eHackConversion = NF_CONVERT_NONE;
@@ -1764,7 +1764,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
{
// As of SV_NUMBERFORMATTER_VERSION_NEWSTANDARD
aComment = SvNumberformat::LoadString( rStream );
- rStream >> nNewStandardDefined;
+ rStream.ReadUInt16( nNewStandardDefined );
}
sal_Int32 nNewCurrencyEnd = -1;
@@ -1779,12 +1779,12 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
// as of SV_NUMBERFORMATTER_VERSION_NEW_CURR
sal_uInt16 nId;
sal_Bool bStreamCurr;
- rStream >> nId;
+ rStream.ReadUInt16( nId );
switch ( nId )
{
case nNewCurrencyVersionId :
bNewCurrencyLoaded = true;
- rStream >> bStreamCurr;
+ rStream.ReadUChar( bStreamCurr );
bNewCurrency = bStreamCurr;
if ( bNewCurrency )
{
@@ -1795,7 +1795,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
}
break;
case nNewStandardFlagVersionId :
- rStream >> bStreamStandard; // the real standard flag
+ rStream.ReadUChar( bStreamStandard ); // the real standard flag
bStandard = bStreamStandard;
break;
default:
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index 95b92d782968..a98e534bf9cc 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -79,16 +79,16 @@ SvStream& ReadGraphicAttr( SvStream& rIStm, GraphicAttr& rAttr )
sal_uInt32 nTmp32;
sal_uInt16 nTmp16;
- rIStm >> nTmp32 >> nTmp32 >> rAttr.mfGamma >> rAttr.mnMirrFlags >> rAttr.mnRotate10;
- rIStm >> rAttr.mnContPercent >> rAttr.mnLumPercent >> rAttr.mnRPercent >> rAttr.mnGPercent >> rAttr.mnBPercent;
- rIStm >> rAttr.mbInvert >> rAttr.mcTransparency >> nTmp16;
+ rIStm.ReadUInt32( nTmp32 ).ReadUInt32( nTmp32 ).ReadDouble( rAttr.mfGamma ).ReadUInt32( rAttr.mnMirrFlags ).ReadUInt16( rAttr.mnRotate10 );
+ rIStm.ReadInt16( rAttr.mnContPercent ).ReadInt16( rAttr.mnLumPercent ).ReadInt16( rAttr.mnRPercent ).ReadInt16( rAttr.mnGPercent ).ReadInt16( rAttr.mnBPercent );
+ rIStm.ReadUChar( rAttr.mbInvert ).ReadUChar( rAttr.mcTransparency ).ReadUInt16( nTmp16 );
rAttr.meDrawMode = (GraphicDrawMode) nTmp16;
if( aCompat.GetVersion() >= 2 )
{
//#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0);
- rIStm >> nTmpL >> nTmpT >> nTmpR >> nTmpB;
+ rIStm.ReadInt32( nTmpL ).ReadInt32( nTmpT ).ReadInt32( nTmpR ).ReadInt32( nTmpB );
rAttr.mnLeftCrop = nTmpL;
rAttr.mnTopCrop = nTmpT;
rAttr.mnRightCrop = nTmpR;
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index ae5a73400729..16ca08ce81ff 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -1153,7 +1153,7 @@ SvStream& ReadGraphicObject( SvStream& rIStm, GraphicObject& rGraphicObj )
ReadGraphic( rIStm, aGraphic );
ReadGraphicAttr( rIStm, aAttr );
- rIStm >> bLink;
+ rIStm.ReadUChar( bLink );
rGraphicObj.SetGraphic( aGraphic );
rGraphicObj.SetAttr( aAttr );
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index b989171e5e04..c2c18fc7d68e 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -116,11 +116,11 @@ void IMapObject::Read( SvStream& rIStm, const OUString& rBaseURL )
// read on type and version
rIStm.SeekRel( 2 );
- rIStm >> nReadVersion;
- rIStm >> nTextEncoding;
+ rIStm.ReadUInt16( nReadVersion );
+ rIStm.ReadUInt16( nTextEncoding );
aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
aAltText = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
- rIStm >> bActive;
+ rIStm.ReadUChar( bActive );
aTarget = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
// make URL absolute
@@ -308,7 +308,7 @@ void IMapCircleObject::ReadIMapObject( SvStream& rIStm )
sal_uInt32 nTmp;
ReadPair( rIStm, aCenter );
- rIStm >> nTmp;
+ rIStm.ReadUInt32( nTmp );
nRadius = nTmp;
}
@@ -450,7 +450,7 @@ void IMapPolygonObject::ReadIMapObject( SvStream& rIStm )
// Version >= 2 has additional ellipses information
if ( nReadVersion >= 2 )
{
- rIStm >> bEllipse;
+ rIStm.ReadUChar( bEllipse );
ReadRectangle( rIStm, aEllipse );
}
}
@@ -894,7 +894,7 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount, const OUString&
{
sal_uInt16 nType;
- rIStm >> nType;
+ rIStm.ReadUInt16( nType );
rIStm.SeekRel( -2 );
switch( nType )
@@ -993,7 +993,7 @@ void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL )
aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, osl_getThreadTextEncoding());
read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Dummy
- rIStm >> nCount;
+ rIStm.ReadUInt16( nCount );
read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Dummy
pCompat = new IMapCompat( rIStm, STREAM_READ );
diff --git a/svtools/source/misc/imap3.cxx b/svtools/source/misc/imap3.cxx
index aecafea392fa..cc7f745f3f4d 100644
--- a/svtools/source/misc/imap3.cxx
+++ b/svtools/source/misc/imap3.cxx
@@ -45,7 +45,7 @@ IMapCompat::IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode ) :
else
{
sal_uInt32 nTotalSizeTmp;
- *pRWStm >> nTotalSizeTmp;
+ pRWStm->ReadUInt32( nTotalSizeTmp );
nTotalSize = nTotalSizeTmp;
nCompatPos = pRWStm->Tell();
}
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 231e41cc653e..6a49d9dbbad7 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -75,15 +75,15 @@ namespace svt
SvStream& operator >> ( SvStream& _rStorage, util::DateTime& _rDate )
{
sal_uInt16 hundredthSeconds;
- _rStorage >> hundredthSeconds;
+ _rStorage.ReadUInt16( hundredthSeconds );
_rDate.NanoSeconds = static_cast< sal_uInt32 >( hundredthSeconds ) * Time::nanoPerCenti;
- _rStorage >> _rDate.Seconds;
- _rStorage >> _rDate.Minutes;
- _rStorage >> _rDate.Hours;
- _rStorage >> _rDate.Day;
- _rStorage >> _rDate.Month;
- _rStorage >> _rDate.Year;
+ _rStorage.ReadUInt16( _rDate.Seconds );
+ _rStorage.ReadUInt16( _rDate.Minutes );
+ _rStorage.ReadUInt16( _rDate.Hours );
+ _rStorage.ReadUInt16( _rDate.Day );
+ _rStorage.ReadUInt16( _rDate.Month );
+ _rStorage.ReadInt16( _rDate.Year );
return _rStorage;
}
@@ -407,7 +407,7 @@ namespace svt
// store the info about the children
// the number
sal_Int32 nChildren = 0;
- m_rStorage >> nChildren;
+ m_rStorage.ReadInt32( nChildren );
TemplateFolderContent& rChildren = _rContent.getSubContents();
rChildren.resize( 0 );
rChildren.reserve( nChildren );
@@ -729,7 +729,7 @@ namespace svt
// check the magic number
sal_Int32 nMagic = 0;
- *m_pCacheStream >> nMagic;
+ m_pCacheStream->ReadInt32( nMagic );
DBG_ASSERT( getMagicNumber() == nMagic, "TemplateFolderCacheImpl::readPreviousState: invalid cache file!" );
if ( getMagicNumber() != nMagic )
return sal_False;
@@ -737,7 +737,7 @@ namespace svt
// the root directories
// their number
sal_Int32 nRootDirectories = 0;
- *m_pCacheStream >> nRootDirectories;
+ m_pCacheStream->ReadInt32( nRootDirectories );
// init empty TemplateContens with the URLs
m_aPreviousState.reserve( nRootDirectories );
while ( nRootDirectories-- )
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index e587d7d1ee59..2d56c4a37df3 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -84,21 +84,21 @@ SvStream& operator>>( SvStream& rIStm, TransferableObjectDescriptor& rObjDesc )
//#fdo39428 Remove SvStream operator>>(long&)
sal_Int32 nTmp(0);
- rIStm >> nSize;
+ rIStm.ReadUInt32( nSize );
rIStm >> rObjDesc.maClassName;
- rIStm >> nViewAspect;
- rIStm >> nTmp;
+ rIStm.ReadUInt32( nViewAspect );
+ rIStm.ReadInt32( nTmp );
rObjDesc.maSize.Width() = nTmp;
- rIStm >> nTmp;
+ rIStm.ReadInt32( nTmp );
rObjDesc.maSize.Height() = nTmp;
- rIStm >> nTmp;
+ rIStm.ReadInt32( nTmp );
rObjDesc.maDragStartPos.X() = nTmp;
- rIStm >> nTmp;
+ rIStm.ReadInt32( nTmp );
rObjDesc.maDragStartPos.Y() = nTmp;
rObjDesc.maTypeName = rIStm.ReadUniOrByteString(osl_getThreadTextEncoding());
rObjDesc.maDisplayName = rIStm.ReadUniOrByteString(osl_getThreadTextEncoding());
- rIStm >> nSig1 >> nSig2;
+ rIStm.ReadUInt32( nSig1 ).ReadUInt32( nSig2 );
rObjDesc.mnViewAspect = static_cast< sal_uInt16 >( nViewAspect );
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 4f8a94cb014d..62ddfeba6c68 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -542,7 +542,7 @@ SvParserState SvRTFParser::CallParser()
{
sal_Char cFirstCh;
nNextChPos = rInput.Tell();
- rInput >> cFirstCh; nNextCh = cFirstCh;
+ rInput.ReadChar( cFirstCh ); nNextCh = cFirstCh;
eState = SVPAR_WORKING;
nOpenBrakets = 0;
SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 );
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index 5365a564f6d0..1286851169eb 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -148,13 +148,13 @@ sal_Unicode SvParser::GetNextChar()
unsigned char c1, c2;
sal_Bool bSeekBack = sal_True;
- rInput >> c1;
+ rInput.ReadUChar( c1 );
bErr = rInput.IsEof() || rInput.GetError();
if( !bErr )
{
if( 0xff == c1 || 0xfe == c1 )
{
- rInput >> c2;
+ rInput.ReadUChar( c2 );
bErr = rInput.IsEof() || rInput.GetError();
if( !bErr )
{
@@ -186,12 +186,12 @@ sal_Unicode SvParser::GetNextChar()
sal_Unicode cUC = USHRT_MAX;
unsigned char c1, c2;
- rInput >> c1 >> c2;
+ rInput.ReadUChar( c1 ).ReadUChar( c2 );
if( 2 == rInput.Tell() &&
!(rInput.IsEof() || rInput.GetError()) &&
( (bUCS2BSrcEnc && 0xfe == c1 && 0xff == c2) ||
(!bUCS2BSrcEnc && 0xff == c1 && 0xfe == c2) ) )
- rInput >> c1 >> c2;
+ rInput.ReadUChar( c1 ).ReadUChar( c2 );
bErr = rInput.IsEof() || rInput.GetError();
if( !bErr )
@@ -213,7 +213,7 @@ sal_Unicode SvParser::GetNextChar()
do
{
sal_Char c1; // signed, that's the text converter expects
- rInput >> c1;
+ rInput.ReadChar( c1 );
bErr = rInput.IsEof() || rInput.GetError();
if( !bErr )
{
@@ -249,7 +249,7 @@ sal_Unicode SvParser::GetNextChar()
{
while( (nInfo&RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) != 0 )
{
- rInput >> c1;
+ rInput.ReadChar( c1 );
bErr = rInput.IsEof() || rInput.GetError();
if( bErr )
break;
@@ -291,7 +291,7 @@ sal_Unicode SvParser::GetNextChar()
while( (nInfo&RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) != 0 &&
nLen < 10 )
{
- rInput >> c1;
+ rInput.ReadChar( c1 );
bErr = rInput.IsEof() || rInput.GetError();
if( bErr )
break;
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
index 98999c42a779..c4dc4beb81d3 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -101,12 +101,12 @@ sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
nFilePos = rIStm.Tell();
// skip over iSize (int), bIsMao ( sal_Bool ) alignment of 4 !!!!
rIStm.SeekRel( 8 );
- rIStm >> nVal; aSizePixel.Width() = nVal;
- rIStm >> nVal; aSizePixel.Height() = nVal;
+ rIStm.ReadInt32( nVal ); aSizePixel.Width() = nVal;
+ rIStm.ReadInt32( nVal ); aSizePixel.Height() = nVal;
// skip over iHSpace, iVSpace, iBorder, iLowResOffset
rIStm.SeekRel( 3 * sizeof( sal_Int32 ) + sizeof( int ) );
- rIStm >> nAltOffset;
- rIStm >> nAnchorOffset;
+ rIStm.ReadInt32( nAltOffset );
+ rIStm.ReadInt32( nAnchorOffset );
// skip over iExtraHTML_Offset
rIStm.SeekRel( sizeof( int ) );
diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx
index 92b0975da1bb..7d58d18142af 100644
--- a/svx/source/gallery2/codec.cxx
+++ b/svx/source/gallery2/codec.cxx
@@ -44,7 +44,7 @@ sal_Bool GalleryCodec::IsCoded( SvStream& rStm, sal_uInt32& rVersion )
sal_Bool bRet;
sal_uInt8 cByte1, cByte2, cByte3, cByte4, cByte5, cByte6;
- rStm >> cByte1 >> cByte2 >> cByte3 >> cByte4 >> cByte5 >> cByte6;
+ rStm.ReadUChar( cByte1 ).ReadUChar( cByte2 ).ReadUChar( cByte3 ).ReadUChar( cByte4 ).ReadUChar( cByte5 ).ReadUChar( cByte6 );
if ( cByte1 == 'S' && cByte2 == 'V' && cByte3 == 'R' && cByte4 == 'L' && cByte5 == 'E' && ( cByte6 == '1' || cByte6 == '2' ) )
{
@@ -96,7 +96,7 @@ void GalleryCodec::Read( SvStream& rStmToRead )
sal_uInt32 nCompressedSize, nUnCompressedSize;
rStm.SeekRel( 6 );
- rStm >> nUnCompressedSize >> nCompressedSize;
+ rStm.ReadUInt32( nUnCompressedSize ).ReadUInt32( nCompressedSize );
// decompress
if( 1 == nVersion )
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 17f5da756217..0175162dc874 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -200,7 +200,7 @@ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion )
sal_uInt32 nTmp32;
sal_uInt16 nTmp16;
- rIn >> nTmp32 >> nTmp16 >> rReadVersion >> nTmp16 >> bIsThumbBmp;
+ rIn.ReadUInt32( nTmp32 ).ReadUInt16( nTmp16 ).ReadUInt16( rReadVersion ).ReadUInt16( nTmp16 ).ReadUChar( bIsThumbBmp );
if( bIsThumbBmp )
{
@@ -382,7 +382,7 @@ void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
{
sal_uInt16 nTmp16;
- rIn >> nTmp16; eSoundType = (GalSoundType) nTmp16;
+ rIn.ReadUInt16( nTmp16 ); eSoundType = (GalSoundType) nTmp16;
if( rReadVersion >= 6 )
aTitle = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index c1b43842fa33..0549d7f5cd91 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -154,7 +154,7 @@ SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry )
// Check to ensure that the file is a valid SGA file
pIStm->Seek( pEntry->nOffset );
- *pIStm >> nInventor;
+ pIStm->ReadUInt32( nInventor );
if( nInventor == COMPAT_FORMAT( 'S', 'G', 'A', '3' ) )
{
@@ -255,7 +255,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, sal_uIntPt
if( pIStm )
{
- *pIStm >> nNextNumber;
+ pIStm->ReadUInt32( nNextNumber );
delete pIStm;
}
}
@@ -700,7 +700,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
sal_uInt16 nVersion;
sal_Bool bThemeNameFromResource = sal_False;
- *pIStm >> nVersion;
+ pIStm->ReadUInt16( nVersion );
if( nVersion <= 0x00ff )
{
@@ -715,7 +715,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
sal_uInt32 nCount;
sal_uInt16 nTemp16;
- *pIStm >> nCount >> nTemp16;
+ pIStm->ReadUInt32( nCount ).ReadUInt16( nTemp16 );
pIStm->Seek( STREAM_SEEK_TO_END );
// check whether there is a newer version;
@@ -726,18 +726,18 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
sal_uInt32 nId1, nId2;
pIStm->SeekRel( -520 );
- *pIStm >> nId1 >> nId2;
+ pIStm->ReadUInt32( nId1 ).ReadUInt32( nId2 );
if( nId1 == COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) &&
nId2 == COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) )
{
VersionCompat* pCompat = new VersionCompat( *pIStm, STREAM_READ );
- *pIStm >> nThemeId;
+ pIStm->ReadUInt32( nThemeId );
if( pCompat->GetVersion() >= 2 )
{
- *pIStm >> bThemeNameFromResource;
+ pIStm->ReadUChar( bThemeNameFromResource );
}
delete pCompat;
@@ -1383,14 +1383,14 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
OUString aThemeName;
rtl_TextEncoding nTextEncoding;
- rIStm >> nVersion;
+ rIStm.ReadUInt16( nVersion );
OString aTmpStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
- rIStm >> nCount;
+ rIStm.ReadUInt32( nCount );
if( nVersion >= 0x0004 )
{
sal_uInt16 nTmp16;
- rIStm >> nTmp16;
+ rIStm.ReadUInt16( nTmp16 );
nTextEncoding = (rtl_TextEncoding) nTmp16;
}
else
@@ -1423,10 +1423,10 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
OUString aPath;
sal_uInt16 nTemp;
- rIStm >> bRel;
+ rIStm.ReadUChar( bRel );
OString aTempFileName = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
- rIStm >> pObj->nOffset;
- rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp;
+ rIStm.ReadUInt32( pObj->nOffset );
+ rIStm.ReadUInt16( nTemp ); pObj->eObjKind = (SgaObjKind) nTemp;
aFileName = OStringToOUString(aTempFileName, osl_getThreadTextEncoding());
@@ -1480,7 +1480,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
aObjectList.push_back( pObj );
}
- rIStm >> nId1 >> nId2;
+ rIStm.ReadUInt32( nId1 ).ReadUInt32( nId2 );
// In newer versions a 512 byte reserve buffer is located at the end,
// the data is located at the beginning of this buffer and are clamped
@@ -1493,11 +1493,11 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
sal_uInt32 nTemp32;
sal_Bool bThemeNameFromResource = sal_False;
- rIStm >> nTemp32;
+ rIStm.ReadUInt32( nTemp32 );
if( pCompat->GetVersion() >= 2 )
{
- rIStm >> bThemeNameFromResource;
+ rIStm.ReadUChar( bThemeNameFromResource );
}
SetId( nTemp32, bThemeNameFromResource );
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index 85331e6b10c5..2ec403520c37 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -148,7 +148,7 @@ SfxPoolItem* SvxOrientationItem::Clone( SfxItemPool* ) const
SfxPoolItem* SvxOrientationItem::Create( SvStream& rStream, sal_uInt16 ) const
{
sal_uInt16 nVal;
- rStream >> nVal;
+ rStream.ReadUInt16( nVal );
return new SvxOrientationItem( (SvxCellOrientation)nVal, Which() );
}
@@ -313,10 +313,10 @@ SfxPoolItem* SvxMarginItem::Create( SvStream& rStream, sal_uInt16 ) const
sal_Int16 nTop;
sal_Int16 nRight;
sal_Int16 nBottom;
- rStream >> nLeft;
- rStream >> nTop;
- rStream >> nRight;
- rStream >> nBottom;
+ rStream.ReadInt16( nLeft );
+ rStream.ReadInt16( nTop );
+ rStream.ReadInt16( nRight );
+ rStream.ReadInt16( nBottom );
return new SvxMarginItem( nLeft, nTop, nRight, nBottom, Which() );
}
diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx
index 6398e4baecb2..02bff07b4dd5 100644
--- a/svx/source/items/chrtitem.cxx
+++ b/svx/source/items/chrtitem.cxx
@@ -281,7 +281,7 @@ SfxPoolItem* SvxDoubleItem::Clone(SfxItemPool* /*pPool*/) const
SfxPoolItem* SvxDoubleItem::Create(SvStream& rIn, sal_uInt16 /*nVersion*/) const
{
double _fVal;
- rIn >> _fVal;
+ rIn.ReadDouble( _fVal );
return new SvxDoubleItem(_fVal, Which());
}
diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx
index 2a3a14051cec..765d5651b720 100644
--- a/svx/source/items/e3ditem.cxx
+++ b/svx/source/items/e3ditem.cxx
@@ -88,9 +88,9 @@ SfxPoolItem* SvxB3DVectorItem::Create(SvStream &rStream, sal_uInt16 /*nVersion*/
DBG_CHKTHIS(SvxB3DVectorItem, 0);
basegfx::B3DVector aStr;
double fValue;
- rStream >> fValue; aStr.setX(fValue);
- rStream >> fValue; aStr.setY(fValue);
- rStream >> fValue; aStr.setZ(fValue);
+ rStream.ReadDouble( fValue ); aStr.setX(fValue);
+ rStream.ReadDouble( fValue ); aStr.setY(fValue);
+ rStream.ReadDouble( fValue ); aStr.setZ(fValue);
return new SvxB3DVectorItem(Which(), aStr);
}
diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx
index b83cab7c95de..be3181097ba9 100644
--- a/svx/source/items/grfitem.cxx
+++ b/svx/source/items/grfitem.cxx
@@ -59,7 +59,7 @@ bool SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const
SfxPoolItem* SvxGrfCrop::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
{
sal_Int32 top, left, right, bottom;
- rStrm >> top >> left >> right >> bottom;
+ rStrm.ReadInt32( top ).ReadInt32( left ).ReadInt32( right ).ReadInt32( bottom );
if( GRFCROP_VERSION_SWDEFAULT == nVersion )
top = -top, bottom = -bottom, left = -left, right = -right;
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index 367b1141e102..1e06287e33a1 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -131,12 +131,12 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
// UNICODE: rStrm >> pNew->sTarget;
pNew->sTarget = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
- rStrm >> nType;
+ rStrm.ReadUInt32( nType );
pNew->eType = (SvxLinkInsertMode) nType;
sal_uInt32 nPos = rStrm.Tell();
sal_uInt32 nMarker;
- rStrm >> nMarker;
+ rStrm.ReadUInt32( nMarker );
if ( nMarker == HYPERLINKFF_MARKER )
{
// new data
@@ -144,17 +144,17 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
pNew->sIntName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
// macro-events
- rStrm >> pNew->nMacroEvents;
+ rStrm.ReadUInt16( pNew->nMacroEvents );
// macros
sal_uInt16 nCnt;
- rStrm >> nCnt;
+ rStrm.ReadUInt16( nCnt );
while( nCnt-- )
{
sal_uInt16 nCurKey;
OUString aLibName, aMacName;
- rStrm >> nCurKey;
+ rStrm.ReadUInt16( nCurKey );
// UNICODE: rStrm >> aLibName;
aLibName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
@@ -164,13 +164,13 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
pNew->SetMacro( nCurKey, SvxMacro( aMacName, aLibName, STARBASIC ) );
}
- rStrm >> nCnt;
+ rStrm.ReadUInt16( nCnt );
while( nCnt-- )
{
sal_uInt16 nCurKey, nScriptType;
OUString aLibName, aMacName;
- rStrm >> nCurKey;
+ rStrm.ReadUInt16( nCurKey );
// UNICODE: rStrm >> aLibName;
aLibName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
@@ -178,7 +178,7 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
// UNICODE: rStrm >> aMacName;
aMacName = rStrm.ReadUniOrByteString(rStrm.GetStreamCharSet());
- rStrm >> nScriptType;
+ rStrm.ReadUInt16( nScriptType );
pNew->SetMacro( nCurKey, SvxMacro( aMacName, aLibName,
(ScriptType)nScriptType ) );
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 2ace029f5a37..50d6659e7629 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -245,9 +245,9 @@ SfxPoolItem* SvxPageItem::Create( SvStream& rStream, sal_uInt16 ) const
// UNICODE: rStream >> sStr;
OUString sStr = rStream.ReadUniOrByteString( rStream.GetStreamCharSet() );
- rStream >> eType;
- rStream >> bLand;
- rStream >> nUse;
+ rStream.ReadUChar( eType );
+ rStream.ReadUChar( bLand );
+ rStream.ReadUInt16( nUse );
SvxPageItem* pPage = new SvxPageItem( Which() );
pPage->SetDescName( sStr );
diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx
index 95798fef8e8c..27f6e2c59571 100644
--- a/svx/source/items/rotmodit.cxx
+++ b/svx/source/items/rotmodit.cxx
@@ -62,7 +62,7 @@ SvxRotateModeItem::~SvxRotateModeItem()
SfxPoolItem* SvxRotateModeItem::Create( SvStream& rStream, sal_uInt16 ) const
{
sal_uInt16 nVal;
- rStream >> nVal;
+ rStream.ReadUInt16( nVal );
return new SvxRotateModeItem( (SvxRotateMode) nVal,Which() );
}
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index abe4d03c050c..23837d2e3808 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -183,10 +183,10 @@ void NBOTypeMgrBase::ImplLoad(OUString filename)
if( pIStm ) {
sal_uInt32 nVersion = 0;
sal_Int32 nNumIndex = 0;
- *pIStm >> nVersion;
+ pIStm->ReadUInt32( nVersion );
if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) //first version
{
- *pIStm >> nNumIndex;
+ pIStm->ReadInt32( nNumIndex );
sal_uInt16 mLevel = 0x1;
while (nNumIndex>=0 && nNumIndex<DEFAULT_NUM_VALUSET_COUNT) {
SvxNumRule aNum(*pIStm);
@@ -204,7 +204,7 @@ void NBOTypeMgrBase::ImplLoad(OUString filename)
}
}
RelplaceNumRule(aNum,nNumIndex,mLevel);
- *pIStm >> nNumIndex;
+ pIStm->ReadInt32( nNumIndex );
}
}
delete pIStm;
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index d532d0826827..7ddfb3b1132a 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -650,8 +650,8 @@ SdrFractionItem::SdrFractionItem(sal_uInt16 nId, SvStream& rIn):
SfxPoolItem(nId)
{
sal_Int32 nMul,nDiv;
- rIn>>nMul;
- rIn>>nDiv;
+ rIn.ReadInt32( nMul );
+ rIn.ReadInt32( nDiv );
nValue=Fraction(nMul,nDiv);
}
@@ -1396,7 +1396,7 @@ SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( SvStream & rStream, sal_
if ( nVersion )
{
sal_Bool bValue;
- rStream >> bValue;
+ rStream.ReadUChar( bValue );
SetValue( bValue );
}
}
@@ -1462,10 +1462,10 @@ SdrCustomShapeAdjustmentItem::SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_u
{
SdrCustomShapeAdjustmentValue aVal;
sal_uInt32 i, nCount;
- rIn >> nCount;
+ rIn.ReadUInt32( nCount );
for ( i = 0; i < nCount; i++ )
{
- rIn >> aVal.nValue;
+ rIn.ReadUInt32( aVal.nValue );
SetValue( i, aVal );
}
}
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 4cac9057870f..4f6ac4a37ecc 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -406,7 +406,7 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplReadObject(
uno::Reference < io::XStream > xStm = xDocStor->openStreamElement( rObjName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( xStm );
- *pTemp >> *pStream;
+ pTemp->ReadStream( *pStream );
delete pStream;
// TODO/LATER: what to do when other types of objects are based on substream persistence?
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 3350feb0523a..f5f3c0dbad37 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -95,7 +95,7 @@ NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, const OUString& rName) :
NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, SvStream& rIn) :
SfxStringItem(_nWhich, rIn)
{
- rIn >> nPalIndex;
+ rIn.ReadInt32( nPalIndex );
}
NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) :
@@ -683,12 +683,12 @@ XLineDashItem::XLineDashItem(SvStream& rIn) :
sal_uInt32 nLTemp;
sal_Int32 nITemp;
- rIn >> nITemp; aDash.SetDashStyle((XDashStyle)nITemp);
- rIn >> nSTemp; aDash.SetDots(nSTemp);
- rIn >> nLTemp; aDash.SetDotLen(nLTemp);
- rIn >> nSTemp; aDash.SetDashes(nSTemp);
- rIn >> nLTemp; aDash.SetDashLen(nLTemp);
- rIn >> nLTemp; aDash.SetDistance(nLTemp);
+ rIn.ReadInt32( nITemp ); aDash.SetDashStyle((XDashStyle)nITemp);
+ rIn.ReadUInt16( nSTemp ); aDash.SetDots(nSTemp);
+ rIn.ReadUInt32( nLTemp ); aDash.SetDotLen(nLTemp);
+ rIn.ReadUInt16( nSTemp ); aDash.SetDashes(nSTemp);
+ rIn.ReadUInt32( nLTemp ); aDash.SetDashLen(nLTemp);
+ rIn.ReadUInt32( nLTemp ); aDash.SetDistance(nLTemp);
}
}
@@ -1225,7 +1225,7 @@ namespace
{
basegfx::B2DPolyPolygon aRetval;
sal_uInt32 nPolygonCount;
- rIn >> nPolygonCount;
+ rIn.ReadUInt32( nPolygonCount );
for(sal_uInt32 a(0L); a < nPolygonCount; a++)
{
@@ -1233,9 +1233,9 @@ namespace
sal_uInt8 bClosed;
sal_uInt8 bControlPoints;
- rIn >> nPointCount;
- rIn >> bClosed;
- rIn >> bControlPoints;
+ rIn.ReadUInt32( nPointCount );
+ rIn.ReadUChar( bClosed );
+ rIn.ReadUChar( bControlPoints );
basegfx::B2DPolygon aCandidate;
aCandidate.setClosed(0 != bClosed);
@@ -1243,23 +1243,23 @@ namespace
for(sal_uInt32 b(0L); b < nPointCount; b++)
{
double fX, fY;
- rIn >> fX;
- rIn >> fY;
+ rIn.ReadDouble( fX );
+ rIn.ReadDouble( fY );
aCandidate.append(basegfx::B2DPoint(fX, fY));
if(0 != bControlPoints)
{
sal_uInt8 bEdgeIsCurve;
- rIn >> bEdgeIsCurve;
+ rIn.ReadUChar( bEdgeIsCurve );
if(0 != bEdgeIsCurve)
{
- rIn >> fX;
- rIn >> fY;
+ rIn.ReadDouble( fX );
+ rIn.ReadDouble( fY );
aCandidate.setPrevControlPoint(b, basegfx::B2DVector(fX, fY));
- rIn >> fX;
- rIn >> fY;
+ rIn.ReadDouble( fX );
+ rIn.ReadDouble( fY );
aCandidate.setNextControlPoint(b, basegfx::B2DVector(fX, fY));
}
}
@@ -2570,30 +2570,30 @@ XFillGradientItem::XFillGradientItem(SvStream& rIn, sal_uInt16 nVer) :
sal_Int16 nITemp;
sal_Int32 nLTemp;
- rIn >> nITemp; aGradient.SetGradientStyle((XGradientStyle)nITemp);
- rIn >> nRed;
- rIn >> nGreen;
- rIn >> nBlue;
+ rIn.ReadInt16( nITemp ); aGradient.SetGradientStyle((XGradientStyle)nITemp);
+ rIn.ReadUInt16( nRed );
+ rIn.ReadUInt16( nGreen );
+ rIn.ReadUInt16( nBlue );
Color aCol;
aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) );
aGradient.SetStartColor( aCol );
- rIn >> nRed;
- rIn >> nGreen;
- rIn >> nBlue;
+ rIn.ReadUInt16( nRed );
+ rIn.ReadUInt16( nGreen );
+ rIn.ReadUInt16( nBlue );
aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) );
aGradient.SetEndColor(aCol);
- rIn >> nLTemp; aGradient.SetAngle(nLTemp);
- rIn >> nUSTemp; aGradient.SetBorder(nUSTemp);
- rIn >> nUSTemp; aGradient.SetXOffset(nUSTemp);
- rIn >> nUSTemp; aGradient.SetYOffset(nUSTemp);
- rIn >> nUSTemp; aGradient.SetStartIntens(nUSTemp);
- rIn >> nUSTemp; aGradient.SetEndIntens(nUSTemp);
+ rIn.ReadInt32( nLTemp ); aGradient.SetAngle(nLTemp);
+ rIn.ReadUInt16( nUSTemp ); aGradient.SetBorder(nUSTemp);
+ rIn.ReadUInt16( nUSTemp ); aGradient.SetXOffset(nUSTemp);
+ rIn.ReadUInt16( nUSTemp ); aGradient.SetYOffset(nUSTemp);
+ rIn.ReadUInt16( nUSTemp ); aGradient.SetStartIntens(nUSTemp);
+ rIn.ReadUInt16( nUSTemp ); aGradient.SetEndIntens(nUSTemp);
// for newer versions consider the step width as well
if (nVer >= 1)
{
- rIn >> nUSTemp; aGradient.SetSteps(nUSTemp);
+ rIn.ReadUInt16( nUSTemp ); aGradient.SetSteps(nUSTemp);
}
}
}
@@ -3086,16 +3086,16 @@ XFillHatchItem::XFillHatchItem(SvStream& rIn) :
sal_Int16 nITemp;
sal_Int32 nLTemp;
- rIn >> nITemp; aHatch.SetHatchStyle((XHatchStyle)nITemp);
- rIn >> nRed;
- rIn >> nGreen;
- rIn >> nBlue;
+ rIn.ReadInt16( nITemp ); aHatch.SetHatchStyle((XHatchStyle)nITemp);
+ rIn.ReadUInt16( nRed );
+ rIn.ReadUInt16( nGreen );
+ rIn.ReadUInt16( nBlue );
Color aCol;
aCol = Color( (sal_uInt8)( nRed >> 8 ), (sal_uInt8)( nGreen >> 8 ), (sal_uInt8)( nBlue >> 8 ) );
aHatch.SetColor(aCol);
- rIn >> nLTemp; aHatch.SetDistance(nLTemp);
- rIn >> nLTemp; aHatch.SetAngle(nLTemp);
+ rIn.ReadInt32( nLTemp ); aHatch.SetDistance(nLTemp);
+ rIn.ReadInt32( nLTemp ); aHatch.SetAngle(nLTemp);
}
}
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 7a000300d2da..69feb1e09cde 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -221,12 +221,12 @@ AffineMatrixItem::AffineMatrixItem(const com::sun::star::geometry::AffineMatrix2
AffineMatrixItem::AffineMatrixItem(SvStream& rIn)
: SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX)
{
- rIn >> maMatrix.m00;
- rIn >> maMatrix.m01;
- rIn >> maMatrix.m02;
- rIn >> maMatrix.m10;
- rIn >> maMatrix.m11;
- rIn >> maMatrix.m12;
+ rIn.ReadDouble( maMatrix.m00 );
+ rIn.ReadDouble( maMatrix.m01 );
+ rIn.ReadDouble( maMatrix.m02 );
+ rIn.ReadDouble( maMatrix.m10 );
+ rIn.ReadDouble( maMatrix.m11 );
+ rIn.ReadDouble( maMatrix.m12 );
}
AffineMatrixItem::AffineMatrixItem(const AffineMatrixItem& rRef)
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index a52c0d1fd116..797e08979c04 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -296,8 +296,8 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer)
{
sal_Int16 iTmp;
- rIn >> iTmp; // former XBitmapStyle
- rIn >> iTmp; // former XBitmapType
+ rIn.ReadInt16( iTmp ); // former XBitmapStyle
+ rIn.ReadInt16( iTmp ); // former XBitmapType
if(XBITMAP_IMPORT == iTmp)
{
@@ -312,7 +312,7 @@ XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer)
for(sal_uInt16 i(0); i < 64; i++)
{
- rIn >> aArray[i];
+ rIn.ReadUInt16( aArray[i] );
}
Color aColorPix;
diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx
index 693f6a7f6a6f..3df1f820f3fc 100644
--- a/svx/source/xoutdev/xexch.cxx
+++ b/svx/source/xoutdev/xexch.cxx
@@ -96,7 +96,7 @@ SvStream& ReadXFillExchangeData( SvStream& rIStm, XFillExchangeData& rData )
sal_uInt32 nItemCount = 0;
sal_uInt16 nWhich, nItemVersion;
- rIStm >> nItemCount;
+ rIStm.ReadUInt32( nItemCount );
if( nItemCount > ( XATTR_FILL_LAST - XATTR_FILL_FIRST + 1 ) )
nItemCount = ( XATTR_FILL_LAST - XATTR_FILL_FIRST + 1 );
@@ -105,7 +105,7 @@ SvStream& ReadXFillExchangeData( SvStream& rIStm, XFillExchangeData& rData )
{
VersionCompat aCompat( rIStm, STREAM_READ );
- rIStm >> nWhich >> nItemVersion;
+ rIStm.ReadUInt16( nWhich ).ReadUInt16( nItemVersion );
if( nWhich )
{
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 );
}
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index f1202e7d5f9f..7c5a627fb4be 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -251,7 +251,7 @@ void VCLXPrinterPropertySet::setBinarySetup( const ::com::sun::star::uno::Sequen
SvMemoryStream aMem( (char*) data.getConstArray(), data.getLength(), STREAM_READ );
sal_uInt32 nMarker;
- aMem >> nMarker;
+ aMem.ReadUInt32( nMarker );
DBG_ASSERT( nMarker == BINARYSETUPMARKER, "setBinarySetup - invalid!" );
if ( nMarker == BINARYSETUPMARKER )
{
diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx
index 677e698de23d..8389bcc1fb33 100644
--- a/tools/qa/cppunit/test_stream.cxx
+++ b/tools/qa/cppunit/test_stream.cxx
@@ -49,7 +49,7 @@ namespace
CPPUNIT_ASSERT(std_a == 'f');
char tools_a(78);
- aMemStream >> tools_a;
+ aMemStream.ReadChar( tools_a );
CPPUNIT_ASSERT(tools_a == 'f');
iss.seekg(0, std::ios_base::end);
@@ -75,7 +75,7 @@ namespace
CPPUNIT_ASSERT(iss.rdstate() == (std::ios::failbit|std::ios::eofbit));
tools_a = 78;
- aMemStream >> tools_a;
+ aMemStream.ReadChar( tools_a );
//so, now eof is set
CPPUNIT_ASSERT(aMemStream.eof());
//a failed read doesn't change the data, it remains unchanged
@@ -92,7 +92,7 @@ namespace
aMemStream.SeekRel(-1);
CPPUNIT_ASSERT(!aMemStream.eof());
CPPUNIT_ASSERT(aMemStream.good());
- aMemStream >> tools_b;
+ aMemStream.ReadUInt16( tools_b );
CPPUNIT_ASSERT(!aMemStream.good());
CPPUNIT_ASSERT(aMemStream.eof());
CPPUNIT_ASSERT(tools_b == 0x1122);
@@ -105,7 +105,7 @@ namespace
aMemStream.Seek(0);
CPPUNIT_ASSERT(aMemStream.good());
- aMemStream >> tools_a;
+ aMemStream.ReadChar( tools_a );
CPPUNIT_ASSERT(tools_a == 'f');
//failbit is rather subtle wrt e.g seeks
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 2c3fc5ade570..909a4e82470f 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -215,7 +215,7 @@ ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
SvStream& Color::Read( SvStream& rIStm, bool bNewFormat )
{
if ( bNewFormat )
- rIStm >> mnColor;
+ rIStm.ReadUInt32( mnColor );
else
ReadColor( rIStm, *this );
@@ -240,7 +240,7 @@ SvStream& ReadColor( SvStream& rIStream, Color& rColor )
sal_uInt16 nColorName;
- rIStream >> nColorName;
+ rIStream.ReadUInt16( nColorName );
if ( nColorName & COL_NAME_USER )
{
@@ -248,9 +248,9 @@ SvStream& ReadColor( SvStream& rIStream, Color& rColor )
sal_uInt16 nGreen;
sal_uInt16 nBlue;
- rIStream >> nRed;
- rIStream >> nGreen;
- rIStream >> nBlue;
+ rIStream.ReadUInt16( nRed );
+ rIStream.ReadUInt16( nGreen );
+ rIStream.ReadUInt16( nBlue );
rColor.mnColor = RGB_COLORDATA( nRed>>8, nGreen>>8, nBlue>>8 );
}
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index 0bfae055ac81..feee316a50e7 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -486,9 +486,9 @@ SvStream& ReadFraction( SvStream& rIStream, Fraction& rFract )
{
//fdo#39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmp(0);
- rIStream >> nTmp;
+ rIStream.ReadInt32( nTmp );
rFract.nNumerator = nTmp;
- rIStream >> nTmp;
+ rIStream.ReadInt32( nTmp );
rFract.nDenominator = nTmp;
return rIStream;
}
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 0a49fd40bb5f..723f9137c15e 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -27,7 +27,7 @@ SvStream& ReadPair( SvStream& rIStream, Pair& rPair )
//39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpA(0), nTmpB(0);
- rIStream >> nTmpA >> nTmpB;
+ rIStream.ReadInt32( nTmpA ).ReadInt32( nTmpB );
rPair.nA = nTmpA;
rPair.nB = nTmpB;
@@ -176,7 +176,7 @@ SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect )
//fdo#39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0);
- rIStream >> nTmpL >> nTmpT >> nTmpR >> nTmpB;
+ rIStream.ReadInt32( nTmpL ).ReadInt32( nTmpT ).ReadInt32( nTmpR ).ReadInt32( nTmpB );
rRect.nLeft = nTmpL;
rRect.nTop = nTmpT;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 2da3bb396694..3a25b9b7796d 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1509,7 +1509,7 @@ SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly )
sal_uInt16 nPoints;
// read all points and create array
- rIStream >> nPoints;
+ rIStream.ReadUInt16( nPoints );
if ( rPoly.mpImplPolygon->mnRefCount != 1 )
{
if ( rPoly.mpImplPolygon->mnRefCount )
@@ -1535,7 +1535,7 @@ SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly )
{
//fdo#39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpX(0), nTmpY(0);
- rIStream >> nTmpX >> nTmpY;
+ rIStream.ReadInt32( nTmpX ).ReadInt32( nTmpY );
rPoly.mpImplPolygon->mpPointAry[i].X() = nTmpX;
rPoly.mpImplPolygon->mpPointAry[i].Y() = nTmpY;
}
@@ -1591,7 +1591,7 @@ void Polygon::ImplRead( SvStream& rIStream )
sal_uInt8 bHasPolyFlags;
ReadPolygon( rIStream, *this );
- rIStream >> bHasPolyFlags;
+ rIStream.ReadUChar( bHasPolyFlags );
if ( bHasPolyFlags )
{
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index c168196ee2ff..24a5f8522686 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -561,7 +561,7 @@ SvStream& ReadPolyPolygon( SvStream& rIStream, PolyPolygon& rPolyPoly )
sal_uInt16 nPolyCount;
// read number of polygons
- rIStream >> nPolyCount;
+ rIStream.ReadUInt16( nPolyCount );
if( nPolyCount )
{
@@ -610,7 +610,7 @@ void PolyPolygon::Read( SvStream& rIStream )
sal_uInt16 nPolyCount;
// Read number of polygons
- rIStream >> nPolyCount;
+ rIStream.ReadUInt16( nPolyCount );
if( nPolyCount )
{
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index 7bc94e5ecb0d..9d982e0bd4a5 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -124,12 +124,12 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
sal_uInt32 nTemp;
// Copy.
- rStrm >> nTemp;
+ rStrm.ReadUInt32( nTemp );
m_nDocSize = nTemp;
m_aDocName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm, RTL_TEXTENCODING_UTF8);
sal_uIntPtr i, n = 0;
- rStrm >> nTemp;
+ rStrm.ReadUInt32( nTemp );
n = nTemp;
for (i = 0; i < n; i++)
@@ -623,7 +623,7 @@ SvStream& INetRFC822Message::operator>> (SvStream& rStrm)
sal_uInt32 nTemp;
for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
{
- rStrm >> nTemp;
+ rStrm.ReadUInt32( nTemp );
m_nIndex[i] = nTemp;
}
@@ -1031,13 +1031,13 @@ SvStream& INetMIMEMessage::operator>> (SvStream& rStrm)
sal_uInt32 nTemp;
for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
{
- rStrm >> nTemp;
+ rStrm.ReadUInt32( nTemp );
m_nIndex[i] = nTemp;
}
m_aBoundary = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStrm);
- rStrm >> nTemp;
+ rStrm.ReadUInt32( nTemp );
return rStrm;
}
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index f23b1ea6ca7d..3fe206497344 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -142,14 +142,14 @@ SvStream& operator >> ( SvStream& rStr, SvGlobalName & rObj )
rObj.NewImp(); // copy if necessary
sal_uInt32 a;
- rStr >> a;
+ rStr.ReadUInt32( a );
memcpy(rObj.pImp->szData, &a, sizeof(sal_uInt32));
sal_uInt16 b;
- rStr >> b;
+ rStr.ReadUInt16( b );
memcpy(rObj.pImp->szData+4, &b, sizeof(sal_uInt16));
- rStr >> b;
+ rStr.ReadUInt16( b );
memcpy(rObj.pImp->szData+6, &b, sizeof(sal_uInt16));
rStr.Read( (sal_Char *)&rObj.pImp->szData[ 8 ], 8 );
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 2f20664b56c6..c9d172768186 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -86,7 +86,7 @@ void TOOLS_DLLPUBLIC WritePersistListObjects(const SvPersistListWriteable& rList
void TOOLS_DLLPUBLIC ReadObjects( SvPersistListReadable& rLst, SvPersistStream & rStm )
{
sal_uInt8 nVer;
- rStm >> nVer;
+ rStm.ReadUChar( nVer );
if( (nVer & ~PERSIST_LIST_DBGUTIL) != PERSIST_LIST_VER )
{
@@ -99,7 +99,7 @@ void TOOLS_DLLPUBLIC ReadObjects( SvPersistListReadable& rLst, SvPersistStream &
nObjLen = rStm.ReadLen( &nObjPos );
sal_uInt32 nCount;
- rStm >> nCount;
+ rStm.ReadUInt32( nCount );
for( sal_uIntPtr n = 0; n < nCount && rStm.GetError() == SVSTREAM_OK; n++ )
{
SvPersistBase * pObj;
@@ -269,25 +269,25 @@ sal_uInt32 SvPersistStream::ReadCompressed( SvStream & rStm )
{
sal_uInt32 nRet(0);
sal_uInt8 nMask;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
if( nMask & LEN_1 )
nRet = ~LEN_1 & nMask;
else if( nMask & LEN_2 )
{
nRet = ~LEN_2 & nMask;
nRet <<= 8;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
nRet |= nMask;
}
else if( nMask & LEN_4 )
{
nRet = ~LEN_4 & nMask;
nRet <<= 8;
- rStm >> nMask;
+ rStm.ReadUChar( nMask );
nRet |= nMask;
nRet <<= 16;
sal_uInt16 n;
- rStm >> n;
+ rStm.ReadUInt16( n );
nRet |= n;
}
else if( nMask & LEN_5 )
@@ -297,7 +297,7 @@ sal_uInt32 SvPersistStream::ReadCompressed( SvStream & rStm )
rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
OSL_FAIL( "format error" );
}
- rStm >> nRet;
+ rStm.ReadUInt32( nRet );
}
else
{
@@ -418,7 +418,7 @@ void SvPersistStream::WriteLen( sal_uInt32 nObjPos )
sal_uInt32 SvPersistStream::ReadLen( sal_uInt32 * pTestPos )
{
sal_uInt32 nLen;
- *this >> nLen;
+ ReadUInt32( nLen );
if( pTestPos )
*pTestPos = Tell();
return nLen;
@@ -484,7 +484,7 @@ static void ReadId
)
{
nClassId = 0;
- rStm >> nHdr;
+ rStm.ReadUChar( nHdr );
if( nHdr & P_ID_0 )
nId = 0;
else
@@ -696,11 +696,11 @@ SvStream& operator >>
rThis.SetStream( &rStm );
sal_uInt8 nVers;
- rThis >> nVers; // Version
+ rThis.ReadUChar( nVers ); // Version
if( 0 == nVers )
{
sal_uInt32 nCount = 0;
- rThis >> nCount;
+ rThis.ReadUInt32( nCount );
for( sal_uInt32 i = 0; i < nCount; i++ )
{
SvPersistBase * pEle;
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index ccb25d3d17f4..bcd73c52ce2d 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -813,7 +813,7 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
bool bTryUtf8 = false;
sal_uInt16 nFlag;
sal_sSize nBack = sizeof(nFlag);
- *this >> nFlag;
+ this->ReadUInt16( nFlag );
switch ( nFlag )
{
case 0xfeff :
@@ -850,7 +850,7 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
{
unsigned char nChar;
nBack += sizeof(nChar);
- *this >> nChar;
+ this->ReadUChar( nChar );
if (nChar == 0xbf)
nBack = 0; // it is UTF-8
}
@@ -879,7 +879,7 @@ sal_Size SvStream::SeekRel( sal_sSize nPos )
return Seek( nActualPos );
}
-SvStream& SvStream::operator>>(sal_uInt16& r)
+SvStream& SvStream::ReadUInt16(sal_uInt16& r)
{
sal_uInt16 n = 0;
READNUMBER_WITHOUT_SWAP(sal_uInt16, n)
@@ -892,7 +892,7 @@ SvStream& SvStream::operator>>(sal_uInt16& r)
return *this;
}
-SvStream& SvStream::operator>>(sal_uInt32& r)
+SvStream& SvStream::ReadUInt32(sal_uInt32& r)
{
sal_uInt32 n = 0;
READNUMBER_WITHOUT_SWAP(sal_uInt32, n)
@@ -905,7 +905,7 @@ SvStream& SvStream::operator>>(sal_uInt32& r)
return *this;
}
-SvStream& SvStream::operator>>(sal_uInt64& r)
+SvStream& SvStream::ReadUInt64(sal_uInt64& r)
{
sal_uInt64 n = 0;
READNUMBER_WITHOUT_SWAP(sal_uInt64, n)
@@ -918,7 +918,7 @@ SvStream& SvStream::operator>>(sal_uInt64& r)
return *this;
}
-SvStream& SvStream::operator>>(sal_Int16& r)
+SvStream& SvStream::ReadInt16(sal_Int16& r)
{
sal_Int16 n = 0;
READNUMBER_WITHOUT_SWAP(sal_Int16, n)
@@ -931,7 +931,7 @@ SvStream& SvStream::operator>>(sal_Int16& r)
return *this;
}
-SvStream& SvStream::operator>>(sal_Int32& r)
+SvStream& SvStream::ReadInt32(sal_Int32& r)
{
sal_Int32 n = 0;
READNUMBER_WITHOUT_SWAP(sal_Int32, n)
@@ -957,7 +957,7 @@ SvStream& SvStream::ReadInt64(sal_Int64& r)
return *this;
}
-SvStream& SvStream::operator>>( signed char& r )
+SvStream& SvStream::ReadSChar( signed char& r )
{
if( (bIoRead || !bIsConsistent) &&
sizeof(signed char) <= nBufFree )
@@ -974,7 +974,7 @@ SvStream& SvStream::operator>>( signed char& r )
// Special treatment for Chars due to PutBack
-SvStream& SvStream::operator>>( char& r )
+SvStream& SvStream::ReadChar( char& r )
{
if( (bIoRead || !bIsConsistent) &&
sizeof(char) <= nBufFree )
@@ -989,7 +989,7 @@ SvStream& SvStream::operator>>( char& r )
return *this;
}
-SvStream& SvStream::operator>>( unsigned char& r )
+SvStream& SvStream::ReadUChar( unsigned char& r )
{
if( (bIoRead || !bIsConsistent) &&
sizeof(char) <= nBufFree )
@@ -1004,7 +1004,7 @@ SvStream& SvStream::operator>>( unsigned char& r )
return *this;
}
-SvStream& SvStream::operator>>(float& r)
+SvStream& SvStream::ReadFloat(float& r)
{
float n = 0;
READNUMBER_WITHOUT_SWAP(float, n)
@@ -1019,7 +1019,7 @@ SvStream& SvStream::operator>>(float& r)
return *this;
}
-SvStream& SvStream::operator>>(double& r)
+SvStream& SvStream::ReadDouble(double& r)
{
double n = 0;
READNUMBER_WITHOUT_SWAP(double, n)
@@ -1034,7 +1034,7 @@ SvStream& SvStream::operator>>(double& r)
return *this;
}
-SvStream& SvStream::operator>> ( SvStream& rStream )
+SvStream& SvStream::ReadStream( SvStream& rStream )
{
const sal_uInt32 cBufLen = 0x8000;
char* pBuf = new char[ cBufLen ];
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx
index 63575a951aa0..afd3fe545195 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -37,8 +37,8 @@ VersionCompat::VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16
}
else
{
- *mpRWStm >> mnVersion;
- *mpRWStm >> mnTotalSize;
+ mpRWStm->ReadUInt16( mnVersion );
+ mpRWStm->ReadUInt32( mnTotalSize );
mnCompatPos = mpRWStm->Tell();
}
}
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index 0d0ad2be93e0..fe2e573699b1 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -347,12 +347,12 @@ void ZCodec::ImplInitBuf ( bool nIOFlag )
sal_uInt8 n1, n2, j, nMethod, nFlags;
for ( int i = 0; i < 2; i++ ) // gz - magic number
{
- *mpIStm >> j;
+ mpIStm->ReadUChar( j );
if ( j != gz_magic[ i ] )
mbStatus = false;
}
- *mpIStm >> nMethod;
- *mpIStm >> nFlags;
+ mpIStm->ReadUChar( nMethod );
+ mpIStm->ReadUChar( nFlags );
if ( nMethod != Z_DEFLATED )
mbStatus = false;
if ( ( nFlags & GZ_RESERVED ) != 0 )
@@ -362,7 +362,7 @@ void ZCodec::ImplInitBuf ( bool nIOFlag )
/* skip the extra field */
if ( nFlags & GZ_EXTRA_FIELD )
{
- *mpIStm >> n1 >> n2;
+ mpIStm->ReadUChar( n1 ).ReadUChar( n2 );
mpIStm->SeekRel( n1 + ( n2 << 8 ) );
}
/* skip the original file name */
@@ -370,7 +370,7 @@ void ZCodec::ImplInitBuf ( bool nIOFlag )
{
do
{
- *mpIStm >> j;
+ mpIStm->ReadUChar( j );
}
while ( j && !mpIStm->IsEof() );
}
@@ -379,7 +379,7 @@ void ZCodec::ImplInitBuf ( bool nIOFlag )
{
do
{
- *mpIStm >> j;
+ mpIStm->ReadUChar( j );
}
while ( j && !mpIStm->IsEof() );
}
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index a1a731eeaed3..29df8b440699 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -202,7 +202,7 @@ bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen)
rStream.SeekRel(2);
// bounding box (bytes 2 -> 9)
rStream.SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN);
- rStream >> y1 >> x1 >> y2 >> x2;
+ rStream.ReadInt16( y1 ).ReadInt16( x1 ).ReadInt16( y2 ).ReadInt16( x2 );
rStream.SetNumberFormatInt(oldNumberFormat); // reset format
if (x1 > x2 || y1 > y2 || // bad bdbox
@@ -321,12 +321,12 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension,
sal_uInt16 nFieldSize;
sal_uInt8 nMagic;
bool bOK=true;
- rStream >> nFieldSize >> nMagic;
+ rStream.ReadUInt16( nFieldSize ).ReadUChar( nMagic );
for (i=0; i<3; i++) {
if (nFieldSize<6) { bOK=false; break; }
if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=false; break; }
rStream.SeekRel(nFieldSize-3);
- rStream >> nFieldSize >> nMagic;
+ rStream.ReadUInt16( nFieldSize ).ReadUChar( nMagic );
if (nMagic!=0xd3) { bOK=false; break; }
}
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index c2d169e06d93..9e3fd4c96624 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -110,13 +110,13 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
// OS/2-BitmapArray
if ( nTemp16 == 0x4142 )
{
rStm.SeekRel( 0x0c );
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
}
// Bitmap
@@ -134,33 +134,33 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo
rStm.SeekRel( 0x10 );
// Pixel width
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aPixSize.Width() = nTemp32;
// Pixel height
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aPixSize.Height() = nTemp32;
// Planes
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nPlanes = nTemp16;
// BitCount
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nBitsPerPixel = nTemp16;
// Compression
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
bCompressed = ( ( nCompression = nTemp32 ) > 0 );
// logical width
rStm.SeekRel( 4 );
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
if ( nTemp32 )
aLogSize.Width() = ( aPixSize.Width() * 100000 ) / nTemp32;
// logical height
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
if ( nTemp32 )
aLogSize.Height() = ( aPixSize.Height() * 100000 ) / nTemp32;
@@ -185,11 +185,11 @@ sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- rStm >> n32;
+ rStm.ReadUInt32( n32 );
if ( n32 == 0x38464947 )
{
- rStm >> n16;
+ rStm.ReadUInt16( n16 );
if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) )
{
nFormat = GFF_GIF;
@@ -200,15 +200,15 @@ sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo
sal_uInt16 nTemp16 = 0;
// Pixel width
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
aPixSize.Width() = nTemp16;
// Pixel height
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
aPixSize.Height() = nTemp16;
// Bits/Pixel
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
nBitsPerPixel = ( ( cByte & 112 ) >> 4 ) + 1;
}
}
@@ -225,14 +225,14 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm )
{
do
{
- rStm >> nByte;
+ rStm.ReadUChar( nByte );
if ( rStm.IsEof() || rStm.GetError() ) // as 0 is not allowed as marker,
return 0; // we can use it as errorcode
}
while ( nByte != 0xff );
do
{
- rStm >> nByte;
+ rStm.ReadUChar( nByte );
if ( rStm.IsEof() || rStm.GetError() )
return 0;
}
@@ -251,7 +251,7 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
// compare upper 24 bits
if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) )
@@ -298,7 +298,7 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf
default :
{
sal_uInt16 nLength = 0;
- rStm >> nLength;
+ rStm.ReadUInt16( nLength );
if ( nLength < 2 )
bScanFailure = true;
@@ -312,7 +312,7 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf
if ( nLength == 16 )
{
sal_Int32 nIdentifier = 0;
- rStm >> nIdentifier;
+ rStm.ReadInt32( nIdentifier );
if ( nIdentifier == 0x4a464946 ) // JFIF Identifier
{
sal_uInt8 nStringTerminator = 0;
@@ -324,14 +324,14 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf
sal_uInt8 nHorzThumbnailPixelCount = 0;
sal_uInt8 nVertThumbnailPixelCount = 0;
- rStm >> nStringTerminator
- >> nMajorRevision
- >> nMinorRevision
- >> nUnits
- >> nHorizontalResolution
- >> nVerticalResolution
- >> nHorzThumbnailPixelCount
- >> nVertThumbnailPixelCount;
+ rStm.ReadUChar( nStringTerminator )
+ .ReadUChar( nMajorRevision )
+ .ReadUChar( nMinorRevision )
+ .ReadUChar( nUnits )
+ .ReadUInt16( nHorizontalResolution )
+ .ReadUInt16( nVerticalResolution )
+ .ReadUChar( nHorzThumbnailPixelCount )
+ .ReadUChar( nVertThumbnailPixelCount );
// setting the logical size
if ( nUnits && nHorizontalResolution && nVerticalResolution )
@@ -369,13 +369,13 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf
sal_uInt8 nComponentsIdentifier = 0;
sal_uInt8 nHorizontalSamplingFactor = 0;
sal_uInt8 nQuantizationTableDestinationSelector = 0;
- rStm >> nSamplePrecision
- >> nNumberOfLines
- >> nSamplesPerLine
- >> nNumberOfImageComponents
- >> nComponentsIdentifier
- >> nHorizontalSamplingFactor
- >> nQuantizationTableDestinationSelector;
+ rStm.ReadUChar( nSamplePrecision )
+ .ReadUInt16( nNumberOfLines )
+ .ReadUInt16( nSamplesPerLine )
+ .ReadUChar( nNumberOfImageComponents )
+ .ReadUChar( nComponentsIdentifier )
+ .ReadUChar( nHorizontalSamplingFactor )
+ .ReadUChar( nQuantizationTableDestinationSelector );
nHorizontalSamplingFactor >>= 4;
aPixSize.Height() = nNumberOfLines;
@@ -412,9 +412,9 @@ sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool )
sal_uInt8 cByte = 0;
rStm.SeekRel( 2048 );
- rStm >> nTemp32;
- rStm >> nTemp16;
- rStm >> cByte;
+ rStm.ReadUInt32( nTemp32 );
+ rStm.ReadUInt16( nTemp16 );
+ rStm.ReadUChar( cByte );
if ( ( nTemp32 == 0x5f444350 ) &&
( nTemp16 == 0x5049 ) &&
@@ -440,7 +440,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
if ( cByte == 0x0a )
{
@@ -461,33 +461,33 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo
rStm.SeekRel( 1 );
// compression
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
bCompressed = ( cByte > 0 );
bRet = (cByte==0 || cByte ==1);
if (bRet)
{
// Bits/Pixel
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
nBitsPerPixel = cByte;
// image dimensions
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nXmin = nTemp16;
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nYmin = nTemp16;
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nXmax = nTemp16;
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nYmax = nTemp16;
aPixSize.Width() = nXmax - nXmin + 1;
aPixSize.Height() = nYmax - nYmin + 1;
// resolution
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nDPIx = nTemp16;
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nDPIy = nTemp16;
// set logical size
@@ -499,7 +499,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo
// number of color planes
cByte = 5; // Illegal value in case of EOF.
rStm.SeekRel( 49 );
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
nPlanes = cByte;
bRet = (nPlanes<=4);
@@ -518,11 +518,11 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
if ( nTemp32 == 0x89504e47 )
{
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
if ( nTemp32 == 0x0d0a1a0a )
{
nFormat = GFF_PNG;
@@ -536,15 +536,15 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo
rStm.SeekRel( 8 );
// width
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aPixSize.Width() = nTemp32;
// height
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aPixSize.Height() = nTemp32;
// Bits/Pixel
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
nBitsPerPixel = cByte;
// Planes always 1;
@@ -558,14 +558,14 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo
rStm.SeekRel( 8 );
// read up to the pHYs-Chunk or the start of the image
- rStm >> nLen32;
- rStm >> nTemp32;
+ rStm.ReadUInt32( nLen32 );
+ rStm.ReadUInt32( nTemp32 );
while( ( nTemp32 != 0x70485973 ) && ( nTemp32 != 0x49444154 )
&& !rStm.IsEof() && !rStm.GetError() )
{
rStm.SeekRel( 4 + nLen32 );
- rStm >> nLen32;
- rStm >> nTemp32;
+ rStm.ReadUInt32( nLen32 );
+ rStm.ReadUInt32( nTemp32 );
}
if ( nTemp32 == 0x70485973
@@ -576,17 +576,17 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo
// horizontal resolution
nTemp32 = 0;
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
nXRes = nTemp32;
// vertical resolution
nTemp32 = 0;
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
nYRes = nTemp32;
// unit
cByte = 0;
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
if ( cByte )
{
@@ -614,8 +614,8 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo
sal_uInt8 cByte2 = 1;
sal_Int32 nStmPos = rStm.Tell();
- rStm >> cByte1;
- rStm >> cByte2;
+ rStm.ReadUChar( cByte1 );
+ rStm.ReadUChar( cByte2 );
if ( cByte1 == cByte2 )
{
if ( cByte1 == 0x49 )
@@ -633,7 +633,7 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo
{
sal_uInt16 nTemp16 = 0;
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
if ( nTemp16 == 0x2a )
{
nFormat = GFF_TIF;
@@ -647,14 +647,14 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo
bool bOk = false;
// Offset of the first IFD
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
rStm.SeekRel( ( nCount = ( nTemp32 + 2 ) ) - 0x08 );
if ( nCount < nMax )
{
// read tags till we find Tag256 ( Width )
// do not read more bytes than DATA_SIZE
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
while ( nTemp16 != 256 )
{
bOk = nCount < nMax;
@@ -663,51 +663,51 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo
break;
}
rStm.SeekRel( 10 );
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nCount += 12;
}
if ( bOk )
{
// width
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
rStm.SeekRel( 4 );
if ( nTemp16 == 3 )
{
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
aPixSize.Width() = nTemp16;
rStm.SeekRel( 2 );
}
else
{
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aPixSize.Width() = nTemp32;
}
nCount += 12;
// height
rStm.SeekRel( 2 );
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
rStm.SeekRel( 4 );
if ( nTemp16 == 3 )
{
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
aPixSize.Height() = nTemp16;
rStm.SeekRel( 2 );
}
else
{
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aPixSize.Height() = nTemp32;
}
nCount += 12;
// Bits/Pixel
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
if ( nTemp16 == 258 )
{
rStm.SeekRel( 6 );
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
nBitsPerPixel = nTemp16;
rStm.SeekRel( 2 );
nCount += 12;
@@ -716,11 +716,11 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo
rStm.SeekRel( -2 );
// compression
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
if ( nTemp16 == 259 )
{
rStm.SeekRel( 6 );
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
bCompressed = ( nTemp16 > 1 );
rStm.SeekRel( 2 );
nCount += 12;
@@ -766,7 +766,7 @@ sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool )
{
sal_Int32 nStmPos = rStm.Tell();
sal_uInt8 nFirst = 0, nSecond = 0;
- rStm >> nFirst >> nSecond;
+ rStm.ReadUChar( nFirst ).ReadUChar( nSecond );
if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) )
bRet = sal_True;
rStm.Seek( nStmPos );
@@ -788,7 +788,7 @@ sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool )
{
sal_uInt8 nFirst = 0, nSecond = 0;
sal_Int32 nStmPos = rStm.Tell();
- rStm >> nFirst >> nSecond;
+ rStm.ReadUChar( nFirst ).ReadUChar( nSecond );
if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) )
bRet = sal_True;
rStm.Seek( nStmPos );
@@ -810,7 +810,7 @@ sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool )
{
sal_uInt8 nFirst = 0, nSecond = 0;
sal_Int32 nStmPos = rStm.Tell();
- rStm >> nFirst >> nSecond;
+ rStm.ReadUChar( nFirst ).ReadUChar( nSecond );
if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) )
bRet = sal_True;
rStm.Seek( nStmPos );
@@ -828,7 +828,7 @@ sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool )
sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- rStm >> nMagicNumber;
+ rStm.ReadUInt32( nMagicNumber );
if ( nMagicNumber == 0x59a66a95 )
{
nFormat = GFF_RAS;
@@ -854,11 +854,11 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo
sal_uInt32 nMagicNumber = 0;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- rStm >> nMagicNumber;
+ rStm.ReadUInt32( nMagicNumber );
if ( nMagicNumber == 0x38425053 )
{
sal_uInt16 nVersion = 0;
- rStm >> nVersion;
+ rStm.ReadUInt16( nVersion );
if ( nVersion == 1 )
{
bRet = sal_True;
@@ -870,7 +870,7 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo
sal_uInt16 nDepth = 0;
sal_uInt16 nMode = 0;
rStm.SeekRel( 6 ); // Pad
- rStm >> nChannels >> nRows >> nColumns >> nDepth >> nMode;
+ rStm.ReadUInt16( nChannels ).ReadUInt32( nRows ).ReadUInt32( nColumns ).ReadUInt16( nDepth ).ReadUInt16( nMode );
if ( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) )
{
nBitsPerPixel = ( nDepth == 16 ) ? 8 : nDepth;
@@ -910,7 +910,7 @@ sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool )
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- rStm >> nFirstLong;
+ rStm.ReadUInt32( nFirstLong );
rStm.SeekRel( -4 );
rStm.Read( &nFirstBytes, 20 );
@@ -976,7 +976,7 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool )
sal_uInt8 nFirst = 0, nSecond = 0;
- rStm >> nFirst >> nSecond;
+ rStm.ReadUChar( nFirst ).ReadUChar( nSecond );
if( nFirst == 'J' && nSecond == 'J' )
bRet = sal_True;
@@ -1007,11 +1007,11 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- rStm >> n32;
+ rStm.ReadUInt32( n32 );
if ( n32 == 0x44475653 )
{
cByte = 0;
- rStm >> cByte;
+ rStm.ReadUChar( cByte );
if ( cByte == 0x49 )
{
nFormat = GFF_SVM;
@@ -1026,17 +1026,17 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo
// width
nTemp32 = 0;
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aLogSize.Width() = nTemp32;
// height
nTemp32 = 0;
- rStm >> nTemp32;
+ rStm.ReadUInt32( nTemp32 );
aLogSize.Height() = nTemp32;
// read MapUnit and determine PrefSize
nTemp16 = 0;
- rStm >> nTemp16;
+ rStm.ReadUInt16( nTemp16 );
aLogSize = OutputDevice::LogicToLogic( aLogSize,
MapMode( (MapUnit) nTemp16 ),
MapMode( MAP_100TH_MM ) );
@@ -1047,13 +1047,13 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo
{
rStm.SeekRel( -4L );
n32 = 0;
- rStm >> n32;
+ rStm.ReadUInt32( n32 );
if( n32 == 0x4D4C4356 )
{
sal_uInt16 nTmp16 = 0;
- rStm >> nTmp16;
+ rStm.ReadUInt16( nTmp16 );
if( nTmp16 == 0x4654 )
{
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 553b45c33e5c..79d58ce0641e 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -145,11 +145,11 @@ bool GIFReader::ReadGlobalHeader()
SvMemoryStream aMemStm;
aMemStm.SetBuffer( pBuf, 7, false, 7 );
- aMemStm >> nGlobalWidth;
- aMemStm >> nGlobalHeight;
- aMemStm >> nRF;
- aMemStm >> nBackgroundColor;
- aMemStm >> nAspect;
+ aMemStm.ReadUInt16( nGlobalWidth );
+ aMemStm.ReadUInt16( nGlobalHeight );
+ aMemStm.ReadUChar( nRF );
+ aMemStm.ReadUChar( nBackgroundColor );
+ aMemStm.ReadUChar( nAspect );
bGlobalPalette = ( nRF & 0x80 );
@@ -210,11 +210,11 @@ bool GIFReader::ReadExtension()
bool bOverreadDataBlocks = false;
// Extension-Label
- rIStm >> cFunction;
+ rIStm.ReadUChar( cFunction );
if( NO_PENDING( rIStm ) )
{
// Block length
- rIStm >> cSize;
+ rIStm.ReadUChar( cSize );
switch( cFunction )
{
@@ -223,10 +223,10 @@ bool GIFReader::ReadExtension()
{
sal_uInt8 cFlags;
- rIStm >> cFlags;
- rIStm >> nTimer;
- rIStm >> nGCTransparentIndex;
- rIStm >> cByte;
+ rIStm.ReadUChar( cFlags );
+ rIStm.ReadUInt16( nTimer );
+ rIStm.ReadUChar( nGCTransparentIndex );
+ rIStm.ReadUChar( cByte );
if ( NO_PENDING( rIStm ) )
{
@@ -251,21 +251,21 @@ bool GIFReader::ReadExtension()
{
OString aAppId = read_uInt8s_ToOString(rIStm, 8);
OString aAppCode = read_uInt8s_ToOString(rIStm, 3);
- rIStm >> cSize;
+ rIStm.ReadUChar( cSize );
// NetScape-Extension
if( aAppId == "NETSCAPE" && aAppCode == "2.0" && cSize == 3 )
{
- rIStm >> cByte;
+ rIStm.ReadUChar( cByte );
// Loop-Extension
if ( cByte == 0x01 )
{
- rIStm >> cByte;
+ rIStm.ReadUChar( cByte );
nLoops = cByte;
- rIStm >> cByte;
+ rIStm.ReadUChar( cByte );
nLoops |= ( (sal_uInt16) cByte << 8 );
- rIStm >> cByte;
+ rIStm.ReadUChar( cByte );
bStatus = ( cByte == 0 );
bRet = NO_PENDING( rIStm );
@@ -282,13 +282,13 @@ bool GIFReader::ReadExtension()
}
else if ( aAppId == "STARDIV " && aAppCode == "5.0" && cSize == 9 )
{
- rIStm >> cByte;
+ rIStm.ReadUChar( cByte );
// Loop extension
if ( cByte == 0x01 )
{
- rIStm >> nLogWidth100 >> nLogHeight100;
- rIStm >> cByte;
+ rIStm.ReadUInt32( nLogWidth100 ).ReadUInt32( nLogHeight100 );
+ rIStm.ReadUChar( cByte );
bStatus = ( cByte == 0 );
bRet = NO_PENDING( rIStm );
bOverreadDataBlocks = false;
@@ -348,11 +348,11 @@ bool GIFReader::ReadLocalHeader()
sal_uInt8 nFlags;
aMemStm.SetBuffer( (char*) pBuf, 9, false, 9 );
- aMemStm >> nImagePosX;
- aMemStm >> nImagePosY;
- aMemStm >> nImageWidth;
- aMemStm >> nImageHeight;
- aMemStm >> nFlags;
+ aMemStm.ReadUInt16( nImagePosX );
+ aMemStm.ReadUInt16( nImagePosY );
+ aMemStm.ReadUInt16( nImageWidth );
+ aMemStm.ReadUInt16( nImageHeight );
+ aMemStm.ReadUChar( nFlags );
// if interlaced, first define startvalue
bInterlaced = ( ( nFlags & 0x40 ) == 0x40 );
@@ -386,7 +386,7 @@ sal_uLong GIFReader::ReadNextBlock()
sal_uLong nRead;
sal_uInt8 cBlockSize;
- rIStm >> cBlockSize;
+ rIStm.ReadUChar( cBlockSize );
if ( rIStm.IsEof() )
nRet = 4UL;
@@ -607,7 +607,7 @@ bool GIFReader::ProcessGIF()
{
sal_uInt8 cByte;
- rIStm >> cByte;
+ rIStm.ReadUChar( cByte );
if( rIStm.IsEof() )
eActAction = END_READING;
@@ -665,7 +665,7 @@ bool GIFReader::ProcessGIF()
{
sal_uInt8 cDataSize;
- rIStm >> cDataSize;
+ rIStm.ReadUChar( cDataSize );
if( rIStm.IsEof() )
eActAction = ABORT_READING;
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index e7c1ed1ef23c..8b99c81c7f80 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -266,7 +266,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
// check if we can read ALL
rIStm.Seek( STREAM_SEEK_TO_END );
- rIStm >> cDummy;
+ rIStm.ReadUChar( cDummy );
// if we cannot read all
// we returnn and wait for new data
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 88ad230cea38..27f49b19e2f3 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -66,7 +66,7 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// check if we can real ALL
mrIStm.Seek( STREAM_SEEK_TO_END );
- mrIStm >> cDummy;
+ mrIStm.ReadUChar( cDummy );
// if we could not read all
// return and wait for new data
diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index cf64f9b1e209..ea4d1314ab59 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -100,7 +100,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
rStream.Seek(STREAM_SEEK_TO_BEGIN);
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- rStream >> aMagic16;
+ rStream.ReadUInt16( aMagic16 );
// Compare JPEG magic bytes
if( 0xFFD8 != aMagic16 )
@@ -117,7 +117,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
for (aCount = 0; aCount < 7; aCount++)
{
- rStream >> aMarker;
+ rStream.ReadUChar( aMarker );
if (aMarker != 0xFF)
{
break;
@@ -128,7 +128,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
}
}
- rStream >> aLength;
+ rStream.ReadUInt16( aLength );
if (aLength < 8)
{
@@ -203,8 +203,8 @@ bool Exif::processExif(SvStream& rStream, sal_uInt16 aSectionLength, bool bSetVa
sal_uInt32 aMagic32;
sal_uInt16 aMagic16;
- rStream >> aMagic32;
- rStream >> aMagic16;
+ rStream.ReadUInt32( aMagic32 );
+ rStream.ReadUInt16( aMagic16 );
// Compare EXIF magic bytes
if( 0x45786966 != aMagic32 || 0x0000 != aMagic16)
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index cd9611dbe4f5..5e5c6ac9e9c9 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -436,7 +436,7 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
// TODO: is it possible to get rid of this seek to the end?
// check if the stream's end is already available
mrStream.Seek( STREAM_SEEK_TO_END );
- mrStream >> cDummy;
+ mrStream.ReadUChar( cDummy );
nEndPosition = mrStream.Tell();
// else check if at least JPEG_MIN_READ bytes can be read
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 1f435d02704a..9a6909f2c418 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -850,11 +850,11 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
// get DIB parameters
aMemStm.Seek( 0 );
- aMemStm >> nHeaderSize;
+ aMemStm.ReadUInt32( nHeaderSize );
aMemStm.SeekRel( 10 );
- aMemStm >> nBitCount >> nCompression >> nImageSize;
+ aMemStm.ReadUInt16( nBitCount ).ReadUInt32( nCompression ).ReadUInt32( nImageSize );
aMemStm.SeekRel( 8 );
- aMemStm >> nColsUsed;
+ aMemStm.ReadUInt32( nColsUsed );
nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) :
( ( 3 == nCompression ) ? 12 : 0 );
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index b7c82c732efe..53c5bdc86ced 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -176,8 +176,7 @@ struct BLENDFUNCTION{
SvStream& operator>>( SvStream& rIn, BLENDFUNCTION& rBlendFun )
{
- rIn >> rBlendFun.aBlendOperation >> rBlendFun.aBlendFlags >>
- rBlendFun.aSrcConstantAlpha >> rBlendFun.aAlphaFormat;
+ rIn.ReadUChar( rBlendFun.aBlendOperation ).ReadUChar( rBlendFun.aBlendFlags ). ReadUChar( rBlendFun.aSrcConstantAlpha ).ReadUChar( rBlendFun.aAlphaFormat );
return rIn;
}
SvStream& operator>>( SvStream& rIn, XForm& rXForm )
@@ -197,8 +196,8 @@ SvStream& operator>>( SvStream& rIn, XForm& rXForm )
rXForm.eDx = GetSwapFloat( rIn );
rXForm.eDy = GetSwapFloat( rIn );
#else
- rIn >> rXForm.eM11 >> rXForm.eM12 >> rXForm.eM21 >> rXForm.eM22
- >> rXForm.eDx >> rXForm.eDy;
+ rIn.ReadFloat( rXForm.eM11 ).ReadFloat( rXForm.eM12 ).ReadFloat( rXForm.eM21 ).ReadFloat( rXForm.eM22 )
+ .ReadFloat( rXForm.eDx ).ReadFloat( rXForm.eDy );
#endif
}
return rIn;
@@ -210,10 +209,10 @@ static bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nL
if ( nLen )
{
sal_uInt32 nHdSize, nType, nCount, nRgnSize, i;
- rSt >> nHdSize
- >> nType
- >> nCount
- >> nRgnSize;
+ rSt.ReadUInt32( nHdSize )
+ .ReadUInt32( nType )
+ .ReadUInt32( nCount )
+ .ReadUInt32( nRgnSize );
if ( nCount && ( nType == RDH_RECTANGLES ) &&
( nLen >= ( ( nCount << 4 ) + ( nHdSize - 16 ) ) ) )
@@ -222,7 +221,7 @@ static bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nL
for ( i = 0; i < nCount; i++ )
{
- rSt >> nx1 >> ny1 >> nx2 >> ny2;
+ rSt.ReadInt32( nx1 ).ReadInt32( ny1 ).ReadInt32( nx2 ).ReadInt32( ny2 );
Rectangle aRect( Point( nx1, ny1 ), Point( nx2, ny2 ) );
Polygon aPolygon( aRect );
@@ -290,7 +289,7 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
sal_uInt16 type(0), flags(0);
sal_uInt32 size(0), dataSize(0);
- *pWMF >> type >> flags >> size >> dataSize;
+ pWMF->ReadUInt16( type ).ReadUInt16( flags ).ReadUInt32( size ).ReadUInt32( dataSize );
nRemainder -= nRequiredHeaderSize;
SAL_INFO ("vcl.emf", "\t\tEMF+ record type: " << std::hex << type << std::dec);
@@ -324,7 +323,7 @@ void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const sal_Bool skipFirst)
{
sal_uInt32 nPoints(0), nStartIndex(0);
pWMF->SeekRel( 16 );
- *pWMF >> nPoints;
+ pWMF->ReadUInt32( nPoints );
if (skipFirst)
{
nPoints ++;
@@ -375,7 +374,7 @@ void EnhWMFReader::ReadAndDrawPolyLine()
sal_Int32 i, nPoly(0), nGesPoints(0);
pWMF->SeekRel( 0x10 );
// Number of Polygons:
- *pWMF >> nPoly >> nGesPoints;
+ pWMF->ReadInt32( nPoly ).ReadInt32( nGesPoints );
// taking the amount of points of each polygon, retrieving the total number of points
if ( pWMF->good() &&
@@ -386,7 +385,7 @@ void EnhWMFReader::ReadAndDrawPolyLine()
sal_uInt16* pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly && pWMF->good(); i++ )
{
- *pWMF >> nPoints;
+ pWMF->ReadUInt32( nPoints );
pnPoints[ i ] = (sal_uInt16)nPoints;
}
// Get polygon points:
@@ -409,7 +408,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
sal_uInt32 nPoly(0), nGesPoints(0), nReadPoints(0);
pWMF->SeekRel( 0x10 );
// Number of polygons
- *pWMF >> nPoly >> nGesPoints;
+ pWMF->ReadUInt32( nPoly ).ReadUInt32( nGesPoints );
if ( pWMF->good() &&
( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && //check against numeric overflowing
( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) &&
@@ -420,7 +419,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
for (sal_uInt32 i = 0; i < nPoly && pWMF->good(); ++i)
{
sal_uInt32 nPoints(0);
- *pWMF >> nPoints;
+ pWMF->ReadUInt32( nPoints );
pnPoints[ i ] = (sal_uInt16)nPoints;
}
if ( pWMF->good() && ( nGesPoints * (sizeof(T)+sizeof(T)) ) <= ( nEndPos - pWMF->Tell() ) )
@@ -467,7 +466,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
while( bStatus && nRecordCount-- && pWMF->good())
{
- *pWMF >> nRecType >> nRecSize;
+ pWMF->ReadUInt32( nRecType ).ReadUInt32( nRecSize );
if ( !pWMF->good() || ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameters are always divisible by 4
{
@@ -497,7 +496,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
if( bEnableEMFPlus && nRecType == EMR_GDICOMMENT ) {
sal_uInt32 length;
- *pWMF >> length;
+ pWMF->ReadUInt32( length );
SAL_INFO("vcl.emf", "\tGDI comment");
SAL_INFO("vcl.emf", "\t\tlength: " << length);
@@ -505,7 +504,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
if( pWMF->good() && length >= 4 ) {
sal_uInt32 id;
- *pWMF >> id;
+ pWMF->ReadUInt32( id );
SAL_INFO ("vcl.emf", "\t\tbegin " << (char)(id & 0xff) << (char)((id & 0xff00) >> 8) << (char)((id & 0xff0000) >> 16) << (char)((id & 0xff000000) >> 24) << " id: 0x" << std::hex << id << std::dec);
@@ -552,42 +551,42 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_SETWINDOWEXTEX :
{ // #75383#
- *pWMF >> nW >> nH;
+ pWMF->ReadUInt32( nW ).ReadUInt32( nH );
pOut->SetWinExt( Size( nW, nH ), true);
}
break;
case EMR_SETWINDOWORGEX :
{
- *pWMF >> nX32 >> nY32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 );
pOut->SetWinOrg( Point( nX32, nY32 ), true);
}
break;
case EMR_SCALEWINDOWEXTEX :
{
- *pWMF >> nNom1 >> nDen1 >> nNom2 >> nDen2;
+ pWMF->ReadUInt32( nNom1 ).ReadUInt32( nDen1 ).ReadUInt32( nNom2 ).ReadUInt32( nDen2 );
pOut->ScaleWinExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 );
}
break;
case EMR_SETVIEWPORTORGEX :
{
- *pWMF >> nX32 >> nY32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 );
pOut->SetDevOrg( Point( nX32, nY32 ) );
}
break;
case EMR_SCALEVIEWPORTEXTEX :
{
- *pWMF >> nNom1 >> nDen1 >> nNom2 >> nDen2;
+ pWMF->ReadUInt32( nNom1 ).ReadUInt32( nDen1 ).ReadUInt32( nNom2 ).ReadUInt32( nDen2 );
pOut->ScaleDevExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 );
}
break;
case EMR_SETVIEWPORTEXTEX :
{
- *pWMF >> nW >> nH;
+ pWMF->ReadUInt32( nW ).ReadUInt32( nH );
pOut->SetDevExt( Size( nW, nH ) );
}
break;
@@ -598,7 +597,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_SETPIXELV :
{
- *pWMF >> nX32 >> nY32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 );
pOut->DrawPixel( Point( nX32, nY32 ), ReadColor() );
}
break;
@@ -606,14 +605,14 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_SETMAPMODE :
{
sal_uInt32 nMapMode;
- *pWMF >> nMapMode;
+ pWMF->ReadUInt32( nMapMode );
pOut->SetMapMode( nMapMode );
}
break;
case EMR_SETBKMODE :
{
- *pWMF >> nDat32;
+ pWMF->ReadUInt32( nDat32 );
pOut->SetBkMode( nDat32 );
}
break;
@@ -623,20 +622,20 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_SETROP2 :
{
- *pWMF >> nDat32;
+ pWMF->ReadUInt32( nDat32 );
pOut->SetRasterOp( nDat32 );
}
break;
case EMR_SETSTRETCHBLTMODE :
{
- *pWMF >> nStretchBltMode;
+ pWMF->ReadUInt32( nStretchBltMode );
}
break;
case EMR_SETTEXTALIGN :
{
- *pWMF >> nDat32;
+ pWMF->ReadUInt32( nDat32 );
pOut->SetTextAlign( nDat32 );
}
break;
@@ -655,21 +654,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_OFFSETCLIPRGN :
{
- *pWMF >> nX32 >> nY32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 );
pOut->MoveClipRegion( Size( nX32, nY32 ) );
}
break;
case EMR_MOVETOEX :
{
- *pWMF >> nX32 >> nY32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 );
pOut->MoveTo( Point( nX32, nY32 ), bRecordPath );
}
break;
case EMR_INTERSECTCLIPRECT :
{
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 );
pOut->IntersectClipRect( ReadRectangle( nX32, nY32, nx32, ny32 ) );
}
break;
@@ -698,21 +697,22 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
{
sal_uInt32 nMode;
XForm aTempXForm;
- *pWMF >> aTempXForm >> nMode;
+ *pWMF >> aTempXForm;
+ pWMF->ReadUInt32( nMode );
pOut->ModifyWorldTransform( aTempXForm, nMode );
}
break;
case EMR_SELECTOBJECT :
{
- *pWMF >> nIndex;
+ pWMF->ReadUInt32( nIndex );
pOut->SelectObject( nIndex );
}
break;
case EMR_CREATEPEN :
{
- *pWMF >> nIndex;
+ pWMF->ReadUInt32( nIndex );
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
@@ -722,7 +722,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
// #fdo39428 Remove SvStream operator>>(long&)
sal_Int32 nTmpW(0), nTmpH(0);
- *pWMF >> nStyle >> nTmpW >> nTmpH;
+ pWMF->ReadUInt32( nStyle ).ReadInt32( nTmpW ).ReadInt32( nTmpH );
aSize.Width() = nTmpW;
aSize.Height() = nTmpH;
@@ -808,12 +808,12 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
sal_uInt32 offBmi, cbBmi, offBits, cbBits, nStyle, nWidth, nBrushStyle, elpNumEntries;
Color aColorRef;
- *pWMF >> nIndex;
+ pWMF->ReadUInt32( nIndex );
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
- *pWMF >> offBmi >> cbBmi >> offBits >> cbBits >> nStyle >> nWidth >> nBrushStyle;
+ pWMF->ReadUInt32( offBmi ).ReadUInt32( cbBmi ).ReadUInt32( offBits ).ReadUInt32( cbBits ). ReadUInt32( nStyle ).ReadUInt32( nWidth ).ReadUInt32( nBrushStyle );
aColorRef = ReadColor();
- *pWMF >> elpHatch >> elpNumEntries;
+ pWMF->ReadInt32( elpHatch ).ReadUInt32( elpNumEntries );
LineInfo aLineInfo;
if ( nWidth )
@@ -859,10 +859,10 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_CREATEBRUSHINDIRECT :
{
sal_uInt32 nStyle;
- *pWMF >> nIndex;
+ pWMF->ReadUInt32( nIndex );
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
- *pWMF >> nStyle;
+ pWMF->ReadUInt32( nStyle );
pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) );
}
}
@@ -870,7 +870,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_DELETEOBJECT :
{
- *pWMF >> nIndex;
+ pWMF->ReadUInt32( nIndex );
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
pOut->DeleteObject( nIndex );
}
@@ -878,21 +878,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_ELLIPSE :
{
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 );
pOut->DrawEllipse( ReadRectangle( nX32, nY32, nx32, ny32 ) );
}
break;
case EMR_RECTANGLE :
{
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 );
pOut->DrawRect( ReadRectangle( nX32, nY32, nx32, ny32 ) );
}
break;
case EMR_ROUNDRECT :
{
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nW >> nH;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nW ).ReadUInt32( nH );
Size aSize( Size( nW, nH ) );
pOut->DrawRoundRect( ReadRectangle( nX32, nY32, nx32, ny32 ), aSize );
}
@@ -901,7 +901,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_ARC :
{
sal_uInt32 nStartX, nStartY, nEndX, nEndY;
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY );
pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) );
}
break;
@@ -909,7 +909,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_CHORD :
{
sal_uInt32 nStartX, nStartY, nEndX, nEndY;
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY );
pOut->DrawChord( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) );
}
break;
@@ -917,7 +917,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_PIE :
{
sal_uInt32 nStartX, nStartY, nEndX, nEndY;
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY );
const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 ));
// #i73608# OutputDevice deviates from WMF
@@ -931,7 +931,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_LINETO :
{
- *pWMF >> nX32 >> nY32;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 );
pOut->LineTo( Point( nX32, nY32 ), bRecordPath );
}
break;
@@ -939,7 +939,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_ARCTO :
{
sal_uInt32 nStartX, nStartY, nEndX, nEndY;
- *pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
+ pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY );
pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), sal_True );
}
break;
@@ -976,7 +976,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_SELECTCLIPPATH :
{
sal_Int32 nClippingMode;
- *pWMF >> nClippingMode;
+ pWMF->ReadInt32( nClippingMode );
pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, sal_True );
}
break;
@@ -984,8 +984,8 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_EXTSELECTCLIPRGN :
{
sal_Int32 iMode, cbRgnData;
- *pWMF >> cbRgnData
- >> iMode;
+ pWMF->ReadInt32( cbRgnData )
+ .ReadInt32( iMode );
PolyPolygon aPolyPoly;
if ( cbRgnData )
@@ -1007,9 +1007,12 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
sal_uInt32 nStart = pWMF->Tell() - 8;
pWMF->SeekRel( 0x10 );
- *pWMF >> xDest >> yDest >> cxDest >> cyDest >> aFunc >> xSrc >> ySrc
- >> xformSrc >> BkColorSrc >> iUsageSrc >> offBmiSrc >> cbBmiSrc
- >> offBitsSrc >> cbBitsSrc >>cxSrc>>cySrc ;
+ pWMF->ReadInt32( xDest ).ReadInt32( yDest ).ReadInt32( cxDest ).ReadInt32( cyDest );
+ *pWMF >> aFunc;
+ pWMF->ReadInt32( xSrc ).ReadInt32( ySrc );
+ *pWMF >> xformSrc;
+ pWMF->ReadUInt32( BkColorSrc ).ReadUInt32( iUsageSrc ).ReadUInt32( offBmiSrc ).ReadUInt32( cbBmiSrc )
+ .ReadUInt32( offBitsSrc ).ReadUInt32( cbBitsSrc ).ReadInt32( cxSrc ).ReadInt32( cySrc ) ;
sal_uInt32 dwRop = SRCAND|SRCINVERT;
@@ -1064,12 +1067,13 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
sal_uInt32 nStart = pWMF->Tell() - 8;
pWMF->SeekRel( 0x10 );
- *pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc
- >> xformSrc >> nColor >> iUsageSrc >> offBmiSrc >> cbBmiSrc
- >> offBitsSrc >> cbBitsSrc;
+ pWMF->ReadInt32( xDest ).ReadInt32( yDest ).ReadInt32( cxDest ).ReadInt32( cyDest ).ReadUInt32( dwRop ).ReadInt32( xSrc ).ReadInt32( ySrc )
+ >> xformSrc;
+ pWMF->ReadUInt32( nColor ).ReadUInt32( iUsageSrc ).ReadUInt32( offBmiSrc ).ReadUInt32( cbBmiSrc )
+ .ReadUInt32( offBitsSrc ).ReadUInt32( cbBitsSrc );
if ( nRecType == EMR_STRETCHBLT )
- *pWMF >> cxSrc >> cySrc;
+ pWMF->ReadInt32( cxSrc ).ReadInt32( cySrc );
else
cxSrc = cySrc = 0;
@@ -1124,20 +1128,20 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
sal_uInt32 nStart = pWMF->Tell() - 8;
pWMF->SeekRel( 0x10 );
- *pWMF >> xDest
- >> yDest
- >> xSrc
- >> ySrc
- >> cxSrc
- >> cySrc
- >> offBmiSrc
- >> cbBmiSrc
- >> offBitsSrc
- >> cbBitsSrc
- >> iUsageSrc
- >> dwRop
- >> cxDest
- >> cyDest;
+ pWMF->ReadInt32( xDest )
+ .ReadInt32( yDest )
+ .ReadInt32( xSrc )
+ .ReadInt32( ySrc )
+ .ReadInt32( cxSrc )
+ .ReadInt32( cySrc )
+ .ReadUInt32( offBmiSrc )
+ .ReadUInt32( cbBmiSrc )
+ .ReadUInt32( offBitsSrc )
+ .ReadUInt32( cbBitsSrc )
+ .ReadUInt32( iUsageSrc )
+ .ReadUInt32( dwRop )
+ .ReadInt32( cxDest )
+ .ReadInt32( cyDest );
Bitmap aBitmap;
Rectangle aRect( Point( xDest, yDest ), Size( cxDest, cyDest ) );
@@ -1189,30 +1193,30 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case EMR_EXTCREATEFONTINDIRECTW :
{
- *pWMF >> nIndex;
+ pWMF->ReadUInt32( nIndex );
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
LOGFONTW aLogFont;
- *pWMF >> aLogFont.lfHeight
- >> aLogFont.lfWidth
- >> aLogFont.lfEscapement
- >> aLogFont.lfOrientation
- >> aLogFont.lfWeight
- >> aLogFont.lfItalic
- >> aLogFont.lfUnderline
- >> aLogFont.lfStrikeOut
- >> aLogFont.lfCharSet
- >> aLogFont.lfOutPrecision
- >> aLogFont.lfClipPrecision
- >> aLogFont.lfQuality
- >> aLogFont.lfPitchAndFamily;
+ pWMF->ReadInt32( aLogFont.lfHeight )
+ .ReadInt32( aLogFont.lfWidth )
+ .ReadInt32( aLogFont.lfEscapement )
+ .ReadInt32( aLogFont.lfOrientation )
+ .ReadInt32( aLogFont.lfWeight )
+ .ReadUChar( aLogFont.lfItalic )
+ .ReadUChar( aLogFont.lfUnderline )
+ .ReadUChar( aLogFont.lfStrikeOut )
+ .ReadUChar( aLogFont.lfCharSet )
+ .ReadUChar( aLogFont.lfOutPrecision )
+ .ReadUChar( aLogFont.lfClipPrecision )
+ .ReadUChar( aLogFont.lfQuality )
+ .ReadUChar( aLogFont.lfPitchAndFamily );
sal_Unicode lfFaceName[ LF_FACESIZE ];
for ( int i = 0; i < LF_FACESIZE; i++ )
{
sal_uInt16 nChar;
- *pWMF >> nChar;
+ pWMF->ReadUInt16( nChar );
lfFaceName[ i ] = nChar;
}
aLogFont.alfFaceName = OUString( lfFaceName );
@@ -1246,11 +1250,11 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
nCurPos = pWMF->Tell() - 8;
- *pWMF >> nLeft >> nTop >> nRight >> nBottom >> nGfxMode >> nXScale >> nYScale
- >> ptlReferenceX >> ptlReferenceY >> nLen >> nOffString >> nOptions;
+ pWMF->ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom ).ReadInt32( nGfxMode ).ReadInt32( nXScale ).ReadInt32( nYScale )
+ .ReadInt32( ptlReferenceX ).ReadInt32( ptlReferenceY ).ReadInt32( nLen ).ReadUInt32( nOffString ).ReadUInt32( nOptions );
pWMF->SeekRel( 0x10 );
- *pWMF >> offDx;
+ pWMF->ReadUInt32( offDx );
sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
if ( nOptions & ETO_RTLREADING )
@@ -1269,7 +1273,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
pDX = new sal_Int32[ nLen ];
sal_Int32 i;
for ( i = 0; i < nLen; i++ )
- *pWMF >> pDX[ i ];
+ pWMF->ReadInt32( pDX[ i ] );
}
}
pWMF->Seek( nCurPos + nOffString );
@@ -1356,7 +1360,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
sal_uInt32 nLen;
PolyPolygon aPolyPoly;
pWMF->SeekRel( 0x10 );
- *pWMF >> nLen >> nIndex;
+ pWMF->ReadUInt32( nLen ).ReadUInt32( nIndex );
if ( ImplReadRegion( aPolyPoly, *pWMF, nRecSize ) )
{
@@ -1373,17 +1377,17 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
sal_uInt32 nStart = pWMF->Tell() - 8;
Bitmap aBitmap;
- *pWMF >> nIndex;
+ pWMF->ReadUInt32( nIndex );
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
sal_uInt32 usage, offBmi, cbBmi, offBits, cbBits;
- *pWMF >> usage;
- *pWMF >> offBmi;
- *pWMF >> cbBmi;
- *pWMF >> offBits;
- *pWMF >> cbBits;
+ pWMF->ReadUInt32( usage );
+ pWMF->ReadUInt32( offBmi );
+ pWMF->ReadUInt32( cbBmi );
+ pWMF->ReadUInt32( offBits );
+ pWMF->ReadUInt32( cbBits );
if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) )
bStatus = sal_False;
@@ -1494,7 +1498,7 @@ sal_Bool EnhWMFReader::ReadHeader()
// Spare me the METAFILEHEADER here
// Reading the METAHEADER - EMR_HEADER ([MS-EMF] section 2.3.4.2 EMR_HEADER Record Types)
- *pWMF >> nType >> nHeaderSize;
+ pWMF->ReadUInt32( nType ).ReadUInt32( nHeaderSize );
if ( nType != 1 ) { // per [MS-EMF] 2.3.4.2 EMF Header Record Types, type MUST be 0x00000001
SAL_WARN("vcl.emf", "EMF header type is not set to 0x00000001 - possibly corrupted file?");
return sal_False;
@@ -1504,7 +1508,7 @@ sal_Bool EnhWMFReader::ReadHeader()
// bound size (RectL object, see [MS-WMF] section 2.2.2.19)
Rectangle rclBounds; // rectangle in logical units
- *pWMF >> nLeft >> nTop >> nRight >> nBottom;
+ pWMF->ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom );
rclBounds.Left() = nLeft;
rclBounds.Top() = nTop;
rclBounds.Right() = nRight;
@@ -1512,13 +1516,13 @@ sal_Bool EnhWMFReader::ReadHeader()
// picture frame size (RectL object)
Rectangle rclFrame; // rectangle in device units 1/100th mm
- *pWMF >> nLeft >> nTop >> nRight >> nBottom;
+ pWMF->ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom );
rclFrame.Left() = nLeft;
rclFrame.Top() = nTop;
rclFrame.Right() = nRight;
rclFrame.Bottom() = nBottom;
- *pWMF >> nSignature;
+ pWMF->ReadUInt32( nSignature );
// nSignature MUST be the ASCII characters "FME", see [WS-EMF] 2.2.9 Header Object
// and 2.1.14 FormatSignature Enumeration
@@ -1527,13 +1531,13 @@ sal_Bool EnhWMFReader::ReadHeader()
return sal_False;
}
- *pWMF >> nVersion; // according to [WS-EMF] 2.2.9, this SHOULD be 0x0001000, however
+ pWMF->ReadUInt32( nVersion ); // according to [WS-EMF] 2.2.9, this SHOULD be 0x0001000, however
// Microsoft note that not even Windows checks this...
if ( nVersion != 0x00010000 ) {
SAL_WARN("vcl.emf", "EMF\t\tThis really should be 0x00010000, though not absolutely essential...");
}
- *pWMF >> nEndPos; // size of metafile
+ pWMF->ReadUInt32( nEndPos ); // size of metafile
nEndPos += nStartPos;
sal_uInt32 nStrmPos = pWMF->Tell(); // checking if nEndPos is valid
@@ -1548,7 +1552,7 @@ sal_Bool EnhWMFReader::ReadHeader()
}
pWMF->Seek( nStrmPos );
- *pWMF >> nRecordCount;
+ pWMF->ReadInt32( nRecordCount );
if ( !nRecordCount ) {
SAL_WARN("vcl.emf", "EMF\t\tEMF Header object shows record counter as 0! This shouldn't "
@@ -1559,14 +1563,14 @@ sal_Bool EnhWMFReader::ReadHeader()
// the number of "handles", or graphics objects used in the metafile
sal_uInt16 nHandlesCount;
- *pWMF >> nHandlesCount;
+ pWMF->ReadUInt16( nHandlesCount );
// the next 2 bytes are reserved, but according to [MS-EMF] section 2.2.9
// it MUST be 0x000 and MUST be ignored... the thing is, having such a specific
// value is actually pretty useful in checking if there is possible corruption
sal_uInt16 nReserved;
- *pWMF >> nReserved;
+ pWMF->ReadUInt16( nReserved );
if ( nReserved != 0x0000 ) {
SAL_WARN("vcl.emf", "EMF\t\tEMF Header object's reserved field is NOT 0x0000... possible "
@@ -1581,7 +1585,7 @@ sal_Bool EnhWMFReader::ReadHeader()
pWMF->SeekRel( 0x8 );
sal_Int32 nPixX, nPixY, nMillX, nMillY;
- *pWMF >> nPalEntries >> nPixX >> nPixY >> nMillX >> nMillY;
+ pWMF->ReadUInt32( nPalEntries ).ReadInt32( nPixX ).ReadInt32( nPixY ).ReadInt32( nMillX ).ReadInt32( nMillY );
pOut->SetrclFrame( rclFrame );
pOut->SetrclBounds( rclBounds );
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 988bd0f95e90..f26c971d8f0d 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -307,7 +307,7 @@ void WinMtf::Callback( sal_uInt16 nPercent )
Color WinMtf::ReadColor()
{
sal_uInt32 nColor;
- *pWMF >> nColor;
+ pWMF->ReadUInt32( nColor );
return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
};
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 0f204dc2a5c1..83cbfe570d8c 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -135,7 +135,7 @@ static void GetWinExtMax( const Rectangle& rSource, Rectangle& rPlaceableBound,
inline Point WMFReader::ReadPoint()
{
short nX = 0, nY = 0;
- *pWMF >> nX >> nY;
+ pWMF->ReadInt16( nX ).ReadInt16( nY );
return Point( nX, nY );
}
@@ -144,7 +144,7 @@ inline Point WMFReader::ReadPoint()
inline Point WMFReader::ReadYX()
{
short nX = 0, nY = 0;
- *pWMF >> nY >> nX;
+ pWMF->ReadInt16( nY ).ReadInt16( nX );
return Point( nX, nY );
}
@@ -165,7 +165,7 @@ Rectangle WMFReader::ReadRectangle()
Size WMFReader::ReadYXExt()
{
short nW=0, nH=0;
- *pWMF >> nH >> nW;
+ pWMF->ReadInt16( nH ).ReadInt16( nW );
return Size( nW, nH );
}
@@ -184,7 +184,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SETBKMODE:
{
sal_uInt16 nDat = 0;
- *pWMF >> nDat;
+ pWMF->ReadUInt16( nDat );
pOut->SetBkMode( nDat );
}
break;
@@ -193,7 +193,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SETMAPMODE:
{
sal_Int16 nMapMode = 0;
- *pWMF >> nMapMode;
+ pWMF->ReadInt16( nMapMode );
pOut->SetMapMode( nMapMode );
}
break;
@@ -201,7 +201,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SETROP2:
{
sal_uInt16 nROP2 = 0;
- *pWMF >> nROP2;
+ pWMF->ReadUInt16( nROP2 );
pOut->SetRasterOp( nROP2 );
}
break;
@@ -221,7 +221,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SETWINDOWEXT:
{
short nWidth = 0, nHeight = 0;
- *pWMF >> nHeight >> nWidth;
+ pWMF->ReadInt16( nHeight ).ReadInt16( nWidth );
pOut->SetWinExt( Size( nWidth, nHeight ) );
}
break;
@@ -229,7 +229,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_OFFSETWINDOWORG:
{
short nXAdd = 0, nYAdd = 0;
- *pWMF >> nYAdd >> nXAdd;
+ pWMF->ReadInt16( nYAdd ).ReadInt16( nXAdd );
pOut->SetWinOrgOffset( nXAdd, nYAdd );
}
break;
@@ -237,7 +237,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SCALEWINDOWEXT:
{
short nXNum = 0, nXDenom = 0, nYNum = 0, nYDenom = 0;
- *pWMF >> nYDenom >> nYNum >> nXDenom >> nXNum;
+ pWMF->ReadInt16( nYDenom ).ReadInt16( nYNum ).ReadInt16( nXDenom ).ReadInt16( nXNum );
pOut->ScaleWinExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom );
}
break;
@@ -249,7 +249,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_OFFSETVIEWPORTORG:
{
short nXAdd = 0, nYAdd = 0;
- *pWMF >> nYAdd >> nXAdd;
+ pWMF->ReadInt16( nYAdd ).ReadInt16( nXAdd );
pOut->SetDevOrgOffset( nXAdd, nYAdd );
}
break;
@@ -257,7 +257,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SCALEVIEWPORTEXT:
{
short nXNum = 0, nXDenom = 0, nYNum = 0, nYDenom = 0;
- *pWMF >> nYDenom >> nYNum >> nXDenom >> nXNum;
+ pWMF->ReadInt16( nYDenom ).ReadInt16( nYNum ).ReadInt16( nXDenom ).ReadInt16( nXNum );
pOut->ScaleDevExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom );
}
break;
@@ -338,7 +338,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_POLYGON:
{
sal_uInt16 nPoints = 0;
- *pWMF >> nPoints;
+ pWMF->ReadUInt16( nPoints );
Polygon aPoly( nPoints );
for( sal_uInt16 i = 0; i < nPoints; i++ )
aPoly[ i ] = ReadPoint();
@@ -351,7 +351,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
bool bRecordOk = true;
sal_uInt16 nPolyCount(0);
// Number of polygons:
- *pWMF >> nPolyCount;
+ pWMF->ReadUInt16( nPolyCount );
if (nPolyCount && pWMF->good())
{
// Number of points of each polygon. Determine total number of points
@@ -361,7 +361,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_uInt16 nPoints = 0;
for (sal_uInt16 a = 0; a < nPolyCount && pWMF->good(); ++a)
{
- *pWMF >> pnPoints[a];
+ pWMF->ReadUInt16( pnPoints[a] );
if (pnPoints[a] > SAL_MAX_UINT16 - nPoints)
{
@@ -413,7 +413,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_POLYLINE:
{
sal_uInt16 nPoints = 0;
- *pWMF >> nPoints;
+ pWMF->ReadUInt16( nPoints );
Polygon aPoly( nPoints );
for(sal_uInt16 i = 0; i < nPoints; i++ )
aPoly[ i ] = ReadPoint();
@@ -449,7 +449,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_TEXTOUT:
{
sal_uInt16 nLength = 0;
- *pWMF >> nLength;
+ pWMF->ReadUInt16( nLength );
if ( nLength )
{
char* pChar = new char[ ( nLength + 1 ) &~ 1 ];
@@ -472,10 +472,10 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pWMF->SeekRel(-6);
nRecordPos = pWMF->Tell();
- *pWMF >> nRecordSize;
+ pWMF->ReadInt32( nRecordSize );
pWMF->SeekRel(2);
aPosition = ReadYX();
- *pWMF >> nLen >> nOptions;
+ pWMF->ReadUInt16( nLen ).ReadUInt16( nOptions );
sal_Int32 nTextLayoutMode = TEXT_LAYOUT_DEFAULT;
if ( nOptions & ETO_RTLREADING )
@@ -515,7 +515,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
if ( pWMF->Tell() >= nMaxStreamPos )
break;
- *pWMF >> nDx;
+ pWMF->ReadInt16( nDx );
if ( nNewTextLen != nOriginalTextLen )
{
sal_Unicode nUniChar = aText[i];
@@ -527,7 +527,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
break;
while ( nDxCount-- )
{
- *pWMF >> nDxTmp;
+ pWMF->ReadInt16( nDxTmp );
nDx = nDx + nDxTmp;
}
}
@@ -551,7 +551,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SELECTOBJECT:
{
sal_Int16 nObjIndex = 0;
- *pWMF >> nObjIndex;
+ pWMF->ReadInt16( nObjIndex );
pOut->SelectObject( nObjIndex );
}
break;
@@ -559,7 +559,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SETTEXTALIGN:
{
sal_uInt16 nAlign = 0;
- *pWMF >> nAlign;
+ pWMF->ReadUInt16( nAlign );
pOut->SetTextAlign( nAlign );
}
break;
@@ -584,10 +584,10 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_uInt16 nSx = 0, nSy = 0, nSxe = 0, nSye = 0, nDontKnow = 0, nWidth = 0, nHeight = 0, nBytesPerScan = 0;
sal_uInt8 nPlanes, nBitCount;
- *pWMF >> nWinROP
- >> nSy >> nSx >> nSye >> nSxe;
+ pWMF->ReadInt32( nWinROP )
+ .ReadUInt16( nSy ).ReadUInt16( nSx ).ReadUInt16( nSye ).ReadUInt16( nSxe );
Point aPoint( ReadYX() );
- *pWMF >> nDontKnow >> nWidth >> nHeight >> nBytesPerScan >> nPlanes >> nBitCount;
+ pWMF->ReadUInt16( nDontKnow ).ReadUInt16( nWidth ).ReadUInt16( nHeight ).ReadUInt16( nBytesPerScan ).ReadUChar( nPlanes ).ReadUChar( nBitCount );
if ( nWidth && nHeight && ( nPlanes == 1 ) && ( nBitCount == 1 ) )
{
@@ -602,7 +602,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
for (sal_uInt16 scan = 0; scan < nBytesPerScan; scan++ )
{
sal_Int8 nEightPixels = 0;
- *pWMF >> nEightPixels;
+ pWMF->ReadSChar( nEightPixels );
for (sal_Int8 i = 7; i >= 0; i-- )
{
if ( x < nWidth )
@@ -637,24 +637,24 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_uInt16 nSx = 0, nSy = 0, nSxe = 0, nSye = 0, nUsage = 0;
Bitmap aBmp;
- *pWMF >> nWinROP;
+ pWMF->ReadInt32( nWinROP );
if( nFunc == W_META_STRETCHDIB )
- *pWMF >> nUsage;
+ pWMF->ReadUInt16( nUsage );
// nSye and nSxe is the number of pixels that has to been used
// If they are set to zero, it is as indicator not to scale the bitmap later
//
if( nFunc == W_META_STRETCHDIB || nFunc == W_META_STRETCHBLT || nFunc == W_META_DIBSTRETCHBLT )
- *pWMF >> nSye >> nSxe;
+ pWMF->ReadUInt16( nSye ).ReadUInt16( nSxe );
// nSy and nx is the offset of the first pixel
- *pWMF >> nSy >> nSx;
+ pWMF->ReadUInt16( nSy ).ReadUInt16( nSx );
if( nFunc == W_META_STRETCHDIB || nFunc == W_META_DIBBITBLT || nFunc == W_META_DIBSTRETCHBLT )
{
if ( nWinROP == PATCOPY )
- *pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage
+ pWMF->ReadUInt16( nUsage ); // i don't know anything of this parameter, so its called nUsage
// pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False );
Size aDestSize( ReadYXExt() );
@@ -685,7 +685,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_uInt32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1;
sal_uInt16 nFunction = 0;
- *pWMF >> nFunction >> nFunction;
+ pWMF->ReadUInt16( nFunction ).ReadUInt16( nFunction );
ReadDIB(aBmp, *pWMF, false);
pBmp = aBmp.AcquireReadAccess();
@@ -715,7 +715,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_DELETEOBJECT:
{
sal_Int16 nIndex = 0;
- *pWMF >> nIndex;
+ pWMF->ReadInt16( nIndex );
pOut->DeleteObject( nIndex );
}
break;
@@ -743,7 +743,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
LineInfo aLineInfo;
sal_uInt16 nStyle = 0, nWidth = 0, nHeight = 0;
- *pWMF >> nStyle >> nWidth >> nHeight;
+ pWMF->ReadUInt16( nStyle ).ReadUInt16( nWidth ).ReadUInt16( nHeight );
if ( nWidth )
aLineInfo.SetWidth( nWidth );
@@ -823,7 +823,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_CREATEBRUSHINDIRECT:
{
sal_uInt16 nStyle = 0;
- *pWMF >> nStyle;
+ pWMF->ReadUInt16( nStyle );
pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) );
}
break;
@@ -836,9 +836,9 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
LOGFONTW aLogFont;
aFontSize = ReadYXExt();
- *pWMF >> lfEscapement >> lfOrientation >> lfWeight
- >> aLogFont.lfItalic >> aLogFont.lfUnderline >> aLogFont.lfStrikeOut >> aLogFont.lfCharSet >> aLogFont.lfOutPrecision
- >> aLogFont.lfClipPrecision >> aLogFont.lfQuality >> aLogFont.lfPitchAndFamily;
+ pWMF->ReadInt16( lfEscapement ).ReadInt16( lfOrientation ).ReadInt16( lfWeight )
+ .ReadUChar( aLogFont.lfItalic ).ReadUChar( aLogFont.lfUnderline ).ReadUChar( aLogFont.lfStrikeOut ).ReadUChar( aLogFont.lfCharSet ).ReadUChar( aLogFont.lfOutPrecision )
+ .ReadUChar( aLogFont.lfClipPrecision ).ReadUChar( aLogFont.lfQuality ).ReadUChar( aLogFont.lfPitchAndFamily );
pWMF->Read( lfFaceName, LF_FACESIZE );
aLogFont.lfWidth = aFontSize.Width();
aLogFont.lfHeight = aFontSize.Height();
@@ -888,7 +888,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_PATBLT:
{
sal_uInt32 nROP = 0, nOldROP = 0;
- *pWMF >> nROP;
+ pWMF->ReadUInt32( nROP );
Size aSize = ReadYXExt();
nOldROP = pOut->SetRasterOp( nROP );
pOut->DrawRect( Rectangle( ReadYX(), aSize ), sal_False );
@@ -899,7 +899,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
case W_META_SELECTCLIPREGION:
{
sal_Int16 nObjIndex = 0;
- *pWMF >> nObjIndex;
+ pWMF->ReadInt16( nObjIndex );
if ( !nObjIndex )
{
PolyPolygon aEmptyPolyPoly;
@@ -923,22 +923,22 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
if ( nRecSize >= 4 ) // minimal escape length
{
sal_uInt16 nMode = 0, nLen = 0;
- *pWMF >> nMode
- >> nLen;
+ pWMF->ReadUInt16( nMode )
+ .ReadUInt16( nLen );
if ( ( nMode == W_MFCOMMENT ) && ( nLen >= 4 ) )
{
sal_uInt32 nNewMagic = 0; // we have to read int32 for
- *pWMF >> nNewMagic; // META_ESCAPE_ENHANCED_METAFILE CommentIdentifier
+ pWMF->ReadUInt32( nNewMagic ); // META_ESCAPE_ENHANCED_METAFILE CommentIdentifier
if( nNewMagic == 0x2c2a4f4f && nLen >= 14 )
{
sal_uInt16 nMagic2 = 0;
- *pWMF >> nMagic2;
+ pWMF->ReadUInt16( nMagic2 );
if( nMagic2 == 0x0a ) // 2nd half of magic
{ // continue with private escape
sal_uInt32 nCheck = 0, nEsc = 0;
- *pWMF >> nCheck
- >> nEsc;
+ pWMF->ReadUInt32( nCheck )
+ .ReadUInt32( nEsc );
sal_uInt32 nEscLen = nLen - 14;
if ( nEscLen <= ( nRecSize * 2 ) )
@@ -980,9 +980,9 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
aMemoryStream.Seek( STREAM_SEEK_TO_BEGIN );
//#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpX(0), nTmpY(0);
- aMemoryStream >> nTmpX
- >> nTmpY
- >> nStringLen;
+ aMemoryStream.ReadInt32( nTmpX )
+ .ReadInt32( nTmpY )
+ .ReadUInt32( nStringLen );
aPt.X() = nTmpX;
aPt.Y() = nTmpY;
@@ -990,14 +990,14 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
aString = read_uInt16s_ToOUString(aMemoryStream, nStringLen);
- aMemoryStream >> nDXCount;
+ aMemoryStream.ReadUInt32( nDXCount );
if ( ( static_cast< sal_uInt64 >( nDXCount ) * sizeof( sal_Int32 ) ) >= ( nEscLen - aMemoryStream.Tell() ) )
nDXCount = 0;
if ( nDXCount )
pDXAry = new sal_Int32[ nDXCount ];
for (sal_uInt32 i = 0; i < nDXCount; i++ )
- aMemoryStream >> pDXAry[ i ];
- aMemoryStream >> nSkipActions;
+ aMemoryStream.ReadInt32( pDXAry[ i ] );
+ aMemoryStream.ReadUInt32( nSkipActions );
pOut->DrawText( aPt, aString, pDXAry );
delete[] pDXAry;
}
@@ -1016,9 +1016,9 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
nCurRecSize = 0, nRemainingSize = 0, nEMFTotalSize = 0;
sal_uInt16 nCheck = 0;
- *pWMF >> nComType >> nVersion >> nCheck >> nFlags
- >> nComRecCount >> nCurRecSize
- >> nRemainingSize >> nEMFTotalSize; // the nRemainingSize is not mentioned in MSDN documentation
+ pWMF->ReadUInt32( nComType ).ReadUInt32( nVersion ).ReadUInt16( nCheck ).ReadUInt32( nFlags )
+ .ReadUInt32( nComRecCount ).ReadUInt32( nCurRecSize )
+ .ReadUInt32( nRemainingSize ).ReadUInt32( nEMFTotalSize ); // the nRemainingSize is not mentioned in MSDN documentation
// but it seems to be required to read in data produced by OLE
if( nComType == 0x01 && nVersion == 0x10000 && nComRecCount )
@@ -1097,7 +1097,7 @@ sal_Bool WMFReader::ReadHeader()
sal_uInt32 nPlaceableMetaKey(0);
// if available read the METAFILEHEADER
- *pWMF >> nPlaceableMetaKey;
+ pWMF->ReadUInt32( nPlaceableMetaKey );
if (!pWMF->good())
return false;
@@ -1111,17 +1111,17 @@ sal_Bool WMFReader::ReadHeader()
pWMF->SeekRel(2);
// BoundRect
- *pWMF >> nVal;
+ pWMF->ReadInt16( nVal );
aPlaceableBound.Left() = nVal;
- *pWMF >> nVal;
+ pWMF->ReadInt16( nVal );
aPlaceableBound.Top() = nVal;
- *pWMF >> nVal;
+ pWMF->ReadInt16( nVal );
aPlaceableBound.Right() = nVal;
- *pWMF >> nVal;
+ pWMF->ReadInt16( nVal );
aPlaceableBound.Bottom() = nVal;
// inch
- *pWMF >> nUnitsPerInch;
+ pWMF->ReadUInt16( nUnitsPerInch );
// reserved
pWMF->SeekRel( 4 );
@@ -1163,13 +1163,13 @@ sal_Bool WMFReader::ReadHeader()
// read the METAHEADER
sal_uInt32 nMetaKey(0);
- *pWMF >> nMetaKey; // type and headersize
+ pWMF->ReadUInt32( nMetaKey ); // type and headersize
if (!pWMF->good())
return false;
if (nMetaKey != 0x00090001)
{
sal_uInt16 aNextWord(0);
- *pWMF >> aNextWord;
+ pWMF->ReadUInt16( aNextWord );
if (nMetaKey != 0x10000 || aNextWord != 0x09)
{
pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -1228,7 +1228,7 @@ void WMFReader::ReadWMF()
Callback( (sal_uInt16) nPercent );
nLastPercent = nPercent;
}
- *pWMF >> nRecSize >> nFunction;
+ pWMF->ReadUInt32( nRecSize ).ReadUInt16( nFunction );
if( pWMF->GetError()
|| ( nRecSize < 3 )
@@ -1328,7 +1328,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
while( bRet )
{
- *pStm >> nRSize >> nFunction;
+ pStm->ReadUInt32( nRSize ).ReadUInt16( nFunction );
if( pStm->GetError() || ( nRSize < 3 ) || ( nRSize==3 && nFunction==0 ) || pStm->IsEof() )
{
@@ -1352,13 +1352,13 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_SETWINDOWEXT:
{
sal_Int16 nWidth(0), nHeight(0);
- *pStm >> nHeight >> nWidth;
+ pStm->ReadInt16( nHeight ).ReadInt16( nWidth );
rPlaceableBound.SetSize( Size( nWidth, nHeight ) );
}
break;
case W_META_SETMAPMODE :
- *pStm >> nMapMode;
+ pStm->ReadInt16( nMapMode );
break;
case W_META_MOVETO:
@@ -1389,7 +1389,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYGON:
{
sal_uInt16 nPoints;
- *pStm >> nPoints;
+ pStm->ReadUInt16( nPoints );
for(sal_uInt16 i = 0; i < nPoints; i++ )
GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode );
}
@@ -1399,11 +1399,11 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
{
bool bRecordOk = true;
sal_uInt16 nPoly, nPoints = 0;
- *pStm >> nPoly;
+ pStm->ReadUInt16( nPoly );
for(sal_uInt16 i = 0; i < nPoly; i++ )
{
sal_uInt16 nP = 0;
- *pStm >> nP;
+ pStm->ReadUInt16( nP );
if (nP > SAL_MAX_UINT16 - nPoints)
{
bRecordOk = false;
@@ -1440,7 +1440,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYLINE:
{
sal_uInt16 nPoints;
- *pStm >> nPoints;
+ pStm->ReadUInt16( nPoints );
for(sal_uInt16 i = 0; i < nPoints; i++ )
GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode );
}
@@ -1456,7 +1456,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_TEXTOUT:
{
sal_uInt16 nLength;
- *pStm >> nLength;
+ pStm->ReadUInt16( nLength );
// todo: we also have to take care of the text width
if ( nLength )
{
@@ -1472,7 +1472,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
Point aPosition;
aPosition = ReadYX();
- *pStm >> nLen >> nOptions;
+ pStm->ReadUInt16( nLen ).ReadUInt16( nOptions );
// todo: we also have to take care of the text width
if( nLen )
GetWinExtMax( aPosition, rPlaceableBound, nMapMode );
@@ -1486,24 +1486,24 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
{
sal_Int32 nWinROP;
sal_uInt16 nSx, nSy, nSxe, nSye, nUsage;
- *pStm >> nWinROP;
+ pStm->ReadInt32( nWinROP );
if( nFunction == W_META_STRETCHDIB )
- *pStm >> nUsage;
+ pStm->ReadUInt16( nUsage );
// nSye and nSxe is the number of pixels that has to been used
if( nFunction == W_META_STRETCHDIB || nFunction == W_META_STRETCHBLT || nFunction == W_META_DIBSTRETCHBLT )
- *pStm >> nSye >> nSxe;
+ pStm->ReadUInt16( nSye ).ReadUInt16( nSxe );
else
nSye = nSxe = 0; // set this to zero as indicator not to scale the bitmap later
// nSy and nx is the offset of the first pixel
- *pStm >> nSy >> nSx;
+ pStm->ReadUInt16( nSy ).ReadUInt16( nSx );
if( nFunction == W_META_STRETCHDIB || nFunction == W_META_DIBBITBLT || nFunction == W_META_DIBSTRETCHBLT )
{
if ( nWinROP == PATCOPY )
- *pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage
+ pStm->ReadUInt16( nUsage ); // i don't know anything of this parameter, so its called nUsage
// pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False );
Size aDestSize( ReadYXExt() );
@@ -1519,7 +1519,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_PATBLT:
{
sal_uInt32 nROP;
- *pStm >> nROP;
+ pStm->ReadUInt32( nROP );
Size aSize = ReadYXExt();
GetWinExtMax( Rectangle( ReadYX(), aSize ), rPlaceableBound, nMapMode );
}
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index c0e2f46993c9..002756aaaeed 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -34,7 +34,7 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaF
sal_uInt16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt();
rStreamWMF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rStreamWMF.Seek( 0x28 );
- rStreamWMF >> nMetaType;
+ rStreamWMF.ReadUInt32( nMetaType );
rStreamWMF.Seek( nOrgPos );
if ( nMetaType == 0x464d4520 )
{
@@ -71,7 +71,7 @@ sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigI
nOrigNumberFormat));
rStream.Seek( 0x28 );
- rStream >> nMetaType;
+ rStream.ReadUInt32( nMetaType );
rStream.Seek( nOrgPos );
if (!rStream.good())
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index c8c6b2d802a0..1baff780e01f 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1880,7 +1880,7 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF )
while( nPos + 1 < nTotalSize )
{
- aStream >> nWord;
+ aStream.ReadUInt16( nWord );
nCheckSum ^= nWord;
nPos += 2;
}
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index dc228087dd07..6b914d7dd8bb 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -748,7 +748,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
nStmPos = rIStm.Tell();
- rIStm >> nAnimMagic1 >> nAnimMagic2;
+ rIStm.ReadUInt32( nAnimMagic1 ).ReadUInt32( nAnimMagic2 );
rAnimation.Clear();
@@ -762,7 +762,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
rIStm.Seek( nStmPos );
ReadDIBBitmapEx(rAnimation.maBitmapEx, rIStm);
nStmPos = rIStm.Tell();
- rIStm >> nAnimMagic1 >> nAnimMagic2;
+ rIStm.ReadUInt32( nAnimMagic1 ).ReadUInt32( nAnimMagic2 );
if( ( nAnimMagic1 == 0x5344414e ) && ( nAnimMagic2 == 0x494d4931 ) && !rIStm.GetError() )
bReadAnimations = true;
@@ -785,15 +785,15 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
ReadPair( rIStm, aAnimBmp.aPosPix );
ReadPair( rIStm, aAnimBmp.aSizePix );
ReadPair( rIStm, rAnimation.maGlobalSize );
- rIStm >> nTmp16; aAnimBmp.nWait = ( ( 65535 == nTmp16 ) ? ANIMATION_TIMEOUT_ON_CLICK : nTmp16 );
- rIStm >> nTmp16; aAnimBmp.eDisposal = ( Disposal) nTmp16;
- rIStm >> cTmp; aAnimBmp.bUserInput = (sal_Bool) cTmp;
- rIStm >> nTmp32; rAnimation.mnLoopCount = (sal_uInt16) nTmp32;
- rIStm >> nTmp32; // Unused
- rIStm >> nTmp32; // Unused
- rIStm >> nTmp32; // Unused
+ rIStm.ReadUInt16( nTmp16 ); aAnimBmp.nWait = ( ( 65535 == nTmp16 ) ? ANIMATION_TIMEOUT_ON_CLICK : nTmp16 );
+ rIStm.ReadUInt16( nTmp16 ); aAnimBmp.eDisposal = ( Disposal) nTmp16;
+ rIStm.ReadUChar( cTmp ); aAnimBmp.bUserInput = (sal_Bool) cTmp;
+ rIStm.ReadUInt32( nTmp32 ); rAnimation.mnLoopCount = (sal_uInt16) nTmp32;
+ rIStm.ReadUInt32( nTmp32 ); // Unused
+ rIStm.ReadUInt32( nTmp32 ); // Unused
+ rIStm.ReadUInt32( nTmp32 ); // Unused
read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Unused
- rIStm >> nTmp16; // The rest to read
+ rIStm.ReadUInt16( nTmp16 ); // The rest to read
rAnimation.Insert( aAnimBmp );
}
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 75461611d20d..6cb0fd44d493 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -53,7 +53,7 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
{
sal_Int32 nSize;
- rIStm >> nSize;
+ rIStm.ReadInt32( nSize );
rPoly = Polygon( (sal_uInt16) nSize );
for( sal_uInt16 i = 0; i < (sal_uInt16) nSize; i++ )
@@ -65,7 +65,7 @@ void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
Polygon aPoly;
sal_Int32 nPolyCount;
- rIStm >> nPolyCount;
+ rIStm.ReadInt32( nPolyCount );
for( sal_uInt16 i = 0; i < (sal_uInt16) nPolyCount; i++ )
{
@@ -107,9 +107,9 @@ void ImplReadColor( SvStream& rIStm, Color& rColor )
{
sal_Int16 nVal;
- rIStm >> nVal; rColor.SetRed( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
- rIStm >> nVal; rColor.SetGreen( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
- rIStm >> nVal; rColor.SetBlue( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
+ rIStm.ReadInt16( nVal ); rColor.SetRed( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
+ rIStm.ReadInt16( nVal ); rColor.SetGreen( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
+ rIStm.ReadInt16( nVal ); rColor.SetBlue( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
}
void ImplWriteColor( SvStream& rOStm, const Color& rColor )
@@ -135,9 +135,9 @@ void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
sal_Int32 nYDenom;
sal_Int16 nUnit;
- rIStm >> nUnit;
+ rIStm.ReadInt16( nUnit );
ReadPair( rIStm, aOrg );
- rIStm >> nXNum >> nXDenom >> nYNum >> nYDenom;
+ rIStm.ReadInt32( nXNum ).ReadInt32( nXDenom ).ReadInt32( nYNum ).ReadInt32( nYDenom );
rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) );
}
@@ -286,8 +286,8 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, OUString& rSt
sal_Size nStringLen;
rIStm.Seek( nStrmPos );
- rIStm >> nType
- >> nActionSize;
+ rIStm .ReadUInt16( nType )
+ .ReadUInt32( nActionSize );
nStringLen = (nActionSize - 4) >> 1;
@@ -304,7 +304,7 @@ void ImplSkipActions( SvStream& rIStm, sal_uLong nSkipCount )
for( sal_uLong i = 0UL; i < nSkipCount; i++ )
{
- rIStm >> nType >> nActionSize;
+ rIStm.ReadInt16( nType ).ReadInt32( nActionSize );
rIStm.SeekRel( nActionSize - 4L );
}
}
@@ -393,12 +393,12 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
{
rPolyPoly.Clear();
sal_uInt16 nPolygonCount(0);
- rIStm >> nPolygonCount;
+ rIStm.ReadUInt16( nPolygonCount );
for(sal_uInt16 a(0); a < nPolygonCount; a++)
{
sal_uInt16 nPointCount(0);
- rIStm >> nPointCount;
+ rIStm.ReadUInt16( nPointCount );
Polygon aCandidate(nPointCount);
if(nPointCount)
@@ -409,7 +409,7 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
}
sal_uInt8 bHasFlags(false);
- rIStm >> bHasFlags;
+ rIStm.ReadUChar( bHasFlags );
if(bHasFlags)
{
@@ -417,7 +417,7 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
for(sal_uInt16 c(0); c < nPointCount; c++)
{
- rIStm >> aPolyFlags;
+ rIStm.ReadUChar( aPolyFlags );
aCandidate.SetFlags(c, (PolyFlags)aPolyFlags);
}
}
@@ -452,13 +452,13 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
// read header
rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Identifier
- rIStm >> nSize; // Size
- rIStm >> nVersion; // Version
+ rIStm.ReadInt16( nSize ); // Size
+ rIStm.ReadInt16( nVersion ); // Version
//#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmp32(0);
- rIStm >> nTmp32;
+ rIStm.ReadInt32( nTmp32 );
aPrefSz.Width() = nTmp32; // PrefSize.Width()
- rIStm >> nTmp32;
+ rIStm.ReadInt32( nTmp32 );
aPrefSz.Height() = nTmp32; // PrefSize.Height()
// check header-magic and version
@@ -493,7 +493,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32 nUnicodeCommentActionNumber = 0;
ImplReadMapMode( rIStm, aMapMode ); // MapMode
- rIStm >> nActions; // Action count
+ rIStm.ReadInt32( nActions ); // Action count
rMtf.SetPrefSize( aPrefSz );
rMtf.SetPrefMapMode( aMapMode );
@@ -501,9 +501,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
for (sal_Int32 i = 0; i < nActions; ++i)
{
- rIStm >> nType;
+ rIStm.ReadInt16( nType );
sal_Int32 nActBegin = rIStm.Tell();
- rIStm >> nActionSize;
+ rIStm.ReadInt32( nActionSize );
DBG_ASSERT( ( nType <= 33 ) || ( nType >= 1024 ), "Unknown GDIMetaAction while converting!" );
@@ -535,7 +535,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case (GDI_LINEJOIN_ACTION) :
{
sal_Int16 nLineJoin(0);
- rIStm >> nLineJoin;
+ rIStm.ReadInt16( nLineJoin );
aLineInfo.SetLineJoin((basegfx::B2DLineJoin)nLineJoin);
}
break;
@@ -543,7 +543,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case (GDI_LINECAP_ACTION) :
{
sal_Int16 nLineCap(0);
- rIStm >> nLineCap;
+ rIStm.ReadInt16( nLineCap );
aLineInfo.SetLineCap((com::sun::star::drawing::LineCap)nLineCap);
}
break;
@@ -553,11 +553,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int16 a(0);
sal_Int32 b(0);
- rIStm >> a; aLineInfo.SetDashCount(a);
- rIStm >> b; aLineInfo.SetDashLen(b);
- rIStm >> a; aLineInfo.SetDotCount(a);
- rIStm >> b; aLineInfo.SetDotLen(b);
- rIStm >> b; aLineInfo.SetDistance(b);
+ rIStm.ReadInt16( a ); aLineInfo.SetDashCount(a);
+ rIStm.ReadInt32( b ); aLineInfo.SetDashLen(b);
+ rIStm.ReadInt16( a ); aLineInfo.SetDotCount(a);
+ rIStm.ReadInt32( b ); aLineInfo.SetDotLen(b);
+ rIStm.ReadInt32( b ); aLineInfo.SetDistance(b);
if(((aLineInfo.GetDashCount() && aLineInfo.GetDashLen())
|| (aLineInfo.GetDotCount() && aLineInfo.GetDotLen()))
@@ -639,7 +639,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_RECT_ACTION ):
{
ImplReadRect( rIStm, aRect );
- rIStm >> nTmp >> nTmp1;
+ rIStm.ReadInt32( nTmp ).ReadInt32( nTmp1 );
if( nTmp || nTmp1 )
rMtf.AddAction( new MetaRoundRectAction( aRect, nTmp, nTmp1 ) );
@@ -794,10 +794,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor );
rIStm.Read( aName, 32 );
aFont.SetName( OUString( aName, strlen(aName), rIStm.GetStreamCharSet() ) );
- rIStm >> nWidth >> nHeight;
- rIStm >> nCharOrient >> nLineOrient;
- rIStm >> nCharSet >> nFamily >> nPitch >> nAlign >> nWeight >> nUnderline >> nStrikeout;
- rIStm >> bItalic >> bOutline >> bShadow >> bTransparent;
+ rIStm.ReadInt32( nWidth ).ReadInt32( nHeight );
+ rIStm.ReadInt16( nCharOrient ).ReadInt16( nLineOrient );
+ rIStm.ReadInt16( nCharSet ).ReadInt16( nFamily ).ReadInt16( nPitch ).ReadInt16( nAlign ).ReadInt16( nWeight ).ReadInt16( nUnderline ).ReadInt16( nStrikeout );
+ rIStm.ReadUChar( bItalic ).ReadUChar( bOutline ).ReadUChar( bShadow ).ReadUChar( bTransparent );
aFont.SetSize( Size( nWidth, nHeight ) );
aFont.SetCharSet( (rtl_TextEncoding) nCharSet );
@@ -832,12 +832,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
sal_Int32 nIndex, nLen;
- ReadPair( rIStm, aPt ) >> nIndex >> nLen >> nTmp;
+ ReadPair( rIStm, aPt ).ReadInt32( nIndex ).ReadInt32( nLen ).ReadInt32( nTmp );
if (nTmp > 0)
{
OString aByteStr = read_uInt8s_ToOString(rIStm, nTmp);
sal_uInt8 nTerminator = 0;
- rIStm >> nTerminator;
+ rIStm.ReadUChar( nTerminator );
DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" );
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
@@ -854,12 +854,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32* pDXAry = NULL;
sal_Int32 nIndex, nLen, nAryLen;
- ReadPair( rIStm, aPt ) >> nIndex >> nLen >> nTmp >> nAryLen;
+ ReadPair( rIStm, aPt ).ReadInt32( nIndex ).ReadInt32( nLen ).ReadInt32( nTmp ).ReadInt32( nAryLen );
if (nTmp > 0)
{
OString aByteStr = read_uInt8s_ToOString(rIStm, nTmp);
sal_uInt8 nTerminator = 0;
- rIStm >> nTerminator;
+ rIStm.ReadUChar( nTerminator );
DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" );
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
@@ -871,7 +871,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
pDXAry = new sal_Int32[ std::max( nAryLen, nStrLen ) ];
for (sal_Int32 j = 0; j < nAryLen; ++j)
- rIStm >> nTmp, pDXAry[ j ] = nTmp;
+ rIStm.ReadInt32( nTmp ), pDXAry[ j ] = nTmp;
// #106172# Add last DX array elem, if missing
if( nAryLen != nStrLen )
@@ -916,12 +916,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
sal_Int32 nIndex, nLen, nWidth;
- ReadPair( rIStm, aPt ) >> nIndex >> nLen >> nTmp >> nWidth;
+ ReadPair( rIStm, aPt ).ReadInt32( nIndex ).ReadInt32( nLen ).ReadInt32( nTmp ).ReadInt32( nWidth );
if (nTmp > 0)
{
OString aByteStr = read_uInt8s_ToOString(rIStm, nTmp);
sal_uInt8 nTerminator = 0;
- rIStm >> nTerminator;
+ rIStm.ReadUChar( nTerminator );
DBG_ASSERT( nTerminator == 0, "expected string to be NULL terminated" );
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
@@ -974,7 +974,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int16 nPenStyle;
ImplReadColor( rIStm, aActionColor );
- rIStm >> nPenWidth >> nPenStyle;
+ rIStm.ReadInt32( nPenWidth ).ReadInt16( nPenStyle );
aLineInfo.SetStyle( nPenStyle ? LINE_SOLID : LINE_NONE );
aLineInfo.SetWidth( nPenWidth );
@@ -990,7 +990,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ImplReadColor( rIStm, aActionColor );
rIStm.SeekRel( 6L );
- rIStm >> nBrushStyle;
+ rIStm.ReadInt16( nBrushStyle );
rMtf.AddAction( new MetaFillColorAction( aActionColor, nBrushStyle != 0 ) );
rIStm.SeekRel( 2L );
}
@@ -1013,7 +1013,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int16 bIntersect;
sal_Bool bClip = sal_False;
- rIStm >> nRegType >> bIntersect;
+ rIStm.ReadInt16( nRegType ).ReadInt16( bIntersect );
ImplReadRect( rIStm, aRect );
switch( nRegType )
@@ -1044,7 +1044,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
PolyPolygon aPolyPoly;
sal_Int32 nPolyCount;
- rIStm >> nPolyCount;
+ rIStm.ReadInt32( nPolyCount );
for( sal_uInt16 j = 0; j < (sal_uInt16) nPolyCount; j++ )
{
@@ -1067,7 +1067,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_MOVECLIPREGION_ACTION ):
{
- rIStm >> nTmp >> nTmp1;
+ rIStm.ReadInt32( nTmp ).ReadInt32( nTmp1 );
rMtf.AddAction( new MetaMoveClipRegionAction( nTmp, nTmp1 ) );
}
break;
@@ -1084,7 +1084,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
RasterOp eRasterOp;
sal_Int16 nRasterOp;
- rIStm >> nRasterOp;
+ rIStm.ReadInt16( nRasterOp );
switch( nRasterOp )
{
@@ -1156,10 +1156,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int16 nIntensityEnd;
ImplReadRect( rIStm, aRect );
- rIStm >> nStyle;
+ rIStm.ReadInt16( nStyle );
ImplReadColor( rIStm, aStartCol );
ImplReadColor( rIStm, aEndCol );
- rIStm >> nAngle >> nBorder >> nOfsX >> nOfsY >> nIntensityStart >> nIntensityEnd;
+ rIStm.ReadInt16( nAngle ).ReadInt16( nBorder ).ReadInt16( nOfsX ).ReadInt16( nOfsY ).ReadInt16( nIntensityStart ).ReadInt16( nIntensityEnd );
Gradient aGrad( (GradientStyle) nStyle, aStartCol, aEndCol );
@@ -1180,7 +1180,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int16 nTrans;
ReadPolyPolygon( rIStm, aPolyPoly );
- rIStm >> nTrans >> nFollowingActionCount;
+ rIStm.ReadInt16( nTrans ).ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaTransparentAction( aPolyPoly, nTrans ) );
@@ -1200,7 +1200,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ReadPair( rIStm, aPos );
ReadPair( rIStm, aSize );
ReadGradient( rIStm, aGradient );
- rIStm >> nFollowingActionCount;
+ rIStm.ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaFloatTransparentAction( aMtf, aPos, aSize, aGradient ) );
@@ -1216,7 +1216,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ReadPolyPolygon( rIStm, aPolyPoly );
ReadHatch( rIStm, aHatch );
- rIStm >> nFollowingActionCount;
+ rIStm.ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaHatchAction( aPolyPoly, aHatch ) );
@@ -1231,7 +1231,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32 nFollowingActionCount;
ReadPair( rIStm, aRefPoint );
- rIStm >> bSet >> nFollowingActionCount;
+ rIStm.ReadUChar( bSet ).ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaRefPointAction( aRefPoint, bSet ) );
@@ -1252,7 +1252,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32 nFollowingActionCount;
ReadColor( rIStm, aColor );
- rIStm >> bSet >> nFollowingActionCount;
+ rIStm.ReadUChar( bSet ).ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaTextLineColorAction( aColor, bSet ) );
@@ -1270,7 +1270,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32 nFollowingActionCount;
ReadPair( rIStm, aStartPt );
- rIStm >> nWidth >> nStrikeout >> nUnderline >> nFollowingActionCount;
+ rIStm.ReadInt32( nWidth ).ReadUInt32( nStrikeout ).ReadUInt32( nUnderline ).ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaTextLineAction( aStartPt, nWidth,
(FontStrikeout) nStrikeout,
@@ -1289,7 +1289,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
ReadPolyPolygon( rIStm, aPolyPoly );
ReadGradient( rIStm, aGradient );
- rIStm >> nFollowingActionCount;
+ rIStm.ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaGradientExAction( aPolyPoly, aGradient ) );
@@ -1305,7 +1305,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32 nFollowingActionCount;
OString aComment = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
- rIStm >> nValue >> nDataSize;
+ rIStm.ReadInt32( nValue ).ReadUInt32( nDataSize );
if( nDataSize )
{
@@ -1315,7 +1315,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
else
pData = NULL;
- rIStm >> nFollowingActionCount;
+ rIStm.ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
rMtf.AddAction( new MetaCommentAction( aComment, nValue, pData, nDataSize ) );
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 9de7205622be..d0b9c2f92582 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -171,17 +171,17 @@ bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& rHeader, bool& bTopDown
{
// BITMAPINFOHEADER or BITMAPCOREHEADER or BITMAPV5HEADER
const sal_Size aStartPos(rIStm.Tell());
- rIStm >> rHeader.nSize;
+ rIStm.ReadUInt32( rHeader.nSize );
// BITMAPCOREHEADER
if ( rHeader.nSize == DIBCOREHEADERSIZE )
{
sal_Int16 nTmp16;
- rIStm >> nTmp16; rHeader.nWidth = nTmp16;
- rIStm >> nTmp16; rHeader.nHeight = nTmp16;
- rIStm >> rHeader.nPlanes;
- rIStm >> rHeader.nBitCount;
+ rIStm.ReadInt16( nTmp16 ); rHeader.nWidth = nTmp16;
+ rIStm.ReadInt16( nTmp16 ); rHeader.nHeight = nTmp16;
+ rIStm.ReadUInt16( rHeader.nPlanes );
+ rIStm.ReadUInt16( rHeader.nBitCount );
}
else
{
@@ -189,42 +189,42 @@ bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& rHeader, bool& bTopDown
sal_Size nUsed(sizeof(rHeader.nSize));
// read DIBInfoHeader entries
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nWidth; nUsed += sizeof(rHeader.nWidth); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nHeight; nUsed += sizeof(rHeader.nHeight); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nPlanes; nUsed += sizeof(rHeader.nPlanes); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nBitCount; nUsed += sizeof(rHeader.nBitCount); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nCompression; nUsed += sizeof(rHeader.nCompression); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nSizeImage; nUsed += sizeof(rHeader.nSizeImage); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nXPelsPerMeter; nUsed += sizeof(rHeader.nXPelsPerMeter); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nYPelsPerMeter; nUsed += sizeof(rHeader.nYPelsPerMeter); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nColsUsed; nUsed += sizeof(rHeader.nColsUsed); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nColsImportant; nUsed += sizeof(rHeader.nColsImportant); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.nWidth ); nUsed += sizeof(rHeader.nWidth); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.nHeight ); nUsed += sizeof(rHeader.nHeight); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt16( rHeader.nPlanes ); nUsed += sizeof(rHeader.nPlanes); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt16( rHeader.nBitCount ); nUsed += sizeof(rHeader.nBitCount); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nCompression ); nUsed += sizeof(rHeader.nCompression); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nSizeImage ); nUsed += sizeof(rHeader.nSizeImage); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.nXPelsPerMeter ); nUsed += sizeof(rHeader.nXPelsPerMeter); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.nYPelsPerMeter ); nUsed += sizeof(rHeader.nYPelsPerMeter); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nColsUsed ); nUsed += sizeof(rHeader.nColsUsed); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nColsImportant ); nUsed += sizeof(rHeader.nColsImportant); }
// read DIBV5HEADER members
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5RedMask; nUsed += sizeof(rHeader.nV5RedMask); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5GreenMask; nUsed += sizeof(rHeader.nV5GreenMask); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5BlueMask; nUsed += sizeof(rHeader.nV5BlueMask); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5AlphaMask; nUsed += sizeof(rHeader.nV5AlphaMask); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5CSType; nUsed += sizeof(rHeader.nV5CSType); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5RedMask ); nUsed += sizeof(rHeader.nV5RedMask); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5GreenMask ); nUsed += sizeof(rHeader.nV5GreenMask); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5BlueMask ); nUsed += sizeof(rHeader.nV5BlueMask); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5AlphaMask ); nUsed += sizeof(rHeader.nV5AlphaMask); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5CSType ); nUsed += sizeof(rHeader.nV5CSType); }
// read contained CIEXYZTriple's
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzRed.aXyzX; nUsed += sizeof(rHeader.aV5Endpoints.aXyzRed.aXyzX); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzRed.aXyzY; nUsed += sizeof(rHeader.aV5Endpoints.aXyzRed.aXyzY); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzRed.aXyzZ; nUsed += sizeof(rHeader.aV5Endpoints.aXyzRed.aXyzZ); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzGreen.aXyzX; nUsed += sizeof(rHeader.aV5Endpoints.aXyzGreen.aXyzX); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzGreen.aXyzY; nUsed += sizeof(rHeader.aV5Endpoints.aXyzGreen.aXyzY); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzGreen.aXyzZ; nUsed += sizeof(rHeader.aV5Endpoints.aXyzGreen.aXyzZ); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzBlue.aXyzX; nUsed += sizeof(rHeader.aV5Endpoints.aXyzBlue.aXyzX); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzBlue.aXyzY; nUsed += sizeof(rHeader.aV5Endpoints.aXyzBlue.aXyzY); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.aV5Endpoints.aXyzBlue.aXyzZ; nUsed += sizeof(rHeader.aV5Endpoints.aXyzBlue.aXyzZ); }
-
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5GammaRed; nUsed += sizeof(rHeader.nV5GammaRed); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5GammaGreen; nUsed += sizeof(rHeader.nV5GammaGreen); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5GammaBlue; nUsed += sizeof(rHeader.nV5GammaBlue); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5Intent; nUsed += sizeof(rHeader.nV5Intent); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5ProfileData; nUsed += sizeof(rHeader.nV5ProfileData); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5ProfileSize; nUsed += sizeof(rHeader.nV5ProfileSize); }
- if(nUsed < rHeader.nSize) { rIStm >> rHeader.nV5Reserved; nUsed += sizeof(rHeader.nV5Reserved); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzRed.aXyzX ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzRed.aXyzX); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzRed.aXyzY ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzRed.aXyzY); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzRed.aXyzZ ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzRed.aXyzZ); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzGreen.aXyzX ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzGreen.aXyzX); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzGreen.aXyzY ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzGreen.aXyzY); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzGreen.aXyzZ ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzGreen.aXyzZ); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzBlue.aXyzX ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzBlue.aXyzX); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzBlue.aXyzY ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzBlue.aXyzY); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadInt32( rHeader.aV5Endpoints.aXyzBlue.aXyzZ ); nUsed += sizeof(rHeader.aV5Endpoints.aXyzBlue.aXyzZ); }
+
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5GammaRed ); nUsed += sizeof(rHeader.nV5GammaRed); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5GammaGreen ); nUsed += sizeof(rHeader.nV5GammaGreen); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5GammaBlue ); nUsed += sizeof(rHeader.nV5GammaBlue); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5Intent ); nUsed += sizeof(rHeader.nV5Intent); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5ProfileData ); nUsed += sizeof(rHeader.nV5ProfileData); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5ProfileSize ); nUsed += sizeof(rHeader.nV5ProfileSize); }
+ if(nUsed < rHeader.nSize) { rIStm.ReadUInt32( rHeader.nV5Reserved ); nUsed += sizeof(rHeader.nV5Reserved); }
// seek to EndPos
rIStm.Seek(aStartPos + rHeader.nSize);
@@ -422,9 +422,9 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
if(bTCMask && BITFIELDS == rHeader.nCompression)
{
rIStm.SeekRel( -12L );
- rIStm >> nRMask;
- rIStm >> nGMask;
- rIStm >> nBMask;
+ rIStm.ReadUInt32( nRMask );
+ rIStm.ReadUInt32( nGMask );
+ rIStm.ReadUInt32( nBMask );
}
if(bRLE)
@@ -669,7 +669,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
sal_uLong nCodedPos(0);
// read coding information
- rIStm >> nCodedSize >> nUncodedSize >> aHeader.nCompression;
+ rIStm.ReadUInt32( nCodedSize ).ReadUInt32( nUncodedSize ).ReadUInt32( aHeader.nCompression );
pData = (sal_uInt8*) rtl_allocateMemory( nUncodedSize );
// decode buffer
@@ -763,23 +763,23 @@ bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset )
sal_uInt16 nTmp16 = 0;
bool bRet = false;
- rIStm >> nTmp16;
+ rIStm.ReadUInt16( nTmp16 );
if ( ( 0x4D42 == nTmp16 ) || ( 0x4142 == nTmp16 ) )
{
if ( 0x4142 == nTmp16 )
{
rIStm.SeekRel( 12L );
- rIStm >> nTmp16;
+ rIStm.ReadUInt16( nTmp16 );
rIStm.SeekRel( 8L );
- rIStm >> nTmp32;
+ rIStm.ReadUInt32( nTmp32 );
rOffset = nTmp32 - 28UL;
bRet = ( 0x4D42 == nTmp16 );
}
else // 0x4D42 == nTmp16, 'MB' from BITMAPFILEHEADER
{
rIStm.SeekRel( 8L ); // we are on bfSize member of BITMAPFILEHEADER, forward to bfOffBits
- rIStm >> nTmp32; // read bfOffBits
+ rIStm.ReadUInt32( nTmp32 ); // read bfOffBits
rOffset = nTmp32 - 14UL; // adapt offset by sizeof(BITMAPFILEHEADER)
bRet = ( rIStm.GetError() == 0UL );
}
@@ -1449,14 +1449,14 @@ bool ReadDIBBitmapEx(
sal_uInt32 nMagic2(0);
rTarget = BitmapEx(aBmp);
- rIStm >> nMagic1 >> nMagic2;
+ rIStm.ReadUInt32( nMagic1 ).ReadUInt32( nMagic2 );
bRetval = (0x25091962 == nMagic1) && (0xACB20201 == nMagic2) && !rIStm.GetError();
if(bRetval)
{
sal_uInt8 bTransparent(false);
- rIStm >> bTransparent;
+ rIStm.ReadUChar( bTransparent );
bRetval = !rIStm.GetError();
if(bRetval)
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index fb2c49bafa9d..738e463c43ef 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -666,33 +666,33 @@ SvStream& ReadImpl_Font( SvStream& rIStm, Impl_Font& rImpl_Font )
rImpl_Font.maStyleName = rIStm.ReadUniOrByteString(rIStm.GetStreamCharSet());
ReadPair( rIStm, rImpl_Font.maSize );
- rIStm >> nTmp16; rImpl_Font.meCharSet = (rtl_TextEncoding) nTmp16;
- rIStm >> nTmp16; rImpl_Font.meFamily = (FontFamily) nTmp16;
- rIStm >> nTmp16; rImpl_Font.mePitch = (FontPitch) nTmp16;
- rIStm >> nTmp16; rImpl_Font.meWeight = (FontWeight) nTmp16;
- rIStm >> nTmp16; rImpl_Font.meUnderline = (FontUnderline) nTmp16;
- rIStm >> nTmp16; rImpl_Font.meStrikeout = (FontStrikeout) nTmp16;
- rIStm >> nTmp16; rImpl_Font.meItalic = (FontItalic) nTmp16;
- rIStm >> nTmp16; rImpl_Font.maLanguageTag.reset( (LanguageType) nTmp16);
- rIStm >> nTmp16; rImpl_Font.meWidthType = (FontWidth) nTmp16;
-
- rIStm >> rImpl_Font.mnOrientation;
-
- rIStm >> bTmp; rImpl_Font.mbWordLine = bTmp;
- rIStm >> bTmp; rImpl_Font.mbOutline = bTmp;
- rIStm >> bTmp; rImpl_Font.mbShadow = bTmp;
- rIStm >> nTmp8; rImpl_Font.mnKerning = nTmp8;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meCharSet = (rtl_TextEncoding) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meFamily = (FontFamily) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.mePitch = (FontPitch) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meWeight = (FontWeight) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meUnderline = (FontUnderline) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meStrikeout = (FontStrikeout) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meItalic = (FontItalic) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.maLanguageTag.reset( (LanguageType) nTmp16);
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meWidthType = (FontWidth) nTmp16;
+
+ rIStm.ReadInt16( rImpl_Font.mnOrientation );
+
+ rIStm.ReadUChar( bTmp ); rImpl_Font.mbWordLine = bTmp;
+ rIStm.ReadUChar( bTmp ); rImpl_Font.mbOutline = bTmp;
+ rIStm.ReadUChar( bTmp ); rImpl_Font.mbShadow = bTmp;
+ rIStm.ReadUChar( nTmp8 ); rImpl_Font.mnKerning = nTmp8;
if( aCompat.GetVersion() >= 2 )
{
- rIStm >> nTmp8; rImpl_Font.meRelief = (FontRelief)nTmp8;
- rIStm >> nTmp16; rImpl_Font.maCJKLanguageTag.reset( (LanguageType)nTmp16);
- rIStm >> bTmp; rImpl_Font.mbVertical = bTmp;
- rIStm >> nTmp16; rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16;
+ rIStm.ReadUChar( nTmp8 ); rImpl_Font.meRelief = (FontRelief)nTmp8;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.maCJKLanguageTag.reset( (LanguageType)nTmp16);
+ rIStm.ReadUChar( bTmp ); rImpl_Font.mbVertical = bTmp;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16;
}
if( aCompat.GetVersion() >= 3 )
{
- rIStm >> nTmp16; rImpl_Font.meOverline = (FontUnderline) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meOverline = (FontUnderline) nTmp16;
}
// Relief
// CJKContextLanguage
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index d11fbbbbd9ee..70346985f30a 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2750,10 +2750,10 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
pCompat = new VersionCompat( rIStm, STREAM_READ );
- rIStm >> nStmCompressMode;
+ rIStm.ReadUInt32( nStmCompressMode );
ReadMapMode( rIStm, rGDIMetaFile.aPrefMapMode );
ReadPair( rIStm, rGDIMetaFile.aPrefSize );
- rIStm >> nCount;
+ rIStm.ReadUInt32( nCount );
delete pCompat;
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 51f9cc344d01..94f1b0022ca8 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -305,7 +305,7 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& rGfxLink)
VersionCompat* pCompat = new VersionCompat( rIStream, STREAM_READ );
// Version 1
- rIStream >> nType >> nSize >> nUserId;
+ rIStream.ReadUInt16( nType ).ReadUInt32( nSize ).ReadUInt32( nUserId );
if( pCompat->GetVersion() >= 2 )
{
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 73ca288f8ddf..da4185ebef2d 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -291,17 +291,11 @@ SvStream& ReadImpl_Gradient( SvStream& rIStm, Impl_Gradient& rImpl_Gradient )
VersionCompat aCompat( rIStm, STREAM_READ );
sal_uInt16 nTmp16;
- rIStm >> nTmp16; rImpl_Gradient.meStyle = (GradientStyle) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImpl_Gradient.meStyle = (GradientStyle) nTmp16;
ReadColor( rIStm, rImpl_Gradient.maStartColor );
ReadColor( rIStm, rImpl_Gradient.maEndColor );
- rIStm >> rImpl_Gradient.mnAngle >>
- rImpl_Gradient.mnBorder >>
- rImpl_Gradient.mnOfsX >>
- rImpl_Gradient.mnOfsY >>
- rImpl_Gradient.mnIntensityStart >>
- rImpl_Gradient.mnIntensityEnd >>
- rImpl_Gradient.mnStepCount;
+ rIStm.ReadUInt16( rImpl_Gradient.mnAngle ). ReadUInt16( rImpl_Gradient.mnBorder ). ReadUInt16( rImpl_Gradient.mnOfsX ). ReadUInt16( rImpl_Gradient.mnOfsY ). ReadUInt16( rImpl_Gradient.mnIntensityStart ). ReadUInt16( rImpl_Gradient.mnIntensityEnd ). ReadUInt16( rImpl_Gradient.mnStepCount );
return rIStm;
}
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index b2a6eda87cfd..447ad966b948 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -165,21 +165,21 @@ SvStream& ReadSvtGraphicStroke( SvStream& rIStm, SvtGraphicStroke& rClass )
rClass.maPath.Read( rIStm );
rClass.maStartArrow.Read( rIStm );
rClass.maEndArrow.Read( rIStm );
- rIStm >> rClass.mfTransparency;
- rIStm >> rClass.mfStrokeWidth;
+ rIStm.ReadDouble( rClass.mfTransparency );
+ rIStm.ReadDouble( rClass.mfStrokeWidth );
sal_uInt16 nTmp;
- rIStm >> nTmp;
+ rIStm.ReadUInt16( nTmp );
rClass.maCapType = SvtGraphicStroke::CapType(nTmp);
- rIStm >> nTmp;
+ rIStm.ReadUInt16( nTmp );
rClass.maJoinType = SvtGraphicStroke::JoinType(nTmp);
- rIStm >> rClass.mfMiterLimit;
+ rIStm.ReadDouble( rClass.mfMiterLimit );
sal_uInt32 nSize;
- rIStm >> nSize;
+ rIStm.ReadUInt32( nSize );
rClass.maDashArray.resize(nSize);
size_t i;
for(i=0; i<rClass.maDashArray.size(); ++i)
- rIStm >> rClass.maDashArray[i];
+ rIStm.ReadDouble( rClass.maDashArray[i] );
return rIStm;
}
@@ -322,25 +322,25 @@ SvStream& ReadSvtGraphicFill( SvStream& rIStm, SvtGraphicFill& rClass )
rClass.maPath.Read( rIStm );
ReadColor( rIStm, rClass.maFillColor );
- rIStm >> rClass.mfTransparency;
+ rIStm.ReadDouble( rClass.mfTransparency );
sal_uInt16 nTmp;
- rIStm >> nTmp;
+ rIStm.ReadUInt16( nTmp );
rClass.maFillRule = SvtGraphicFill::FillRule( nTmp );
- rIStm >> nTmp;
+ rIStm.ReadUInt16( nTmp );
rClass.maFillType = SvtGraphicFill::FillType( nTmp );
int i;
for(i=0; i<SvtGraphicFill::Transform::MatrixSize; ++i)
- rIStm >> rClass.maFillTransform.matrix[i];
- rIStm >> nTmp;
+ rIStm.ReadDouble( rClass.maFillTransform.matrix[i] );
+ rIStm.ReadUInt16( nTmp );
rClass.mbTiling = nTmp;
- rIStm >> nTmp;
+ rIStm.ReadUInt16( nTmp );
rClass.maHatchType = SvtGraphicFill::HatchType( nTmp );
ReadColor( rIStm, rClass.maHatchColor );
- rIStm >> nTmp;
+ rIStm.ReadUInt16( nTmp );
rClass.maGradientType = SvtGraphicFill::GradientType( nTmp );
ReadColor( rIStm, rClass.maGradient1stColor );
ReadColor( rIStm, rClass.maGradient2ndColor );
- rIStm >> rClass.maGradientStepCount;
+ rIStm.ReadInt32( rClass.maGradientStepCount );
ReadGraphic( rIStm, rClass.maFillGraphic );
return rIStm;
diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index 8ad2368da8f0..b4f2439ef93a 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -125,9 +125,9 @@ SvStream& ReadImplHatch( SvStream& rIStm, ImplHatch& rImplHatch )
sal_uInt16 nTmp16;
sal_Int32 nTmp32(0);
- rIStm >> nTmp16; rImplHatch.meStyle = (HatchStyle) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImplHatch.meStyle = (HatchStyle) nTmp16;
//#fdo39428 SvStream no longer supports operator>>(long&)
- ReadColor( rIStm, rImplHatch.maColor ) >> nTmp32 >> rImplHatch.mnAngle;
+ ReadColor( rIStm, rImplHatch.maColor ).ReadInt32( nTmp32 ).ReadUInt16( rImplHatch.mnAngle );
rImplHatch.mnDistance = nTmp32;
return rIStm;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index b1b04606e497..f8c6065c3f1c 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1005,7 +1005,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap )
}
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- rIStm >> nId;
+ rIStm.ReadUInt32( nId );
// check version
if( GRAPHIC_FORMAT_50 == nId )
@@ -1013,8 +1013,8 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap )
// read new style header
VersionCompat* pCompat = new VersionCompat( rIStm, STREAM_READ );
- rIStm >> nType;
- rIStm >> nLen;
+ rIStm.ReadInt32( nType );
+ rIStm.ReadInt32( nLen );
ReadPair( rIStm, aSize );
ReadMapMode( rIStm, aMapMode );
@@ -1030,9 +1030,9 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap )
rIStm.SeekRel( -4L );
- rIStm >> nType >> nLen >> nWidth >> nHeight;
- rIStm >> nMapMode >> nScaleNumX >> nScaleDenomX >> nScaleNumY;
- rIStm >> nScaleDenomY >> nOffsX >> nOffsY;
+ rIStm.ReadInt32( nType ).ReadInt32( nLen ).ReadInt32( nWidth ).ReadInt32( nHeight );
+ rIStm.ReadInt32( nMapMode ).ReadInt32( nScaleNumX ).ReadInt32( nScaleDenomX ).ReadInt32( nScaleNumY );
+ rIStm.ReadInt32( nScaleDenomY ).ReadInt32( nOffsX ).ReadInt32( nOffsY );
// swapped
if( nType > 100L )
@@ -1598,7 +1598,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
rImpGraphic.ImplClear();
// read Id
- rIStm >> nTmp;
+ rIStm.ReadUInt32( nTmp );
// if there is no more data, avoid further expensive
// reading which will create VDevs and other stuff, just to
@@ -1659,7 +1659,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
sal_uInt32 nMagic1(0), nMagic2(0);
sal_uLong nActPos = rIStm.Tell();
- rIStm >> nMagic1 >> nMagic2;
+ rIStm.ReadUInt32( nMagic1 ).ReadUInt32( nMagic2 );
rIStm.Seek( nActPos );
rImpGraphic = ImpGraphic( aBmpEx );
@@ -1697,12 +1697,12 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
sal_uInt32 nMagic;
rIStm.Seek(nStmPos1);
rIStm.ResetError();
- rIStm >> nMagic;
+ rIStm.ReadUInt32( nMagic );
if(nSvgMagic == nMagic)
{
sal_uInt32 mnSvgDataArrayLength(0);
- rIStm >> mnSvgDataArrayLength;
+ rIStm.ReadUInt32( mnSvgDataArrayLength );
if(mnSvgDataArrayLength)
{
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 35133b88ca30..1ad4a4a8fbc0 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -229,12 +229,12 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
sal_Size nFirstPos = rIStream.Tell();
sal_uInt16 nLen = 0;
- rIStream >> nLen;
+ rIStream.ReadUInt16( nLen );
if ( !nLen )
return rIStream;
sal_uInt16 nSystem = 0;
- rIStream >> nSystem;
+ rIStream.ReadUInt16( nSystem );
char* pTempBuf = new char[nLen];
rIStream.Read( pTempBuf, nLen - sizeof( nLen ) - sizeof( nSystem ) );
diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index c733808b2ca5..bc6f7390b68d 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -236,31 +236,31 @@ SvStream& ReadImplLineInfo( SvStream& rIStm, ImplLineInfo& rImplLineInfo )
sal_Int32 nTmp32(0);
//#fdo39428 SvStream no longer supports operator>>(long&)
- rIStm >> nTmp16; rImplLineInfo.meStyle = (LineStyle) nTmp16;
- rIStm >> nTmp32;
+ rIStm.ReadUInt16( nTmp16 ); rImplLineInfo.meStyle = (LineStyle) nTmp16;
+ rIStm.ReadInt32( nTmp32 );
rImplLineInfo.mnWidth = nTmp32;
if( aCompat.GetVersion() >= 2 )
{
// version 2
- rIStm >> rImplLineInfo.mnDashCount >> nTmp32;
+ rIStm.ReadUInt16( rImplLineInfo.mnDashCount ).ReadInt32( nTmp32 );
rImplLineInfo.mnDashLen = nTmp32;
- rIStm >> rImplLineInfo.mnDotCount >> nTmp32;
+ rIStm.ReadUInt16( rImplLineInfo.mnDotCount ).ReadInt32( nTmp32 );
rImplLineInfo.mnDotLen = nTmp32;
- rIStm >> nTmp32;
+ rIStm.ReadInt32( nTmp32 );
rImplLineInfo.mnDistance = nTmp32;
}
if( aCompat.GetVersion() >= 3 )
{
// version 3
- rIStm >> nTmp16; rImplLineInfo.meLineJoin = (basegfx::B2DLineJoin) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImplLineInfo.meLineJoin = (basegfx::B2DLineJoin) nTmp16;
}
if( aCompat.GetVersion() >= 4 )
{
// version 4
- rIStm >> nTmp16; rImplLineInfo.meLineCap = (com::sun::star::drawing::LineCap) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImplLineInfo.meLineCap = (com::sun::star::drawing::LineCap) nTmp16;
}
return rIStm;
diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 56d8380e589a..d17e73e8cd38 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -48,11 +48,11 @@ SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rImplMapMode )
VersionCompat aCompat( rIStm, STREAM_READ );
sal_uInt16 nTmp16;
- rIStm >> nTmp16; rImplMapMode.meUnit = (MapUnit) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImplMapMode.meUnit = (MapUnit) nTmp16;
ReadPair( rIStm, rImplMapMode.maOrigin );
ReadFraction( rIStm, rImplMapMode.maScaleX );
ReadFraction( rIStm, rImplMapMode.maScaleY );
- rIStm >> rImplMapMode.mbSimple;
+ rIStm.ReadUChar( rImplMapMode.mbSimple );
return rIStm;
}
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 30fcd3909153..09c4fccd300b 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -157,7 +157,7 @@ MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData
MetaAction* pAction = NULL;
sal_uInt16 nType = 0;
- rIStm >> nType;
+ rIStm.ReadUInt16( nType );
SAL_INFO("vcl.gdi", "ReadMetaAction " << nType);
@@ -599,7 +599,7 @@ void MetaRoundRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaRoundRectAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- ReadRectangle( rIStm, maRect ) >> mnHorzRound >> mnVertRound;
+ ReadRectangle( rIStm, maRect ).ReadUInt32( mnHorzRound ).ReadUInt32( mnVertRound );
}
// ========================================================================
@@ -1002,7 +1002,7 @@ void MetaPolyLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
if ( aCompat.GetVersion() >= 3 )
{
sal_uInt8 bHasPolyFlags;
- rIStm >> bHasPolyFlags;
+ rIStm.ReadUChar( bHasPolyFlags );
if ( bHasPolyFlags )
maPoly.Read( rIStm );
}
@@ -1084,7 +1084,7 @@ void MetaPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
if( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt8 bHasPolyFlags;
- rIStm >> bHasPolyFlags;
+ rIStm.ReadUChar( bHasPolyFlags );
if ( bHasPolyFlags )
maPoly.Read( rIStm );
}
@@ -1184,10 +1184,10 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 i, nIndex, nNumberOfComplexPolygons;
- rIStm >> nNumberOfComplexPolygons;
+ rIStm.ReadUInt16( nNumberOfComplexPolygons );
for ( i = 0; i < nNumberOfComplexPolygons; i++ )
{
- rIStm >> nIndex;
+ rIStm.ReadUInt16( nIndex );
Polygon aPoly;
aPoly.Read( rIStm );
maPolyPoly.Replace( aPoly, nIndex );
@@ -1271,8 +1271,8 @@ void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
COMPAT( rIStm );
ReadPair( rIStm, maPt );
maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
- rIStm >> mnIndex;
- rIStm >> mnLen;
+ rIStm .ReadInt32( mnIndex );
+ rIStm .ReadInt32( mnLen );
if ( aCompat.GetVersion() >= 2 ) // Version 2
maStr = read_lenPrefixed_uInt16s_ToOUString<sal_uInt16>(rIStm);
@@ -1416,9 +1416,9 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
COMPAT( rIStm );
ReadPair( rIStm, maStartPt );
maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
- rIStm >> mnIndex;
- rIStm >> mnLen;
- rIStm >> nAryLen;
+ rIStm .ReadInt32( mnIndex );
+ rIStm .ReadInt32( mnLen );
+ rIStm .ReadInt32( nAryLen );
if ( mnIndex + mnLen > maStr.getLength() )
{
@@ -1437,7 +1437,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
{
sal_Int32 i;
for( i = 0; i < nAryLen; i++ )
- rIStm >> mpDXAry[ i ];
+ rIStm.ReadInt32( mpDXAry[ i ] );
// #106172# setup remainder
for( ; i < mnLen; i++ )
@@ -1546,9 +1546,9 @@ void MetaStretchTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
COMPAT( rIStm );
ReadPair( rIStm, maPt );
maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
- rIStm >> mnWidth;
- rIStm >> mnIndex;
- rIStm >> mnLen;
+ rIStm .ReadUInt32( mnWidth );
+ rIStm .ReadInt32( mnIndex );
+ rIStm .ReadInt32( mnLen );
if ( aCompat.GetVersion() >= 2 ) // Version 2
maStr = read_lenPrefixed_uInt16s_ToOUString<sal_uInt16>(rIStm);
@@ -1627,7 +1627,7 @@ void MetaTextRectAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
COMPAT( rIStm );
ReadRectangle( rIStm, maRect );
maStr = rIStm.ReadUniOrByteString(pData->meActualCharSet);
- rIStm >> mnStyle;
+ rIStm .ReadUInt16( mnStyle );
if ( aCompat.GetVersion() >= 2 ) // Version 2
maStr = read_lenPrefixed_uInt16s_ToOUString<sal_uInt16>(rIStm);
@@ -1719,14 +1719,14 @@ void MetaTextLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
sal_uInt32 nTemp;
sal_Int32 nTemp2;
ReadPair( rIStm, maPos );
- rIStm >> nTemp2;
+ rIStm.ReadInt32( nTemp2 );
mnWidth = nTemp2;
- rIStm >> nTemp;
+ rIStm.ReadUInt32( nTemp );
meStrikeout = (FontStrikeout)nTemp;
- rIStm >> nTemp;
+ rIStm.ReadUInt32( nTemp );
meUnderline = (FontUnderline)nTemp;
if ( aCompat.GetVersion() >= 2 ) {
- rIStm >> nTemp;
+ rIStm.ReadUInt32( nTemp );
meUnderline = (FontUnderline)nTemp;
}
}
@@ -2835,7 +2835,7 @@ void MetaClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
ReadRegion( rIStm, maRegion );
- rIStm >> mbClip;
+ rIStm.ReadUChar( mbClip );
}
// ========================================================================
@@ -3029,7 +3029,7 @@ void MetaMoveClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
COMPAT( rIStm );
//#fdo39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpHM(0), nTmpVM(0);
- rIStm >> nTmpHM >> nTmpVM;
+ rIStm.ReadInt32( nTmpHM ).ReadInt32( nTmpVM );
mnHorzMove = nTmpHM;
mnVertMove = nTmpVM;
}
@@ -3089,7 +3089,7 @@ void MetaLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
maColor.Read( rIStm, true );
- rIStm >> mbSet;
+ rIStm.ReadUChar( mbSet );
}
// ========================================================================
@@ -3147,7 +3147,7 @@ void MetaFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
maColor.Read( rIStm, true );
- rIStm >> mbSet;
+ rIStm.ReadUChar( mbSet );
}
// ========================================================================
@@ -3256,7 +3256,7 @@ void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
maColor.Read( rIStm, true );
- rIStm >> mbSet;
+ rIStm.ReadUChar( mbSet );
}
// ========================================================================
@@ -3314,7 +3314,7 @@ void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
maColor.Read( rIStm, true );
- rIStm >> mbSet;
+ rIStm.ReadUChar( mbSet );
}
// ========================================================================
@@ -3372,7 +3372,7 @@ void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
maColor.Read( rIStm, true );
- rIStm >> mbSet;
+ rIStm.ReadUChar( mbSet );
}
// ========================================================================
@@ -3425,7 +3425,7 @@ void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
sal_uInt16 nTmp16;
COMPAT( rIStm );
- rIStm >> nTmp16; maAlign = (TextAlign) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); maAlign = (TextAlign) nTmp16;
}
// ========================================================================
@@ -3613,7 +3613,7 @@ void MetaPushAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- rIStm >> mnFlags;
+ rIStm.ReadUInt16( mnFlags );
}
// ========================================================================
@@ -3700,7 +3700,7 @@ void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
sal_uInt16 nTmp16;
COMPAT( rIStm );
- rIStm >> nTmp16; meRasterOp = (RasterOp) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); meRasterOp = (RasterOp) nTmp16;
}
// ========================================================================
@@ -3783,7 +3783,7 @@ void MetaTransparentAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
ReadPolyPolygon( rIStm, maPolyPoly );
- rIStm >> mnTransPercent;
+ rIStm.ReadUInt16( mnTransPercent );
}
// ========================================================================
@@ -4003,7 +4003,7 @@ void MetaRefPointAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- ReadPair( rIStm, maRefPoint ) >> mbSet;
+ ReadPair( rIStm, maRefPoint ).ReadUChar( mbSet );
}
// ========================================================================
@@ -4175,9 +4175,9 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
float m11, m12, m21, m22, mdx, mdy;
// read data
- aMemStm >> nLeft >> nTop >> nRight >> nBottom;
- aMemStm >> nPixX >> nPixY >> nMillX >> nMillY;
- aMemStm >> m11 >> m12 >> m21 >> m22 >> mdx >> mdy;
+ aMemStm.ReadInt32( nLeft ).ReadInt32( nTop ).ReadInt32( nRight ).ReadInt32( nBottom );
+ aMemStm.ReadInt32( nPixX ).ReadInt32( nPixY ).ReadInt32( nMillX ).ReadInt32( nMillY );
+ aMemStm.ReadFloat( m11 ).ReadFloat( m12 ).ReadFloat( m21 ).ReadFloat( m22 ).ReadFloat( mdx ).ReadFloat( mdy );
// add scale to the transformation
m11 *= fXScale;
@@ -4225,7 +4225,7 @@ void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
maComment = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
- rIStm >> mnValue >> mnDataSize;
+ rIStm.ReadInt32( mnValue ).ReadUInt32( mnDataSize );
SAL_INFO("vcl.gdi", "MetaCommentAction::Read " << maComment);
@@ -4288,7 +4288,7 @@ void MetaLayoutModeAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaLayoutModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- rIStm >> mnLayoutMode;
+ rIStm.ReadUInt32( mnLayoutMode );
}
// ========================================================================
@@ -4339,7 +4339,7 @@ void MetaTextLanguageAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextLanguageAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- rIStm >> meTextLanguage;
+ rIStm.ReadUInt16( meTextLanguage );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index ea547ccc3ba8..61329f0a98b2 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -211,9 +211,9 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
// check the PNG header magic
sal_uInt32 nDummy = 0;
- mrPNGStream >> nDummy;
+ mrPNGStream.ReadUInt32( nDummy );
mbStatus = (nDummy == 0x89504e47);
- mrPNGStream >> nDummy;
+ mrPNGStream.ReadUInt32( nDummy );
mbStatus = (nDummy == 0x0d0a1a0a) && mbStatus;
mnPreviewShift = 0;
@@ -259,7 +259,7 @@ bool PNGReaderImpl::ReadNextChunk()
PNGReader::ChunkData& rChunkData = *maChunkIter;
// read the chunk header
- mrPNGStream >> mnChunkLen >> mnChunkType;
+ mrPNGStream.ReadInt32( mnChunkLen ).ReadUInt32( mnChunkType );
rChunkData.nType = mnChunkType;
// fdo#61847 truncate over-long, trailing chunks
@@ -289,7 +289,7 @@ bool PNGReaderImpl::ReadNextChunk()
maDataIter = rChunkData.aData.begin();
}
sal_uInt32 nCheck(0);
- mrPNGStream >> nCheck;
+ mrPNGStream.ReadUInt32( nCheck );
if( nCRC32 != nCheck )
return false;
}
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index f064c2ef7afd..f0d9c59e77a8 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -278,8 +278,8 @@ SvStream& ReadQueueInfo( SvStream& rIStream, QueueInfo& rInfo )
rInfo.maDriver = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
rInfo.maLocation = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
rInfo.maComment = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
- rIStream >> rInfo.mnStatus;
- rIStream >> rInfo.mnJobs;
+ rIStream.ReadUInt32( rInfo.mnStatus );
+ rIStream.ReadUInt32( rInfo.mnJobs );
return rIStream;
}
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 50417023214d..e35f0b424ceb 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1568,10 +1568,10 @@ SvStream& ReadRegion(SvStream& rIStrm, Region& rRegion)
rRegion.SetEmpty();
// get version of streamed region
- rIStrm >> nVersion;
+ rIStrm.ReadUInt16( nVersion );
// get type of region
- rIStrm >> nTmp16;
+ rIStrm.ReadUInt16( nTmp16 );
enum RegionType { REGION_NULL, REGION_EMPTY, REGION_RECTANGLE, REGION_COMPLEX };
RegionType meStreamedType = (RegionType)nTmp16;
@@ -1600,7 +1600,7 @@ SvStream& ReadRegion(SvStream& rIStrm, Region& rRegion)
{
sal_Bool bHasPolyPolygon(sal_False);
- rIStrm >> bHasPolyPolygon;
+ rIStrm.ReadUChar( bHasPolyPolygon );
if(bHasPolyPolygon)
{
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index a1366adbadd5..3e8ea17a8570 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -205,7 +205,7 @@ void RegionBand::load(SvStream& rIStrm)
// get header from first element
sal_uInt16 nTmp16(0);
- rIStrm >> nTmp16;
+ rIStrm.ReadUInt16( nTmp16 );
while(STREAMENTRY_END != (StreamEntryType)nTmp16)
{
@@ -215,8 +215,8 @@ void RegionBand::load(SvStream& rIStrm)
sal_Int32 nYTop(0);
sal_Int32 nYBottom(0);
- rIStrm >> nYTop;
- rIStrm >> nYBottom;
+ rIStrm.ReadInt32( nYTop );
+ rIStrm.ReadInt32( nYBottom );
// create band
ImplRegionBand* pNewBand = new ImplRegionBand( nYTop, nYBottom );
@@ -239,8 +239,8 @@ void RegionBand::load(SvStream& rIStrm)
sal_Int32 nXLeft(0);
sal_Int32 nXRight(0);
- rIStrm >> nXLeft;
- rIStrm >> nXRight;
+ rIStrm.ReadInt32( nXLeft );
+ rIStrm.ReadInt32( nXRight );
// add separation
if ( pCurrBand )
@@ -257,7 +257,7 @@ void RegionBand::load(SvStream& rIStrm)
}
// get next header
- rIStrm >> nTmp16;
+ rIStrm.ReadUInt16( nTmp16 );
}
}
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index a303d25ca508..328ca8cfa63a 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -113,14 +113,14 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
// version 1
ReadColor( rIStm, rImplWallpaper.maColor );
- rIStm >> nTmp16; rImplWallpaper.meStyle = (WallpaperStyle) nTmp16;
+ rIStm.ReadUInt16( nTmp16 ); rImplWallpaper.meStyle = (WallpaperStyle) nTmp16;
// version 2
if( aCompat.GetVersion() >= 2 )
{
sal_Bool bRect, bGrad, bBmp, bDummy;
- rIStm >> bRect >> bGrad >> bBmp >> bDummy >> bDummy >> bDummy;
+ rIStm.ReadUChar( bRect ).ReadUChar( bGrad ).ReadUChar( bBmp ).ReadUChar( bDummy ).ReadUChar( bDummy ).ReadUChar( bDummy );
if( bRect )
{
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index 63933822a772..44e203092387 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -91,7 +91,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
{
xRef->Seek(2);
sal_Int16 nWord;
- *xRef >> nWord;
+ xRef->ReadInt16( nWord );
//version detection
bWord = nWord >= 0x6a && nWord <= 0xc1;
}
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index d6845b723805..523615292ff8 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -908,7 +908,7 @@ int RTFDocumentImpl::resolveChars(char ch)
m_pBinaryData->WriteChar( ch );
for (int i = 0; i < m_aStates.top().nBinaryToRead - 1; ++i)
{
- Strm() >> ch;
+ Strm().ReadChar( ch );
m_pBinaryData->WriteChar( ch );
}
m_aStates.top().nInternalState = INTERNAL_NORMAL;
@@ -944,7 +944,7 @@ int RTFDocumentImpl::resolveChars(char ch)
// read a single char if we're in hex mode
if (m_aStates.top().nInternalState == INTERNAL_HEX)
break;
- Strm() >> ch;
+ Strm().ReadChar( ch );
}
if (m_aStates.top().nInternalState != INTERNAL_HEX && !Strm().IsEof())
Strm().SeekRel(-1);
@@ -1284,7 +1284,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
bool bInKeyword = false;
while (!bFoundCode && ch != '}')
{
- Strm() >> ch;
+ Strm().ReadChar( ch );
if ('\\' == ch)
bInKeyword = true;
if (!bInKeyword && isalnum(ch))
@@ -1411,7 +1411,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
char ch;
for (int i = 0; i < 7; ++i)
{
- Strm() >> ch;
+ Strm().ReadChar( ch );
aBuf.append(ch);
}
OString aKeyword = aBuf.makeStringAndClear();
@@ -4259,15 +4259,15 @@ int RTFDocumentImpl::popState()
// Skip ObjectHeader
sal_uInt32 nData;
- *m_pObjectData >> nData; // OLEVersion
- *m_pObjectData >> nData; // FormatID
- *m_pObjectData >> nData; // ClassName
+ m_pObjectData->ReadUInt32( nData ); // OLEVersion
+ m_pObjectData->ReadUInt32( nData ); // FormatID
+ m_pObjectData->ReadUInt32( nData ); // ClassName
m_pObjectData->SeekRel(nData);
- *m_pObjectData >> nData; // TopicName
+ m_pObjectData->ReadUInt32( nData ); // TopicName
m_pObjectData->SeekRel(nData);
- *m_pObjectData >> nData; // ItemName
+ m_pObjectData->ReadUInt32( nData ); // ItemName
m_pObjectData->SeekRel(nData);
- *m_pObjectData >> nData; // NativeDataSize
+ m_pObjectData->ReadUInt32( nData ); // NativeDataSize
}
uno::Reference<io::XInputStream> xInputStream(new utl::OInputStreamWrapper(m_pObjectData.get()));
diff --git a/writerfilter/source/rtftok/rtflookahead.cxx b/writerfilter/source/rtftok/rtflookahead.cxx
index 0338efd7d86e..d3a8d492d529 100644
--- a/writerfilter/source/rtftok/rtflookahead.cxx
+++ b/writerfilter/source/rtftok/rtflookahead.cxx
@@ -65,7 +65,7 @@ int RTFLookahead::dispatchValue(RTFKeyword /*nKeyword*/, int /*nParam*/)
int RTFLookahead::resolveChars(char ch)
{
while(!m_rStream.IsEof() && (ch != '{' && ch != '}' && ch != '\\'))
- m_rStream >> ch;
+ m_rStream.ReadChar( ch );
if (!m_rStream.IsEof())
m_rStream.SeekRel(-1);
return 0;
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index fc99189ad3a2..d907dbac2df5 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -76,7 +76,7 @@ int RTFTokenizer::resolveParse()
m_xStatusIndicator->setValue(nLastPos = nCurrentPos);
}
- while ((Strm() >> ch, !Strm().IsEof()))
+ while ((Strm().ReadChar( ch ), !Strm().IsEof()))
{
//SAL_INFO("writerfilter", OSL_THIS_FUNC << ": parsing character '" << ch << "'");
@@ -211,7 +211,7 @@ int RTFTokenizer::resolveKeyword()
bool bParam = false;
int nParam = 0;
- Strm() >> ch;
+ Strm().ReadChar( ch );
if (Strm().IsEof())
return ERROR_EOF;
@@ -226,7 +226,7 @@ int RTFTokenizer::resolveKeyword()
while(isalpha(ch))
{
aBuf.append(ch);
- Strm() >> ch;
+ Strm().ReadChar( ch );
if (Strm().IsEof())
{
ch = ' ';
@@ -242,7 +242,7 @@ int RTFTokenizer::resolveKeyword()
{
// in case we'll have a parameter, that will be negative
bNeg = true;
- Strm() >> ch;
+ Strm().ReadChar( ch );
if (Strm().IsEof())
return ERROR_EOF;
}
@@ -255,7 +255,7 @@ int RTFTokenizer::resolveKeyword()
while(isdigit(ch))
{
aParameter.append(ch);
- Strm() >> ch;
+ Strm().ReadChar( ch );
if (Strm().IsEof())
{
ch = ' ';