diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-25 06:11:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-26 15:26:20 +0200 |
commit | 8ea2bb252a8847b514546b7c49eeb7a83fcc7851 (patch) | |
tree | fa24994cab40dc38198c29a32478373aea2ffe4a /editeng | |
parent | bec72dd34f8aa7419c6159bdf02c5ba34a6228a8 (diff) |
remove unnecessary casts in calls to SvStream.WriteSChar
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I4f17a2fd6a68f8078b97c96e89e27a5627c57c03
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 16 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 28 |
2 files changed, 22 insertions, 22 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 6c7b3cc55b7b..9a62c911ab72 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1236,7 +1236,7 @@ SvStream& SvxProtectItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) if( IsPosProtected() ) cProt |= 0x01; if( IsSizeProtected() ) cProt |= 0x02; if( IsCntntProtected() ) cProt |= 0x04; - rStrm.WriteSChar( (sal_Int8) cProt ); + rStrm.WriteSChar( cProt ); return rStrm; } @@ -1475,12 +1475,12 @@ bool SvxShadowItem::GetPresentation SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( (sal_Int8) GetLocation() ) + rStrm.WriteSChar( GetLocation() ) .WriteUInt16( (sal_uInt16) GetWidth() ) .WriteUChar( (aShadowColor.GetTransparency() > 0) ); WriteColor( rStrm, GetColor() ); WriteColor( rStrm, GetColor() ); - rStrm.WriteSChar( (sal_Int8)(aShadowColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID + rStrm.WriteSChar( (aShadowColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID return rStrm; } @@ -2567,7 +2567,7 @@ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) cFlags |= 0x02; if ( IsMinDist() ) cFlags |= 0x04; - rStrm.WriteSChar( (sal_Int8) cFlags ) + rStrm.WriteSChar( cFlags ) .WriteUInt16( (sal_uInt16) GetDefDist() ); const SvxBorderLine* pLine[ 2 ]; pLine[ 0 ] = GetHori(); @@ -2967,9 +2967,9 @@ SfxPoolItem* SvxFmtBreakItem::Clone( SfxItemPool* ) const SvStream& SvxFmtBreakItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { - rStrm.WriteSChar( (sal_Int8)GetValue() ); + rStrm.WriteSChar( GetValue() ); if( FMTBREAK_NOAUTO > nItemVersion ) - rStrm.WriteSChar( (sal_Int8)0x01 ); + rStrm.WriteSChar( 0x01 ); return rStrm; } @@ -3818,7 +3818,7 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ ) rStream.WriteUChar( false ); WriteColor( rStream, aColor ); WriteColor( rStream, aColor ); - rStream.WriteSChar( (sal_Int8)(aColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID + rStream.WriteSChar( (aColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID sal_uInt16 nDoLoad = 0; @@ -3845,7 +3845,7 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ ) // UNICODE: rStream << maStrFilter; rStream.WriteUniOrByteString(maStrFilter, rStream.GetStreamCharSet()); } - rStream.WriteSChar( (sal_Int8)eGraphicPos ); + rStream.WriteSChar( eGraphicPos ); return rStream; } diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 56d29e297b30..5a9789e2d39e 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -266,11 +266,11 @@ SfxPoolItem* SvxLineSpacingItem::Create(SvStream& rStrm, sal_uInt16) const SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( (sal_Int8) GetPropLineSpace() ) + rStrm.WriteSChar( GetPropLineSpace() ) .WriteInt16( (short) GetInterLineSpace() ) .WriteUInt16( (sal_uInt16) GetLineHeight() ) - .WriteSChar( (sal_Int8) GetLineSpaceRule() ) - .WriteSChar( (sal_Int8) GetInterLineSpaceRule() ); + .WriteSChar( GetLineSpaceRule() ) + .WriteSChar( GetInterLineSpaceRule() ); return rStrm; } @@ -504,7 +504,7 @@ SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const nFlags |= 0x0002; if ( bLastBlock ) nFlags |= 0x0004; - rStrm.WriteSChar( (sal_Int8) nFlags ); + rStrm.WriteSChar( nFlags ); } return rStrm; } @@ -536,7 +536,7 @@ SfxPoolItem* SvxWidowsItem::Create(SvStream& rStrm, sal_uInt16) const SvStream& SvxWidowsItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( (sal_Int8)GetValue() ); + rStrm.WriteSChar( GetValue() ); return rStrm; } @@ -601,7 +601,7 @@ SfxPoolItem* SvxOrphansItem::Create(SvStream& rStrm, sal_uInt16) const SvStream& SvxOrphansItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( (sal_Int8) GetValue() ); + rStrm.WriteSChar( GetValue() ); return rStrm; } @@ -795,11 +795,11 @@ SfxPoolItem* SvxHyphenZoneItem::Create(SvStream& rStrm, sal_uInt16) const SvStream& SvxHyphenZoneItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( (sal_Int8) IsHyphen() ) - .WriteSChar( (sal_Int8) IsPageEnd() ) - .WriteSChar( (sal_Int8) GetMinLead() ) - .WriteSChar( (sal_Int8) GetMinTrail() ) - .WriteSChar( (sal_Int8) GetMaxHyphens() ); + rStrm.WriteSChar( (sal_Int8) IsHyphen() ) + .WriteSChar( (sal_Int8) IsPageEnd() ) + .WriteSChar( GetMinLead() ) + .WriteSChar( GetMinTrail() ) + .WriteSChar( GetMaxHyphens() ); return rStrm; } @@ -1158,12 +1158,12 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) nCount = (sal_uInt16)(nNew < lA3Width ? ( lA3Width - nNew ) / nDefDist + 1 : 0); } - rStrm.WriteSChar( (sal_Int8) ( nTabs + nCount ) ); + rStrm.WriteSChar( ( nTabs + nCount ) ); for ( short i = 0; i < nTabs; i++ ) { const SvxTabStop& rTab = (*this)[ i ]; rStrm.WriteInt32( rTab.GetTabPos() ) - .WriteSChar( (sal_Int8) rTab.GetAdjustment() ) + .WriteSChar( rTab.GetAdjustment() ) .WriteUChar( rTab.GetDecimal() ) .WriteUChar( rTab.GetFill() ); } @@ -1173,7 +1173,7 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) { SvxTabStop aSwTabStop(nNew, SVX_TAB_ADJUST_DEFAULT); rStrm.WriteInt32( aSwTabStop.GetTabPos() ) - .WriteSChar( (sal_Int8) aSwTabStop.GetAdjustment() ) + .WriteSChar( aSwTabStop.GetAdjustment() ) .WriteUChar( aSwTabStop.GetDecimal() ) .WriteUChar( aSwTabStop.GetFill() ); nNew += nDefDist; |