summaryrefslogtreecommitdiff
path: root/linguistic/source
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /linguistic/source
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic/source')
-rw-r--r--linguistic/source/convdicxml.cxx6
-rw-r--r--linguistic/source/lngsvcmgr.cxx6
-rw-r--r--linguistic/source/lngsvcmgr.hxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index bc9aede1c32b..3549060acfeb 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -44,8 +44,8 @@ using namespace linguistic;
#define XML_NAMESPACE_TCD_STRING "http://openoffice.org/2003/text-conversion-dictionary"
-#define CONV_TYPE_HANGUL_HANJA "Hangul / Hanja"
-#define CONV_TYPE_SCHINESE_TCHINESE "Chinese simplified / Chinese traditional"
+#define CONV_TYPE_HANGUL_HANJA u"Hangul / Hanja"
+#define CONV_TYPE_SCHINESE_TCHINESE u"Chinese simplified / Chinese traditional"
static OUString ConversionTypeToText( sal_Int16 nConversionType )
@@ -58,7 +58,7 @@ static OUString ConversionTypeToText( sal_Int16 nConversionType )
return aRes;
}
-static sal_Int16 GetConversionTypeFromText( const OUString &rText )
+static sal_Int16 GetConversionTypeFromText( std::u16string_view rText )
{
sal_Int16 nRes = -1;
if (rText == CONV_TYPE_HANGUL_HANJA)
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 5dd758ebbf8d..dbf82dc60e0b 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -617,7 +617,7 @@ void LngSvcMgr::UpdateAll()
SvtLinguConfig aCfg;
const int nNumServices = 4;
- const char * const apServices[nNumServices] = { SN_SPELLCHECKER, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_THESAURUS };
+ const sal_Unicode * const 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" };
@@ -627,7 +627,7 @@ void LngSvcMgr::UpdateAll()
for (int k = 0; k < nNumServices; ++k)
{
- OUString aService( OUString::createFromAscii( apServices[k] ) );
+ OUString aService( apServices[k] );
OUString aActiveList( OUString::createFromAscii( apCurLists[k] ) );
OUString aLastFoundList( OUString::createFromAscii( apLastFoundLists[k] ) );
@@ -1550,7 +1550,7 @@ void SAL_CALL
}
-bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName )
+bool LngSvcMgr::SaveCfgSvcs( std::u16string_view rServiceName )
{
SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SaveCfgSvcs" );
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index dfd2ede52d38..5a56eaaaae21 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -114,7 +114,7 @@ class LngSvcMgr :
void SetCfgServiceLists( HyphenatorDispatcher &rHyphDsp );
void SetCfgServiceLists( ThesaurusDispatcher &rThesDsp );
- bool SaveCfgSvcs( const OUString &rServiceName );
+ bool SaveCfgSvcs( std::u16string_view rServiceName );
// utl::ConfigItem (to allow for listening of changes of relevant properties)
virtual void Notify( const css::uno::Sequence< OUString > &rPropertyNames ) override;