LibreOffice Module svx (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SvxLanguageBox Class Reference

#include <langbox.hxx>

Collaboration diagram for SvxLanguageBox:
[legend]

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
 
SvxLanguageBoxSaveEditedAsEntry (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::ComboBoxget_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::ComboBoxm_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
 

Detailed Description

Definition at line 48 of file langbox.hxx.

Member Enumeration Documentation

◆ EditedAndValid

enum class SvxLanguageBox::EditedAndValid
strong
Enumerator
No 
Valid 
Invalid 

Definition at line 52 of file langbox.hxx.

Constructor & Destructor Documentation

◆ SvxLanguageBox()

SvxLanguageBox::SvxLanguageBox ( std::unique_ptr< weld::ComboBox pControl)

Definition at line 473 of file langbox.cxx.

References LANGUAGE_DONTKNOW, LINK, m_xControl, and No.

Member Function Documentation

◆ AddLanguages()

void SvxLanguageBox::AddLanguages ( const std::vector< LanguageType > &  rLanguageTypes,
SvxLanguageListFlags  nLangList,
std::vector< weld::ComboBoxEntry > &  rEntries,
bool  requireSublang 
)
private

◆ append()

void SvxLanguageBox::append ( const LanguageType  eLangType,
const OUString &  rStr 
)

Definition at line 146 of file langbox.cxx.

References m_xControl.

◆ BuildEntry()

weld::ComboBoxEntry SvxLanguageBox::BuildEntry ( const LanguageType  nLangType,
sal_Int16  nType = css::i18n::ScriptType::WEAK 
)
private

◆ connect_changed()

void SvxLanguageBox::connect_changed ( const Link< weld::ComboBox &, void > &  rLink)
inline

Definition at line 87 of file langbox.hxx.

◆ connect_focus_in()

void SvxLanguageBox::connect_focus_in ( const Link< weld::Widget &, void > &  rLink)
inline

Definition at line 88 of file langbox.hxx.

References m_xControl.

◆ DECL_DLLPRIVATE_LINK()

SvxLanguageBox::DECL_DLLPRIVATE_LINK ( ChangeHdl  ,
weld::ComboBox ,
void   
)
private

◆ find_id()

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().

◆ find_text()

int SvxLanguageBox::find_text ( const OUString &  rStr) const
inline

Definition at line 109 of file langbox.hxx.

References m_xControl.

◆ get_active()

int SvxLanguageBox::get_active ( ) const
inline

Definition at line 99 of file langbox.hxx.

References m_xControl.

◆ get_active_id()

LanguageType SvxLanguageBox::get_active_id ( ) const

Definition at line 117 of file langbox.cxx.

References LANGUAGE_DONTKNOW, and m_xControl.

◆ get_active_id_changed_from_saved()

bool SvxLanguageBox::get_active_id_changed_from_saved ( ) const
inline

Definition at line 92 of file langbox.hxx.

◆ get_active_text()

OUString SvxLanguageBox::get_active_text ( ) const
inline

Definition at line 101 of file langbox.hxx.

References m_xControl.

◆ get_count()

int SvxLanguageBox::get_count ( ) const
inline

Definition at line 111 of file langbox.hxx.

References m_xControl.

◆ get_id()

LanguageType SvxLanguageBox::get_id ( int  nPos) const

Definition at line 136 of file langbox.cxx.

References m_xControl, and pos.

◆ get_saved_active_id()

LanguageType SvxLanguageBox::get_saved_active_id ( ) const
inline

Definition at line 91 of file langbox.hxx.

◆ get_text()

OUString SvxLanguageBox::get_text ( int  nPos) const
inline

Definition at line 110 of file langbox.hxx.

References m_xControl, and nPos.

◆ get_visible()

bool SvxLanguageBox::get_visible ( ) const
inline

Definition at line 102 of file langbox.hxx.

References m_xControl.

◆ get_widget()

weld::ComboBox * SvxLanguageBox::get_widget ( )
inline

Definition at line 112 of file langbox.hxx.

References m_xControl.

◆ GetEditedAndValid()

EditedAndValid SvxLanguageBox::GetEditedAndValid ( ) const
inline

Definition at line 84 of file langbox.hxx.

◆ grab_focus()

void SvxLanguageBox::grab_focus ( )
inline

Definition at line 89 of file langbox.hxx.

References m_xControl.

◆ hide()

void SvxLanguageBox::hide ( )
inline

Definition at line 93 of file langbox.hxx.

References m_xControl.

◆ InsertLanguage()

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().

◆ InsertLanguages()

void SvxLanguageBox::InsertLanguages ( const std::vector< LanguageType > &  rLanguageTypes)

Definition at line 344 of file langbox.cxx.

References AddLanguages(), ALL, m_xControl, and SortLanguages().

◆ remove_id()

void SvxLanguageBox::remove_id ( const LanguageType  eLangType)

Definition at line 141 of file langbox.cxx.

References m_xControl.

◆ save_active_id()

void SvxLanguageBox::save_active_id ( )
inline

Definition at line 90 of file langbox.hxx.

◆ SaveEditedAsEntry()

SvxLanguageBox * SvxLanguageBox::SaveEditedAsEntry ( SvxLanguageBox ppBoxes[3])

◆ set_active()

void SvxLanguageBox::set_active ( int  nPos)
inline

Definition at line 98 of file langbox.hxx.

References m_xControl, and nPos.

◆ set_active_id()

void SvxLanguageBox::set_active_id ( const LanguageType  eLangType)

◆ set_id()

void SvxLanguageBox::set_id ( int  nPos,
const LanguageType  eLangType 
)

Definition at line 131 of file langbox.cxx.

References m_xControl, and pos.

◆ set_sensitive()

void SvxLanguageBox::set_sensitive ( bool  bSensitive)
inline

Definition at line 97 of file langbox.hxx.

References m_xControl.

◆ set_size_request()

void SvxLanguageBox::set_size_request ( int  nWidth,
int  nHeight 
)
inline

Definition at line 95 of file langbox.hxx.

References m_xControl.

◆ set_visible()

void SvxLanguageBox::set_visible ( bool  bShow)
inline

Definition at line 94 of file langbox.hxx.

References m_xControl.

◆ set_width_chars()

void SvxLanguageBox::set_width_chars ( int  nChars)
inline

Definition at line 96 of file langbox.hxx.

References m_xControl.

◆ SetLanguageList()

void SvxLanguageBox::SetLanguageList ( SvxLanguageListFlags  nLangList,
bool  bHasLangNone,
bool  bLangNoneIsLangAll = false,
bool  bCheckSpellAvail = false,
bool  bDefaultLangExist = false,
LanguageType  eDefaultLangType = LANGUAGE_NONE,
sal_Int16  nDefaultType = 0 
)

Member Data Documentation

◆ m_aChangeHdl

Link<weld::ComboBox&, void> SvxLanguageBox::m_aChangeHdl
private

Definition at line 61 of file langbox.hxx.

◆ m_bHasLangNone

bool SvxLanguageBox::m_bHasLangNone
private

Definition at line 65 of file langbox.hxx.

Referenced by BuildEntry(), and SetLanguageList().

◆ m_bLangNoneIsLangAll

bool SvxLanguageBox::m_bLangNoneIsLangAll
private

Definition at line 66 of file langbox.hxx.

Referenced by BuildEntry(), and SetLanguageList().

◆ m_bWithCheckmark

bool SvxLanguageBox::m_bWithCheckmark
private

Definition at line 67 of file langbox.hxx.

Referenced by BuildEntry(), and SetLanguageList().

◆ m_eEditedAndValid

EditedAndValid SvxLanguageBox::m_eEditedAndValid
private

Definition at line 64 of file langbox.hxx.

Referenced by SaveEditedAsEntry().

◆ m_eSavedLanguage

LanguageType SvxLanguageBox::m_eSavedLanguage
private

Definition at line 63 of file langbox.hxx.

◆ m_xControl

std::unique_ptr<weld::ComboBox> SvxLanguageBox::m_xControl
private

◆ m_xSpellUsedLang

std::unique_ptr<css::uno::Sequence<sal_Int16> > SvxLanguageBox::m_xSpellUsedLang
private

Definition at line 62 of file langbox.hxx.

Referenced by BuildEntry().


The documentation for this class was generated from the following files: