diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-06-05 17:31:34 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-06-06 11:54:03 +0200 |
commit | 1bdc67de20cf3090f07412513dfece356024ef0b (patch) | |
tree | 70f62b79fcb0e4b14c83931f2e543862a6f551e6 /svx/source/dialog | |
parent | 4c5438b2c447403194420b69311a81ea7d36e157 (diff) |
SvxLanguageBox::Store id from getReplacementForObsoleteLanguage
... not the original id passed to the function. Theese corrected ids
are used e.g. in set_active_id.
Change-Id: I9967d52ed2362ace947ea21f526c4c0694f14476
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/langbox.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 459e7db31033..8142f0425687 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -328,9 +328,9 @@ weld::ComboBoxEntry SvxLanguageBox::BuildEntry(const LanguageType nLangType, sal return weld::ComboBoxEntry(""); } - OUString aStrEntry = SvtLanguageTable::GetLanguageString( nLang ); - if (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll) - aStrEntry = m_aAllString; + OUString aStrEntry = (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll) + ? m_aAllString + : SvtLanguageTable::GetLanguageString(nLang); LanguageType nRealLang = nLang; if (nRealLang == LANGUAGE_SYSTEM) @@ -357,10 +357,10 @@ weld::ComboBoxEntry SvxLanguageBox::BuildEntry(const LanguageType nLangType, sal bool bFound = m_xSpellUsedLang && lcl_SeqHasLang(*m_xSpellUsedLang, static_cast<sal_uInt16>(nRealLang)); - return weld::ComboBoxEntry(aStrEntry, OUString::number(static_cast<sal_uInt16>(nLangType)), bFound ? OUString(RID_SVXBMP_CHECKED) : OUString(RID_SVXBMP_NOTCHECKED)); + return weld::ComboBoxEntry(aStrEntry, OUString::number(static_cast<sal_uInt16>(nLang)), bFound ? OUString(RID_SVXBMP_CHECKED) : OUString(RID_SVXBMP_NOTCHECKED)); } else - return weld::ComboBoxEntry(aStrEntry, OUString::number(static_cast<sal_uInt16>(nLangType))); + return weld::ComboBoxEntry(aStrEntry, OUString::number(static_cast<sal_uInt16>(nLang))); } IMPL_LINK(SvxLanguageBox, ChangeHdl, weld::ComboBox&, rControl, void) |