From 358d1a99484bcc02900bd200a7606a7bf3298cac Mon Sep 17 00:00:00 2001 From: Eike Rathke 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 --- forms/source/component/FormattedField.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'forms') diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 773c7a5603db..8e74136c109b 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -845,7 +845,7 @@ void OFormattedModel::write(const Reference& _rxOutStream) if (isA(aLocale, static_cast(NULL))) { Locale* pLocale = (Locale*)aLocale.getValue(); - eFormatLanguage = LanguageTag( *pLocale ).getLanguageType( false); + eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false); } } @@ -928,7 +928,7 @@ void OFormattedModel::read(const Reference& _rxInStream) thr if (xFormats.is()) { - Locale aDescriptionLanguage( LanguageTag(eDescriptionLanguage).getLocale()); + Locale aDescriptionLanguage( LanguageTag::convertToLocale(eDescriptionLanguage)); nKey = xFormats->queryKey(sFormatDescription, aDescriptionLanguage, sal_False); if (nKey == (sal_Int32)-1) -- cgit v1.2.3