loplugin:ostr in lingucomponent
Change-Id: I1910fd2a7cba63404c37b7bb80b77de2443dd7a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167386 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
This commit is contained in:
parent
927e66058a
commit
38c980d472
7 changed files with 20 additions and 19 deletions
|
@ -123,8 +123,8 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
|
|||
// new configuration entries).
|
||||
std::vector< SvtLinguConfigDictionaryEntry > aDics;
|
||||
uno::Sequence< OUString > aFormatList;
|
||||
aLinguCfg.GetSupportedDictionaryFormatsFor( "Hyphenators",
|
||||
"org.openoffice.lingu.LibHnjHyphenator", aFormatList );
|
||||
aLinguCfg.GetSupportedDictionaryFormatsFor( u"Hyphenators"_ustr,
|
||||
u"org.openoffice.lingu.LibHnjHyphenator"_ustr, aFormatList );
|
||||
for (const auto& rFormat : aFormatList)
|
||||
{
|
||||
std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
|
||||
|
@ -961,7 +961,7 @@ void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >
|
|||
// Service specific part
|
||||
OUString SAL_CALL Hyphenator::getImplementationName()
|
||||
{
|
||||
return "org.openoffice.lingu.LibHnjHyphenator";
|
||||
return u"org.openoffice.lingu.LibHnjHyphenator"_ustr;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL Hyphenator::supportsService( const OUString& ServiceName )
|
||||
|
|
|
@ -296,7 +296,7 @@ void SAL_CALL LangGuess_Impl::enableLanguages(
|
|||
|
||||
OUString SAL_CALL LangGuess_Impl::getImplementationName( )
|
||||
{
|
||||
return "com.sun.star.lingu2.LanguageGuessing";
|
||||
return u"com.sun.star.lingu2.LanguageGuessing"_ustr;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL LangGuess_Impl::supportsService( const OUString& ServiceName )
|
||||
|
@ -306,7 +306,7 @@ sal_Bool SAL_CALL LangGuess_Impl::supportsService( const OUString& ServiceName )
|
|||
|
||||
Sequence<OUString> SAL_CALL LangGuess_Impl::getSupportedServiceNames( )
|
||||
{
|
||||
return { "com.sun.star.linguistic2.LanguageGuessing" };
|
||||
return { u"com.sun.star.linguistic2.LanguageGuessing"_ustr };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
|
|
@ -207,7 +207,7 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
|
|||
#ifndef IOS
|
||||
// follow the hunspell tool's example and check DICPATH for preferred dictionaries
|
||||
rtl_uString * pSearchPath = nullptr;
|
||||
osl_getEnvironment(OUString("DICPATH").pData, &pSearchPath);
|
||||
osl_getEnvironment(u"DICPATH"_ustr.pData, &pSearchPath);
|
||||
|
||||
if (pSearchPath)
|
||||
{
|
||||
|
|
|
@ -145,7 +145,7 @@ uno::Sequence<Locale> SAL_CALL NumberText_Impl::getAvailableLanguages()
|
|||
|
||||
OUString SAL_CALL NumberText_Impl::getImplementationName()
|
||||
{
|
||||
return "com.sun.star.lingu2.NumberText";
|
||||
return u"com.sun.star.lingu2.NumberText"_ustr;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL NumberText_Impl::supportsService(const OUString& ServiceName)
|
||||
|
@ -155,7 +155,7 @@ sal_Bool SAL_CALL NumberText_Impl::supportsService(const OUString& ServiceName)
|
|||
|
||||
Sequence<OUString> SAL_CALL NumberText_Impl::getSupportedServiceNames()
|
||||
{
|
||||
return { "com.sun.star.linguistic2.NumberText" };
|
||||
return { u"com.sun.star.linguistic2.NumberText"_ustr };
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
|
|
|
@ -83,7 +83,7 @@ PropertyValue lcl_GetLineColorPropertyFromErrorId(const std::string& rErrorId)
|
|||
constexpr Color COL_ORANGE(0xD1, 0x68, 0x20);
|
||||
aColor = COL_ORANGE;
|
||||
}
|
||||
return comphelper::makePropertyValue("LineColor", aColor);
|
||||
return comphelper::makePropertyValue(u"LineColor"_ustr, aColor);
|
||||
}
|
||||
|
||||
OString encodeTextForLT(const OUString& text)
|
||||
|
@ -346,8 +346,9 @@ uno::Sequence<Locale> SAL_CALL LanguageToolGrammarChecker::getLocales()
|
|||
aLocaleList.getArray()[2] = "en-GB";
|
||||
}
|
||||
else
|
||||
aLinguCfg.GetLocaleListFor("GrammarCheckers",
|
||||
"org.openoffice.lingu.LanguageToolGrammarChecker", aLocaleList);
|
||||
aLinguCfg.GetLocaleListFor(u"GrammarCheckers"_ustr,
|
||||
u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr,
|
||||
aLocaleList);
|
||||
|
||||
auto nLength = aLocaleList.getLength();
|
||||
m_aSuppLocales.realloc(nLength);
|
||||
|
@ -494,7 +495,7 @@ OUString SAL_CALL LanguageToolGrammarChecker::getServiceDisplayName(const Locale
|
|||
|
||||
OUString SAL_CALL LanguageToolGrammarChecker::getImplementationName()
|
||||
{
|
||||
return "org.openoffice.lingu.LanguageToolGrammarChecker";
|
||||
return u"org.openoffice.lingu.LanguageToolGrammarChecker"_ustr;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL LanguageToolGrammarChecker::supportsService(const OUString& ServiceName)
|
||||
|
|
|
@ -118,8 +118,8 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
|
|||
// new configuration entries).
|
||||
std::vector< SvtLinguConfigDictionaryEntry > aDics;
|
||||
uno::Sequence< OUString > aFormatList;
|
||||
aLinguCfg.GetSupportedDictionaryFormatsFor( "SpellCheckers",
|
||||
"org.openoffice.lingu.MySpellSpellChecker", aFormatList );
|
||||
aLinguCfg.GetSupportedDictionaryFormatsFor( u"SpellCheckers"_ustr,
|
||||
u"org.openoffice.lingu.MySpellSpellChecker"_ustr, aFormatList );
|
||||
for (auto const& format : aFormatList)
|
||||
{
|
||||
std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
|
||||
|
@ -141,7 +141,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
|
|||
if (!aDics.empty())
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xServiceFactory(comphelper::getProcessServiceFactory());
|
||||
uno::Reference< ucb::XSimpleFileAccess > xAccess(xServiceFactory->createInstance("com.sun.star.ucb.SimpleFileAccess"), uno::UNO_QUERY);
|
||||
uno::Reference< ucb::XSimpleFileAccess > xAccess(xServiceFactory->createInstance(u"com.sun.star.ucb.SimpleFileAccess"_ustr), uno::UNO_QUERY);
|
||||
// get supported locales from the dictionaries-to-use...
|
||||
std::set<OUString> aLocaleNamesSet;
|
||||
for (auto const& dict : aDics)
|
||||
|
@ -621,7 +621,7 @@ void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener
|
|||
// Service specific part
|
||||
OUString SAL_CALL SpellChecker::getImplementationName()
|
||||
{
|
||||
return "org.openoffice.lingu.MySpellSpellChecker";
|
||||
return u"org.openoffice.lingu.MySpellSpellChecker"_ustr;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL SpellChecker::supportsService( const OUString& ServiceName )
|
||||
|
|
|
@ -106,8 +106,8 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
|
|||
// get list of dictionaries-to-use
|
||||
std::vector< SvtLinguConfigDictionaryEntry > aDics;
|
||||
uno::Sequence< OUString > aFormatList;
|
||||
aLinguCfg.GetSupportedDictionaryFormatsFor( "Thesauri",
|
||||
"org.openoffice.lingu.new.Thesaurus", aFormatList );
|
||||
aLinguCfg.GetSupportedDictionaryFormatsFor( u"Thesauri"_ustr,
|
||||
u"org.openoffice.lingu.new.Thesaurus"_ustr, aFormatList );
|
||||
for (const auto& rFormat : aFormatList)
|
||||
{
|
||||
std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
|
||||
|
@ -547,7 +547,7 @@ void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >&
|
|||
// Service specific part
|
||||
OUString SAL_CALL Thesaurus::getImplementationName()
|
||||
{
|
||||
return "org.openoffice.lingu.new.Thesaurus";
|
||||
return u"org.openoffice.lingu.new.Thesaurus"_ustr;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName )
|
||||
|
|
Loading…
Reference in a new issue