summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-13 12:49:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-13 14:55:54 +0200
commitdc82dd830bf4ef66451897624c946655a1526bde (patch)
tree55738ab3e8996cc9d4a1032f95144779e6239ac5 /unotools
parente695b6d89a00c86fc35332213be42d5b29196eae (diff)
loplugin:unusedmethods
Change-Id: Ifa9c3fe86e7bad6d3839fd3fdfdb8c1f7b5053c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/misc/syslocale.cxx35
1 files changed, 0 insertions, 35 deletions
diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx
index a1325958a0d4..31b448e6583a 100644
--- a/unotools/source/misc/syslocale.cxx
+++ b/unotools/source/misc/syslocale.cxx
@@ -174,39 +174,4 @@ const LanguageTag& SvtSysLocale::GetUILanguageTag() const
return pImpl->aSysLocaleOptions.GetRealUILanguageTag();
}
-// static
-rtl_TextEncoding SvtSysLocale::GetBestMimeEncoding()
-{
- const char* pCharSet = rtl_getBestMimeCharsetFromTextEncoding(
- osl_getThreadTextEncoding() );
- if ( !pCharSet )
- {
- // If the system locale is unknown to us, e.g. LC_ALL=xx, match the UI
- // language if possible.
- SvtSysLocale aSysLocale;
- const LanguageTag& rLanguageTag = aSysLocale.GetUILanguageTag();
- // Converting blindly to Locale and then to rtl_Locale may feed the
- // 'qlt' to rtl_locale_register() and the underlying system locale
- // stuff, which doesn't know about it nor about BCP47 in the Variant
- // field. So use the real language and for non-pure ISO cases hope for
- // the best... the fallback to UTF-8 should solve these cases nowadays.
- /* FIXME-BCP47: the script needs to go in here as well, so actually
- * we'd need some variant fiddling or glibc locale string and tweak
- * rtl_locale_register() to know about it! But then again the Windows
- * implementation still wouldn't know anything about it ... */
- SAL_WARN_IF( !rLanguageTag.isIsoLocale(), "unotools.i18n",
- "SvtSysLocale::GetBestMimeEncoding - non-ISO UI locale");
- rtl_Locale * pLocale = rtl_locale_register( rLanguageTag.getLanguage().getStr(),
- rLanguageTag.getCountry().getStr(), OUString().getStr() );
- rtl_TextEncoding nEnc = osl_getTextEncodingFromLocale( pLocale );
- pCharSet = rtl_getBestMimeCharsetFromTextEncoding( nEnc );
- }
- rtl_TextEncoding nRet;
- if ( pCharSet )
- nRet = rtl_getTextEncodingFromMimeCharset( pCharSet );
- else
- nRet = RTL_TEXTENCODING_UTF8;
- return nRet;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */