summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-26 10:57:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-26 12:57:34 +0100
commitab1a7b5242c3d5e0b86601073fb4ff4750f7f0d3 (patch)
tree1a0bd07eb243a822c5969ea7e5ff6d075b7840c5 /sfx2/inc
parent9f94ea12c7d919441ccbb8ebc99adff11a2e6fd1 (diff)
loplugin:stringliteraldefine in sfx2
Change-Id: I45ccf6b1841024db7406b910a28dff054f67464d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/bitmaps.hlst105
-rw-r--r--sfx2/inc/strings.hxx75
2 files changed, 89 insertions, 91 deletions
diff --git a/sfx2/inc/bitmaps.hlst b/sfx2/inc/bitmaps.hlst
index 9d385c9765b3..3dad7c78b7ae 100644
--- a/sfx2/inc/bitmaps.hlst
+++ b/sfx2/inc/bitmaps.hlst
@@ -6,22 +6,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#pragma once
-#ifndef INCLUDED_SFX2_INC_BITMAPS_HRC
-#define INCLUDED_SFX2_INC_BITMAPS_HRC
+#include <rtl/ustring.hxx>
-#define BMP_HELP_TOOLBOX_INDEX_ON "sfx2/res/indexon_small.png"
-#define BMP_HELP_TOOLBOX_INDEX_OFF "sfx2/res/indexoff_small.png"
-#define BMP_HELP_TOOLBOX_START "res/sc06303.png"
-#define BMP_HELP_TOOLBOX_PREV "res/sc06301.png"
-#define BMP_HELP_TOOLBOX_NEXT "res/sc06300.png"
-#define BMP_HELP_TOOLBOX_PRINT "res/sc05504.png"
-#define BMP_HELP_TOOLBOX_BOOKMARKS "sfx2/res/favourite.png"
-#define BMP_HELP_TOOLBOX_SEARCHDIALOG "sfx2/res/sc05961.png"
-#define BMP_HELP_TOOLBOX_COPY "sfx2/res/sc05711.png"
-#define BMP_HELP_CONTENT_BOOK_OPEN "sfx2/res/hlpbookopen.png"
-#define BMP_HELP_CONTENT_BOOK_CLOSED "sfx2/res/hlpbookclosed.png"
-#define BMP_HELP_CONTENT_DOC "sfx2/res/hlpdoc.png"
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_INDEX_ON = u"sfx2/res/indexon_small.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_INDEX_OFF = u"sfx2/res/indexoff_small.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_START = u"res/sc06303.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_PREV = u"res/sc06301.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_NEXT = u"res/sc06300.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_PRINT = u"res/sc05504.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_BOOKMARKS = u"sfx2/res/favourite.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_SEARCHDIALOG = u"sfx2/res/sc05961.png";
+inline constexpr OUStringLiteral BMP_HELP_TOOLBOX_COPY = u"sfx2/res/sc05711.png";
+inline constexpr OUStringLiteral BMP_HELP_CONTENT_BOOK_OPEN = u"sfx2/res/hlpbookopen.png";
+inline constexpr OUStringLiteral BMP_HELP_CONTENT_BOOK_CLOSED = u"sfx2/res/hlpbookclosed.png";
+inline constexpr OUStringLiteral BMP_HELP_CONTENT_DOC = u"sfx2/res/hlpdoc.png";
#define BMP_HELP_TOOLBOX_L_INDEX_ON "sfx2/res/indexon_big.png"
#define BMP_HELP_TOOLBOX_L_INDEX_OFF "sfx2/res/indexoff_big.png"
#define BMP_HELP_TOOLBOX_L_START "res/lc06303.png"
@@ -33,7 +33,7 @@
//start, sfx2/source/sidebar/Theme.cxx
#define CHEVRON "sfx2/res/chevron.png"
-#define CLOSEDOC "sfx2/res/closedoc.png"
+inline constexpr OUStringLiteral CLOSEDOC = u"sfx2/res/closedoc.png";
#define GRIP "sfx2/res/grip.png"
#define OPEN_MORE "sfx2/res/symphony/open_more.png"
#define MOREBUTTON "sfx2/res/symphony/morebutton.png"
@@ -63,52 +63,51 @@
#define SIDEBAR_FUNCTIONS_SMALL "sfx2/res/symphony/sidebar-functions-small.png"
//end, sfx2/source/sidebar/Theme.cxx
-#define SFX_THUMBNAIL_TEXT "res/ott_96_8.png"
-#define SFX_THUMBNAIL_SHEET "res/ots_96_8.png"
-#define SFX_THUMBNAIL_PRESENTATION "res/otp_96_8.png"
-#define SFX_THUMBNAIL_DRAWING "res/otg_96_8.png"
-#define SFX_FILE_THUMBNAIL_TEXT "res/odt_48_8.png"
-#define SFX_FILE_THUMBNAIL_SHEET "res/ods_48_8.png"
-#define SFX_FILE_THUMBNAIL_PRESENTATION "res/odp_48_8.png"
-#define SFX_FILE_THUMBNAIL_DRAWING "res/odg_48_8.png"
-#define SFX_FILE_THUMBNAIL_DATABASE "res/odb_48_8.png"
-#define SFX_FILE_THUMBNAIL_MATH "res/odf_48_8.png"
-#define SFX_FILE_THUMBNAIL_DEFAULT "res/mainapp_48_8.png"
+inline constexpr OUStringLiteral SFX_THUMBNAIL_TEXT = u"res/ott_96_8.png";
+inline constexpr OUStringLiteral SFX_THUMBNAIL_SHEET = u"res/ots_96_8.png";
+inline constexpr OUStringLiteral SFX_THUMBNAIL_PRESENTATION = u"res/otp_96_8.png";
+inline constexpr OUStringLiteral SFX_THUMBNAIL_DRAWING = u"res/otg_96_8.png";
+inline constexpr OUStringLiteral SFX_FILE_THUMBNAIL_TEXT = u"res/odt_48_8.png";
+inline constexpr OUStringLiteral SFX_FILE_THUMBNAIL_SHEET = u"res/ods_48_8.png";
+inline constexpr OUStringLiteral SFX_FILE_THUMBNAIL_PRESENTATION = u"res/odp_48_8.png";
+inline constexpr OUStringLiteral SFX_FILE_THUMBNAIL_DRAWING = u"res/odg_48_8.png";
+inline constexpr OUStringLiteral SFX_FILE_THUMBNAIL_DATABASE = u"res/odb_48_8.png";
+inline constexpr OUStringLiteral SFX_FILE_THUMBNAIL_MATH = u"res/odf_48_8.png";
+inline constexpr OUStringLiteral SFX_FILE_THUMBNAIL_DEFAULT = u"res/mainapp_48_8.png";
#define SFX_THUMBNAIL_BASE_192 "res/base_thumbnail_192.png"
#define SFX_THUMBNAIL_BASE_256 "res/base_thumbnail_256.png"
-#define BMP_RECENTDOC_REMOVE "res/recentdoc_remove.png"
-#define BMP_RECENTDOC_REMOVE_HIGHLIGHTED "res/recentdoc_remove_highlighted.png"
-#define BMP_DEFAULT "res/templatestar.png"
-#define BMP_ACTION_REFRESH "res/reload.png"
+inline constexpr OUStringLiteral BMP_RECENTDOC_REMOVE = u"res/recentdoc_remove.png";
+inline constexpr OUStringLiteral BMP_RECENTDOC_REMOVE_HIGHLIGHTED = u"res/recentdoc_remove_highlighted.png";
+inline constexpr OUStringLiteral BMP_DEFAULT = u"res/templatestar.png";
+inline constexpr OUStringLiteral BMP_ACTION_REFRESH = u"res/reload.png";
-#define BMP_128X128_CALC_DOC "sfx2/res/128x128_calc_doc-p.png"
-#define BMP_128X128_DRAW_DOC "sfx2/res/128x128_draw_doc-p.png"
-#define BMP_128X128_IMPRESS_DOC "sfx2/res/128x128_impress_doc-p.png"
-#define BMP_128X128_MATH_DOC "sfx2/res/128x128_math_doc-p.png"
-#define BMP_128X128_WRITER_DOC "sfx2/res/128x128_writer_doc-p.png"
+inline constexpr OUStringLiteral BMP_128X128_CALC_DOC = u"sfx2/res/128x128_calc_doc-p.png";
+inline constexpr OUStringLiteral BMP_128X128_DRAW_DOC = u"sfx2/res/128x128_draw_doc-p.png";
+inline constexpr OUStringLiteral BMP_128X128_IMPRESS_DOC = u"sfx2/res/128x128_impress_doc-p.png";
+inline constexpr OUStringLiteral BMP_128X128_MATH_DOC = u"sfx2/res/128x128_math_doc-p.png";
+inline constexpr OUStringLiteral BMP_128X128_WRITER_DOC = u"sfx2/res/128x128_writer_doc-p.png";
-#define SFX_BMP_CLOSE_DOC "sfx2/res/closedoc.png"
+inline constexpr OUStringLiteral SFX_BMP_CLOSE_DOC = u"sfx2/res/closedoc.png";
-#define SIDEBAR_CLOSE_INDICATOR "cmd/lc_decrementlevel.png"
-#define BMP_ACTION_DEFAULT_WRITER "res/odt_16_8.png"
-#define BMP_ACTION_DEFAULT_CALC "res/ods_16_8.png"
-#define BMP_ACTION_DEFAULT_IMPRESS "res/odp_16_8.png"
-#define BMP_ACTION_DEFAULT_DRAW "res/odg_16_8.png"
+inline constexpr OUStringLiteral SIDEBAR_CLOSE_INDICATOR = u"cmd/lc_decrementlevel.png";
+inline constexpr OUStringLiteral BMP_ACTION_DEFAULT_WRITER = u"res/odt_16_8.png";
+inline constexpr OUStringLiteral BMP_ACTION_DEFAULT_CALC = u"res/ods_16_8.png";
+inline constexpr OUStringLiteral BMP_ACTION_DEFAULT_IMPRESS = u"res/odp_16_8.png";
+inline constexpr OUStringLiteral BMP_ACTION_DEFAULT_DRAW = u"res/odg_16_8.png";
#define BMP_ACTION_MOVE "cmd/sc_move.png"
-#define BMP_ACTION_IMPORT "cmd/sc_dataimport.png"
+inline constexpr OUStringLiteral BMP_ACTION_IMPORT = u"cmd/sc_dataimport.png";
#define BMP_ACTION_EXPORT "cmd/sc_exportto.png"
-#define BMP_ACTION_EXTENSIONS "cmd/sc_additionsdialog.png"
-#define BMP_ACTION_DELETE_CATEGORY "cmd/sc_delete.png"
-#define BMP_ACTION_NEW_CATEGORY "cmd/sc_add.png"
-#define BMP_ACTION_RENAME "cmd/sc_editdoc.png"
+inline constexpr OUStringLiteral BMP_ACTION_EXTENSIONS = u"cmd/sc_additionsdialog.png";
+inline constexpr OUStringLiteral BMP_ACTION_DELETE_CATEGORY = u"cmd/sc_delete.png";
+inline constexpr OUStringLiteral BMP_ACTION_NEW_CATEGORY = u"cmd/sc_add.png";
+inline constexpr OUStringLiteral BMP_ACTION_RENAME = u"cmd/sc_editdoc.png";
-#define BMP_MENU_OPEN "cmd/sc_opentemplate.png"
-#define BMP_MENU_EDIT "cmd/sc_opentemplate.png"
-#define BMP_MENU_MOVE "cmd/sc_move.png"
-#define BMP_MENU_RENAME "cmd/sc_editdoc.png"
-#define BMP_MENU_DELETE "cmd/sc_delete.png"
-#define BMP_MENU_EXPORT "cmd/sc_exportto.png"
-#endif
+inline constexpr OUStringLiteral BMP_MENU_OPEN = u"cmd/sc_opentemplate.png";
+inline constexpr OUStringLiteral BMP_MENU_EDIT = u"cmd/sc_opentemplate.png";
+inline constexpr OUStringLiteral BMP_MENU_MOVE = u"cmd/sc_move.png";
+inline constexpr OUStringLiteral BMP_MENU_RENAME = u"cmd/sc_editdoc.png";
+inline constexpr OUStringLiteral BMP_MENU_DELETE = u"cmd/sc_delete.png";
+inline constexpr OUStringLiteral BMP_MENU_EXPORT = u"cmd/sc_exportto.png";
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sfx2/inc/strings.hxx b/sfx2/inc/strings.hxx
index f3c3ba717845..67df9d7dfc80 100644
--- a/sfx2/inc/strings.hxx
+++ b/sfx2/inc/strings.hxx
@@ -6,53 +6,52 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#pragma once
-#ifndef INCLUDED_SFX2_INC_STRINGS_HXX
-#define INCLUDED_SFX2_INC_STRINGS_HXX
+#include <rtl/ustring.hxx>
-#define STR_HTML_GENERATOR "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION (%1)"
+inline constexpr OUStringLiteral STR_HTML_GENERATOR
+ = u"%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION (%1)";
// Do not translate STR_TEMPLATE_NAME*_DEF names!!
// STR_TEMPLATE_NAME*_DEF strings must EXACTLY fit dc:title tag in meta.xml of each template file
-#define STR_TEMPLATE_NAME1_DEF "Grey Elegant"
-#define STR_TEMPLATE_NAME2_DEF "Beehive"
-#define STR_TEMPLATE_NAME3_DEF "Blue Curve"
-#define STR_TEMPLATE_NAME4_DEF "Blueprint Plans"
-#define STR_TEMPLATE_NAME5_DEF "Candy"
-#define STR_TEMPLATE_NAME6_DEF "Yellow Idea"
-#define STR_TEMPLATE_NAME7_DEF "DNA"
-#define STR_TEMPLATE_NAME8_DEF "Focus"
-#define STR_TEMPLATE_NAME9_DEF "Forestbird"
-#define STR_TEMPLATE_NAME10_DEF "Freshes"
-#define STR_TEMPLATE_NAME11_DEF "Inspiration"
-#define STR_TEMPLATE_NAME12_DEF "Lights"
-#define STR_TEMPLATE_NAME13_DEF "Growing Liberty"
-#define STR_TEMPLATE_NAME14_DEF "Metropolis"
-#define STR_TEMPLATE_NAME15_DEF "Midnightblue"
-#define STR_TEMPLATE_NAME16_DEF "Nature Illustration"
-#define STR_TEMPLATE_NAME17_DEF "Pencil"
-#define STR_TEMPLATE_NAME18_DEF "Piano"
-#define STR_TEMPLATE_NAME19_DEF "Portfolio"
-#define STR_TEMPLATE_NAME20_DEF "Progress"
-#define STR_TEMPLATE_NAME21_DEF "Sunset"
-#define STR_TEMPLATE_NAME22_DEF "Vintage"
-#define STR_TEMPLATE_NAME23_DEF "Vivid"
-#define STR_TEMPLATE_NAME24_DEF "CV"
-#define STR_TEMPLATE_NAME25_DEF "Resume"
-#define STR_TEMPLATE_NAME26_DEF "Default"
-#define STR_TEMPLATE_NAME27_DEF "Modern"
-#define STR_TEMPLATE_NAME28_DEF "Modern business letter sans-serif"
-#define STR_TEMPLATE_NAME29_DEF "Modern business letter serif"
-#define STR_TEMPLATE_NAME30_DEF "Businesscard with logo"
-#define STR_TEMPLATE_NAME31_DEF "Simple"
-#define STR_TEMPLATE_NAME32_DEF "BPMN"
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME1_DEF = u"Grey Elegant";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME2_DEF = u"Beehive";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME3_DEF = u"Blue Curve";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME4_DEF = u"Blueprint Plans";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME5_DEF = u"Candy";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME6_DEF = u"Yellow Idea";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME7_DEF = u"DNA";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME8_DEF = u"Focus";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME9_DEF = u"Forestbird";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME10_DEF = u"Freshes";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME11_DEF = u"Inspiration";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME12_DEF = u"Lights";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME13_DEF = u"Growing Liberty";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME14_DEF = u"Metropolis";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME15_DEF = u"Midnightblue";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME16_DEF = u"Nature Illustration";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME17_DEF = u"Pencil";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME18_DEF = u"Piano";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME19_DEF = u"Portfolio";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME20_DEF = u"Progress";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME21_DEF = u"Sunset";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME22_DEF = u"Vintage";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME23_DEF = u"Vivid";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME24_DEF = u"CV";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME25_DEF = u"Resume";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME26_DEF = u"Default";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME27_DEF = u"Modern";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME28_DEF = u"Modern business letter sans-serif";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME29_DEF = u"Modern business letter serif";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME30_DEF = u"Businesscard with logo";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME31_DEF = u"Simple";
+inline constexpr OUStringLiteral STR_TEMPLATE_NAME32_DEF = u"BPMN";
-#define CMIS_TYPE_STRING "String"
+inline constexpr OUStringLiteral CMIS_TYPE_STRING = u"String";
#define CMIS_TYPE_INTEGER "Integer"
#define CMIS_TYPE_DECIMAL "Decimal"
#define CMIS_TYPE_DATETIME "Datetime"
#define CMIS_TYPE_BOOL "Bool"
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */