diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-15 09:44:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-15 13:46:29 +0200 |
commit | 718cdd43c25783d9cd402e381123efe3981cc514 (patch) | |
tree | e8c4c20b8173f15520724a3d3e216bfbe0e98851 /sc/source | |
parent | 4cd418692ed71e31fdf2fbd85cef89aa29df55c9 (diff) |
loplugin:redundantcast, find more functional casts
In the enum types that caused the problem look like this when I dump
then:
EnumType 0xdb45770 'enum SvxFrameDirection'
`-Enum 0xdb456d8 'SvxFrameDirection'
SubstTemplateTypeParmType 0xdb61200 'enum SvxFrameDirection' sugar
|-TemplateTypeParmType 0xd7518f0 'EnumT' dependent depth 0 index 0
| `-TemplateTypeParm 0xd7518a8 'EnumT'
`-EnumType 0xdb45770 'enum SvxFrameDirection'
`-Enum 0xdb456d8 'SvxFrameDirection'
Change-Id: Id8fedabe43b7a27df61a2320a9acbf54d2dc7882
Reviewed-on: https://gerrit.libreoffice.org/41169
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/pagedlg/tptable.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index 90754c32d1cc..fab08754d31e 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -77,7 +77,7 @@ bool WAS_DEFAULT(sal_uInt16 w, SfxItemSet const & s) #define GET_BOOL(sid,set) static_cast<const SfxBoolItem&>((set).Get(GetWhich((sid)))).GetValue() #define GET_USHORT(sid,set) static_cast<const SfxUInt16Item&>((set).Get(GetWhich((sid)))).GetValue() -#define GET_SHOW(sid,set) ( ScVObjMode( static_cast<const ScViewObjectModeItem&>((set).Get(GetWhich((sid)))).GetValue() ) \ +#define GET_SHOW(sid,set) ( static_cast<const ScViewObjectModeItem&>((set).Get(GetWhich((sid)))).GetValue() \ == VOBJ_MODE_SHOW ) // List box entries "Scaling mode" #define SC_TPTABLE_SCALE_PERCENT 0 diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 3dc53df16d36..b62ac3b34496 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1557,12 +1557,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, true,&pItem ) == SfxItemState::SET) { pHorJustify = static_cast<const SvxHorJustifyItem*>(pItem); - eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() ); + eHorJustify = pHorJustify->GetValue(); } if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, true,&pItem ) == SfxItemState::SET) { pVerJustify = static_cast<const SvxVerJustifyItem*>(pItem); - eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() ); + eVerJustify = pVerJustify->GetValue(); } switch ( nSlot ) @@ -2299,7 +2299,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) { case SfxItemState::SET: { - switch ( SvxCellHorJustify( pHorJustify->GetValue() ) ) + switch ( pHorJustify->GetValue() ) { case SvxCellHorJustify::Standard: break; @@ -2367,7 +2367,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) { case SfxItemState::SET: { - eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() ); + eVerJustify = pVerJustify->GetValue(); switch ( eVerJustify ) { diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 42c97db3185f..ebdc9edb15ba 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -89,7 +89,7 @@ inline sal_uInt16 lcl_GetUShort(const SfxItemSet* pSet, sal_uInt16 nWhich) inline bool lcl_GetShow(const SfxItemSet* pSet, sal_uInt16 nWhich) { - return ScVObjMode::VOBJ_MODE_SHOW == ScVObjMode( static_cast<const ScViewObjectModeItem&>(pSet->Get(nWhich)).GetValue() ); + return ScVObjMode::VOBJ_MODE_SHOW == static_cast<const ScViewObjectModeItem&>(pSet->Get(nWhich)).GetValue(); } |