summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-24 13:24:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-24 19:31:38 +0100
commit2baf13e903164e92af6c87346e368043bbd09b28 (patch)
tree5ce84dc9f5d64a46495bd7ca5f404285bb4683b9 /sw/source/ui
parent089ce740f9f97f9c7b13e37a31acfc94984e9a3e (diff)
use more TypedWhichId
Change-Id: I6ab3ca829bc08e672736dd8dd41ba714d7172090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx4
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx3
-rw-r--r--sw/source/ui/misc/pgfnote.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx5
4 files changed, 6 insertions, 8 deletions
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<const SfxUInt16Item*>(GetOldItem( *rSet, SID_ATTR_PARA_OUTLINE_LEVEL));
+ const SfxUInt16Item* pOldOutlineLv = GetOldItem( *rSet, SID_ATTR_PARA_OUTLINE_LEVEL);
if (pOldOutlineLv)
{
std::unique_ptr<SfxUInt16Item> pOutlineLv(pOldOutlineLv->Clone());
@@ -165,7 +165,7 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet)
if( eItemState >= SfxItemState::DEFAULT )
{
- sal_Int16 nOutlineLv = static_cast<const SfxUInt16Item &>(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<const SfxInt16Item&>(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<const SwPageFootnoteInfoItem&>(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<const SvxFrameDirectionItem&>(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<sal_uInt32>(nDirection)));
}
if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SfxItemState::DEFAULT )
{
- sal_uInt16 nVert = static_cast<const SfxUInt16Item&>(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)
{