summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-06 11:48:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-06 12:23:05 +0100
commit63cc9fc463fbf182bcf93651420e0adc6180f2aa (patch)
treea0fd5b6bacb22ba33fa4df8817887a3dcb376df1 /starmath
parenta4c9664532329d7143aabdacf22b1cab662f77c4 (diff)
loplugin:stringliteraldefine in starmath
Change-Id: I539dbb8eaa21604401709d3b6e19433474056902 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126406 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/document.hxx2
-rw-r--r--starmath/inc/format.hxx6
-rw-r--r--starmath/inc/helpids.h8
-rw-r--r--starmath/inc/strings.hxx2
-rw-r--r--starmath/inc/types.hxx4
-rw-r--r--starmath/inc/unomodel.hxx10
6 files changed, 18 insertions, 14 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 772b66748fb4..7403d35cf5a8 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -41,7 +41,7 @@ class SmCursor;
namespace oox::formulaimport { class XmlStream; }
#define STAROFFICE_XML "StarOffice XML (Math)"
-#define MATHML_XML "MathML XML (Math)"
+inline constexpr OUStringLiteral MATHML_XML = u"MathML XML (Math)";
/* Access to printer should happen through this class only
* ==========================================================================
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index d723f5cd6843..61fc8b04764f 100644
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -25,9 +25,9 @@
#include "types.hxx"
-#define FNTNAME_TIMES "Times New Roman"
-#define FNTNAME_HELV "Helvetica"
-#define FNTNAME_COUR "Courier"
+inline constexpr OUStringLiteral FNTNAME_TIMES = u"Times New Roman";
+inline constexpr OUStringLiteral FNTNAME_HELV = u"Helvetica";
+inline constexpr OUStringLiteral FNTNAME_COUR = u"Courier";
#define FNTNAME_MATH FONTNAME_MATH
diff --git a/starmath/inc/helpids.h b/starmath/inc/helpids.h
index 5674678a409f..59489e57ac0d 100644
--- a/starmath/inc/helpids.h
+++ b/starmath/inc/helpids.h
@@ -19,10 +19,12 @@
#pragma once
-#define HID_SMA_WIN_DOCUMENT "STARMATH_HID_SMA_WIN_DOCUMENT"
-#define HID_SMA_COMMAND_WIN_EDIT "STARMATH_HID_SMA_COMMAND_WIN_EDIT"
+#include <rtl/string.hxx>
-#define HID_SMA_COMMAND_WIN "STARMATH_HID_SMA_COMMAND_WIN"
+inline constexpr OStringLiteral HID_SMA_WIN_DOCUMENT = "STARMATH_HID_SMA_WIN_DOCUMENT";
+inline constexpr OStringLiteral HID_SMA_COMMAND_WIN_EDIT = "STARMATH_HID_SMA_COMMAND_WIN_EDIT";
+
+inline constexpr OStringLiteral HID_SMA_COMMAND_WIN = "STARMATH_HID_SMA_COMMAND_WIN";
#define HID_SMA_DEFAULT_DIST "STARMATH_HID_SMA_DEFAULT_DIST"
#define HID_SMA_LINE_DIST "STARMATH_HID_SMA_LINE_DIST"
diff --git a/starmath/inc/strings.hxx b/starmath/inc/strings.hxx
index a9115cc9ea05..ccde8244032a 100644
--- a/starmath/inc/strings.hxx
+++ b/starmath/inc/strings.hxx
@@ -15,7 +15,7 @@
#pragma once
-#define RID_UNDOFORMATNAME "Format"
+inline constexpr OUStringLiteral RID_UNDOFORMATNAME = u"Format";
// clang-format off
#define RID_PLUSX "+<?> "
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index b0bd00dad939..39d2f5c6fe05 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -20,7 +20,9 @@
#pragma once
#include <sal/types.h>
-#define FONTNAME_MATH "OpenSymbol"
+#include <rtl/ustring.hxx>
+
+inline constexpr OUStringLiteral FONTNAME_MATH = u"OpenSymbol";
enum SmPrintSize
{
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index c01eaec1e8fb..1bb66c4da435 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -28,11 +28,11 @@
#include <oox/mathml/export.hxx>
#include <oox/mathml/import.hxx>
-#define PRTUIOPT_TITLE_ROW "TitleRow"
-#define PRTUIOPT_FORMULA_TEXT "FormulaText"
-#define PRTUIOPT_BORDER "Border"
-#define PRTUIOPT_PRINT_FORMAT "PrintFormat"
-#define PRTUIOPT_PRINT_SCALE "PrintScale"
+inline constexpr OUStringLiteral PRTUIOPT_TITLE_ROW = u"TitleRow";
+inline constexpr OUStringLiteral PRTUIOPT_FORMULA_TEXT = u"FormulaText";
+inline constexpr OUStringLiteral PRTUIOPT_BORDER = u"Border";
+inline constexpr OUStringLiteral PRTUIOPT_PRINT_FORMAT = u"PrintFormat";
+inline constexpr OUStringLiteral PRTUIOPT_PRINT_SCALE = u"PrintScale";
class SmPrintUIOptions : public vcl::PrinterOptionsHelper
{