i18npool/source/collator/collator_unicode.cxx | 10 +++------- i18npool/source/indexentry/indexentrysupplier_asian.cxx | 6 +----- i18npool/source/textconversion/textconversion.cxx | 6 +----- i18npool/source/transliteration/textToPronounce_zh.cxx | 6 +----- 4 files changed, 6 insertions(+), 22 deletions(-)
New commits: commit 30b27bd038a9362b2a13c6ea7d9cdad0ae012cac Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Feb 9 14:04:28 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Feb 9 14:32:32 2024 +0100 use more SAL_MODULENAME macro which simplifies the call sites Change-Id: Ic884ee8568c9f1346ff49fd3e0dc951ed5cc4cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163160 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index 0a73ce1803ba..a3a1b4f84e66 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -156,14 +156,10 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: size_t (*funclen)() = nullptr; #ifndef DISABLE_DYNLOADING - OUStringBuffer aBuf; -#ifdef SAL_DLLPREFIX - aBuf.append(SAL_DLLPREFIX); -#endif - aBuf.append( "collator_data" SAL_DLLEXTENSION ); - hModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT ); + constexpr OUString sModuleName( u"" SAL_MODULENAME( "i18npool" ) ""_ustr ); + hModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, SAL_LOADMODULE_DEFAULT ); if (hModule) { - aBuf.append("get_" + rLocale.Language + "_"); + OUStringBuffer aBuf("get_" + rLocale.Language + "_"); if ( rLocale.Language == "zh" ) { OUString func_base = aBuf.makeStringAndClear(); if (OUString("TW HK MO").indexOf(rLocale.Country) >= 0) diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx index abe6c490e5b2..98cadffe815e 100644 --- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx @@ -41,11 +41,7 @@ IndexEntrySupplier_asian::IndexEntrySupplier_asian( { implementationName = "com.sun.star.i18n.IndexEntrySupplier_asian"; #ifndef DISABLE_DYNLOADING -#ifdef SAL_DLLPREFIX - OUString lib(SAL_DLLPREFIX"index_data" SAL_DLLEXTENSION); -#else - OUString lib("index_data" SAL_DLLEXTENSION); -#endif + constexpr OUString lib( u"" SAL_MODULENAME( "index_data" ) ""_ustr ); hModule = osl_loadModuleRelative( &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT ); #endif diff --git a/i18npool/source/textconversion/textconversion.cxx b/i18npool/source/textconversion/textconversion.cxx index a64f4072cc06..0dba10e1f155 100644 --- a/i18npool/source/textconversion/textconversion.cxx +++ b/i18npool/source/textconversion/textconversion.cxx @@ -34,11 +34,7 @@ TextConversionService::TextConversionService(const char *pImplName) : implementationName(pImplName) { #ifndef DISABLE_DYNLOADING -#ifdef SAL_DLLPREFIX - OUString lib(SAL_DLLPREFIX"textconv_dict" SAL_DLLEXTENSION); -#else - OUString lib("textconv_dict" SAL_DLLEXTENSION); -#endif + constexpr OUString lib( u"" SAL_MODULENAME( "textconv_dict" ) ""_ustr ); hModule = osl_loadModuleRelative( &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT ); #endif diff --git a/i18npool/source/transliteration/textToPronounce_zh.cxx b/i18npool/source/transliteration/textToPronounce_zh.cxx index 8d6b3e3e81a3..79e5eefda3b1 100644 --- a/i18npool/source/transliteration/textToPronounce_zh.cxx +++ b/i18npool/source/transliteration/textToPronounce_zh.cxx @@ -162,11 +162,7 @@ extern "C" { static void thisModule() {} } TextToPronounce_zh::TextToPronounce_zh(const char* func_name) { -#ifdef SAL_DLLPREFIX - OUString lib(SAL_DLLPREFIX"index_data" SAL_DLLEXTENSION); -#else - OUString lib("index_data" SAL_DLLEXTENSION); -#endif + constexpr OUString lib( u"" SAL_MODULENAME( "index_data" ) ""_ustr ); hModule = osl_loadModuleRelative( &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT ); idx=nullptr;