summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-07-13 02:54:05 +0200
committerEike Rathke <erack@redhat.com>2013-07-13 11:55:16 +0200
commit358d1a99484bcc02900bd200a7606a7bf3298cac (patch)
tree031f808141dbc712553b8a4a029a354a2699a622 /chart2
parent5d1a8e0d47b6d6e9e3e5735d0ee52fa0b4782202 (diff)
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
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/tools/CharacterProperties.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 40c79a3cb55d..ff8b8c9a167c 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -409,11 +409,11 @@ void CharacterProperties::AddDefaultsToMap(
using namespace ::com::sun::star::i18n::ScriptType;
LanguageType nLang;
- nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag(aDefaultLocale).getLanguageType( false), LATIN);
+ nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale, false), LATIN);
Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
- nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag( aDefaultLocale_CJK).getLanguageType( false), ASIAN);
+ nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CJK, false), ASIAN);
Font aFontCJK = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
- nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag( aDefaultLocale_CTL).getLanguageType( false), COMPLEX);
+ nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CTL, false), COMPLEX);
Font aFontCTL = OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetName() ) );