summaryrefslogtreecommitdiff
path: root/padmin
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-03-29 14:07:33 +0100
committerEike Rathke <erack@redhat.com>2013-03-29 14:09:01 +0100
commit5be14df2444d9fcc3518c5f54872c87b924e3e98 (patch)
tree5a0b3b4b588469e9ff012c3a3328bdb224843160 /padmin
parentba4df3dd31ee9b2ced2a9119ecfd263e95de5ee6 (diff)
ResMgr with LanguageTag
Change-Id: Ie5ce9157a7ea59db7b0509fbaec61d07f8f9edf0
Diffstat (limited to 'padmin')
-rw-r--r--padmin/source/helper.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index 69c5631fa2e5..8e16ca406710 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -54,7 +54,7 @@ ResId padmin::PaResId( sal_uInt32 nId )
static ResMgr* pPaResMgr = NULL;
if( ! pPaResMgr )
{
- ::com::sun::star::lang::Locale aLocale;
+ LanguageTag aLanguageTag( LANGUAGE_SYSTEM);
utl::OConfigurationNode aNode =
utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
@@ -66,16 +66,12 @@ ResId padmin::PaResId( sal_uInt32 nId )
Any aValue = aNode.getNodeValue( OUString("ooLocale") );
if( aValue >>= aLoc )
{
- /* FIXME-BCP47: handle language tags! */
- sal_Int32 nIndex = 0;
- aLocale.Language = aLoc.getToken( 0, '-', nIndex );
- aLocale.Country = aLoc.getToken( 0, '-', nIndex );
- aLocale.Variant = aLoc.getToken( 0, '-', nIndex );
+ aLanguageTag.reset( aLoc);
}
}
- pPaResMgr = ResMgr::SearchCreateResMgr( "spa", aLocale );
+ pPaResMgr = ResMgr::SearchCreateResMgr( "spa", aLanguageTag );
AllSettings aSettings = Application::GetSettings();
- aSettings.SetUILanguageTag( LanguageTag( aLocale) );
+ aSettings.SetUILanguageTag( aLanguageTag );
Application::SetSettings( aSettings );
}
return ResId( nId, *pPaResMgr );