summaryrefslogtreecommitdiff
path: root/svx/source/dialog/langbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/langbox.cxx')
-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)