diff options
author | Rob Snelders <programming@ertai.nl> | 2012-07-08 20:51:13 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-07-09 12:40:32 +0200 |
commit | 860b321d81633268e4b80b8fe10b73df615c28ae (patch) | |
tree | 71e7f6bb6b772f90166a1e1cdbf24a5f5801d485 | |
parent | c3b6e14db7a8134a49da7bdb12d351cddcc866d5 (diff) |
- fdo#45830 - Language/User Interface: current choice indicated as default
Change-Id: I3ac2e8e3219c12be84ce38cb98342f0dce0d6476
-rw-r--r-- | cui/source/options/optgdlg.cxx | 6 | ||||
-rw-r--r-- | svtools/source/misc/langtab.src | 1 | ||||
-rw-r--r-- | svx/inc/svx/langbox.hxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/langbox.cxx | 11 |
4 files changed, 16 insertions, 3 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index b8cc40f41dd1..72e66d2b919f 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1355,7 +1355,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe aComplexLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::COMPLEX ); aLocaleSettingLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_False, sal_False, sal_False); - aLocaleSettingLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::WEAK ); + aLocaleSettingLB.InsertSystemLanguage( ); const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable(); const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM ); @@ -1697,7 +1697,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) if ( !sLang.isEmpty() ) aLocaleSettingLB.SelectLanguage(lcl_LangStringToLangType(sLang)); else - aLocaleSettingLB.SelectLanguage( LANGUAGE_SYSTEM ); + aLocaleSettingLB.SelectLanguage( LANGUAGE_USER_SYSTEM_CONFIG ); sal_Bool bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_LOCALE); aLocaleSettingLB.Enable(!bReadonly); aLocaleSettingFT.Enable(!bReadonly); @@ -1904,7 +1904,7 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox ) } sal_uInt16 nPos; - if ( eLang == LANGUAGE_SYSTEM ) + if ( eLang == LANGUAGE_USER_SYSTEM_CONFIG ) nPos = aCurrencyLB.GetEntryPos( (void*) NULL ); else { diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 6ddac9eb418d..5ac0a0dfbe27 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -41,6 +41,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "[None]" ; LANGUAGE_NONE ; > ; < "Unknown" ; LANGUAGE_DONTKNOW ; > ; < "Default" ; LANGUAGE_SYSTEM ; > ; + < "Default" ; LANGUAGE_USER_SYSTEM_CONFIG ; > ; < "Afrikaans (South Africa)" ; LANGUAGE_AFRIKAANS ; > ; < "Albanian" ; LANGUAGE_ALBANIAN ; > ; < "Arabic" ; LANGUAGE_ARABIC_PRIMARY_ONLY ; > ; diff --git a/svx/inc/svx/langbox.hxx b/svx/inc/svx/langbox.hxx index 7baf253e01f6..37a7699ed51f 100644 --- a/svx/inc/svx/langbox.hxx +++ b/svx/inc/svx/langbox.hxx @@ -89,6 +89,7 @@ public: sal_uInt16 InsertLanguage( const LanguageType eLangType, sal_uInt16 nPos = LISTBOX_APPEND ); sal_uInt16 InsertDefaultLanguage( sal_Int16 nType, sal_uInt16 nPos = LISTBOX_APPEND ); + sal_uInt16 InsertSystemLanguage( sal_uInt16 nPos = LISTBOX_APPEND ); sal_uInt16 InsertLanguage( const LanguageType eLangType, sal_Bool bCheckEntry, sal_uInt16 nPos = LISTBOX_APPEND ); void RemoveLanguage( const LanguageType eLangType ); diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 0ec2329c4303..ff08724b4058 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -352,6 +352,10 @@ sal_uInt16 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal nRealLang = MsLangId::resolveSystemLanguageByScriptType(nRealLang, nType); aStrEntry.AppendAscii(" - "); aStrEntry.Append(m_pLangTable->GetString( nRealLang )); + } else if (nRealLang == LANGUAGE_USER_SYSTEM_CONFIG) { + nRealLang = MsLangId::getSystemLanguage(); + aStrEntry.AppendAscii(" - "); + aStrEntry.Append(m_pLangTable->GetString( nRealLang )); } aStrEntry = ApplyLreOrRleEmbedding( aStrEntry ); @@ -388,6 +392,13 @@ sal_uInt16 SvxLanguageBox::InsertDefaultLanguage( sal_Int16 nType, sal_uInt16 nP //------------------------------------------------------------------------ +sal_uInt16 SvxLanguageBox::InsertSystemLanguage( sal_uInt16 nPos ) +{ + return ImplInsertLanguage( LANGUAGE_USER_SYSTEM_CONFIG, nPos, ::com::sun::star::i18n::ScriptType::WEAK ); +} + +//------------------------------------------------------------------------ + sal_uInt16 SvxLanguageBox::InsertLanguage( const LanguageType nLangType, sal_Bool bCheckEntry, sal_uInt16 nPos ) { |