summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-26 11:18:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-26 13:49:54 +0200
commit5315e6069e425aad88873beb5344bb8ea31e0c55 (patch)
treeee8928e3fb00e52a04faa1cc5a3424b3ed0f8ff2 /sw
parenta82e7cc9ed17a2500ad8cb9ffe54c412b0d8063f (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 'sw')
-rw-r--r--sw/inc/cmdid.h14
-rw-r--r--sw/inc/globals.hrc2
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx4
5 files changed, 12 insertions, 12 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index dda6aafb36f2..14d721ae427b 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -238,7 +238,7 @@ class SwUINumRuleItem;
#define FN_INSERT_STRING TypedWhichId<SfxStringItem>(FN_INSERT+31)
#define FN_INSERT_COMBO_BOX_CONTENT_CONTROL (FN_INSERT + 32) /* Combo box content control */
#define FN_INSERT_FRAME_INTERACT (FN_INSERT + 33) /* Insert interactive frame */
-#define FN_INSERT_FRAME (FN_INSERT + 34) /* Insert Frame */
+#define FN_INSERT_FRAME TypedWhichId<SfxUInt16Item>(FN_INSERT + 34) /* Insert Frame */
#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* insert index entry */
#define FN_INSERT_FRAME_INTERACT_NOCOL (FN_INSERT + 36) /*insert interactive non column frame*/
@@ -388,14 +388,14 @@ class SwUINumRuleItem;
#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* */
#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* */
#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* */
-#define FN_TABLE_INSERT_ROW_AFTER (FN_FORMAT + 109) /* */
+#define FN_TABLE_INSERT_ROW_AFTER TypedWhichId<SfxUInt16Item>(FN_FORMAT + 109) /* */
#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem for optimizing tables */
#define FN_TABLE_INSERT_ROW_BEFORE (FN_FORMAT + 111) /* */
#define FN_TABLE_INSERT_COL_BEFORE (FN_FORMAT + 112) /* */
#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* */
#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* */
#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* */
-#define FN_TABLE_INSERT_COL_AFTER (FN_FORMAT + 116) /* */
+#define FN_TABLE_INSERT_COL_AFTER TypedWhichId<SfxUInt16Item>(FN_FORMAT + 116) /* */
#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* protect table cells */
#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* undo table cell protection */
#define FN_TABLE_HEADLINE_REPEAT (FN_FORMAT + 120) /* also used in SwXTextTable*/
@@ -490,7 +490,7 @@ class SwUINumRuleItem;
#define FN_FRAME_UNCHAIN (FN_FORMAT2 + 137)
#define FN_NUMBER_NEWSTART (FN_FORMAT2 + 138)
-#define FN_NUMBER_NEWSTART_AT (FN_FORMAT2 + 139)
+#define FN_NUMBER_NEWSTART_AT TypedWhichId<SfxUInt16Item>(FN_FORMAT2 + 139)
#define FN_FRAME_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 140)
#define FN_GRAPHIC_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 141)
@@ -528,7 +528,7 @@ class SwUINumRuleItem;
#define FN_GLOSSARY_DLG (FN_EXTRA + 20) /* text building blocks */
#define FN_EXPAND_GLOSSARY (FN_EXTRA + 28) /* expand text building blocks */
-#define FN_CHANGE_PAGENUM (FN_EXTRA + 34) /* change page numbers*/
+#define FN_CHANGE_PAGENUM TypedWhichId<SfxUInt16Item>(FN_EXTRA + 34) /* change page numbers*/
#define FN_ADD_TEXT_BOX (FN_EXTRA + 35) /* add text box to draw shape */
#define FN_REMOVE_TEXT_BOX (FN_EXTRA + 36) /* remove text box of draw shape */
#define FN_OPEN_LOCAL_URL (FN_EXTRA + 37) /* open local copy for bibliography */
@@ -867,8 +867,8 @@ class SwUINumRuleItem;
#define FN_STAT_PAGE (FN_STAT + 1)
#define FN_STAT_TEMPLATE TypedWhichId<SfxStringItem>(FN_STAT + 2)
#define FN_STAT_ZOOM (FN_STAT + 3)
-#define FN_STAT_SELMODE (FN_STAT + 5)
-#define FN_STAT_BOOKMARK (FN_STAT + 8) /* For Popup Bookmarks*/
+#define FN_STAT_SELMODE TypedWhichId<SfxUInt16Item>(FN_STAT + 5)
+#define FN_STAT_BOOKMARK TypedWhichId<SfxUInt16Item>(FN_STAT + 8) /* For Popup Bookmarks*/
#define FN_STAT_WORDCOUNT TypedWhichId<SfxStringItem>(FN_STAT + 9)
#define FN_STAT_ACCESSIBILITY_CHECK (FN_STAT + 10)
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 473ec1f5fbff..7f2eb29d8b2e 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -54,7 +54,7 @@
//maximum: RC_GLOBALS_BEGIN + 120
#define SID_PREVIEWFLAG_TYPE (RC_GLOBALS_BEGIN + 114)
-#define SID_FONTMODE_TYPE (RC_GLOBALS_BEGIN + 115)
+#define SID_FONTMODE_TYPE TypedWhichId<SfxUInt16Item>(RC_GLOBALS_BEGIN + 115)
#define SID_FAX_LIST (RC_GLOBALS_BEGIN + 116)
#define SID_WRT_SHELL (RC_GLOBALS_BEGIN + 117)
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 76c2f27ef472..e002a6db1640 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -281,7 +281,7 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet)
eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART_AT);
if( eItemState > SfxItemState::DEFAULT )
{
- const sal_uInt16 nNewStart = static_cast<const SfxUInt16Item&>(rSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ const sal_uInt16 nNewStart = rSet->Get(FN_NUMBER_NEWSTART_AT).GetValue();
const bool bNotMax = USHRT_MAX != nNewStart;
m_xNewStartNumberCB->set_active(bNotMax);
m_xNewStartNF->set_value(bNotMax ? nNewStart : 1);
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 855685eda05d..916c4c839485 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -995,7 +995,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand()));
if( pDlg->Execute() == 1 )
{
- const sal_uInt16 nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG)
+ const TypedWhichId<SfxUInt16Item> nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG)
? FN_TABLE_INSERT_COL_AFTER : FN_TABLE_INSERT_ROW_AFTER;
SfxUInt16Item aCountItem( nDispatchSlot, pDlg->getInsertCount() );
SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() );
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 774f6299559a..b6f68af7406b 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -337,14 +337,14 @@ static void sw_ParagraphDialogResult(SfxItemSet* pSet, SwWrtShell &rWrtSh, SfxRe
sal_uInt16 nNumStart = USHRT_MAX;
if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- nNumStart = static_cast<const SfxUInt16Item&>(pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ nNumStart = pSet->Get(FN_NUMBER_NEWSTART_AT).GetValue();
}
rWrtSh.SetNumRuleStart(bStart, pPaM);
rWrtSh.SetNodeNumStart(nNumStart);
}
else if( SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- rWrtSh.SetNodeNumStart(static_cast<const SfxUInt16Item&>(pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue());
+ rWrtSh.SetNodeNumStart(pSet->Get(FN_NUMBER_NEWSTART_AT).GetValue());
rWrtSh.SetNumRuleStart(false, pPaM);
}
// #i56253#