summaryrefslogtreecommitdiff
path: root/svl/source/numbers
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/source/numbers
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/source/numbers')
-rw-r--r--svl/source/numbers/numhead.cxx8
-rw-r--r--svl/source/numbers/zforlist.cxx12
-rw-r--r--svl/source/numbers/zformat.cxx24
3 files changed, 22 insertions, 22 deletions
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: