summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-02-09 14:04:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-02-09 14:32:32 +0100
commit30b27bd038a9362b2a13c6ea7d9cdad0ae012cac (patch)
treed28397df3e49dbb216f638436186be3dedfab3b8 /i18npool
parent6cbed7b6a8a3ded92020e0dce3c562d867299fe1 (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/collator/collator_unicode.cxx10
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_asian.cxx6
-rw-r--r--i18npool/source/textconversion/textconversion.cxx6
-rw-r--r--i18npool/source/transliteration/textToPronounce_zh.cxx6
4 files changed, 6 insertions, 22 deletions
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;