diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-25 17:56:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-26 15:26:48 +0200 |
commit | 5501c8d2220ee3cab703d09d348e99ba3e017dba (patch) | |
tree | ce59b08fa7ad1192f3038266db1be0d64a05c0c3 /editeng/source | |
parent | dedfa972bc19f21e6fab7c38a64ae9543142f416 (diff) |
remove unnecessary casts in calls to SvStream.WriteUInt16
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/flditem.cxx | 18 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 14 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 32 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/svdfield.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 14 |
7 files changed, 42 insertions, 42 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index cfa6a93d3362..5f315dceb1f5 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1077,7 +1077,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const // Store Current text encoding ... rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( osl_getThreadTextEncoding() ); - rOStream.WriteUInt16( (sal_uInt16) eEncoding ); + rOStream.WriteUInt16( eEncoding ); // The number of paragraphs ... size_t nParagraphs = aContents.size(); diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 73074e8e0c60..a5a02abd7c0d 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -432,8 +432,8 @@ void SvxDateField::Load( SvPersistStream & rStm ) void SvxDateField::Save( SvPersistStream & rStm ) { rStm.WriteUInt32( nFixDate ); - rStm.WriteUInt16( (sal_uInt16)eType ); - rStm.WriteUInt16( (sal_uInt16)eFormat ); + rStm.WriteUInt16( eType ); + rStm.WriteUInt16( eFormat ); } @@ -593,7 +593,7 @@ void SvxURLField::Load( SvPersistStream & rStm ) void SvxURLField::Save( SvPersistStream & rStm ) { - rStm.WriteUInt16( (sal_uInt16)eFormat ); + rStm.WriteUInt16( eFormat ); write_unicode( rStm, aURL ); write_unicode( rStm, aRepresentation ); @@ -841,8 +841,8 @@ void SvxExtTimeField::Load( SvPersistStream & rStm ) void SvxExtTimeField::Save( SvPersistStream & rStm ) { rStm.WriteInt64(m_nFixTime); - rStm.WriteUInt16( (sal_uInt16) eType ); - rStm.WriteUInt16( (sal_uInt16) eFormat ); + rStm.WriteUInt16( eType ); + rStm.WriteUInt16( eFormat ); } @@ -989,8 +989,8 @@ void SvxExtFileField::Save( SvPersistStream & rStm ) // UNICODE: rStm << aFile; rStm.WriteUniOrByteString(aFile, rStm.GetStreamCharSet()); - rStm.WriteUInt16( (sal_uInt16) eType ); - rStm.WriteUInt16( (sal_uInt16) eFormat ); + rStm.WriteUInt16( eType ); + rStm.WriteUInt16( eFormat ); } @@ -1145,8 +1145,8 @@ void SvxAuthorField::Save( SvPersistStream & rStm ) write_unicode( rStm, aFirstName ); write_unicode( rStm, aShortName ); - rStm.WriteUInt16( (sal_uInt16) eType ); - rStm.WriteUInt16( (sal_uInt16) eFormat ); + rStm.WriteUInt16( eType ); + rStm.WriteUInt16( eFormat ); } diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index c958e8ca37be..0dd0deb9a64a 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1476,7 +1476,7 @@ bool SvxShadowItem::GetPresentation SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { rStrm.WriteSChar( GetLocation() ) - .WriteUInt16( (sal_uInt16) GetWidth() ) + .WriteUInt16( GetWidth() ) .WriteUChar( (aShadowColor.GetTransparency() > 0) ); WriteColor( rStrm, GetColor() ); WriteColor( rStrm, GetColor() ); @@ -2166,7 +2166,7 @@ bool SvxBoxItem::GetPresentation SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { - rStrm.WriteUInt16( (sal_uInt16) GetDistance() ); + rStrm.WriteUInt16( GetDistance() ); const SvxBorderLine* pLine[ 4 ]; // top, left, right, bottom pLine[ 0 ] = GetTop(); pLine[ 1 ] = GetLeft(); @@ -2195,10 +2195,10 @@ SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const if( nItemVersion >= BOX_4DISTS_VERSION && (cLine & 0x10) != 0 ) { - rStrm.WriteUInt16( (sal_uInt16)nTopDist ) - .WriteUInt16( (sal_uInt16)nLeftDist ) - .WriteUInt16( (sal_uInt16)nRightDist ) - .WriteUInt16( (sal_uInt16)nBottomDist ); + rStrm.WriteUInt16( nTopDist ) + .WriteUInt16( nLeftDist ) + .WriteUInt16( nRightDist ) + .WriteUInt16( nBottomDist ); } return rStrm; @@ -2568,7 +2568,7 @@ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) if ( IsMinDist() ) cFlags |= 0x04; rStrm.WriteSChar( cFlags ) - .WriteUInt16( (sal_uInt16) GetDefDist() ); + .WriteUInt16( GetDefDist() ); const SvxBorderLine* pLine[ 2 ]; pLine[ 0 ] = GetHori(); pLine[ 1 ] = GetVert(); diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index faf7f13f5990..937801177c74 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -251,13 +251,13 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC pBulletFont->SetName(sFontName); } - rStream.WriteUInt16( (sal_uInt16)NUMITEM_VERSION_04 ); + rStream.WriteUInt16( NUMITEM_VERSION_04 ); - rStream.WriteUInt16( (sal_uInt16)GetNumberingType() ); - rStream.WriteUInt16( (sal_uInt16)eNumAdjust ); - rStream.WriteUInt16( (sal_uInt16)nInclUpperLevels ); + rStream.WriteUInt16( GetNumberingType() ); + rStream.WriteUInt16( eNumAdjust ); + rStream.WriteUInt16( nInclUpperLevels ); rStream.WriteUInt16( nStart ); - rStream.WriteUInt16( (sal_uInt16)cBullet ); + rStream.WriteUInt16( cBullet ); rStream.WriteInt16( nFirstLineOffset ); rStream.WriteInt16( nAbsLSpace ); @@ -270,7 +270,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC rStream.WriteUniOrByteString(sCharStyleName, eEnc); if(pGraphicBrush) { - rStream.WriteUInt16( (sal_uInt16)1 ); + rStream.WriteUInt16( 1 ); // in SD or SI force bullet itself to be stored, // for that purpose throw away link when link and graphic @@ -283,16 +283,16 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION); } else - rStream.WriteUInt16( (sal_uInt16)0 ); + rStream.WriteUInt16( 0 ); - rStream.WriteUInt16( (sal_uInt16)eVertOrient ); + rStream.WriteUInt16( eVertOrient ); if(pBulletFont) { - rStream.WriteUInt16( (sal_uInt16)1 ); + rStream.WriteUInt16( 1 ); WriteFont( rStream, *pBulletFont ); } else - rStream.WriteUInt16( (sal_uInt16)0 ); + rStream.WriteUInt16( 0 ); WritePair( rStream, aGraphicSize ); Color nTempColor = nBulletColor; @@ -302,8 +302,8 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC rStream.WriteUInt16( nBulletRelSize ); rStream.WriteUInt16( (sal_uInt16)IsShowSymbol() ); - rStream.WriteUInt16( ( sal_uInt16 ) mePositionAndSpaceMode ); - rStream.WriteUInt16( ( sal_uInt16 ) meLabelFollowedBy ); + rStream.WriteUInt16( mePositionAndSpaceMode ); + rStream.WriteUInt16( meLabelFollowedBy ); rStream.WriteInt32( ( sal_Int32 ) mnListtabPos ); rStream.WriteInt32( ( sal_Int32 ) mnFirstLineIndent ); rStream.WriteInt32( ( sal_Int32 ) mnIndentAt ); @@ -687,12 +687,12 @@ SvxNumRule::SvxNumRule( SvStream &rStream ) SvStream& SvxNumRule::Store( SvStream &rStream ) { - rStream.WriteUInt16( (sal_uInt16)NUMITEM_VERSION_03 ); + rStream.WriteUInt16( NUMITEM_VERSION_03 ); rStream.WriteUInt16( nLevelCount ); //first save of nFeatureFlags for old versions - rStream.WriteUInt16( (sal_uInt16)nFeatureFlags ); + rStream.WriteUInt16( nFeatureFlags ); rStream.WriteUInt16( (sal_uInt16)bContinuousNumbering ); - rStream.WriteUInt16( (sal_uInt16)eNumberingType ); + rStream.WriteUInt16( eNumberingType ); FontToSubsFontConverter pConverter = 0; bool bConvertBulletFont = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_50 ) && ( rStream.GetVersion() ); @@ -715,7 +715,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream ) rStream.WriteUInt16( 0 | nSetFlag ); } //second save of nFeatureFlags for new versions - rStream.WriteUInt16( (sal_uInt16)nFeatureFlags ); + rStream.WriteUInt16( nFeatureFlags ); if(pConverter) DestroyFontToSubsFontConverter(pConverter); diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index d46627ddbdec..88af51f10a4f 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -268,7 +268,7 @@ SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion* { rStrm.WriteSChar( GetPropLineSpace() ) .WriteInt16( GetInterLineSpace() ) - .WriteUInt16( (sal_uInt16) GetLineHeight() ) + .WriteUInt16( GetLineHeight() ) .WriteSChar( GetLineSpaceRule() ) .WriteSChar( GetInterLineSpaceRule() ); return rStrm; diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx index 493fcc1f0b46..58d4f3f2a367 100644 --- a/editeng/source/items/svdfield.cxx +++ b/editeng/source/items/svdfield.cxx @@ -45,7 +45,7 @@ void SdrMeasureField::Load(SvPersistStream& rIn) void SdrMeasureField::Save(SvPersistStream& rOut) { - rOut.WriteUInt16( (sal_uInt16)eMeasureFieldKind ); + rOut.WriteUInt16( eMeasureFieldKind ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 0122f2584bc0..6e6745805d3f 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -735,10 +735,10 @@ SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { - rStrm.WriteUInt16( (sal_uInt16)GetHeight() ); + rStrm.WriteUInt16( GetHeight() ); if( FONTHEIGHT_UNIT_VERSION <= nItemVersion ) - rStrm.WriteUInt16( GetProp() ).WriteUInt16( (sal_uInt16)GetPropUnit() ); + rStrm.WriteUInt16( GetProp() ).WriteUInt16( GetPropUnit() ); else { // When exporting to the old versions the relative information is lost @@ -1760,7 +1760,7 @@ SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const SvStream& SvxPropSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUInt16( (sal_uInt16) GetValue() ); + rStrm.WriteUInt16( GetValue() ); return rStrm; } @@ -2432,7 +2432,7 @@ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUInt16( (sal_uInt16) GetValue() ); + rStrm.WriteUInt16( GetValue() ); return rStrm; } @@ -2703,7 +2703,7 @@ SfxPoolItem* SvxEmphasisMarkItem::Clone( SfxItemPool * ) const SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUInt16( (sal_uInt16)GetValue() ); + rStrm.WriteUInt16( GetValue() ); return rStrm; } @@ -3104,10 +3104,10 @@ SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, sal_uInt16 nVer ) con { // see comment in Create().... rRet.SeekRel( -1*(long)sizeof(sal_uInt16) ); - rRet.WriteUInt16( (sal_uInt16)0 ); + rRet.WriteUInt16( 0 ); rRet.WriteUInt16( GetValue() ); // Really ugly, but not a problem for reading the doc in 5.2 - rRet.WriteUInt16( (sal_uInt16)0x1234 ); + rRet.WriteUInt16( 0x1234 ); } return rRet; } |