[Libreoffice-commits] core.git: basctl/source basic/source chart2/qa compilerplugins/clang connectivity/source cppcanvas/source dbaccess/source desktop/source editeng/source extensions/source filter/source idl/source include/tools linguistic/source lotuswordpro/source sc/source sd/source sfx2/source sot/source starmath/source svl/source svtools/source svx/source sw/qa sw/source toolkit/source tools/qa tools/source vcl/source writerfilter/source
Noel Grandin
noel at peralex.com
Wed Feb 12 07:32:16 PST 2014
basctl/source/basicide/bastypes.cxx | 4
basic/source/basmgr/basmgr.cxx | 26
basic/source/classes/image.cxx | 12
basic/source/classes/sb.cxx | 2
basic/source/classes/sbxmod.cxx | 6
basic/source/runtime/methods.cxx | 2
basic/source/runtime/methods1.cxx | 16
basic/source/sbx/sbxarray.cxx | 8
basic/source/sbx/sbxbase.cxx | 14
basic/source/sbx/sbxcoll.cxx | 2
basic/source/sbx/sbxobj.cxx | 2
basic/source/sbx/sbxvalue.cxx | 34 -
basic/source/sbx/sbxvar.cxx | 14
chart2/qa/extras/chart2export.cxx | 2
compilerplugins/clang/svstreamoutputoperators.cxx | 142 ++--
connectivity/source/drivers/dbase/DTable.cxx | 18
connectivity/source/drivers/dbase/dindexnode.cxx | 8
cppcanvas/source/mtfrenderer/emfplus.cxx | 184 ++---
cppcanvas/source/mtfrenderer/implrenderer.cxx | 4
dbaccess/source/ui/tabledesign/TEditControl.cxx | 2
dbaccess/source/ui/tabledesign/TableRow.cxx | 26
desktop/source/migration/services/wordbookmigration.cxx | 2
editeng/source/editeng/editobj.cxx | 38 -
editeng/source/items/bulitem.cxx | 36 -
editeng/source/items/flditem.cxx | 22
editeng/source/items/frmitems.cxx | 73 +-
editeng/source/items/justifyitem.cxx | 6
editeng/source/items/numitem.cxx | 54 -
editeng/source/items/optitems.cxx | 2
editeng/source/items/paraitem.cxx | 36 -
editeng/source/items/svdfield.cxx | 2
editeng/source/items/textitem.cxx | 72 +-
extensions/source/scanner/scanunx.cxx | 2
filter/source/graphicfilter/eos2met/eos2met.cxx | 8
filter/source/graphicfilter/ieps/ieps.cxx | 8
filter/source/graphicfilter/ios2met/ios2met.cxx | 138 ++--
filter/source/graphicfilter/ipbm/ipbm.cxx | 16
filter/source/graphicfilter/ipcd/ipcd.cxx | 2
filter/source/graphicfilter/ipcx/ipcx.cxx | 22
filter/source/graphicfilter/ipict/ipict.cxx | 131 ++--
filter/source/graphicfilter/ipsd/ipsd.cxx | 86 +-
filter/source/graphicfilter/iras/iras.cxx | 19
filter/source/graphicfilter/itga/itga.cxx | 67 --
filter/source/graphicfilter/itiff/ccidecom.cxx | 10
filter/source/graphicfilter/itiff/itiff.cxx | 54 -
filter/source/graphicfilter/itiff/lzwdecom.cxx | 4
filter/source/msfilter/dffpropset.cxx | 8
filter/source/msfilter/dffrecordheader.cxx | 6
filter/source/msfilter/escherex.cxx | 8
filter/source/msfilter/msdffimp.cxx | 150 ++--
filter/source/msfilter/mstoolbar.cxx | 28
filter/source/msfilter/svdfppt.cxx | 506 ++++++++--------
filter/source/xmlfilterdetect/filterdetect.cxx | 2
idl/source/objects/basobj.cxx | 14
idl/source/objects/bastype.cxx | 8
idl/source/objects/module.cxx | 4
idl/source/objects/object.cxx | 4
idl/source/objects/slot.cxx | 6
idl/source/objects/types.cxx | 12
idl/source/prj/database.cxx | 8
include/tools/stream.hxx | 46 +
linguistic/source/dicimp.cxx | 10
lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 14
lotuswordpro/source/filter/lwpdrawobj.cxx | 190 +++---
lotuswordpro/source/filter/lwpfilter.cxx | 2
lotuswordpro/source/filter/lwpsvstream.cxx | 12
sc/source/core/data/attrib.cxx | 16
sc/source/core/data/documen8.cxx | 2
sc/source/core/data/patattr.cxx | 4
sc/source/core/tool/autoform.cxx | 68 +-
sc/source/core/tool/ddelink.cxx | 4
sc/source/core/tool/rechead.cxx | 8
sc/source/core/tool/zforauto.cxx | 2
sc/source/filter/excel/xiescher.cxx | 2
sc/source/filter/excel/xistream.cxx | 26
sc/source/filter/excel/xltoolbar.cxx | 8
sc/source/filter/lotus/filter.cxx | 12
sc/source/filter/lotus/lotread.cxx | 4
sc/source/filter/lotus/op.cxx | 56 -
sc/source/filter/qpro/biff.cxx | 2
sc/source/filter/qpro/qpro.cxx | 16
sc/source/filter/qpro/qproform.cxx | 16
sc/source/filter/starcalc/scflt.cxx | 404 ++++++------
sc/source/ui/dbgui/scuiasciiopt.cxx | 2
sc/source/ui/unoobj/exceldetect.cxx | 2
sc/source/ui/unoobj/scdetect.cxx | 10
sd/source/core/sdiocmpt.cxx | 4
sd/source/filter/eppt/eppt.cxx | 4
sd/source/filter/eppt/epptso.cxx | 14
sd/source/filter/html/pubdlg.cxx | 38 -
sd/source/filter/ppt/ppt97animations.cxx | 28
sd/source/filter/ppt/pptin.cxx | 74 +-
sd/source/filter/ppt/pptinanimations.cxx | 98 +--
sd/source/filter/ppt/propread.cxx | 46 -
sd/source/ui/dlg/morphdlg.cxx | 2
sd/source/ui/dlg/vectdlg.cxx | 2
sd/source/ui/unoidl/sddetect.cxx | 2
sfx2/source/doc/docfile.cxx | 2
sfx2/source/doc/oleprops.cxx | 37 -
sfx2/source/doc/zoomitem.cxx | 2
sot/source/base/filelist.cxx | 4
sot/source/sdstor/stgelem.cxx | 78 +-
sot/source/sdstor/stgole.cxx | 6
sot/source/sdstor/storinfo.cxx | 6
sot/source/sdstor/ucbstorage.cxx | 14
starmath/source/eqnolefilehdr.cxx | 2
starmath/source/mathtype.cxx | 70 +-
svl/source/filerec/filerec.cxx | 16
svl/source/items/cenumitm.cxx | 4
svl/source/items/cintitem.cxx | 8
svl/source/items/cntwall.cxx | 4
svl/source/items/ctypeitm.cxx | 4
svl/source/items/intitem.cxx | 4
svl/source/items/itemset.cxx | 2
svl/source/items/lckbitem.cxx | 4
svl/source/items/macitem.cxx | 8
svl/source/items/poolio.cxx | 64 +-
svl/source/items/rngitem.cxx | 12
svl/source/items/slstitm.cxx | 2
svl/source/items/visitem.cxx | 2
svl/source/numbers/numhead.cxx | 8
svl/source/numbers/zforlist.cxx | 12
svl/source/numbers/zformat.cxx | 24
svtools/source/graphic/grfattr.cxx | 8
svtools/source/graphic/grfmgr.cxx | 2
svtools/source/misc/imap.cxx | 14
svtools/source/misc/imap3.cxx | 2
svtools/source/misc/templatefoldercache.cxx | 20
svtools/source/misc/transfer.cxx | 14
svtools/source/svrtf/parrtf.cxx | 2
svtools/source/svrtf/svparser.cxx | 14
svtools/source/urlobj/inetimg.cxx | 8
svx/source/gallery2/codec.cxx | 4
svx/source/gallery2/galobj.cxx | 4
svx/source/gallery2/galtheme.cxx | 32 -
svx/source/items/algitem.cxx | 10
svx/source/items/chrtitem.cxx | 2
svx/source/items/e3ditem.cxx | 6
svx/source/items/grfitem.cxx | 2
svx/source/items/hlnkitem.cxx | 16
svx/source/items/pageitem.cxx | 6
svx/source/items/rotmodit.cxx | 2
svx/source/sidebar/nbdtmg.cxx | 6
svx/source/svdraw/svdattr.cxx | 10
svx/source/xml/xmleohlp.cxx | 2
svx/source/xoutdev/xattr.cxx | 76 +-
svx/source/xoutdev/xattr2.cxx | 12
svx/source/xoutdev/xattrbmp.cxx | 6
svx/source/xoutdev/xexch.cxx | 4
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 2
sw/source/core/doc/tblafmt.cxx | 76 +-
sw/source/core/layout/atrfrm.cxx | 2
sw/source/core/layout/dbg_lay.cxx | 2
sw/source/core/layout/laycache.cxx | 22
sw/source/filter/basflt/iodetect.cxx | 2
sw/source/filter/ww8/ww8atr.cxx | 8
sw/source/filter/ww8/ww8graf2.cxx | 6
sw/source/filter/ww8/ww8par.cxx | 52 -
sw/source/filter/ww8/ww8par2.cxx | 56 -
sw/source/filter/ww8/ww8par3.cxx | 60 -
sw/source/filter/ww8/ww8par4.cxx | 18
sw/source/filter/ww8/ww8scan.cxx | 380 ++++++------
sw/source/filter/ww8/ww8toolbar.cxx | 50 -
sw/source/ui/config/uinums.cxx | 52 -
toolkit/source/awt/vclxprinter.cxx | 2
tools/qa/cppunit/test_stream.cxx | 8
tools/source/generic/color.cxx | 10
tools/source/generic/fract.cxx | 4
tools/source/generic/gen.cxx | 4
tools/source/generic/poly.cxx | 6
tools/source/generic/poly2.cxx | 4
tools/source/inet/inetmsg.cxx | 10
tools/source/ref/globname.cxx | 6
tools/source/ref/pstm.cxx | 22
tools/source/stream/stream.cxx | 26
tools/source/stream/vcompat.cxx | 4
tools/source/zcodec/zcodec.cxx | 12
vcl/source/filter/graphicfilter.cxx | 6
vcl/source/filter/graphicfilter2.cxx | 182 ++---
vcl/source/filter/igif/gifread.cxx | 54 -
vcl/source/filter/ixbm/xbmread.cxx | 2
vcl/source/filter/ixpm/xpmread.cxx | 2
vcl/source/filter/jpeg/Exif.cxx | 10
vcl/source/filter/jpeg/JpegReader.cxx | 2
vcl/source/filter/wmf/emfwr.cxx | 6
vcl/source/filter/wmf/enhwmf.cxx | 226 +++----
vcl/source/filter/wmf/winmtf.cxx | 2
vcl/source/filter/wmf/winwmf.cxx | 158 ++--
vcl/source/filter/wmf/wmf.cxx | 4
vcl/source/filter/wmf/wmfwr.cxx | 2
vcl/source/gdi/animate.cxx | 20
vcl/source/gdi/cvtsvm.cxx | 114 +--
vcl/source/gdi/dibtools.cxx | 94 +-
vcl/source/gdi/font.cxx | 42 -
vcl/source/gdi/gdimtf.cxx | 4
vcl/source/gdi/gfxlink.cxx | 2
vcl/source/gdi/gradient.cxx | 10
vcl/source/gdi/graphictools.cxx | 30
vcl/source/gdi/hatch.cxx | 4
vcl/source/gdi/impgraph.cxx | 20
vcl/source/gdi/jobset.cxx | 4
vcl/source/gdi/lineinfo.cxx | 14
vcl/source/gdi/mapmod.cxx | 4
vcl/source/gdi/metaact.cxx | 76 +-
vcl/source/gdi/pngread.cxx | 8
vcl/source/gdi/print.cxx | 4
vcl/source/gdi/region.cxx | 6
vcl/source/gdi/regionband.cxx | 12
vcl/source/gdi/wall.cxx | 4
writerfilter/source/filter/WriterFilterDetection.cxx | 2
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 20
writerfilter/source/rtftok/rtflookahead.cxx | 2
writerfilter/source/rtftok/rtftokenizer.cxx | 10
213 files changed, 3129 insertions(+), 3074 deletions(-)
New commits:
commit 15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4
Author: Noel Grandin <noel at peralex.com>
Date: Wed Feb 5 10:41:04 2014 +0200
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 at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 5194385..eb12999 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 7a22f78..620deb9 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 2cf81ae..cea14dd 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 869db65..bb9569b 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 a75922b..0e90a25 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 aeb5000..9f74c79 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 af6ae3d..efbd2da 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 a25e46e..ab65a28 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 376da54..bf73df0 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 741735b..7c40c78 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 4b6c7db..7095294 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 3cdaeb5..25c3d65 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 d621d66..bc60b86 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 e6dceb8..6288d3d 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 4427797..9cdc4b2 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 2970cb5..3705e33 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 b795ea8..7e519fc 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 48e0cd3..1978f3e 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 d5ec542..18040744 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 cfd9259..d4cd227 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 a53f69f..ca3e35b 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 b2131fd..1f4c051 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 24cc1a8..29a0a87 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 d7af9a2..52d2f99 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 cd86e0e..9887a5a 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 d07ffd2..6eb012a 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 038beff..827edd7 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 528142c..8a87a64 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;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list