diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-22 12:26:52 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-22 12:34:59 +0100 |
commit | 9955dbebbdf1b7d36fec272dfea46f57fab47e19 (patch) | |
tree | 80705ccc2382e7440ea76f62a544d64d12d1ce4f /vcl/source/window | |
parent | 9c5d6ea5efb5f56a4ac96b4a8505ed84abbbc6bf (diff) |
AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/mnemonic.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 |
6 files changed, 12 insertions, 10 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index e2fcca66d36c..463dad0187e4 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -132,7 +132,7 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri OUString sUri = sUIDir + sUIFile; - com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); bool bEN_US = aLocale.Language == "en" && aLocale.Country == "US" && aLocale.Variant.isEmpty(); if (!bEN_US) loadTranslations(aLocale, sUri); diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 11194b453a94..26f730016a15 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -417,7 +417,7 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni if ( !xCharClass.is() ) xCharClass = vcl::unohelper::CreateCharacterClassification(); - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILanguageTag().getLocale(); cCharCode = xCharClass->toUpper( rtl::OUString(cCharCode), 0, 1, rLocale )[0]; if ( i < nFormEnd ) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index b6606b365999..926438c17fc1 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -370,7 +370,8 @@ MenuItemData* MenuItemList::SearchItem( sal_Unicode mnUnicode = pData->aText.GetChar(n+1); Window* pDefWindow = ImplGetDefaultWindow(); if( ( pDefWindow - && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, Application::GetSettings().GetUILanguage(), mnKeyCode ) + && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, + Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode ) && aKeyCode.GetCode() == mnKeyCode.GetCode() ) || ( ascii @@ -430,7 +431,8 @@ size_t MenuItemList::GetItemCount( KeyCode aKeyCode ) const // so we have working shortcuts when ascii mnemonics are used Window* pDefWindow = ImplGetDefaultWindow(); if( ( pDefWindow - && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), Application::GetSettings().GetUILanguage(), mnKeyCode ) + && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), + Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode ) && aKeyCode.GetCode() == mnKeyCode.GetCode() ) || ( ascii diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx index da6394df0afc..877e1dd9d2d3 100644 --- a/vcl/source/window/mnemonic.cxx +++ b/vcl/source/window/mnemonic.cxx @@ -82,7 +82,7 @@ sal_Unicode MnemonicGenerator::ImplFindMnemonic( const XubString& rKey ) void MnemonicGenerator::RegisterMnemonic( const XubString& rKey ) { - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILanguageTag().getLocale(); uno::Reference < i18n::XCharacterClassification > xCharClass = GetCharClass(); // Don't crash even when we don't have access to i18n service @@ -128,7 +128,7 @@ sal_Bool MnemonicGenerator::CreateMnemonic( XubString& rKey ) if ( !rKey.Len() || ImplFindMnemonic( rKey ) ) return sal_False; - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILanguageTag().getLocale(); uno::Reference < i18n::XCharacterClassification > xCharClass = GetCharClass(); // Don't crash even when we don't have access to i18n service @@ -140,7 +140,7 @@ sal_Bool MnemonicGenerator::CreateMnemonic( XubString& rKey ) sal_Bool bChanged = sal_False; xub_StrLen nLen = aKey.Len(); - bool bCJK = MsLangId::isCJK(Application::GetSettings().GetUILanguage()); + bool bCJK = MsLangId::isCJK(Application::GetSettings().GetUILanguageTag().getLanguageType()); // #107889# in CJK versions ALL strings (even those that contain latin characters) // will get mnemonics in the form: xyz (M) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 22c35fa01282..db996f3e22c0 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -315,7 +315,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl if ( !bUseSystemFont ) { ImplInitFontList(); - String aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( rSettings.GetUILocale() ); + String aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( rSettings.GetUILanguageTag().getLocale() ); xub_StrLen nIndex = 0; while( nIndex != STRING_NOTFOUND ) { @@ -397,7 +397,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl // if the UI is korean, chinese or another locale // where the system font size is kown to be often too small to // generate readable fonts enforce a minimum font size of 9 points - bool bBrokenLangFontHeight = MsLangId::isCJK(Application::GetSettings().GetUILanguage()); + bool bBrokenLangFontHeight = MsLangId::isCJK(Application::GetSettings().GetUILanguageTag().getLanguageType()); if (bBrokenLangFontHeight) defFontheight = Max(9, defFontheight); diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index c0d013d9c518..318534a5a2aa 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -894,7 +894,7 @@ void Window::SetZoomedPointFont( const Font& rFont ) nType = DEFAULTFONT_FIXED; else nType = DEFAULTFONT_UI_SANS; - Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguage(), 0 ); + Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguageTag().getLanguageType(), 0 ); aFont.SetName( aTempFont.GetName() ); SetPointFont( aFont ); } |