summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 15:08:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-02 14:43:58 +0200
commit1597cc5b3e07dd24cb4cb10b35b1e93545e4b929 (patch)
treef6ed37244e41d23e8a84327b1580e37f3dc18829 /linguistic
parent0e883d6dbee8d72257f77605ae0c8a1d5bfbf044 (diff)
convert #defines to OUStringLiteral
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdicxml.cxx6
-rw-r--r--linguistic/source/dicimp.cxx4
-rw-r--r--linguistic/source/hhconvdic.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 3549060acfeb..e9ac72be3769 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -43,9 +43,9 @@ using namespace com::sun::star::linguistic2;
using namespace linguistic;
-#define XML_NAMESPACE_TCD_STRING "http://openoffice.org/2003/text-conversion-dictionary"
-#define CONV_TYPE_HANGUL_HANJA u"Hangul / Hanja"
-#define CONV_TYPE_SCHINESE_TCHINESE u"Chinese simplified / Chinese traditional"
+constexpr OUStringLiteral XML_NAMESPACE_TCD_STRING = u"http://openoffice.org/2003/text-conversion-dictionary";
+constexpr OUStringLiteral CONV_TYPE_HANGUL_HANJA = u"Hangul / Hanja";
+constexpr OUStringLiteral CONV_TYPE_SCHINESE_TCHINESE = u"Chinese simplified / Chinese traditional";
static OUString ConversionTypeToText( sal_Int16 nConversionType )
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index f7d4d1b3b0c4..b2d28491c41d 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -61,7 +61,7 @@ using namespace linguistic;
// XML-header to query SPELLML support
// to handle user words with "Grammar By" model words
-#define SPELLML_SUPPORT "<?xml?>"
+constexpr OUStringLiteral SPELLML_SUPPORT = u"<?xml?>";
// User dictionaries can contain optional "title:" tags
// to support custom titles with space and other characters.
@@ -72,7 +72,7 @@ using namespace linguistic;
// The following fake file name extension will be
// added to the text of the title: field for correct
// text stripping and dictionary saving.
-#define EXTENSION_FOR_TITLE_TEXT "."
+constexpr OUStringLiteral EXTENSION_FOR_TITLE_TEXT = u".";
const char* const pVerStr2 = "WBSWG2";
const char* const pVerStr5 = "WBSWG5";
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index 1888e6186a81..76349a4d76ef 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -37,7 +37,7 @@ using namespace com::sun::star::linguistic2;
using namespace linguistic;
-#define SN_HH_CONV_DICTIONARY "com.sun.star.linguistic2.HangulHanjaConversionDictionary"
+constexpr OUStringLiteral SN_HH_CONV_DICTIONARY = u"com.sun.star.linguistic2.HangulHanjaConversionDictionary";
#include <com/sun/star/i18n/UnicodeScript.hpp>