loplugin:stringliteraldefine in linguistc

Change-Id: Id347daab7aa21ce8756dbc2d139ac022fc22be3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125536
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2021-11-19 11:02:19 +02:00
parent bcf601f53c
commit addf580c28
4 changed files with 8 additions and 8 deletions

View file

@ -22,7 +22,7 @@
// maximal number of suggestions to be returned in spelling context-menu
// (may not include results added by looking up user dictionaries)
#define UPN_MAX_NUMBER_OF_SUGGESTIONS "MaxNumberOfSuggestions"
inline constexpr OUStringLiteral UPN_MAX_NUMBER_OF_SUGGESTIONS = u"MaxNumberOfSuggestions";
#endif

View file

@ -46,10 +46,10 @@ class CharClass;
class LocaleDataWrapper;
#define SN_GRAMMARCHECKER u"com.sun.star.linguistic2.Proofreader"
#define SN_SPELLCHECKER u"com.sun.star.linguistic2.SpellChecker"
#define SN_HYPHENATOR u"com.sun.star.linguistic2.Hyphenator"
#define SN_THESAURUS u"com.sun.star.linguistic2.Thesaurus"
inline constexpr OUStringLiteral SN_GRAMMARCHECKER = u"com.sun.star.linguistic2.Proofreader";
inline constexpr OUStringLiteral SN_SPELLCHECKER = u"com.sun.star.linguistic2.SpellChecker";
inline constexpr OUStringLiteral SN_HYPHENATOR = u"com.sun.star.linguistic2.Hyphenator";
inline constexpr OUStringLiteral SN_THESAURUS = u"com.sun.star.linguistic2.Thesaurus";
namespace linguistic

View file

@ -31,10 +31,10 @@
#include <unordered_map>
// text conversion dictionary extension
#define CONV_DIC_EXT "tcd"
inline constexpr OUStringLiteral CONV_DIC_EXT = u"tcd";
#define CONV_DIC_DOT_EXT ".tcd"
#define SN_CONV_DICTIONARY "com.sun.star.linguistic2.ConversionDictionary"
inline constexpr OUStringLiteral SN_CONV_DICTIONARY = u"com.sun.star.linguistic2.ConversionDictionary";
bool IsConvDic( const OUString &rFileURL, LanguageType &nLang, sal_Int16 &nConvType );

View file

@ -618,7 +618,7 @@ void LngSvcMgr::UpdateAll()
SvtLinguConfig aCfg;
const int nNumServices = 4;
const sal_Unicode * const apServices[nNumServices] = { SN_SPELLCHECKER, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_THESAURUS };
static constexpr rtl::OUStringConstExpr apServices[nNumServices] = { SN_SPELLCHECKER, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_THESAURUS };
const char * const apCurLists[nNumServices] = { "ServiceManager/SpellCheckerList", "ServiceManager/GrammarCheckerList", "ServiceManager/HyphenatorList", "ServiceManager/ThesaurusList" };
const char * const apLastFoundLists[nNumServices] = { "ServiceManager/LastFoundSpellCheckers", "ServiceManager/LastFoundGrammarCheckers", "ServiceManager/LastFoundHyphenators", "ServiceManager/LastFoundThesauri" };