Kaydet (Commit) 8ea2bb25 authored tarafından Noel Grandin's avatar Noel Grandin

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
üst bec72dd3
......@@ -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;
}
......
......@@ -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;
......
......@@ -88,7 +88,7 @@ SvStream& SvxZoomItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) con
{
rStrm.WriteUInt16( (sal_uInt16)GetValue() )
.WriteUInt16( nValueSet )
.WriteSChar( (sal_Int8)eType );
.WriteSChar( eType );
return rStrm;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment