summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-06-05 14:25:52 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-06-05 20:26:27 +0200
commitee2d846031e9921c61ff1ff8399ed1fe9106c5fc (patch)
treea74974c96fc9a5ee7bc72bcdbe4a4880dfa101df /svx
parent496bd45f1e2f4c3dc90448d1adc81c5c29349f58 (diff)
Drop unneeded indirection
Change-Id: Ie837aec7e2b4b87665cc98200d38329ec2155c56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152614 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/langbox.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 4135964daa29..459e7db31033 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -305,20 +305,14 @@ void SvxLanguageBox::SetLanguageList(SvxLanguageListFlags nLangList, bool bHasLa
m_xControl->insert_vector(aEntries, true);
}
-void SvxLanguageBox::InsertLanguage(const LanguageType nLangType, sal_Int16 nType)
+void SvxLanguageBox::InsertLanguage(const LanguageType nLangType)
{
- weld::ComboBoxEntry aEntry = BuildEntry(nLangType, nType);
+ if (find_id(nLangType) != -1)
+ return;
+ weld::ComboBoxEntry aEntry = BuildEntry(nLangType);
if (aEntry.sString.isEmpty())
return;
- if (aEntry.sImage.isEmpty())
- m_xControl->append(aEntry.sId, aEntry.sString);
- else
- m_xControl->append(aEntry.sId, aEntry.sString, aEntry.sImage);
-}
-
-void SvxLanguageBox::InsertLanguage(const LanguageType nLangType)
-{
- InsertLanguage(nLangType, css::i18n::ScriptType::WEAK);
+ m_xControl->append(aEntry);
}
weld::ComboBoxEntry SvxLanguageBox::BuildEntry(const LanguageType nLangType, sal_Int16 nType)