summaryrefslogtreecommitdiff
path: root/starmath/inc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-02 01:18:42 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-04-02 18:46:47 +0200
commit116b9d6ddf2b61186b29f0370234eec9c1bbe306 (patch)
tree7f90a12333274086e33c4e0fabfd96a8e54e6b6c /starmath/inc
parentd7ba78e9c7be835a1e2ecdacd25995663e96862f (diff)
Avoid conversions between OUString and OString in VCL
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/dialog.hxx4
-rw-r--r--starmath/inc/helpids.h56
2 files changed, 30 insertions, 30 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index fee12d9a5130..a595917d450d 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -141,7 +141,7 @@ class SmFontTypeDialog final : public weld::GenericDialogController
std::unique_ptr<weld::MenuButton> m_xMenuButton;
std::unique_ptr<weld::Button> m_xDefaultButton;
- DECL_LINK(MenuSelectHdl, const OString&, void);
+ DECL_LINK(MenuSelectHdl, const OUString&, void);
DECL_LINK(DefaultButtonClickHdl, weld::Button&, void);
public:
@@ -205,7 +205,7 @@ class SmDistanceDialog final : public weld::GenericDialogController
bool bScaleAllBrackets;
DECL_LINK(GetFocusHdl, weld::Widget&, void);
- DECL_LINK(MenuSelectHdl, const OString&, void);
+ DECL_LINK(MenuSelectHdl, const OUString&, void);
DECL_LINK(DefaultButtonClickHdl, weld::Button&, void);
DECL_LINK(CheckBoxClickHdl, weld::Toggleable&, void);
diff --git a/starmath/inc/helpids.h b/starmath/inc/helpids.h
index 59489e57ac0d..195ccfb570a9 100644
--- a/starmath/inc/helpids.h
+++ b/starmath/inc/helpids.h
@@ -19,36 +19,36 @@
#pragma once
-#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
-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 OUStringLiteral HID_SMA_WIN_DOCUMENT = u"STARMATH_HID_SMA_WIN_DOCUMENT";
+inline constexpr OUStringLiteral HID_SMA_COMMAND_WIN_EDIT = u"STARMATH_HID_SMA_COMMAND_WIN_EDIT";
-inline constexpr OStringLiteral HID_SMA_COMMAND_WIN = "STARMATH_HID_SMA_COMMAND_WIN";
+inline constexpr OUStringLiteral HID_SMA_COMMAND_WIN = u"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"
-#define HID_SMA_ROOT_DIST "STARMATH_HID_SMA_ROOT_DIST"
-#define HID_SMA_SUP_DIST "STARMATH_HID_SMA_SUP_DIST"
-#define HID_SMA_SUB_DIST "STARMATH_HID_SMA_SUB_DIST"
-#define HID_SMA_NUMERATOR_DIST "STARMATH_HID_SMA_NUMERATOR_DIST"
-#define HID_SMA_DENOMINATOR_DIST "STARMATH_HID_SMA_DENOMINATOR_DIST"
-#define HID_SMA_FRACLINE_EXCWIDTH "STARMATH_HID_SMA_FRACLINE_EXCWIDTH"
-#define HID_SMA_FRACLINE_LINEWIDTH "STARMATH_HID_SMA_FRACLINE_LINEWIDTH"
-#define HID_SMA_UPPERLIMIT_DIST "STARMATH_HID_SMA_UPPERLIMIT_DIST"
-#define HID_SMA_LOWERLIMIT_DIST "STARMATH_HID_SMA_LOWERLIMIT_DIST"
-#define HID_SMA_BRACKET_EXCHEIGHT "STARMATH_HID_SMA_BRACKET_EXCHEIGHT"
-#define HID_SMA_BRACKET_DIST "STARMATH_HID_SMA_BRACKET_DIST"
-#define HID_SMA_MATRIXROW_DIST "STARMATH_HID_SMA_MATRIXROW_DIST"
-#define HID_SMA_MATRIXCOL_DIST "STARMATH_HID_SMA_MATRIXCOL_DIST"
-#define HID_SMA_ATTRIBUT_DIST "STARMATH_HID_SMA_ATTRIBUT_DIST"
-#define HID_SMA_INTERATTRIBUT_DIST "STARMATH_HID_SMA_INTERATTRIBUT_DIST"
-#define HID_SMA_OPERATOR_EXCHEIGHT "STARMATH_HID_SMA_OPERATOR_EXCHEIGHT"
-#define HID_SMA_OPERATOR_DIST "STARMATH_HID_SMA_OPERATOR_DIST"
-#define HID_SMA_LEFTBORDER_DIST "STARMATH_HID_SMA_LEFTBORDER_DIST"
-#define HID_SMA_RIGHTBORDER_DIST "STARMATH_HID_SMA_RIGHTBORDER_DIST"
-#define HID_SMA_UPPERBORDER_DIST "STARMATH_HID_SMA_UPPERBORDER_DIST"
-#define HID_SMA_LOWERBORDER_DIST "STARMATH_HID_SMA_LOWERBORDER_DIST"
-#define HID_SMA_BRACKET_EXCHEIGHT2 "STARMATH_HID_SMA_BRACKET_EXCHEIGHT2"
+inline constexpr OUStringLiteral HID_SMA_DEFAULT_DIST = u"STARMATH_HID_SMA_DEFAULT_DIST";
+inline constexpr OUStringLiteral HID_SMA_LINE_DIST = u"STARMATH_HID_SMA_LINE_DIST";
+inline constexpr OUStringLiteral HID_SMA_ROOT_DIST = u"STARMATH_HID_SMA_ROOT_DIST";
+inline constexpr OUStringLiteral HID_SMA_SUP_DIST = u"STARMATH_HID_SMA_SUP_DIST";
+inline constexpr OUStringLiteral HID_SMA_SUB_DIST = u"STARMATH_HID_SMA_SUB_DIST";
+inline constexpr OUStringLiteral HID_SMA_NUMERATOR_DIST = u"STARMATH_HID_SMA_NUMERATOR_DIST";
+inline constexpr OUStringLiteral HID_SMA_DENOMINATOR_DIST = u"STARMATH_HID_SMA_DENOMINATOR_DIST";
+inline constexpr OUStringLiteral HID_SMA_FRACLINE_EXCWIDTH = u"STARMATH_HID_SMA_FRACLINE_EXCWIDTH";
+inline constexpr OUStringLiteral HID_SMA_FRACLINE_LINEWIDTH = u"STARMATH_HID_SMA_FRACLINE_LINEWIDTH";
+inline constexpr OUStringLiteral HID_SMA_UPPERLIMIT_DIST = u"STARMATH_HID_SMA_UPPERLIMIT_DIST";
+inline constexpr OUStringLiteral HID_SMA_LOWERLIMIT_DIST = u"STARMATH_HID_SMA_LOWERLIMIT_DIST";
+inline constexpr OUStringLiteral HID_SMA_BRACKET_EXCHEIGHT = u"STARMATH_HID_SMA_BRACKET_EXCHEIGHT";
+inline constexpr OUStringLiteral HID_SMA_BRACKET_DIST = u"STARMATH_HID_SMA_BRACKET_DIST";
+inline constexpr OUStringLiteral HID_SMA_MATRIXROW_DIST = u"STARMATH_HID_SMA_MATRIXROW_DIST";
+inline constexpr OUStringLiteral HID_SMA_MATRIXCOL_DIST = u"STARMATH_HID_SMA_MATRIXCOL_DIST";
+inline constexpr OUStringLiteral HID_SMA_ATTRIBUT_DIST = u"STARMATH_HID_SMA_ATTRIBUT_DIST";
+inline constexpr OUStringLiteral HID_SMA_INTERATTRIBUT_DIST = u"STARMATH_HID_SMA_INTERATTRIBUT_DIST";
+inline constexpr OUStringLiteral HID_SMA_OPERATOR_EXCHEIGHT = u"STARMATH_HID_SMA_OPERATOR_EXCHEIGHT";
+inline constexpr OUStringLiteral HID_SMA_OPERATOR_DIST = u"STARMATH_HID_SMA_OPERATOR_DIST";
+inline constexpr OUStringLiteral HID_SMA_LEFTBORDER_DIST = u"STARMATH_HID_SMA_LEFTBORDER_DIST";
+inline constexpr OUStringLiteral HID_SMA_RIGHTBORDER_DIST = u"STARMATH_HID_SMA_RIGHTBORDER_DIST";
+inline constexpr OUStringLiteral HID_SMA_UPPERBORDER_DIST = u"STARMATH_HID_SMA_UPPERBORDER_DIST";
+inline constexpr OUStringLiteral HID_SMA_LOWERBORDER_DIST = u"STARMATH_HID_SMA_LOWERBORDER_DIST";
+inline constexpr OUStringLiteral HID_SMA_BRACKET_EXCHEIGHT2 = u"STARMATH_HID_SMA_BRACKET_EXCHEIGHT2";
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */