LibreOffice Module svx (master) 1
|
#include <langbox.hxx>
Public Types | |
enum class | EditedAndValid { No , Valid , Invalid } |
Public Member Functions | |
SvxLanguageBox (std::unique_ptr< weld::ComboBox > pControl) | |
void | SetLanguageList (SvxLanguageListFlags nLangList, bool bHasLangNone, bool bLangNoneIsLangAll=false, bool bCheckSpellAvail=false, bool bDefaultLangExist=false, LanguageType eDefaultLangType=LANGUAGE_NONE, sal_Int16 nDefaultType=0) |
void | InsertLanguage (const LanguageType nLangType) |
void | InsertLanguages (const std::vector< LanguageType > &rLanguageTypes) |
EditedAndValid | GetEditedAndValid () const |
SvxLanguageBox * | SaveEditedAsEntry (SvxLanguageBox *ppBoxes[3]) |
void | connect_changed (const Link< weld::ComboBox &, void > &rLink) |
void | connect_focus_in (const Link< weld::Widget &, void > &rLink) |
void | grab_focus () |
void | save_active_id () |
LanguageType | get_saved_active_id () const |
bool | get_active_id_changed_from_saved () const |
void | hide () |
void | set_visible (bool bShow) |
void | set_size_request (int nWidth, int nHeight) |
void | set_width_chars (int nChars) |
void | set_sensitive (bool bSensitive) |
void | set_active (int nPos) |
int | get_active () const |
void | set_active_id (const LanguageType eLangType) |
OUString | get_active_text () const |
bool | get_visible () const |
LanguageType | get_active_id () const |
int | find_id (const LanguageType eLangType) const |
LanguageType | get_id (int nPos) const |
void | set_id (int nPos, const LanguageType eLangType) |
void | remove_id (const LanguageType eLangType) |
void | append (const LanguageType eLangType, const OUString &rStr) |
int | find_text (const OUString &rStr) const |
OUString | get_text (int nPos) const |
int | get_count () const |
weld::ComboBox * | get_widget () |
Private Member Functions | |
SVX_DLLPRIVATE weld::ComboBoxEntry | BuildEntry (const LanguageType nLangType, sal_Int16 nType=css::i18n::ScriptType::WEAK) |
SVX_DLLPRIVATE void | AddLanguages (const std::vector< LanguageType > &rLanguageTypes, SvxLanguageListFlags nLangList, std::vector< weld::ComboBoxEntry > &rEntries, bool requireSublang) |
DECL_DLLPRIVATE_LINK (ChangeHdl, weld::ComboBox &, void) | |
Private Attributes | |
std::unique_ptr< weld::ComboBox > | m_xControl |
Link< weld::ComboBox &, void > | m_aChangeHdl |
std::unique_ptr< css::uno::Sequence< sal_Int16 > > | m_xSpellUsedLang |
LanguageType | m_eSavedLanguage |
EditedAndValid | m_eEditedAndValid |
bool | m_bHasLangNone |
bool | m_bLangNoneIsLangAll |
bool | m_bWithCheckmark |
Definition at line 48 of file langbox.hxx.
|
strong |
Enumerator | |
---|---|
No | |
Valid | |
Invalid |
Definition at line 52 of file langbox.hxx.
SvxLanguageBox::SvxLanguageBox | ( | std::unique_ptr< weld::ComboBox > | pControl | ) |
Definition at line 473 of file langbox.cxx.
References LANGUAGE_DONTKNOW, LINK, m_xControl, and No.
|
private |
Definition at line 169 of file langbox.cxx.
References BuildEntry(), find_id(), MsLangId::getReplacementForObsoleteLanguage(), and weld::ComboBoxEntry::sString.
Referenced by InsertLanguages(), and SetLanguageList().
void SvxLanguageBox::append | ( | const LanguageType | eLangType, |
const OUString & | rStr | ||
) |
Definition at line 146 of file langbox.cxx.
References m_xControl.
|
private |
Definition at line 352 of file langbox.cxx.
References find_id(), SvtLanguageTable::GetLanguageString(), LanguageTag::getLanguageType(), MsLangId::getReplacementForObsoleteLanguage(), LinguMgr::GetSpellChecker(), MsLangId::getSystemLanguage(), LANGUAGE_NONE, LANGUAGE_SYSTEM, LANGUAGE_USER_SYSTEM_CONFIG, lcl_SeqHasLang(), m_bHasLangNone, m_bLangNoneIsLangAll, m_bWithCheckmark, m_xSpellUsedLang, LanguageTag::makeFallback(), nType, MsLangId::resolveSystemLanguageByScriptType(), and SvxResId().
Referenced by AddLanguages(), InsertLanguage(), and SetLanguageList().
|
inline |
Definition at line 87 of file langbox.hxx.
|
inline |
Definition at line 88 of file langbox.hxx.
References m_xControl.
|
private |
int SvxLanguageBox::find_id | ( | const LanguageType | eLangType | ) | const |
Definition at line 126 of file langbox.cxx.
References m_xControl.
Referenced by AddLanguages(), BuildEntry(), InsertLanguage(), SaveEditedAsEntry(), and set_active_id().
|
inline |
Definition at line 109 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 99 of file langbox.hxx.
References m_xControl.
LanguageType SvxLanguageBox::get_active_id | ( | ) | const |
Definition at line 117 of file langbox.cxx.
References LANGUAGE_DONTKNOW, and m_xControl.
|
inline |
Definition at line 92 of file langbox.hxx.
|
inline |
Definition at line 101 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 111 of file langbox.hxx.
References m_xControl.
LanguageType SvxLanguageBox::get_id | ( | int | nPos | ) | const |
Definition at line 136 of file langbox.cxx.
References m_xControl, and pos.
|
inline |
Definition at line 91 of file langbox.hxx.
|
inline |
Definition at line 110 of file langbox.hxx.
References m_xControl, and nPos.
|
inline |
Definition at line 102 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 112 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 84 of file langbox.hxx.
|
inline |
Definition at line 89 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 93 of file langbox.hxx.
References m_xControl.
void SvxLanguageBox::InsertLanguage | ( | const LanguageType | nLangType | ) |
Definition at line 334 of file langbox.cxx.
References BuildEntry(), find_id(), m_xControl, and weld::ComboBoxEntry::sString.
Referenced by SaveEditedAsEntry(), and set_active_id().
void SvxLanguageBox::InsertLanguages | ( | const std::vector< LanguageType > & | rLanguageTypes | ) |
Definition at line 344 of file langbox.cxx.
References AddLanguages(), ALL, m_xControl, and SortLanguages().
void SvxLanguageBox::remove_id | ( | const LanguageType | eLangType | ) |
Definition at line 141 of file langbox.cxx.
References m_xControl.
|
inline |
Definition at line 90 of file langbox.hxx.
SvxLanguageBox * SvxLanguageBox::SaveEditedAsEntry | ( | SvxLanguageBox * | ppBoxes[3] | ) |
Definition at line 484 of file langbox.cxx.
References SvtLanguageTable::AddLanguageTag(), find_id(), SvtLanguageTable::GetLanguageString(), LanguageTag::getLanguageType(), MsLangId::getScriptType(), SvtLanguageTable::HasLanguageType(), i, InsertLanguage(), LANGUAGE_DONTKNOW, m_eEditedAndValid, m_xControl, nPos, SAL_WARN, and Valid.
|
inline |
Definition at line 98 of file langbox.hxx.
References m_xControl, and nPos.
void SvxLanguageBox::set_active_id | ( | const LanguageType | eLangType | ) |
Definition at line 151 of file langbox.cxx.
References find_id(), MsLangId::getReplacementForObsoleteLanguage(), InsertLanguage(), and m_xControl.
void SvxLanguageBox::set_id | ( | int | nPos, |
const LanguageType | eLangType | ||
) |
Definition at line 131 of file langbox.cxx.
References m_xControl, and pos.
|
inline |
Definition at line 97 of file langbox.hxx.
References m_xControl.
Definition at line 95 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 94 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 96 of file langbox.hxx.
References m_xControl.
void SvxLanguageBox::SetLanguageList | ( | SvxLanguageListFlags | nLangList, |
bool | bHasLangNone, | ||
bool | bLangNoneIsLangAll = false , |
||
bool | bCheckSpellAvail = false , |
||
bool | bDefaultLangExist = false , |
||
LanguageType | eDefaultLangType = LANGUAGE_NONE , |
||
sal_Int16 | nDefaultType = 0 |
||
) |
Definition at line 233 of file langbox.cxx.
References AddLanguages(), aEntries, ALL, appendLocaleSeqToLangs(), BuildEntry(), CJK, CTL, EMPTY, FBD_CHARS, LocaleDataWrapper::getInstalledLanguageTypes(), SvtLanguageTable::GetLanguageEntryCount(), SvtLanguageTable::GetLanguageTypeAtIndex(), LinguMgr::GetLngSvcMgr(), LinguMgr::GetSpellChecker(), MsLangId::hasForbiddenCharacters(), i, LANGUAGE_NONE, lcl_SeqHasLang(), m_bHasLangNone, m_bLangNoneIsLangAll, m_bWithCheckmark, m_xControl, nCount, ONLY_KNOWN, SN_HYPHENATOR, SN_SPELLCHECKER, SN_THESAURUS, SortLanguages(), SPELL_USED, and WESTERN.
|
private |
Definition at line 61 of file langbox.hxx.
|
private |
Definition at line 65 of file langbox.hxx.
Referenced by BuildEntry(), and SetLanguageList().
|
private |
Definition at line 66 of file langbox.hxx.
Referenced by BuildEntry(), and SetLanguageList().
|
private |
Definition at line 67 of file langbox.hxx.
Referenced by BuildEntry(), and SetLanguageList().
|
private |
Definition at line 64 of file langbox.hxx.
Referenced by SaveEditedAsEntry().
|
private |
Definition at line 63 of file langbox.hxx.
|
private |
Definition at line 60 of file langbox.hxx.
Referenced by append(), find_id(), get_active_id(), get_id(), InsertLanguage(), InsertLanguages(), remove_id(), SaveEditedAsEntry(), set_active_id(), set_id(), SetLanguageList(), and SvxLanguageBox().
|
private |
Definition at line 62 of file langbox.hxx.
Referenced by BuildEntry().