summaryrefslogtreecommitdiff
path: root/editeng/source/items/numitem.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-08 08:48:26 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-10 13:26:24 +0000
commitb69864f3f8c9be2e1f28f4b422074d2040b084a0 (patch)
tree93d51bc91257472198beffccb92188ceee61667d /editeng/source/items/numitem.cxx
parentde84529b55f5b295b089043a7119d6b0d8b92408 (diff)
re-write SvStream operator<< to non-overloaded methods
This is the actual re-write. Use a clang rewriter to rewrite SvStream::operator<< to methods like WriteuInt32. Note that the rewriter is not perfect, and I hand-tweaked the output. In particular, I had to adjust places doing things like (*this) << 1; Change-Id: I5923eda3f4ebaa8b452b6ef109e726e116235a2a Reviewed-on: https://gerrit.libreoffice.org/7342 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'editeng/source/items/numitem.cxx')
-rw-r--r--editeng/source/items/numitem.cxx60
1 files changed, 30 insertions, 30 deletions
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 2dca4a74d332..08f0a63cd7b6 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -245,26 +245,26 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
pBulletFont->SetName(sFontName);
}
- rStream << (sal_uInt16)NUMITEM_VERSION_04;
+ rStream.WriteUInt16( (sal_uInt16)NUMITEM_VERSION_04 );
- rStream << (sal_uInt16)GetNumberingType();
- rStream << (sal_uInt16)eNumAdjust;
- rStream << (sal_uInt16)nInclUpperLevels;
- rStream << nStart;
- rStream << (sal_uInt16)cBullet;
+ rStream.WriteUInt16( (sal_uInt16)GetNumberingType() );
+ rStream.WriteUInt16( (sal_uInt16)eNumAdjust );
+ rStream.WriteUInt16( (sal_uInt16)nInclUpperLevels );
+ rStream.WriteUInt16( nStart );
+ rStream.WriteUInt16( (sal_uInt16)cBullet );
- rStream << nFirstLineOffset;
- rStream << nAbsLSpace;
- rStream << nLSpace;
+ rStream.WriteInt16( nFirstLineOffset );
+ rStream.WriteInt16( nAbsLSpace );
+ rStream.WriteInt16( nLSpace );
- rStream << nCharTextDistance;
+ rStream.WriteInt16( nCharTextDistance );
rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
rStream.WriteUniOrByteString(sPrefix, eEnc);
rStream.WriteUniOrByteString(sSuffix, eEnc);
rStream.WriteUniOrByteString(sCharStyleName, eEnc);
if(pGraphicBrush)
{
- rStream << (sal_uInt16)1;
+ rStream.WriteUInt16( (sal_uInt16)1 );
// in SD or SI force bullet itself to be stored,
// for that purpose throw away link when link and graphic
@@ -277,30 +277,30 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION);
}
else
- rStream << (sal_uInt16)0;
+ rStream.WriteUInt16( (sal_uInt16)0 );
- rStream << (sal_uInt16)eVertOrient;
+ rStream.WriteUInt16( (sal_uInt16)eVertOrient );
if(pBulletFont)
{
- rStream << (sal_uInt16)1;
+ rStream.WriteUInt16( (sal_uInt16)1 );
rStream << *pBulletFont;
}
else
- rStream << (sal_uInt16)0;
+ rStream.WriteUInt16( (sal_uInt16)0 );
rStream << aGraphicSize;
Color nTempColor = nBulletColor;
if(COL_AUTO == nBulletColor.GetColor())
nTempColor = COL_BLACK;
rStream << nTempColor;
- rStream << nBulletRelSize;
- rStream << (sal_uInt16)IsShowSymbol();
+ rStream.WriteUInt16( nBulletRelSize );
+ rStream.WriteUInt16( (sal_uInt16)IsShowSymbol() );
- rStream << ( sal_uInt16 ) mePositionAndSpaceMode;
- rStream << ( sal_uInt16 ) meLabelFollowedBy;
- rStream << ( sal_Int32 ) mnListtabPos;
- rStream << ( sal_Int32 ) mnFirstLineIndent;
- rStream << ( sal_Int32 ) mnIndentAt;
+ rStream.WriteUInt16( ( sal_uInt16 ) mePositionAndSpaceMode );
+ rStream.WriteUInt16( ( sal_uInt16 ) meLabelFollowedBy );
+ rStream.WriteInt32( ( sal_Int32 ) mnListtabPos );
+ rStream.WriteInt32( ( sal_Int32 ) mnFirstLineIndent );
+ rStream.WriteInt32( ( sal_Int32 ) mnIndentAt );
return rStream;
}
@@ -710,12 +710,12 @@ SvxNumRule* SvxNumRule::Create( SvStream & rStream )
SvStream& SvxNumRule::Store( SvStream &rStream )
{
- rStream<<(sal_uInt16)NUMITEM_VERSION_03;
- rStream<<nLevelCount;
+ rStream.WriteUInt16( (sal_uInt16)NUMITEM_VERSION_03 );
+ rStream.WriteUInt16( nLevelCount );
//first save of nFeatureFlags for old versions
- rStream<<(sal_uInt16)nFeatureFlags;
- rStream<<(sal_uInt16)bContinuousNumbering;
- rStream<<(sal_uInt16)eNumberingType;
+ rStream.WriteUInt16( (sal_uInt16)nFeatureFlags );
+ rStream.WriteUInt16( (sal_uInt16)bContinuousNumbering );
+ rStream.WriteUInt16( (sal_uInt16)eNumberingType );
FontToSubsFontConverter pConverter = 0;
sal_Bool bConvertBulletFont = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_50 ) && ( rStream.GetVersion() );
@@ -724,7 +724,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
sal_uInt16 nSetFlag(aFmtsSet[i] ? 2 : 0); // fdo#68648 store that too
if(aFmts[i])
{
- rStream << sal_uInt16(1 | nSetFlag);
+ rStream.WriteUInt16( sal_uInt16(1 | nSetFlag) );
if(bConvertBulletFont && aFmts[i]->GetBulletFont())
{
if(!pConverter)
@@ -735,10 +735,10 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
aFmts[i]->Store(rStream, pConverter);
}
else
- rStream << sal_uInt16(0 | nSetFlag);
+ rStream.WriteUInt16( sal_uInt16(0 | nSetFlag) );
}
//second save of nFeatureFlags for new versions
- rStream<<(sal_uInt16)nFeatureFlags;
+ rStream.WriteUInt16( (sal_uInt16)nFeatureFlags );
if(pConverter)
DestroyFontToSubsFontConverter(pConverter);