summaryrefslogtreecommitdiff
path: root/svl
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 /svl
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>
Diffstat (limited to 'svl')
-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
16 files changed, 89 insertions, 89 deletions
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: