diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-26 15:34:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-30 08:14:35 +0200 |
commit | dc50abb7f972c53fcca08d2ac3627e7848456520 (patch) | |
tree | df9e2923e0896d6caa72d64f594a680368cc6f89 /sd | |
parent | fc4f7db59152f606b6aa88cf32197700959d0f8b (diff) |
use more TypedWhichInfo
Change-Id: I406c5d070e3dd197b2cf819d63212d5a40a8eadc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152309
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/app.hrc | 16 | ||||
-rw-r--r-- | sd/inc/sdattr.hrc | 7 | ||||
-rw-r--r-- | sd/source/ui/dlg/present.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/fusldlg.cxx | 2 |
5 files changed, 16 insertions, 17 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 73a82fef0067..ec0eed81d1f3 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -239,7 +239,7 @@ // In svxids.hrc: ID_VAL_ANGLEEND (SID_SD_START+209) // In svxids.hrc: ID_VAL_CENTER_X (SID_SD_START+210) // In svxids.hrc: ID_VAL_CENTER_Y (SID_SD_START+211) -#define ID_VAL_WHATPAGE (SID_SD_START+212) +#define ID_VAL_WHATPAGE TypedWhichId<SfxUInt32Item>(SID_SD_START+212) #define ID_VAL_WHATLAYER (SID_SD_START+213) #define ID_VAL_ANGLE (SID_SD_START+214) #define ID_VAL_MIRRORVERT (SID_SD_START+215) @@ -253,7 +253,7 @@ #define ID_VAL_PAGERIGHT (SID_SD_START+223) #define ID_VAL_SCALEOBJECTS (SID_SD_START+224) #define ID_VAL_PAGENAME TypedWhichId<SfxStringItem>(SID_SD_START+225) -#define ID_VAL_WHATLAYOUT (SID_SD_START+226) +#define ID_VAL_WHATLAYOUT TypedWhichId<SfxUInt32Item>(SID_SD_START+226) #define ID_VAL_ISPAGEBACK (SID_SD_START+227) #define ID_VAL_ISPAGEOBJ (SID_SD_START+228) #define ID_VAL_LAYERNAME (SID_SD_START+229) @@ -297,9 +297,9 @@ #define SID_RENAMEPAGE (SID_SD_START+268) #define SID_RENAMELAYER (SID_SD_START+269) #define SID_HATCH (SID_SD_START+270) -#define SID_GETFILLSTYLE (SID_SD_START+271) -#define SID_GETLINESTYLE (SID_SD_START+272) -#define SID_GETLINEWIDTH (SID_SD_START+273) +#define SID_GETFILLSTYLE TypedWhichId<SfxUInt32Item>(SID_SD_START+271) +#define SID_GETLINESTYLE TypedWhichId<SfxUInt32Item>(SID_SD_START+272) +#define SID_GETLINEWIDTH TypedWhichId<SfxUInt32Item>(SID_SD_START+273) #define SID_SETLINECOLOR (SID_SD_START+274) #define SID_SETHATCHCOLOR (SID_SD_START+275) #define SID_SETGRADSTARTCOLOR (SID_SD_START+276) @@ -313,7 +313,7 @@ #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_STATE TypedWhichId<SfxUInt32Item>(SID_SD_START+288) #define SID_NAVIGATOR_INIT (SID_SD_START+289) // FREE #define SID_NAVIGATOR_PAGE TypedWhichId<SfxUInt16Item>(SID_SD_START+292) @@ -414,7 +414,7 @@ // FREE #define SID_INSERT_PAGE_NUMBER (SID_SD_START+411) #define SID_INSERT_DATE_TIME (SID_SD_START+412) -#define SID_SDMODE_FLAG (SID_SD_START+413) +#define SID_SDMODE_FLAG TypedWhichId<SfxUInt32Item>(SID_SD_START+413) // Enum in the middle of IDs... #define SD_DRAW_MODE 1 #define SD_IMPRESS_MODE 2 @@ -436,7 +436,7 @@ #define SID_DELETE_MASTER_PAGE (SID_SD_START+432) #define SID_RENAME_MASTER_PAGE (SID_SD_START+433) #define SID_CLOSE_MASTER_VIEW (SID_SD_START+434) -#define SID_ASSIGN_LAYOUT (SID_SD_START+435) +#define SID_ASSIGN_LAYOUT TypedWhichId<SfxUInt32Item>(SID_SD_START+435) #define SID_DISPLAY_MASTER_BACKGROUND (SID_SD_START+436) #define SID_DISPLAY_MASTER_OBJECTS (SID_SD_START+437) #define SID_INSERTPAGE_LAYOUT_MENU (SID_SD_START+438) diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc index 8c81c4f13aee..2e2bfddec98b 100644 --- a/sd/inc/sdattr.hrc +++ b/sd/inc/sdattr.hrc @@ -24,6 +24,7 @@ class SdOptionsPrintItem; class SfxInt32Item; class SfxStringItem; +class SfxUInt32Item; class XColorItem; // Layer attributes @@ -51,7 +52,7 @@ class XColorItem; #define ATTR_PRESENT_ALWAYS_ON_TOP ATTR_PRESENT_START + 9 #define ATTR_PRESENT_FULLSCREEN ATTR_PRESENT_START + 10 #define ATTR_PRESENT_ANIMATION_ALLOWED ATTR_PRESENT_START + 12 -#define ATTR_PRESENT_PAUSE_TIMEOUT ATTR_PRESENT_START + 13 +#define ATTR_PRESENT_PAUSE_TIMEOUT TypedWhichId<SfxUInt32Item>(ATTR_PRESENT_START + 13) #define ATTR_PRESENT_SHOW_PAUSELOGO ATTR_PRESENT_START + 14 #define ATTR_PRESENT_DISPLAY TypedWhichId<SfxInt32Item>(ATTR_PRESENT_START + 15) #define ATTR_PRESENT_SHOW_NAVIGATION_BUTTONS ATTR_PRESENT_START + 16 @@ -108,8 +109,8 @@ class XColorItem; #define ATTR_OPTIONS_SCALE_START ATTR_OPTIONS_END + 1 #define ATTR_OPTIONS_SCALE_X TypedWhichId<SfxInt32Item>(ATTR_OPTIONS_SCALE_START) #define ATTR_OPTIONS_SCALE_Y TypedWhichId<SfxInt32Item>(ATTR_OPTIONS_SCALE_START + 1) -#define ATTR_OPTIONS_SCALE_WIDTH ATTR_OPTIONS_SCALE_START + 2 -#define ATTR_OPTIONS_SCALE_HEIGHT ATTR_OPTIONS_SCALE_START + 3 +#define ATTR_OPTIONS_SCALE_WIDTH TypedWhichId<SfxUInt32Item>(ATTR_OPTIONS_SCALE_START + 2) +#define ATTR_OPTIONS_SCALE_HEIGHT TypedWhichId<SfxUInt32Item>(ATTR_OPTIONS_SCALE_START + 3) #define ATTR_OPTIONS_SCALE_END ATTR_OPTIONS_SCALE_HEIGHT #define ATTR_PRESLAYOUT_START ATTR_OPTIONS_SCALE_END + 1 diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index 8bd7eb30e0bd..a2c39f4e4fed 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -117,7 +117,7 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI const bool bEndless = static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_ENDLESS ) ).GetValue(); const bool bWindow = !static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_FULLSCREEN ) ).GetValue(); - const tools::Long nPause = static_cast<const SfxUInt32Item&>( rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ) ).GetValue(); + const tools::Long nPause = rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ).GetValue(); m_xFormatter->SetTime( tools::Time( 0, 0, nPause ) ); // set cursor in timefield to end diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 3d214f56df72..694590712c72 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -450,10 +450,8 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs ) //Scale sal_Int32 nX = rAttrs->Get( ATTR_OPTIONS_SCALE_X ).GetValue(); sal_Int32 nY = rAttrs->Get( ATTR_OPTIONS_SCALE_Y ).GetValue(); - nWidth = static_cast<const SfxUInt32Item&>( rAttrs-> - Get( ATTR_OPTIONS_SCALE_WIDTH ) ).GetValue(); - nHeight = static_cast<const SfxUInt32Item&>( rAttrs-> - Get( ATTR_OPTIONS_SCALE_HEIGHT ) ).GetValue(); + nWidth = rAttrs->Get( ATTR_OPTIONS_SCALE_WIDTH ).GetValue(); + nHeight = rAttrs->Get( ATTR_OPTIONS_SCALE_HEIGHT ).GetValue(); m_xCbScale->set_entry_text( GetScale( nX, nY ) ); diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index afb8f5294e25..ddb8f2ccf7cb 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -208,7 +208,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) rPresentationSettings.mbFullScreen = bValue; } - nValue32 = ITEMVALUE( aDlgSet, ATTR_PRESENT_PAUSE_TIMEOUT, SfxUInt32Item ); + nValue32 = aDlgSet.Get(ATTR_PRESENT_PAUSE_TIMEOUT).GetValue(); if( nValue32 != rPresentationSettings.mnPauseTimeout ) { bValuesChanged = true; |