summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-30 11:41:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-30 14:04:17 +0200
commit08101a1ab3b5d7c41488e93a2af518462286844f (patch)
treef0a944fb9af5fb4e064e3b274eb93872108714a7 /svx
parent30a75a8d3dcfcca2cf349d9df797ac0b1550eb5e (diff)
weld OfaLanguagesTabPage
Change-Id: Ib0938f0c9d810c0f851dd0180093aabb4babdc19 Reviewed-on: https://gerrit.libreoffice.org/76594 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/langbox.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index cd1f7ce8c77f..2ccfe16d6de4 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -19,7 +19,6 @@
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
-#include <com/sun/star/i18n/ScriptType.hpp>
#include <linguistic/misc.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
@@ -578,9 +577,9 @@ int LanguageBox::ImplTypeToPos(LanguageType eType) const
return m_xControl->find_id(OUString::number(static_cast<sal_uInt16>(eType)));
}
-void LanguageBox::InsertLanguage(const LanguageType nLangType)
+void LanguageBox::InsertLanguage(const LanguageType nLangType, sal_Int16 nType)
{
- weld::ComboBoxEntry aEntry = BuildEntry(nLangType);
+ weld::ComboBoxEntry aEntry = BuildEntry(nLangType, nType);
if (aEntry.sString.isEmpty())
return;
if (aEntry.sImage.isEmpty())
@@ -589,7 +588,17 @@ void LanguageBox::InsertLanguage(const LanguageType nLangType)
m_xControl->append(aEntry.sId, aEntry.sString, aEntry.sImage);
}
-weld::ComboBoxEntry LanguageBox::BuildEntry(const LanguageType nLangType)
+void LanguageBox::InsertLanguage(const LanguageType nLangType)
+{
+ InsertLanguage(nLangType, css::i18n::ScriptType::WEAK);
+}
+
+void LanguageBox::InsertDefaultLanguage(sal_Int16 nType)
+{
+ InsertLanguage(LANGUAGE_SYSTEM, nType);
+}
+
+weld::ComboBoxEntry LanguageBox::BuildEntry(const LanguageType nLangType, sal_Int16 nType)
{
LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage(nLangType);
// For obsolete and to be replaced languages check whether an entry of the
@@ -609,7 +618,7 @@ weld::ComboBoxEntry LanguageBox::BuildEntry(const LanguageType nLangType)
LanguageType nRealLang = nLang;
if (nRealLang == LANGUAGE_SYSTEM)
{
- nRealLang = MsLangId::resolveSystemLanguageByScriptType(nRealLang, css::i18n::ScriptType::WEAK);
+ nRealLang = MsLangId::resolveSystemLanguageByScriptType(nRealLang, nType);
aStrEntry += " - ";
aStrEntry += SvtLanguageTable::GetLanguageString( nRealLang );
}