diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-08-14 15:37:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-15 08:56:52 +0200 |
commit | 8ee4530b90ca7c7967fad00f059236a2b0b57607 (patch) | |
tree | 5335981632ba7a871c5f9f8cc41ed46414fba248 /sw | |
parent | b50d6a593dbd4e17cf2caee0e6765a0d22f49e76 (diff) |
remove redundant SvxFrameDirection casts
and replace remaining C-style casts
Change-Id: Ie83e2706391c05946ab46dfd7d26059101579153
Reviewed-on: https://gerrit.libreoffice.org/41143
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/frmdlg/column.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 54d33a4fbbb0..f7995e5ce6be 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -653,8 +653,9 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet) const sal_Int32 nPos = m_pTextDirectionLB->GetSelectEntryPos(); if ( m_pTextDirectionLB->IsValueChangedFromSaved() ) { - sal_uInt32 nDirection = (sal_uInt32)reinterpret_cast<sal_IntPtr>(m_pTextDirectionLB->GetEntryData( nPos )); - rSet->Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR)); + SvxFrameDirection eDirection = static_cast<SvxFrameDirection>( + reinterpret_cast<sal_IntPtr>(m_pTextDirectionLB->GetEntryData( nPos ))); + rSet->Put( SvxFrameDirectionItem(eDirection, RES_FRAMEDIR) ); } } return true; diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index eb2dcd2c7540..48617f50e596 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -3090,7 +3090,7 @@ void SwFrameAddPage::Reset(const SfxItemSet *rSet ) SvxFrameDirection nVal = static_cast<const SvxFrameDirectionItem&>(rSet->Get(RES_FRAMEDIR)).GetValue(); sal_Int32 nPos; for( nPos = m_pTextFlowLB->GetEntryCount(); nPos; ) - if( (SvxFrameDirection)reinterpret_cast<sal_IntPtr>(m_pTextFlowLB->GetEntryData( --nPos )) == nVal ) + if( static_cast<SvxFrameDirection>(reinterpret_cast<sal_IntPtr>(m_pTextFlowLB->GetEntryData( --nPos ))) == nVal ) break; m_pTextFlowLB->SelectEntryPos( nPos ); m_pTextFlowLB->SaveValue(); @@ -3149,9 +3149,9 @@ bool SwFrameAddPage::FillItemSet(SfxItemSet *rSet) sal_Int32 nPos = m_pTextFlowLB->GetSelectEntryPos(); if( m_pTextFlowLB->IsValueChangedFromSaved() ) { - sal_uInt16 nData = (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pTextFlowLB->GetEntryData( nPos )); - bRet |= nullptr != rSet->Put( SvxFrameDirectionItem( - (SvxFrameDirection)nData, RES_FRAMEDIR )); + SvxFrameDirection eDirection = static_cast<SvxFrameDirection>( + reinterpret_cast<sal_IntPtr>(m_pTextFlowLB->GetEntryData( nPos ))); + bRet |= nullptr != rSet->Put( SvxFrameDirectionItem(eDirection, RES_FRAMEDIR )); } } if(m_pWrtSh) |