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 | |
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')
-rw-r--r-- | sd/inc/app.hrc | 8 | ||||
-rw-r--r-- | sd/inc/sdattr.hrc | 12 | ||||
-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 |
8 files changed, 27 insertions, 29 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index bf944d2b3675..73a82fef0067 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -169,7 +169,7 @@ #define SID_OBJECT_CLOSE (SID_SD_START+109) #define SID_ANIMATOR_ADD (SID_SD_START+110) #define SID_ANIMATOR_CREATE (SID_SD_START+111) -#define SID_ANIMATOR_STATE (SID_SD_START+112) +#define SID_ANIMATOR_STATE TypedWhichId<SfxUInt16Item>(SID_SD_START+112) #define SID_PRESENTATIONOBJECT (SID_SD_START+113) // In svxids.hrc: SID_SIZE_VISAREA (SID_SD_START+114) // In svxids.hrc: SID_ATTR_SYMBOLTYPE (SID_SD_START+115) @@ -309,14 +309,14 @@ #define SID_UNSELECT (SID_SD_START+280) #define SID_TEXTATTR_DLG (SID_SD_START+281) #define SID_ORIGINAL_SIZE (SID_SD_START+282) -#define SID_PAGES_PER_ROW (SID_SD_START+284) +#define SID_PAGES_PER_ROW TypedWhichId<SfxUInt16Item>(SID_SD_START+284) #define SID_TEXT_FITTOSIZE (SID_SD_START+285) // In svxids.hrc: SID_TEXT_FITTOSIZE_VERTICAL (SID_SD_START+286) #define SID_NAVIGATOR_PAGENAME TypedWhichId<SfxStringItem>(SID_SD_START+287) #define SID_NAVIGATOR_STATE (SID_SD_START+288) #define SID_NAVIGATOR_INIT (SID_SD_START+289) // FREE -#define SID_NAVIGATOR_PAGE (SID_SD_START+292) +#define SID_NAVIGATOR_PAGE TypedWhichId<SfxUInt16Item>(SID_SD_START+292) #define SID_NAVIGATOR_OBJECT TypedWhichId<SfxStringItem>(SID_SD_START+293) #define SID_ANIMATOR_INIT (SID_SD_START+294) #define SID_DRAWTBX_3D_OBJECTS (SID_SD_START+295) @@ -328,7 +328,7 @@ #define SID_GLUE_EDITMODE (SID_SD_START+301) #define SID_GLUE_INSERT_POINT (SID_SD_START+302) #define SID_GLUE_PERCENT (SID_SD_START+303) -#define SID_GLUE_ESCDIR (SID_SD_START+304) +#define SID_GLUE_ESCDIR TypedWhichId<SfxUInt16Item>(SID_SD_START+304) #define SID_GLUE_HORZALIGN_CENTER (SID_SD_START+305) #define SID_GLUE_HORZALIGN_LEFT (SID_SD_START+306) #define SID_GLUE_HORZALIGN_RIGHT (SID_SD_START+307) diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc index 958ab13e7fb2..e4c102f46557 100644 --- a/sd/inc/sdattr.hrc +++ b/sd/inc/sdattr.hrc @@ -60,8 +60,8 @@ class XColorItem; // animation attributes #define ATTR_ANIMATION_START ATTR_PRESENT_END + 1 #define ATTR_ANIMATION_ACTIVE ATTR_ANIMATION_START -#define ATTR_ANIMATION_EFFECT ATTR_ANIMATION_START + 1 -#define ATTR_ANIMATION_SPEED ATTR_ANIMATION_START + 2 +#define ATTR_ANIMATION_EFFECT TypedWhichId<SfxUInt16Item>(ATTR_ANIMATION_START + 1) +#define ATTR_ANIMATION_SPEED TypedWhichId<SfxUInt16Item>(ATTR_ANIMATION_START + 2) #define ATTR_ANIMATION_INVISIBLE ATTR_ANIMATION_START + 3 #define ATTR_ANIMATION_FADEOUT ATTR_ANIMATION_START + 4 #define ATTR_ANIMATION_COLOR ATTR_ANIMATION_START + 5 @@ -72,9 +72,9 @@ class XColorItem; #define ATTR_ANIMATION_END ATTR_ANIMATION_TEXTEFFECT #define ATTR_ACTION_START ATTR_ANIMATION_END + 1 -#define ATTR_ACTION ATTR_ACTION_START -#define ATTR_ACTION_EFFECT ATTR_ACTION_START + 1 -#define ATTR_ACTION_EFFECTSPEED ATTR_ACTION_START + 2 +#define ATTR_ACTION TypedWhichId<SfxUInt16Item>(ATTR_ACTION_START) +#define ATTR_ACTION_EFFECT TypedWhichId<SfxUInt16Item>(ATTR_ACTION_START + 1) +#define ATTR_ACTION_EFFECTSPEED TypedWhichId<SfxUInt16Item>(ATTR_ACTION_START + 2) #define ATTR_ACTION_FILENAME TypedWhichId<SfxStringItem>(ATTR_ACTION_START + 3) #define ATTR_ACTION_SOUNDON ATTR_ACTION_START + 4 #define ATTR_ACTION_PLAYFULL ATTR_ACTION_START + 5 @@ -92,7 +92,7 @@ class XColorItem; #define ATTR_COPY_END ATTR_COPY_END_COLOR #define ATTR_SNAPLINE_START ATTR_COPY_END + 1 -#define ATTR_SNAPLINE_KIND ATTR_SNAPLINE_START +#define ATTR_SNAPLINE_KIND TypedWhichId<SfxUInt16Item>(ATTR_SNAPLINE_START) #define ATTR_SNAPLINE_X ATTR_SNAPLINE_START + 1 #define ATTR_SNAPLINE_Y ATTR_SNAPLINE_START + 2 #define ATTR_SNAPLINE_END ATTR_SNAPLINE_Y 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) { |