diff options
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 | ||||
-rw-r--r-- | include/svx/svxids.hrc | 12 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 4 | ||||
-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 | ||||
-rw-r--r-- | sw/inc/cmdid.h | 6 |
9 files changed, 27 insertions, 30 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 3030f49c6d9d..9bdcb0e6b0a5 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -672,7 +672,7 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* rCoreAttrs ) if ( bDataChanged ) { const SfxItemSet& rMyItemSet = GetItemSet(); - sal_uInt16 nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); + TypedWhichId<SfxUInt32Item> nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); SfxItemState eItemState = rMyItemSet.GetItemState( nWhich, false ); // OK chosen - Is format code input entered already taken over? diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index b8269b0dcf13..97832803a7d8 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -164,7 +164,7 @@ class XFillGradientItem; #define ID_VAL_DASHES (SID_SD_START+243) #define ID_VAL_DASHLEN (SID_SD_START+244) #define ID_VAL_DISTANCE (SID_SD_START+245) -#define ID_VAL_INDEX (SID_SD_START+246) +#define ID_VAL_INDEX TypedWhichId<SfxUInt32Item>(SID_SD_START+246) #define SID_BEZIERTO (SID_SD_START+252) #define SID_DASH (SID_SD_START+267) #define SID_TEXT_FITTOSIZE_VERTICAL TypedWhichId<SfxBoolItem>(SID_SD_START+286) @@ -510,7 +510,7 @@ class XFillGradientItem; #define SID_TABLE_INSERT_ROW_AFTER ( SID_SVX_START + 421 ) #define SID_ATTR_3D_INTERN TypedWhichId<SfxUInt32Item>( SID_SVX_START + 422 ) -#define SID_PSZ_FUNCTION ( SID_SVX_START + 423 ) +#define SID_PSZ_FUNCTION TypedWhichId<SfxUInt32Item>( SID_SVX_START + 423 ) // CAUTION! <424 > used by sfxids (!) #define SID_TABLE_INSERT_COL_DLG ( SID_SVX_START + 426 ) @@ -616,7 +616,7 @@ class XFillGradientItem; #define SID_FM_DESIGN_MODE TypedWhichId<SfxBoolItem>( SID_SVX_START + 629 ) #define SID_FM_RECORD_UNDO ( SID_SVX_START + 630 ) #define SID_FM_CONTROL_IDENTIFIER TypedWhichId<SfxUInt16Item>( SID_SVX_START + 631 ) -#define SID_FM_CONTROL_INVENTOR ( SID_SVX_START + 632 ) +#define SID_FM_CONTROL_INVENTOR TypedWhichId<SfxUInt32Item>( SID_SVX_START + 632 ) #define SID_FM_SHOW_FMEXPLORER ( SID_SVX_START + 633 ) #define SID_FM_FIELDS_CONTROL ( SID_SVX_START + 634 ) #define SID_FM_SHOW_PROPERTIES TypedWhichId<SfxBoolItem>( SID_SVX_START + 635 ) @@ -863,11 +863,11 @@ class XFillGradientItem; #define SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK ( SID_SVX_START + 1027 ) #define SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT ( SID_SVX_START + 1028 ) #define SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1029 ) -#define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET ( SID_SVX_START + 1030 ) -#define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST ( SID_SVX_START + 1031 ) +#define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET TypedWhichId<SfxUInt32Item>( SID_SVX_START + 1030 ) +#define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST TypedWhichId<SfxUInt32Item>( SID_SVX_START + 1031 ) #define SID_SVXTABULATORTABPAGE_DISABLEFLAGS TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1032 ) #define SID_SVXTEXTATTRPAGE_OBJKIND ( SID_SVX_START + 1033 ) -#define SID_FLAG_TYPE ( SID_SVX_START + 1034 ) +#define SID_FLAG_TYPE TypedWhichId<SfxUInt32Item>( SID_SVX_START + 1034 ) #define SID_SWMODE_TYPE TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1035 ) #define SID_DISABLE_CTL TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1036 ) #define SID_INSERT_HYPERLINKCONTROL ( SID_SVX_START + 1037 ) diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 93b74d70e68e..c4055320d88f 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -418,9 +418,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_PSZ_FUNCTION: if (pReqArgs) { - auto const & p = pReqArgs->Get(SID_PSZ_FUNCTION); - assert(dynamic_cast<const SfxUInt32Item*>(&p) && "wrong Parameter"); - const SfxUInt32Item& rItem = static_cast<const SfxUInt32Item&>(p); + const SfxUInt32Item & rItem = pReqArgs->Get(SID_PSZ_FUNCTION); ScAppOptions aNewOpts( GetAppOptions() ); aNewOpts.SetStatusFunc( rItem.GetValue() ); 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; diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 6d828cefbe94..78fce16a7bd5 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -188,7 +188,7 @@ class SwUINumRuleItem; #define FN_HSCROLL_METRIC TypedWhichId<SfxUInt16Item>(FN_VIEW + 53) /* Metric horizontal scrollbar */ #define FN_VSCROLL_METRIC TypedWhichId<SfxUInt16Item>(FN_VIEW + 54) /* Metric vertical scrollbar */ -#define FN_NAV_ELEMENT (FN_VIEW + 55) /* Navigate By drop down controller */ +#define FN_NAV_ELEMENT TypedWhichId<SfxUInt32Item>(FN_VIEW + 55) /* Navigate By drop down controller */ #define FN_SCROLL_PREV (FN_VIEW + 57) /* uno:ScrollToPrevious */ #define FN_SCROLL_NEXT (FN_VIEW + 58) /* uno:ScrollToNext */ #define FN_VIEW_HIDE_WHITESPACE (FN_VIEW + 59) /* Hide header, footer, and pagebreak */ @@ -462,8 +462,8 @@ class SwUINumRuleItem; #define FN_TABLE_MODE_FIX_PROP (FN_FORMAT + 190) /* -"- */ #define FN_TABLE_MODE_VARIABLE (FN_FORMAT + 191) /* -"- */ #define FN_TABLE_BOX_TEXTORIENTATION TypedWhichId<SvxFrameDirectionItem>(FN_FORMAT + 192) /* text orientation of table cells */ -#define SID_ATTR_TABLE_ROW_HEIGHT (FN_FORMAT + 193) -#define SID_ATTR_TABLE_COLUMN_WIDTH (FN_FORMAT2 + 194) +#define SID_ATTR_TABLE_ROW_HEIGHT TypedWhichId<SfxUInt32Item>(FN_FORMAT + 193) +#define SID_ATTR_TABLE_COLUMN_WIDTH TypedWhichId<SfxUInt32Item>(FN_FORMAT2 + 194) #define FN_TABLE_AUTOSUM (FN_FORMAT + 195) /* */ |