[Libreoffice-commits] .: forms/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 16 18:30:41 PST 2012


 forms/source/component/FormattedField.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c90231291b5fa033ec3b079427c522177083a585
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Nov 17 03:30:11 2012 +0100

    use LanguageTag
    
    Change-Id: Ie3079b1acde5cc98e0cffb37e3ff696aac8fe5f2

diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index aabe359..91faaa6 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -43,7 +43,7 @@
 #include <vcl/svapp.hxx>
 #include <tools/debug.hxx>
 #include <tools/wintypes.hxx>
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
 #include <rtl/textenc.h>
 #include <com/sun/star/sdbc/DataType.hpp>
 #include <com/sun/star/util/NumberFormat.hpp>
@@ -150,7 +150,7 @@ Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Referenc
         // get the Office's locale
         const Locale& rSysLocale = SvtSysLocale().GetLocaleData().getLocale();
         // translate
-        eSysLanguage = MsLangId::convertLocaleToLanguage( rSysLocale );
+        eSysLanguage = LanguageTag( rSysLocale ).getLanguageType( false);
     }
 
     StandardFormatsSupplier* pSupplier = new StandardFormatsSupplier( _rxORB, eSysLanguage );
@@ -856,7 +856,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
             if (isA(aLocale, static_cast<Locale*>(NULL)))
             {
                 Locale* pLocale = (Locale*)aLocale.getValue();
-                eFormatLanguage = MsLangId::convertLocaleToLanguage( *pLocale );
+                eFormatLanguage = LanguageTag( *pLocale ).getLanguageType( false);
             }
         }
 
@@ -940,7 +940,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
 
                 if (xFormats.is())
                 {
-                    Locale aDescriptionLanguage( MsLangId::convertLanguageToLocale(eDescriptionLanguage));
+                    Locale aDescriptionLanguage( LanguageTag(eDescriptionLanguage).getLocale());
 
                     nKey = xFormats->queryKey(sFormatDescription, aDescriptionLanguage, sal_False);
                     if (nKey == (sal_Int32)-1)


More information about the Libreoffice-commits mailing list