diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-18 15:41:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-25 12:23:00 +0100 |
commit | a029e07ffbd6ea4a4a191188c5be2eca7e10066d (patch) | |
tree | f2e7b288c5a5d5edf36817641a387541f302c5a0 /cui | |
parent | 3eb9eb9906c93fd7b1d1d8461bd34ea5a1ef2fa3 (diff) |
loplugin:stringliteraldefine in cui
Change-Id: I3b0c8811b583d6edf48ccd7e368e50228e70c362
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125480
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/inc/bitmaps.hlst | 34 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 2 | ||||
-rw-r--r-- | cui/source/inc/helpids.h | 47 |
3 files changed, 45 insertions, 38 deletions
diff --git a/cui/inc/bitmaps.hlst b/cui/inc/bitmaps.hlst index 3c0faced780b..1fa444fc6da4 100644 --- a/cui/inc/bitmaps.hlst +++ b/cui/inc/bitmaps.hlst @@ -48,33 +48,33 @@ #define RID_SVXBMP_SHADOW_TOP_LEFT "svx/res/sh05.png" #define RID_SVXBMP_SHADOW_TOP_LEFT_32 "svx/res/shadow_top_left_32.png" -#define RID_SVXBMP_BOTTOMLOCK "svx/res/lo01.png" -#define RID_SVXBMP_TOPLOCK "svx/res/lo02.png" -#define RID_SVXBMP_CELLLOCK "svx/res/lo03.png" +inline constexpr OUStringLiteral RID_SVXBMP_BOTTOMLOCK = u"svx/res/lo01.png"; +inline constexpr OUStringLiteral RID_SVXBMP_TOPLOCK = u"svx/res/lo02.png"; +inline constexpr OUStringLiteral RID_SVXBMP_CELLLOCK = u"svx/res/lo03.png"; -#define RID_SVXBMP_LOCK "res/lock.png" +inline constexpr OUStringLiteral RID_SVXBMP_LOCK = u"res/lock.png"; -#define RID_SVXBMP_THEME_NORMAL_BIG "svx/res/galnorl.png" -#define RID_SVXBMP_THEME_READONLY_BIG "svx/res/galrdol.png" -#define RID_SVXBMP_THEME_DEFAULT_BIG "svx/res/galdefl.png" +inline constexpr OUStringLiteral RID_SVXBMP_THEME_NORMAL_BIG = u"svx/res/galnorl.png"; +inline constexpr OUStringLiteral RID_SVXBMP_THEME_READONLY_BIG = u"svx/res/galrdol.png"; +inline constexpr OUStringLiteral RID_SVXBMP_THEME_DEFAULT_BIG = u"svx/res/galdefl.png"; -#define RID_CUIBMP_HARDDISK "res/harddisk_16.png" -#define RID_CUIBMP_LIB "res/im30820.png" -#define RID_CUIBMP_MACRO "res/im30821.png" -#define RID_CUIBMP_DOC "res/im30826.png" +inline constexpr OUStringLiteral RID_CUIBMP_HARDDISK = u"res/harddisk_16.png"; +inline constexpr OUStringLiteral RID_CUIBMP_LIB = u"res/im30820.png"; +inline constexpr OUStringLiteral RID_CUIBMP_MACRO = u"res/im30821.png"; +inline constexpr OUStringLiteral RID_CUIBMP_DOC = u"res/im30826.png"; #define RID_CUIBMP_COLLAPSED "res/plus.png" #define RID_CUIBMP_EXPANDED "res/minus.png" -#define RID_SVXBMP_SCRIPT "res/script.png" +inline constexpr OUStringLiteral RID_SVXBMP_SCRIPT = u"res/script.png"; #define RID_SVXBMP_COLLAPSEDNODE "res/sx18002.png" #define RID_SVXBMP_EXPANDEDNODE "res/sx18003.png" -#define RID_SVXBMP_LEGTYP1 "svx/res/legtyp1.png" -#define RID_SVXBMP_LEGTYP2 "svx/res/legtyp2.png" -#define RID_SVXBMP_LEGTYP3 "svx/res/legtyp3.png" +inline constexpr OUStringLiteral RID_SVXBMP_LEGTYP1 = u"svx/res/legtyp1.png"; +inline constexpr OUStringLiteral RID_SVXBMP_LEGTYP2 = u"svx/res/legtyp2.png"; +inline constexpr OUStringLiteral RID_SVXBMP_LEGTYP3 = u"svx/res/legtyp3.png"; -#define RID_SVXBMP_COMPONENT "res/component_16.png" -#define RID_SVXBMP_MACRO "svx/res/id018.png" +inline constexpr OUStringLiteral RID_SVXBMP_COMPONENT = u"res/component_16.png"; +inline constexpr OUStringLiteral RID_SVXBMP_MACRO = u"svx/res/id018.png"; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index b143367a547f..730c6f0ad234 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -40,7 +40,7 @@ #include "cfgutil.hxx" #include "CommandCategoryListBox.hxx" -#define notebookbarTabScope "notebookbarTabScope" +inline constexpr OUStringLiteral notebookbarTabScope = u"notebookbarTabScope"; inline constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL"; inline constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER = u"ItemDescriptorContainer"; diff --git a/cui/source/inc/helpids.h b/cui/source/inc/helpids.h index 437552504d95..2ac2fbd0b02c 100644 --- a/cui/source/inc/helpids.h +++ b/cui/source/inc/helpids.h @@ -18,26 +18,33 @@ */ #pragma once -#define HID_OPTIONS_COLORCONFIG_SAVE_SCHEME "CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME" -#define HID_OFA_FONT_SUBST_CLB "CUI_HID_OFA_FONT_SUBST_CLB" -#define HID_DBPATH_CTL_PATH "CUI_HID_DBPATH_CTL_PATH" +inline constexpr OStringLiteral HID_OPTIONS_COLORCONFIG_SAVE_SCHEME + = "CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME"; +inline constexpr OStringLiteral HID_OFA_FONT_SUBST_CLB = "CUI_HID_OFA_FONT_SUBST_CLB"; +inline constexpr OStringLiteral HID_DBPATH_CTL_PATH = "CUI_HID_DBPATH_CTL_PATH"; #define HID_DBPATH_HEADERBAR "CUI_HID_DBPATH_HEADERBAR" -#define HID_OFADLG_TREELISTBOX "CUI_HID_OFADLG_TREELISTBOX" -#define HID_SVX_CONFIG_TOOLBAR "CUI_HID_SVX_CONFIG_TOOLBAR" -#define HID_SVX_CONFIG_TOOLBAR_CONTENTS "CUI_HID_SVX_CONFIG_TOOLBAR_CONTENTS" -#define HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS "CUI_HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS" -#define HID_HANGULDLG_SUGGESTIONS_GRID "CUI_HID_HANGULDLG_SUGGESTIONS_GRID" -#define HID_HANGULDLG_SUGGESTIONS_LIST "CUI_HID_HANGULDLG_SUGGESTIONS_LIST" -#define HID_SVX_CONFIG_NAME_SUBMENU "CUI_HID_SVX_CONFIG_NAME_SUBMENU" -#define HID_SVX_CONFIG_RENAME_MENU "CUI_HID_SVX_CONFIG_RENAME_MENU" -#define HID_SVX_CONFIG_RENAME_MENU_ITEM "CUI_HID_SVX_CONFIG_RENAME_MENU_ITEM" -#define HID_SVX_CONFIG_RENAME_TOOLBAR "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR" -#define HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM" -#define HID_SVX_UP_TOOLBAR_ITEM "CUI_HID_SVX_UP_TOOLBAR_ITEM" -#define HID_SVX_DOWN_TOOLBAR_ITEM "CUI_HID_SVX_DOWN_TOOLBAR_ITEM" -#define HID_SVX_SAVE_IN "CUI_HID_SVX_SAVE_IN" -#define HID_SVX_TOPLEVELLISTBOX "CUI_HID_SVX_TOPLEVELLISTBOX" -#define HID_SVX_DESCFIELD "CUI_HID_SVX_DESCFIELD" -#define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX" +inline constexpr OStringLiteral HID_OFADLG_TREELISTBOX = "CUI_HID_OFADLG_TREELISTBOX"; +inline constexpr OStringLiteral HID_SVX_CONFIG_TOOLBAR = "CUI_HID_SVX_CONFIG_TOOLBAR"; +inline constexpr OStringLiteral HID_SVX_CONFIG_TOOLBAR_CONTENTS + = "CUI_HID_SVX_CONFIG_TOOLBAR_CONTENTS"; +inline constexpr OStringLiteral HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS + = "CUI_HID_SVX_CONFIG_NOTEBOOKBAR_CONTENTS"; +inline constexpr OStringLiteral HID_HANGULDLG_SUGGESTIONS_GRID + = "CUI_HID_HANGULDLG_SUGGESTIONS_GRID"; +inline constexpr OStringLiteral HID_HANGULDLG_SUGGESTIONS_LIST + = "CUI_HID_HANGULDLG_SUGGESTIONS_LIST"; +inline constexpr OStringLiteral HID_SVX_CONFIG_NAME_SUBMENU = "CUI_HID_SVX_CONFIG_NAME_SUBMENU"; +inline constexpr OStringLiteral HID_SVX_CONFIG_RENAME_MENU = "CUI_HID_SVX_CONFIG_RENAME_MENU"; +inline constexpr OStringLiteral HID_SVX_CONFIG_RENAME_MENU_ITEM + = "CUI_HID_SVX_CONFIG_RENAME_MENU_ITEM"; +inline constexpr OStringLiteral HID_SVX_CONFIG_RENAME_TOOLBAR = "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR"; +inline constexpr OStringLiteral HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM + = "CUI_HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM"; +inline constexpr OStringLiteral HID_SVX_UP_TOOLBAR_ITEM = "CUI_HID_SVX_UP_TOOLBAR_ITEM"; +inline constexpr OStringLiteral HID_SVX_DOWN_TOOLBAR_ITEM = "CUI_HID_SVX_DOWN_TOOLBAR_ITEM"; +inline constexpr OStringLiteral HID_SVX_SAVE_IN = "CUI_HID_SVX_SAVE_IN"; +inline constexpr OStringLiteral HID_SVX_TOPLEVELLISTBOX = "CUI_HID_SVX_TOPLEVELLISTBOX"; +inline constexpr OStringLiteral HID_SVX_DESCFIELD = "CUI_HID_SVX_DESCFIELD"; +inline constexpr OStringLiteral HID_MACRO_HEADERTABLISTBOX = "CUI_HID_MACRO_HEADERTABLISTBOX"; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |