diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-04 19:42:16 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-04 20:32:59 +0200 |
commit | 6dfe34d6ff30bede5a17e27e02cdc0ca54c11325 (patch) | |
tree | 9d9a28ec211223ee48f0d4d6b793e21402f2ef57 /oox | |
parent | b5d481e2b96e2124021e6f80d2543a5904dad026 (diff) |
use LanguageTag
Change-Id: I16c1f5ba5a74858f01f5e62af2614beba608ef8c
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textcharacterproperties.cxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 11a551a5294b..8a12c629bd8c 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/awt/FontSlant.hpp> #include <com/sun/star/awt/FontWeight.hpp> +#include <i18nlangtag/languagetag.hxx> #include "oox/helper/helper.hxx" #include "oox/helper/propertyset.hxx" #include "oox/core/xmlfilterbase.hxx" @@ -93,17 +94,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil if( moLang.has() && !moLang.get().isEmpty() ) { - lang::Locale aLocale; - sal_Int32 nSepPos = moLang.get().indexOf( sal_Unicode( '-' ), 0 ); - if ( nSepPos >= 0 ) - { - aLocale.Language = moLang.get().copy( 0, nSepPos ); - aLocale.Country = moLang.get().copy( nSepPos + 1 ); - } - else - { - aLocale.Language = moLang.get(); - } + lang::Locale aLocale( LanguageTag( moLang.get()).getLocale()); rPropMap[ PROP_CharLocale ] <<= aLocale; rPropMap[ PROP_CharLocaleAsian ] <<= aLocale; rPropMap[ PROP_CharLocaleComplex ] <<= aLocale; |