diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-13 02:54:05 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-13 11:55:16 +0200 |
commit | 358d1a99484bcc02900bd200a7606a7bf3298cac (patch) | |
tree | 031f808141dbc712553b8a4a029a354a2699a622 /svtools | |
parent | 5d1a8e0d47b6d6e9e3e5735d0ee52fa0b4782202 (diff) |
use static LanguageTag::convertTo...() for standalone conversions
If no LanguageTag instance is at hand use the static methods to convert
between BCP 47 string, Locale and MS-LangID instead of creating
temporary instances.
Change-Id: I9597f768078eb81c840e84a5db5617f26bb7dc09
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/langsupport/langsupport.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/langtab.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/svtools/langsupport/langsupport.cxx b/svtools/langsupport/langsupport.cxx index 226187a5d020..12269cada3d7 100644 --- a/svtools/langsupport/langsupport.cxx +++ b/svtools/langsupport/langsupport.cxx @@ -56,7 +56,7 @@ SAL_IMPLEMENT_MAIN() continue; } - OUString sTag( LanguageTag( eLang).getBcp47()); + OUString sTag( LanguageTag::convertToBcp47( eLang)); std::cout << OUStringToOString(sTag, osl_getThreadTextEncoding()).getStr() << std::endl; diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index b83443d2754e..4fcaa7399855 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -143,7 +143,7 @@ const OUString SvtLanguageTable::GetString( const LanguageType eType, bool bUser return ResStringArray::GetString( nPos ); //Rather than return a fairly useless "Unknown" name, return a geeky but usable-in-a-pinch lang-tag - OUString sLangTag(LanguageTag(eType).getBcp47()); + OUString sLangTag(LanguageTag::convertToBcp47(eType)); SAL_WARN("svtools.misc", "Language: 0x" << std::hex << eType << " with unknown name, so returning lang-tag of: " |