summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-25 11:30:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-25 20:14:03 +0200
commitea63b3d25a7c83773721f8ba6bf6d00c059d44fe (patch)
tree5b6ba1cf938f436489c391dda6ae3308d47c5c1c /sc
parent3ec8822b62d647379999b4c09f3e72b9474b61a3 (diff)
use more TypedWhichId
Change-Id: I6c54c1276b36cbc71417486ffcee2ef9ef0cff7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/sc.hrc54
-rw-r--r--sc/source/ui/view/cellsh1.cxx5
-rw-r--r--sc/source/ui/view/cellsh2.cxx3
-rw-r--r--sc/source/ui/view/cellsh3.cxx3
4 files changed, 31 insertions, 34 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 39892c4fb6ec..4f4d20702ee8 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -87,10 +87,10 @@ class SvxZoomSliderItem;
#define SID_SCDOCOPTIONS TypedWhichId<ScTpCalcItem>(SC_VIEW_START + 40)
// cursor movements as properties:
-#define SID_CURRENTCELL (SC_VIEW_START + 41)
+#define SID_CURRENTCELL TypedWhichId<SfxStringItem>(SC_VIEW_START + 41)
#define SID_CURRENTTAB (SC_VIEW_START + 42)
-#define SID_CURRENTDOC (SC_VIEW_START + 43)
-#define SID_CURRENTOBJECT (SC_VIEW_START + 44)
+#define SID_CURRENTDOC TypedWhichId<SfxStringItem>(SC_VIEW_START + 43)
+#define SID_CURRENTOBJECT TypedWhichId<SfxStringItem>(SC_VIEW_START + 44)
// slot-IDs for special toolbox functions:
#define SID_NUMBER_CURRENCY (SC_VIEW_START + 45)
@@ -178,8 +178,8 @@ class SvxZoomSliderItem;
#define FID_FILTER_OK (SC_MESSAGE_START + 8)
#define FID_INPUTLINE_MATRIX (SC_MESSAGE_START + 11)
#define SID_DLG_RETOK (SC_MESSAGE_START + 12)
-#define SID_STATUS_DOCPOS (SC_MESSAGE_START + 14)
-#define SID_STATUS_PAGESTYLE (SC_MESSAGE_START + 15)
+#define SID_STATUS_DOCPOS TypedWhichId<SfxStringItem>(SC_MESSAGE_START + 14)
+#define SID_STATUS_PAGESTYLE TypedWhichId<SfxStringItem>(SC_MESSAGE_START + 15)
#define SID_STATUS_SELMODE (SC_MESSAGE_START + 16)
#define SID_DLG_MATRIX (SC_MESSAGE_START + 18)
@@ -195,9 +195,9 @@ class SvxZoomSliderItem;
#define FID_INPUTLINE_BLOCK (SC_MESSAGE_START + 29)
-#define SID_STATUS_SUM (SC_MESSAGE_START + 30)
+#define SID_STATUS_SUM TypedWhichId<SfxStringItem>(SC_MESSAGE_START + 30)
-#define SID_ENTER_STRING (SC_MESSAGE_START + 37)
+#define SID_ENTER_STRING TypedWhichId<SfxStringItem>(SC_MESSAGE_START + 37)
#define SID_ROWCOL_SELCOUNT (SC_MESSAGE_START + 38)
#define SID_AUTO_SUM (SC_MESSAGE_START + 39)
@@ -253,14 +253,14 @@ class SvxZoomSliderItem;
#ifndef EDIT_MENU_START // duplicated in sfx2/sfxsids.hrc
#define EDIT_MENU_START (FILE_MENU_END)
#endif
-#define FID_DELETE_CELL (EDIT_MENU_START + 2)
+#define FID_DELETE_CELL TypedWhichId<SfxStringItem>(EDIT_MENU_START + 2)
#define FID_DELETE_TABLE (EDIT_MENU_START + 3)
#define FID_FILL_TO_BOTTOM (EDIT_MENU_START + 4)
#define FID_FILL_TO_RIGHT (EDIT_MENU_START + 5)
#define FID_FILL_TO_TOP (EDIT_MENU_START + 6)
#define FID_FILL_TO_LEFT (EDIT_MENU_START + 7)
-#define FID_FILL_TAB (EDIT_MENU_START + 8)
-#define FID_FILL_SERIES (EDIT_MENU_START + 9)
+#define FID_FILL_TAB TypedWhichId<SfxStringItem>(EDIT_MENU_START + 8)
+#define FID_FILL_SERIES TypedWhichId<SfxStringItem>(EDIT_MENU_START + 9)
#define FID_FILL_SINGLE_EDIT (EDIT_MENU_START + 10)
#define SID_HFEDIT (EDIT_MENU_START + 15)
@@ -290,11 +290,11 @@ class SvxZoomSliderItem;
#define FID_INS_COLBRK (INSERT_MENU_START + 2)
#define FID_DEL_ROWBRK (INSERT_MENU_START + 3)
#define FID_DEL_COLBRK (INSERT_MENU_START + 4)
-#define FID_INS_CELL_CONTENTS (INSERT_MENU_START + 5)
-#define FID_INS_CELL (INSERT_MENU_START + 6)
+#define FID_INS_CELL_CONTENTS TypedWhichId<SfxStringItem>(INSERT_MENU_START + 5)
+#define FID_INS_CELL TypedWhichId<SfxStringItem>(INSERT_MENU_START + 6)
#define FID_INS_ROW (INSERT_MENU_START + 7)
#define FID_INS_COLUMN (INSERT_MENU_START + 8)
-#define FID_INS_TABLE (INSERT_MENU_START + 9)
+#define FID_INS_TABLE TypedWhichId<SfxStringItem>(INSERT_MENU_START + 9)
#define SID_INS_FUNCTION (INSERT_MENU_START + 10)
#define FID_DEFINE_NAME (INSERT_MENU_START + 11)
#define FID_INSERT_NAME (INSERT_MENU_START + 12)
@@ -322,7 +322,7 @@ class SvxZoomSliderItem;
#define FID_COL_HIDE (FORMAT_MENU_START + 7)
#define FID_COL_SHOW (FORMAT_MENU_START + 8)
#define FID_TABLE_HIDE (FORMAT_MENU_START + 9)
-#define FID_TABLE_SHOW (FORMAT_MENU_START + 10)
+#define FID_TABLE_SHOW TypedWhichId<SfxStringItem>(FORMAT_MENU_START + 10)
#define FID_MERGE_ON (FORMAT_MENU_START + 15)
#define FID_MERGE_OFF (FORMAT_MENU_START + 16)
#define SID_FORMATPAGE (FORMAT_MENU_START + 17)
@@ -350,7 +350,7 @@ class SvxZoomSliderItem;
#define DATA_MENU_START (EXTRA_MENU_END)
#define SID_DEFINE_DBNAME (DATA_MENU_START)
-#define SID_SELECT_DB (DATA_MENU_START + 1)
+#define SID_SELECT_DB TypedWhichId<SfxStringItem>(DATA_MENU_START + 1)
#define SID_SORT (DATA_MENU_START + 2)
#define SID_FILTER (DATA_MENU_START + 3)
#define SID_SPECIAL_FILTER (DATA_MENU_START + 4)
@@ -371,15 +371,15 @@ class SvxZoomSliderItem;
#define SID_SORT_ASCENDING (DATA_MENU_START + 24)
#define SID_OUTLINE_HIDE (DATA_MENU_START + 25)
#define SID_OUTLINE_SHOW (DATA_MENU_START + 26)
-#define SID_OUTLINE_MAKE (DATA_MENU_START + 27)
-#define SID_OUTLINE_REMOVE (DATA_MENU_START + 28)
+#define SID_OUTLINE_MAKE TypedWhichId<SfxStringItem>(DATA_MENU_START + 27)
+#define SID_OUTLINE_REMOVE TypedWhichId<SfxStringItem>(DATA_MENU_START + 28)
#define DATA_MENU_END (DATA_MENU_START + 29)
#define TAB_POPUP_START (DATA_MENU_END)
#define FID_TAB_MENU_RENAME (TAB_POPUP_START)
-#define FID_TAB_RENAME (TAB_POPUP_START+1)
-#define FID_TAB_MOVE (TAB_POPUP_START+2)
+#define FID_TAB_RENAME TypedWhichId<SfxStringItem>(TAB_POPUP_START+1)
+#define FID_TAB_MOVE TypedWhichId<SfxStringItem>(TAB_POPUP_START+2)
#define FID_TAB_SELECTALL (TAB_POPUP_START+3)
#define FID_TAB_APPEND (TAB_POPUP_START+4)
#define FID_TAB_INDEX (TAB_POPUP_START+5)
@@ -400,7 +400,7 @@ class SvxZoomSliderItem;
#define SID_ALIGNTOP (OBJBAR_FORMAT_START+10)
#define SID_ALIGNBOTTOM (OBJBAR_FORMAT_START+11)
#define SID_ALIGNCENTERVER (OBJBAR_FORMAT_START+12)
-#define SID_SELECT_SCENARIO (OBJBAR_FORMAT_START+13)
+#define SID_SELECT_SCENARIO TypedWhichId<SfxStringItem>(OBJBAR_FORMAT_START+13)
#define SID_V_ALIGNCELL (OBJBAR_FORMAT_START+14)
#define SID_H_ALIGNCELL (OBJBAR_FORMAT_START+15)
@@ -524,13 +524,13 @@ static_assert(SID_PREVIEW_END < SID_KEYFUNC_START, "calc slots ids trampling inf
#define SID_RANGE_COL TypedWhichId<SfxInt16Item>(SID_NEW_SLOTS+21)
#define SID_RANGE_TABLE (SID_NEW_SLOTS+22)
// empty, was SID_RANGE_VALUE
-#define SID_RANGE_FORMULA (SID_NEW_SLOTS+24)
-#define SID_RANGE_TEXTVALUE (SID_NEW_SLOTS+26)
+#define SID_RANGE_FORMULA TypedWhichId<SfxStringItem>(SID_NEW_SLOTS+24)
+#define SID_RANGE_TEXTVALUE TypedWhichId<SfxStringItem>(SID_NEW_SLOTS+26)
#define SID_TABLE_ACTIVATE (SID_NEW_SLOTS+27)
#define SID_DEFINE_PRINTAREA (SID_NEW_SLOTS+31)
#define SID_DELETE_PRINTAREA (SID_NEW_SLOTS+32)
-#define SID_CHANGE_PRINTAREA (SID_NEW_SLOTS+33)
+#define SID_CHANGE_PRINTAREA TypedWhichId<SfxStringItem>(SID_NEW_SLOTS+33)
#define SID_OPENDLG_EDIT_PRINTAREA (SID_NEW_SLOTS+34)
#define SID_OLE_ACTIVATE (SID_NEW_SLOTS+36)
@@ -548,13 +548,13 @@ static_assert(SID_PREVIEW_END < SID_KEYFUNC_START, "calc slots ids trampling inf
#define FID_SEARCH_COUNT (SID_NEW_SLOTS+45)
#define SID_SC_SETTEXT (SID_NEW_SLOTS+46)
-#define SID_RANGE_ADDRESS (SID_NEW_SLOTS+47)
-#define SID_NUMBER_FORMAT (SID_NEW_SLOTS+49)
+#define SID_RANGE_ADDRESS TypedWhichId<SfxStringItem>(SID_NEW_SLOTS+47)
+#define SID_NUMBER_FORMAT TypedWhichId<SfxStringItem>(SID_NEW_SLOTS+49)
#define SID_OLE_SELECT (SID_NEW_SLOTS+50)
#define FID_CURRENTVALIDATION (SID_NEW_SLOTS+51)
-#define SID_RANGE_NOTETEXT (SID_NEW_SLOTS+52)
+#define SID_RANGE_NOTETEXT TypedWhichId<SfxStringItem>(SID_NEW_SLOTS+52)
#define FID_INSERT_FILE (SID_NEW_SLOTS+53)
#define FID_VALIDATION (SID_NEW_SLOTS+54)
@@ -591,7 +591,7 @@ static_assert(SID_PREVIEW_END < SID_KEYFUNC_START, "calc slots ids trampling inf
#define FID_RESET_PRINTZOOM (SID_NEW_SLOTS+82)
#define SID_TABLES_COUNT (SID_NEW_SLOTS+83)
-#define SID_ACTIVE_OBJ_NAME (SID_NEW_SLOTS+84)
+#define SID_ACTIVE_OBJ_NAME TypedWhichId<SfxStringItem>(SID_NEW_SLOTS+84)
#define SID_OBJECT_LEFT (SID_NEW_SLOTS+85)
#define SID_OBJECT_TOP (SID_NEW_SLOTS+86)
#define SID_OBJECT_WIDTH (SID_NEW_SLOTS+87)
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 1c6817c0bfec..c44cb95e77c9 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2391,7 +2391,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_RANGE_NOTETEXT:
if (pReqArgs)
{
- const SfxStringItem& rTextItem = static_cast<const SfxStringItem&>(pReqArgs->Get( SID_RANGE_NOTETEXT ));
+ const SfxStringItem& rTextItem = pReqArgs->Get( SID_RANGE_NOTETEXT );
// always cursor position
ScAddress aPos( GetViewData().GetCurX(), GetViewData().GetCurY(), GetViewData().GetTabNo() );
@@ -2677,8 +2677,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pReqArgs )
{
- const SfxStringItem& rItem
- = static_cast<const SfxStringItem&>(pReqArgs->Get(SID_SELECT_SCENARIO));
+ const SfxStringItem& rItem = pReqArgs->Get(SID_SELECT_SCENARIO);
pTabViewShell->UseScenario(rItem.GetValue());
//! why should the return value be valid?!?!
rReq.SetReturnValue(SfxStringItem(SID_SELECT_SCENARIO, rItem.GetValue()));
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index b1ddf40c9598..3be0428bbc2b 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -735,8 +735,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
if ( pReqArgs )
{
- const SfxStringItem& rItem
- = static_cast<const SfxStringItem&>(pReqArgs->Get(SID_SELECT_DB));
+ const SfxStringItem& rItem = pReqArgs->Get(SID_SELECT_DB);
pTabViewShell->GotoDBArea(rItem.GetValue());
rReq.Done();
}
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 29711173777a..2b3c082af597 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -276,8 +276,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
rBindings.Invalidate(SID_DOC_MODIFIED);
}
- OUString aStr( static_cast<const SfxStringItem&>(pReqArgs->
- Get( SID_ENTER_STRING )).GetValue() );
+ OUString aStr( pReqArgs->Get( SID_ENTER_STRING ).GetValue() );
const SfxPoolItem* pDontCommitItem;
bool bCommit = true;
if (pReqArgs->HasItem(FN_PARAM_1, &pDontCommitItem))