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) |
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) |
SVX_DLLPRIVATE void | InsertLanguage (const LanguageType nLangType, sal_Int16 nType) |
SVX_DLLPRIVATE int | ImplTypeToPos (LanguageType eType) const |
DECL_DLLPRIVATE_LINK (ChangeHdl, weld::ComboBox &, void) | |
Private Attributes | |
std::unique_ptr< weld::ComboBox > | m_xControl |
Link< weld::ComboBox &, void > | m_aChangeHdl |
OUString | m_aAllString |
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 454 of file langbox.cxx.
References LANGUAGE_DONTKNOW, LINK, m_xControl, and No.
|
private |
Definition at line 170 of file langbox.cxx.
References BuildEntry(), MsLangId::getReplacementForObsoleteLanguage(), ImplTypeToPos(), and weld::ComboBoxEntry::sString.
Referenced by SetLanguageList().
void SvxLanguageBox::append | ( | const LanguageType | eLangType, |
const OUString & | rStr | ||
) |
Definition at line 147 of file langbox.cxx.
References m_xControl.
|
private |
Definition at line 333 of file langbox.cxx.
References SvtLanguageTable::GetLanguageString(), LanguageTag::getLanguageType(), MsLangId::getReplacementForObsoleteLanguage(), LinguMgr::GetSpellChecker(), MsLangId::getSystemLanguage(), ImplTypeToPos(), LANGUAGE_NONE, LANGUAGE_SYSTEM, LANGUAGE_USER_SYSTEM_CONFIG, lcl_SeqHasLang(), m_aAllString, m_bHasLangNone, m_bLangNoneIsLangAll, m_bWithCheckmark, m_xSpellUsedLang, LanguageTag::makeFallback(), nType, and MsLangId::resolveSystemLanguageByScriptType().
Referenced by AddLanguages(), InsertLanguage(), and SetLanguageList().
|
inline |
Definition at line 89 of file langbox.hxx.
|
inline |
Definition at line 90 of file langbox.hxx.
References m_xControl.
|
private |
int SvxLanguageBox::find_id | ( | const LanguageType | eLangType | ) | const |
Definition at line 127 of file langbox.cxx.
References m_xControl.
|
inline |
Definition at line 111 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 101 of file langbox.hxx.
References m_xControl.
LanguageType SvxLanguageBox::get_active_id | ( | ) | const |
Definition at line 118 of file langbox.cxx.
References LANGUAGE_DONTKNOW, and m_xControl.
|
inline |
Definition at line 94 of file langbox.hxx.
|
inline |
Definition at line 103 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 113 of file langbox.hxx.
References m_xControl.
LanguageType SvxLanguageBox::get_id | ( | int | nPos | ) | const |
Definition at line 137 of file langbox.cxx.
References m_xControl, and pos.
|
inline |
Definition at line 93 of file langbox.hxx.
|
inline |
Definition at line 112 of file langbox.hxx.
References m_xControl, and nPos.
|
inline |
Definition at line 104 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 114 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 86 of file langbox.hxx.
|
inline |
Definition at line 91 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 95 of file langbox.hxx.
References m_xControl.
|
private |
Definition at line 312 of file langbox.cxx.
References eType, and m_xControl.
Referenced by AddLanguages(), BuildEntry(), SaveEditedAsEntry(), and set_active_id().
void SvxLanguageBox::InsertLanguage | ( | const LanguageType | nLangType | ) |
Definition at line 328 of file langbox.cxx.
References InsertLanguage().
|
private |
Definition at line 317 of file langbox.cxx.
References BuildEntry(), m_xControl, nType, weld::ComboBoxEntry::sId, weld::ComboBoxEntry::sImage, and weld::ComboBoxEntry::sString.
Referenced by InsertLanguage(), SaveEditedAsEntry(), and set_active_id().
void SvxLanguageBox::remove_id | ( | const LanguageType | eLangType | ) |
Definition at line 142 of file langbox.cxx.
References m_xControl.
|
inline |
Definition at line 92 of file langbox.hxx.
SvxLanguageBox * SvxLanguageBox::SaveEditedAsEntry | ( | SvxLanguageBox * | ppBoxes[3] | ) |
Definition at line 466 of file langbox.cxx.
References SvtLanguageTable::AddLanguageTag(), SvtLanguageTable::GetLanguageString(), LanguageTag::getLanguageType(), MsLangId::getScriptType(), SvtLanguageTable::HasLanguageType(), i, ImplTypeToPos(), InsertLanguage(), LANGUAGE_DONTKNOW, m_eEditedAndValid, m_xControl, nPos, SAL_WARN, and Valid.
|
inline |
Definition at line 100 of file langbox.hxx.
References m_xControl, and nPos.
void SvxLanguageBox::set_active_id | ( | const LanguageType | eLangType | ) |
Definition at line 152 of file langbox.cxx.
References MsLangId::getReplacementForObsoleteLanguage(), ImplTypeToPos(), InsertLanguage(), and m_xControl.
void SvxLanguageBox::set_id | ( | int | nPos, |
const LanguageType | eLangType | ||
) |
Definition at line 132 of file langbox.cxx.
References m_xControl, and pos.
|
inline |
Definition at line 99 of file langbox.hxx.
References m_xControl.
Definition at line 97 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 96 of file langbox.hxx.
References m_xControl.
|
inline |
Definition at line 98 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 195 of file langbox.cxx.
References AddLanguages(), aEntries, ALL, BuildEntry(), CJK, CTL, EMPTY, FBD_CHARS, LocaleDataWrapper::getInstalledLanguageTypes(), SvtLanguageTable::GetLanguageEntryCount(), SvtLanguageTable::GetLanguageTypeAtIndex(), LinguMgr::GetLngSvcMgr(), LinguMgr::GetSpellChecker(), MsLangId::hasForbiddenCharacters(), i, LANGUAGE_NONE, lcl_LocaleSeqToLangSeq(), lcl_SeqHasLang(), m_bHasLangNone, m_bLangNoneIsLangAll, m_bWithCheckmark, m_xControl, nCount, ONLY_KNOWN, SN_HYPHENATOR, SN_SPELLCHECKER, SN_THESAURUS, SPELL_USED, and WESTERN.
|
private |
Definition at line 62 of file langbox.hxx.
Referenced by BuildEntry().
|
private |
Definition at line 61 of file langbox.hxx.
|
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 68 of file langbox.hxx.
Referenced by BuildEntry(), and SetLanguageList().
|
private |
Definition at line 65 of file langbox.hxx.
Referenced by SaveEditedAsEntry().
|
private |
Definition at line 64 of file langbox.hxx.
|
private |
Definition at line 60 of file langbox.hxx.
Referenced by append(), find_id(), get_active_id(), get_id(), ImplTypeToPos(), InsertLanguage(), remove_id(), SaveEditedAsEntry(), set_active_id(), set_id(), SetLanguageList(), and SvxLanguageBox().
|
private |
Definition at line 63 of file langbox.hxx.
Referenced by BuildEntry().