From 2b0a014dce8bf811d82fdfb3c287a6e9dfab95de Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 17 Nov 2012 02:00:31 +0100 Subject: use LanguageTag Change-Id: Ibe18dc1b768c928e8f53ff4bf98adab40d808025 --- svx/source/form/fmcontrollayout.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'svx') diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index f441deef1873..06e34f9bc0d0 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -41,6 +41,7 @@ #include #include +#include #include #include @@ -142,7 +143,7 @@ namespace svxform // determine the script type associated with the system locale const SvtSysLocale aSysLocale; const LocaleDataWrapper& rSysLocaleData = aSysLocale.GetLocaleData(); - const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( MsLangId::convertLocaleToLanguage( rSysLocaleData.getLocale() ) ); + const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( LanguageTag( rSysLocaleData.getLocale() ).getLanguageType() ); // depending on this script type, use the right property from the document's style which controls the // default locale for document content @@ -185,7 +186,7 @@ namespace svxform } // retrieve a default font for this locale, and set it at the control - Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, MsLangId::convertLocaleToLanguage( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE ); + Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, LanguageTag( aDocumentCharLocale ).getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE ); FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont ); _rxModel->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ), -- cgit