From 2baf13e903164e92af6c87346e368043bbd09b28 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 24 Feb 2022 13:24:04 +0200 Subject: use more TypedWhichId Change-Id: I6ab3ca829bc08e672736dd8dd41ba714d7172090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130498 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/ui/chrdlg/numpara.cxx | 4 ++-- sw/source/ui/frmdlg/wrap.cxx | 3 +-- sw/source/ui/misc/pgfnote.cxx | 2 +- sw/source/ui/table/tabledlg.cxx | 5 ++--- 4 files changed, 6 insertions(+), 8 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 205bcacadb6f..064439a1be15 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -96,7 +96,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) if (m_xOutlineLvLB->get_value_changed_from_saved()) { const sal_uInt16 aOutlineLv = m_xOutlineLvLB->get_active(); - const SfxUInt16Item* pOldOutlineLv = static_cast(GetOldItem( *rSet, SID_ATTR_PARA_OUTLINE_LEVEL)); + const SfxUInt16Item* pOldOutlineLv = GetOldItem( *rSet, SID_ATTR_PARA_OUTLINE_LEVEL); if (pOldOutlineLv) { std::unique_ptr pOutlineLv(pOldOutlineLv->Clone()); @@ -165,7 +165,7 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet) if( eItemState >= SfxItemState::DEFAULT ) { - sal_Int16 nOutlineLv = static_cast(rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue(); + sal_Int16 nOutlineLv = rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) ).GetValue(); m_xOutlineLvLB->set_active(nOutlineLv) ; } else diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 5f608db7108d..a03ddff953be 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -129,8 +129,7 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet) m_xWrapOutlineCB->show(); m_xWrapOutsideCB->show(); - m_xWrapTransparentCB->set_active( 0 == static_cast(rSet->Get( - FN_DRAW_WRAP_DLG)).GetValue() ); + m_xWrapTransparentCB->set_active( 0 == rSet->Get(FN_DRAW_WRAP_DLG).GetValue() ); m_xWrapTransparentCB->save_state(); } else diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 452aab1874d1..786d8028f97a 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -211,7 +211,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) // stuff attributes into the set, when OK bool SwFootNotePage::FillItemSet(SfxItemSet *rSet) { - SwPageFootnoteInfoItem aItem(static_cast(GetItemSet().Get(FN_PARAM_FTN_INFO))); + SwPageFootnoteInfoItem aItem(GetItemSet().Get(FN_PARAM_FTN_INFO)); // that's the original SwPageFootnoteInfo &rFootnoteInfo = aItem.GetPageFootnoteInfo(); diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 7762a9d33588..c62b73629aa2 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1596,14 +1596,13 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) } if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SfxItemState::DEFAULT ) { - SvxFrameDirection nDirection = - static_cast(rSet->Get(FN_TABLE_BOX_TEXTORIENTATION)).GetValue(); + SvxFrameDirection nDirection = rSet->Get(FN_TABLE_BOX_TEXTORIENTATION).GetValue(); m_xTextDirectionLB->set_active_id(OUString::number(static_cast(nDirection))); } if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SfxItemState::DEFAULT ) { - sal_uInt16 nVert = static_cast(rSet->Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); + sal_uInt16 nVert = rSet->Get(FN_TABLE_SET_VERT_ALIGN).GetValue(); sal_uInt16 nPos = 0; switch(nVert) { -- cgit