diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-14 13:59:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-14 14:43:43 +0200 |
commit | 5685ee25aad4a4debb47fb5896082be48f521d17 (patch) | |
tree | ba2d8f9341fc1124097e70cae64e1f07cc920712 /cui/source/tabpages/textattr.cxx | |
parent | 44bfe8fad4f7c263dc713a65fb2ab0e2f9afcf99 (diff) |
improve redundantcast loplugin
to find c-style casts where the expression is a templated method
Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b
Reviewed-on: https://gerrit.libreoffice.org/42275
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/tabpages/textattr.cxx')
-rw-r--r-- | cui/source/tabpages/textattr.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index b7cf03f7b81b..a56710534587 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -235,8 +235,8 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState) { // VertAdjust and HorAdjust are unequivocal, thus - SdrTextVertAdjust eTVA = (SdrTextVertAdjust)static_cast<const SdrTextVertAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); - SdrTextHorzAdjust eTHA = (SdrTextHorzAdjust)static_cast<const SdrTextHorzAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_HORZADJUST)).GetValue(); + SdrTextVertAdjust eTVA = static_cast<const SdrTextVertAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); + SdrTextHorzAdjust eTHA = static_cast<const SdrTextHorzAdjustItem&>(rAttrs->Get(SDRATTR_TEXT_HORZADJUST)).GetValue(); RectPoint eRP = RectPoint::LB; m_pTsbFullWidth->EnableTriState( false ); @@ -309,7 +309,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) // adjust to border if ( rAttrs->GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SfxItemState::DONTCARE ) { - SdrFitToSizeType eFTS = (SdrFitToSizeType) + SdrFitToSizeType eFTS = static_cast<const SdrTextFitToSizeTypeItem&>( rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); if( eFTS == SdrFitToSizeType::Autofit || eFTS == SdrFitToSizeType::NONE ) m_pTsbFitToSize->SetState( TRISTATE_FALSE ); @@ -462,8 +462,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE ) { - eOldTVA = (SdrTextVertAdjust) - static_cast<const SdrTextVertAdjustItem&>( rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ) ).GetValue(); + eOldTVA = static_cast<const SdrTextVertAdjustItem&>( rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ) ).GetValue(); if( eOldTVA != eTVA ) rAttrs->Put( SdrTextVertAdjustItem( eTVA ) ); } @@ -472,8 +471,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE ) { - eOldTHA = (SdrTextHorzAdjust) - static_cast<const SdrTextHorzAdjustItem&>( rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ) ).GetValue(); + eOldTHA = static_cast<const SdrTextHorzAdjustItem&>( rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ) ).GetValue(); if( eOldTHA != eTHA ) rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) ); } |