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 /svx/source | |
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 'svx/source')
-rw-r--r-- | svx/source/dialog/fntctrl.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 86cbb294f2ad..0632773624cc 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -873,13 +873,13 @@ static void SetPrevFontStyle( const SfxItemSet& rSet, sal_uInt16 nPosture, sal_u if( GetWhich( rSet, nPosture, nWhich ) ) { const SvxPostureItem& rItem = static_cast<const SvxPostureItem&>( rSet.Get( nWhich ) ); - rFont.SetItalic( ( FontItalic ) rItem.GetValue() != ITALIC_NONE ? ITALIC_NORMAL : ITALIC_NONE ); + rFont.SetItalic( rItem.GetValue() != ITALIC_NONE ? ITALIC_NORMAL : ITALIC_NONE ); } if( GetWhich( rSet, nWeight, nWhich ) ) { const SvxWeightItem& rItem = static_cast<const SvxWeightItem&>( rSet.Get( nWhich ) ); - rFont.SetWeight( ( FontWeight ) rItem.GetValue() != WEIGHT_NORMAL ? WEIGHT_BOLD : WEIGHT_NORMAL ); + rFont.SetWeight( rItem.GetValue() != WEIGHT_NORMAL ? WEIGHT_BOLD : WEIGHT_NORMAL ); } } @@ -940,7 +940,7 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack if( GetWhich( rSet, SID_ATTR_CHAR_UNDERLINE, nWhich ) ) { const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>( rSet.Get( nWhich ) ); - eUnderline = ( FontLineStyle ) rItem.GetValue(); + eUnderline = rItem.GetValue(); SetTextLineColor( rItem.GetColor() ); } else @@ -955,7 +955,7 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack if( GetWhich( rSet, SID_ATTR_CHAR_OVERLINE, nWhich ) ) { const SvxOverlineItem& rItem = static_cast<const SvxOverlineItem&>( rSet.Get( nWhich ) ); - eOverline = ( FontLineStyle ) rItem.GetValue(); + eOverline = rItem.GetValue(); SetOverlineColor( rItem.GetColor() ); } else @@ -970,7 +970,7 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack if( GetWhich( rSet, SID_ATTR_CHAR_STRIKEOUT, nWhich ) ) { const SvxCrossedOutItem& rItem = static_cast<const SvxCrossedOutItem&>( rSet.Get( nWhich ) ); - eStrikeout = ( FontStrikeout ) rItem.GetValue(); + eStrikeout = rItem.GetValue(); } else eStrikeout = STRIKEOUT_NONE; @@ -1002,7 +1002,7 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack if( GetWhich( rSet, SID_ATTR_CHAR_RELIEF, nWhich ) ) { const SvxCharReliefItem& rItem = static_cast<const SvxCharReliefItem&>( rSet.Get( nWhich ) ); - FontRelief eFontRelief = ( FontRelief ) rItem.GetValue(); + FontRelief eFontRelief = rItem.GetValue(); rFont.SetRelief( eFontRelief ); rCJKFont.SetRelief( eFontRelief ); rCTLFont.SetRelief( eFontRelief ); @@ -1176,7 +1176,7 @@ void SvxFontPrevWindow::Init(const SfxItemSet& rSet) if( ISITEMSET ) { const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>( rSet.Get( nWhich ) ); - eUnderline = ( FontLineStyle ) rItem.GetValue(); + eUnderline = rItem.GetValue(); SetTextLineColor( rItem.GetColor() ); } else @@ -1192,7 +1192,7 @@ void SvxFontPrevWindow::Init(const SfxItemSet& rSet) if( ISITEMSET ) { const SvxOverlineItem& rItem = static_cast<const SvxOverlineItem&>( rSet.Get( nWhich ) ); - eOverline = ( FontLineStyle ) rItem.GetValue(); + eOverline = rItem.GetValue(); SetOverlineColor( rItem.GetColor() ); } else @@ -1208,7 +1208,7 @@ void SvxFontPrevWindow::Init(const SfxItemSet& rSet) if( ISITEMSET ) { const SvxCrossedOutItem& rItem = static_cast<const SvxCrossedOutItem&>( rSet.Get( nWhich ) ); - eStrikeout = ( FontStrikeout ) rItem.GetValue(); + eStrikeout = rItem.GetValue(); } else eStrikeout = STRIKEOUT_NONE; @@ -1243,7 +1243,7 @@ void SvxFontPrevWindow::Init(const SfxItemSet& rSet) if( ISITEMSET ) { const SvxCharReliefItem& rItem = static_cast<const SvxCharReliefItem&>( rSet.Get( nWhich ) ); - FontRelief eFontRelief = ( FontRelief ) rItem.GetValue(); + FontRelief eFontRelief = rItem.GetValue(); rFont.SetRelief( eFontRelief ); rCJKFont.SetRelief( eFontRelief ); rCTLFont.SetRelief( eFontRelief ); @@ -1407,14 +1407,14 @@ void SvxFontPrevWindow::SetFontStyle( const SfxItemSet& rSet, sal_uInt16 nPostur if( ISITEMSET ) { const SvxPostureItem& rItem = static_cast<const SvxPostureItem&>( rSet.Get( nWhich ) ); - rFont.SetItalic( ( FontItalic ) rItem.GetValue() != ITALIC_NONE ? ITALIC_NORMAL : ITALIC_NONE ); + rFont.SetItalic( rItem.GetValue() != ITALIC_NONE ? ITALIC_NORMAL : ITALIC_NONE ); } nWhich = rSet.GetPool()->GetWhich( nWeight ); if( ISITEMSET ) { const SvxWeightItem& rItem = static_cast<const SvxWeightItem&>( rSet.Get( nWhich ) ); - rFont.SetWeight( ( FontWeight ) rItem.GetValue() != WEIGHT_NORMAL ? WEIGHT_BOLD : WEIGHT_NORMAL ); + rFont.SetWeight( rItem.GetValue() != WEIGHT_NORMAL ? WEIGHT_BOLD : WEIGHT_NORMAL ); } } |