From 358d1a99484bcc02900bd200a7606a7bf3298cac Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Sat, 13 Jul 2013 02:54:05 +0200
Subject: 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
---
 svl/source/config/asiancfg.cxx        | 4 ++--
 svl/source/config/languageoptions.cxx | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'svl/source/config')

diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx
index 695f7623eb9e..b644705aef97 100644
--- a/svl/source/config/asiancfg.cxx
+++ b/svl/source/config/asiancfg.cxx
@@ -50,7 +50,7 @@ OUString toString(css::lang::Locale const & locale) {
             "Locale language \"" << locale.Language << "\" contains \"-\"");
     SAL_WARN_IF( locale.Country.indexOf('-') != -1, "svl",
             "Locale country \"" << locale.Country << "\" contains \"-\"");
-    return LanguageTag( locale).getBcp47( false);
+    return LanguageTag::convertToBcp47( locale, false);
 }
 
 }
@@ -105,7 +105,7 @@ css::uno::Sequence< css::lang::Locale > SvxAsianConfig::GetStartEndCharLocales()
         getElementNames());
     css::uno::Sequence< css::lang::Locale > ls(ns.getLength());
     for (sal_Int32 i = 0; i < ns.getLength(); ++i) {
-        ls[i] = LanguageTag( ns[i]).getLocale( false);
+        ls[i] = LanguageTag::convertToLocale( ns[i], false);
     }
     return ls;
 }
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index a095ac5b731e..687c99a81d3a 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -204,7 +204,7 @@ LanguageType SvtSystemLanguageOptions::GetWin16SystemLanguage() const
 {
     if( m_sWin16SystemLocale.isEmpty() )
         return LANGUAGE_NONE;
-    return LanguageTag( m_sWin16SystemLocale ).getLanguageType();
+    return LanguageTag::convertToLanguageType( m_sWin16SystemLocale );
 }
 
 bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptType) const
-- 
cgit