summaryrefslogtreecommitdiff
path: root/forms/source/component
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-04-07 14:23:00 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-04-07 14:23:00 +0000
commita070ca88ca66749d069c5d350d31f9e685452af4 (patch)
treef5cc6b0198cec3db4aa34691fa85ee0ee1bece0e /forms/source/component
parent88880bf821c53e843d4a5b0c8010c1a46b210cec (diff)
INTEGRATION: CWS internatiodel (1.37.46); FILE MERGED
2006/02/10 19:31:14 er 1.37.46.1: #i52115# move LangIDs and ISO conversion from tools to i18npool; introduce class MsLangId and libi18nisolang
Diffstat (limited to 'forms/source/component')
-rw-r--r--forms/source/component/FormattedField.cxx25
1 files changed, 8 insertions, 17 deletions
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index c4650fb74f09..242a53ea5fbb 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: FormattedField.cxx,v $
*
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 22:40:35 $
+ * last change: $Author: vg $ $Date: 2006-04-07 15:23:00 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -81,8 +81,8 @@
#ifndef _SV_WINTYPES_HXX
#include <vcl/wintypes.hxx>
#endif
-#ifndef _ISOLANG_HXX
-#include <tools/isolang.hxx>
+#ifndef INCLUDED_I18NPOOL_MSLANGID_HXX
+#include <i18npool/mslangid.hxx>
#endif
#ifndef _RTL_TEXTENC_H
#include <rtl/textenc.h>
@@ -221,10 +221,10 @@ Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Referenc
if ( xSupplier.is() )
return xSupplier;
- // get the Office's UI locale
+ // get the Office's locale
const Locale& rSysLocale = SvtSysLocale().GetLocaleData().getLocale();
// translate
- eSysLanguage = ConvertIsoNamesToLanguage( rSysLocale.Language, rSysLocale.Country );
+ eSysLanguage = MsLangId::convertLocaleToLanguage( rSysLocale );
}
StandardFormatsSupplier* pSupplier = new StandardFormatsSupplier( _rxORB, eSysLanguage );
@@ -960,10 +960,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
if (isA(aLocale, static_cast<Locale*>(NULL)))
{
Locale* pLocale = (Locale*)aLocale.getValue();
- eFormatLanguage = ConvertIsoNamesToLanguage(
- ::rtl::OUStringToOString(pLocale->Language, RTL_TEXTENCODING_ASCII_US).getStr(),
- ::rtl::OUStringToOString(pLocale->Country, RTL_TEXTENCODING_ASCII_US).getStr()
- );
+ eFormatLanguage = MsLangId::convertLocaleToLanguage( *pLocale );
}
}
@@ -1047,13 +1044,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
if (xFormats.is())
{
- UniString sLanguage, sCountry;
- ConvertLanguageToIsoNames(eDescriptionLanguage, sLanguage, sCountry);
- Locale aDescriptionLanguage(
- sLanguage,
- sCountry,
- ::rtl::OUString()
- );
+ Locale aDescriptionLanguage( MsLangId::convertLanguageToLocale(eDescriptionLanguage));
nKey = xFormats->queryKey(sFormatDescription, aDescriptionLanguage, sal_False);
if (nKey == (sal_Int32)-1)