diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-03-15 13:06:21 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-15 18:36:37 +0000 |
commit | 82981b94feeae5fb1fb72139ce87fbc22ef33601 (patch) | |
tree | e4a05955832137210c5cbbf0b68510cd22ccaf7e /editeng | |
parent | e0d86cff2b3314576c6cb857da06d6b6d217f89b (diff) |
remove useless casts
Change-Id: I900b72372a56d341d18091b0d4721d31002d147f
Reviewed-on: https://gerrit.libreoffice.org/35223
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editattr.cxx | 8 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unofdesc.cxx | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index f3b11a2f682f..6d8206588091 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -122,7 +122,7 @@ EditCharAttribWeight::EditCharAttribWeight( const SvxWeightItem& rAttr, sal_uInt void EditCharAttribWeight::SetFont( SvxFont& rFont, OutputDevice* ) { - rFont.SetWeight( (FontWeight)static_cast<const SvxWeightItem*>(GetItem())->GetValue() ); + rFont.SetWeight( static_cast<const SvxWeightItem*>(GetItem())->GetValue() ); } @@ -136,7 +136,7 @@ EditCharAttribUnderline::EditCharAttribUnderline( const SvxUnderlineItem& rAttr, void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev ) { - rFont.SetUnderline( (FontLineStyle)static_cast<const SvxUnderlineItem*>(GetItem())->GetValue() ); + rFont.SetUnderline( static_cast<const SvxUnderlineItem*>(GetItem())->GetValue() ); if ( pOutDev ) pOutDev->SetTextLineColor( static_cast<const SvxUnderlineItem*>(GetItem())->GetColor() ); @@ -154,7 +154,7 @@ EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, sa void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev ) { - rFont.SetOverline( (FontLineStyle)static_cast<const SvxOverlineItem*>(GetItem())->GetValue() ); + rFont.SetOverline( static_cast<const SvxOverlineItem*>(GetItem())->GetValue() ); if ( pOutDev ) pOutDev->SetOverlineColor( static_cast<const SvxOverlineItem*>(GetItem())->GetColor() ); } @@ -199,7 +199,7 @@ EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem& rAttr void EditCharAttribStrikeout::SetFont( SvxFont& rFont, OutputDevice* ) { - rFont.SetStrikeout( (FontStrikeout)static_cast<const SvxCrossedOutItem*>(GetItem())->GetValue() ); + rFont.SetStrikeout( static_cast<const SvxCrossedOutItem*>(GetItem())->GetValue() ); } diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index c3056134e1c3..65e6965757b2 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -650,7 +650,7 @@ bool SvxWeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; case MID_WEIGHT: { - rVal <<= (float)( VCLUnoHelper::ConvertFontWeight( (FontWeight)GetValue() ) ); + rVal <<= (float)( VCLUnoHelper::ConvertFontWeight( GetValue() ) ); } break; } @@ -1209,7 +1209,7 @@ bool SvxTextLineItem::HasBoolValue() const bool SvxTextLineItem::GetBoolValue() const { - return (FontLineStyle)GetValue() != LINESTYLE_NONE; + return GetValue() != LINESTYLE_NONE; } diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 69d08901322f..48dbeb4ddcc9 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -95,28 +95,28 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte } { - SvxPostureItem aPostureItem( (FontItalic)0, EE_CHAR_ITALIC ); + SvxPostureItem aPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); aTemp <<= rDesc.Slant; static_cast<SfxPoolItem*>(&aPostureItem)->PutValue( aTemp, MID_POSTURE ); rSet.Put(aPostureItem); } { - SvxUnderlineItem aUnderlineItem( (FontLineStyle)0, EE_CHAR_UNDERLINE ); + SvxUnderlineItem aUnderlineItem( LINESTYLE_NONE, EE_CHAR_UNDERLINE ); aTemp <<= (sal_Int16)rDesc.Underline; static_cast<SfxPoolItem*>(&aUnderlineItem)->PutValue( aTemp, MID_TL_STYLE ); rSet.Put( aUnderlineItem ); } { - SvxWeightItem aWeightItem( (FontWeight)0, EE_CHAR_WEIGHT ); + SvxWeightItem aWeightItem( WEIGHT_DONTKNOW, EE_CHAR_WEIGHT ); aTemp <<= rDesc.Weight; static_cast<SfxPoolItem*>(&aWeightItem)->PutValue( aTemp, MID_WEIGHT ); rSet.Put( aWeightItem ); } { - SvxCrossedOutItem aCrossedOutItem( (FontStrikeout)0, EE_CHAR_STRIKEOUT ); + SvxCrossedOutItem aCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); aTemp <<= rDesc.Strikeout; static_cast<SfxPoolItem*>(&aCrossedOutItem)->PutValue( aTemp, MID_CROSS_OUT ); rSet.Put( aCrossedOutItem ); |