diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-26 11:18:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-26 13:49:54 +0200 |
commit | 5315e6069e425aad88873beb5344bb8ea31e0c55 (patch) | |
tree | ee8928e3fb00e52a04faa1cc5a3424b3ed0f8ff2 /sd/source | |
parent | a82e7cc9ed17a2500ad8cb9ffe54c412b0d8063f (diff) |
use more TypedWhichId
which flushed out an inconsistency in how SID_NUMBER_TYPE_FORMAT was being used
Change-Id: Ib59ae4c4950136703d18d7485db432a39e3dc39c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152300
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/dlg/dlgpage.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpaction.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuoaprms.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/func/fusnapln.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsd.cxx | 3 |
6 files changed, 17 insertions, 19 deletions
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index ecc452dca022..5e41ec6cec20 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -84,7 +84,7 @@ void SdPageDlg::PageCreated(const OUString& rId, SfxTabPage& rPage) SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if (rId == "RID_SVXPAGE_PAGE") { - aSet.Put(SfxUInt16Item(sal_uInt16(SID_ENUM_PAGE_MODE), SVX_PAGE_MODE_PRESENTATION)); + aSet.Put(SfxUInt16Item(SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_PRESENTATION)); aSet.Put(SfxUInt16Item(SID_PAPER_START, PAPER_A0)); aSet.Put(SfxUInt16Item(SID_PAPER_END, PAPER_E)); diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index ed2690ebdbd7..db92bd2a820e 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -289,8 +289,8 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs ) // m_xLbAction if( rAttrs->GetItemState( ATTR_ACTION ) != SfxItemState::DONTCARE ) { - eCA = static_cast<presentation::ClickAction>(static_cast<const SfxUInt16Item&>( rAttrs-> - Get( ATTR_ACTION ) ).GetValue()); + eCA = static_cast<presentation::ClickAction>( rAttrs-> + Get( ATTR_ACTION ).GetValue()); SetActualClickAction( eCA ); } else diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index b0de894dc194..fd01f9befd1d 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -466,8 +466,8 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) if (pArgs->GetItemState(ATTR_ANIMATION_EFFECT) == SfxItemState::SET) { - eEffect = static_cast<presentation::AnimationEffect>(static_cast<const SfxUInt16Item&>( pArgs-> - Get(ATTR_ANIMATION_EFFECT)).GetValue()); + eEffect = static_cast<presentation::AnimationEffect>( pArgs-> + Get(ATTR_ANIMATION_EFFECT).GetValue()); nEffectSet = ATTR_SET; } else @@ -484,8 +484,8 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) if (pArgs->GetItemState(ATTR_ANIMATION_SPEED) == SfxItemState::SET) { - eSpeed = static_cast<presentation::AnimationSpeed>(static_cast<const SfxUInt16Item&>( pArgs-> - Get(ATTR_ANIMATION_SPEED)).GetValue()); + eSpeed = static_cast<presentation::AnimationSpeed>( pArgs-> + Get(ATTR_ANIMATION_SPEED).GetValue()); nSpeedSet = ATTR_SET; } else @@ -541,8 +541,8 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) if (pArgs->GetItemState(ATTR_ACTION) == SfxItemState::SET) { - eClickAction = static_cast<presentation::ClickAction>(static_cast<const SfxUInt16Item&>(pArgs-> - Get(ATTR_ACTION)).GetValue()); + eClickAction = static_cast<presentation::ClickAction>(pArgs-> + Get(ATTR_ACTION).GetValue()); nClickActionSet = ATTR_SET; } else @@ -558,8 +558,8 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) if (pArgs->GetItemState(ATTR_ACTION_EFFECT) == SfxItemState::SET) { - eSecondEffect = static_cast<presentation::AnimationEffect>(static_cast<const SfxUInt16Item&>( pArgs-> - Get(ATTR_ACTION_EFFECT)).GetValue()); + eSecondEffect = static_cast<presentation::AnimationEffect>( pArgs-> + Get(ATTR_ACTION_EFFECT).GetValue()); nSecondEffectSet = ATTR_SET; } else @@ -567,8 +567,8 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) if (pArgs->GetItemState(ATTR_ACTION_EFFECTSPEED) == SfxItemState::SET) { - eSecondSpeed = static_cast<presentation::AnimationSpeed>(static_cast<const SfxUInt16Item&>( pArgs-> - Get(ATTR_ACTION_EFFECTSPEED)).GetValue()); + eSecondSpeed = static_cast<presentation::AnimationSpeed>( pArgs-> + Get(ATTR_ACTION_EFFECTSPEED).GetValue()); nSecondSpeedSet = ATTR_SET; } else diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index ee51d78cec88..323404b5afab 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -167,8 +167,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) pPV = mpView->GetSdrPageView(); - switch ( static_cast<SnapKind>(static_cast<const SfxUInt16Item&>( - pArgs->Get(ATTR_SNAPLINE_KIND)).GetValue()) ) + switch ( static_cast<SnapKind>(pArgs->Get(ATTR_SNAPLINE_KIND).GetValue()) ) { case SnapKind::Horizontal : eKind = SdrHelpLineKind::Horizontal; break; case SnapKind::Vertical : eKind = SdrHelpLineKind::Vertical; break; diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index f01851668f76..559846aeb5f0 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -234,7 +234,7 @@ void FuText::DoExecute( SfxRequest& ) && SID_TEXTEDIT == nSlotId && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) - && static_cast<const SfxUInt16Item&>(pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) + && pArgs->Get(SID_TEXTEDIT).GetValue() == 2) { // Selection by doubleclick -> don't allow QuickDrag bQuickDrag = false; @@ -1256,7 +1256,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq) && SID_TEXTEDIT == nSlotId && SfxItemState::SET == pArgs->GetItemState(SID_TEXTEDIT) - && static_cast<const SfxUInt16Item&>( pArgs->Get(SID_TEXTEDIT)).GetValue() == 2) + && pArgs->Get(SID_TEXTEDIT).GetValue() == 2) { // selection with double click -> do not allow QuickDrag bQuickDrag = false; diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx index 59b040e68b97..1a6bb3aee913 100644 --- a/sd/source/ui/view/drviewsd.cxx +++ b/sd/source/ui/view/drviewsd.cxx @@ -72,8 +72,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq ) mpDrawView->SdrEndTextEdit(); const SfxItemSet* pArgs = rReq.GetArgs(); - PageJump eJump = static_cast<PageJump>(static_cast<const SfxUInt16Item&>( pArgs-> - Get(SID_NAVIGATOR_PAGE)).GetValue()); + PageJump eJump = static_cast<PageJump>( pArgs->Get(SID_NAVIGATOR_PAGE).GetValue() ); switch (eJump) { |