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  EditedAndValid {
  EditedAndValid::No,
  EditedAndValid::Valid,
  EditedAndValid::Invalid
}
 

Public Member Functions

 SvxLanguageBox (std::unique_ptr< weld::ComboBox > pControl)
 
void SetLanguageList (SvxLanguageListFlags nLangList, bool bHasLangNone, bool bLangNoneIsLangAll=false, bool bCheckSpellAvail=false)
 
void InsertLanguage (const LanguageType nLangType)
 
void InsertDefaultLanguage (sal_Int16 nType)
 
EditedAndValid GetEditedAndValid () const
 
sal_Int32 SaveEditedAsEntry ()
 
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 show ()
 
void hide ()
 
void set_visible (bool bShow)
 
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)
 
SVX_DLLPRIVATE void InsertLanguage (const LanguageType nLangType, sal_Int16 nType)
 
SVX_DLLPRIVATE int ImplTypeToPos (LanguageType eType) const
 
SVX_DLLPRIVATE void ImplClear ()
 
 DECL_LINK (ChangeHdl, weld::ComboBox &, void)
 

Private Attributes

std::unique_ptr< weld::ComboBoxm_xControl
 
Link< weld::ComboBox &, voidm_aChangeHdl
 
OUString const 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
 

Detailed Description

Definition at line 48 of file langbox.hxx.

Member Enumeration Documentation

Enumerator
No 
Valid 
Invalid 

Definition at line 51 of file langbox.hxx.

Constructor & Destructor Documentation

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

Definition at line 438 of file langbox.cxx.

References LANGUAGE_DONTKNOW, LINK, m_xControl, and No.

Member Function Documentation

void SvxLanguageBox::AddLanguages ( const std::vector< LanguageType > &  rLanguageTypes,
SvxLanguageListFlags  nLangList,
std::vector< weld::ComboBoxEntry > &  rEntries 
)
private
void SvxLanguageBox::append ( const LanguageType  eLangType,
const OUString &  rStr 
)

Definition at line 141 of file langbox.cxx.

References m_xControl.

weld::ComboBoxEntry SvxLanguageBox::BuildEntry ( const LanguageType  nLangType,
sal_Int16  nType = css::i18n::ScriptType::WEAK 
)
private
void SvxLanguageBox::connect_changed ( const Link< weld::ComboBox &, void > &  rLink)
inline

Definition at line 88 of file langbox.hxx.

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

Definition at line 89 of file langbox.hxx.

SvxLanguageBox::DECL_LINK ( ChangeHdl  ,
weld::ComboBox ,
void   
)
private
int SvxLanguageBox::find_id ( const LanguageType  eLangType) const

Definition at line 121 of file langbox.cxx.

References m_xControl.

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

Definition at line 109 of file langbox.hxx.

int SvxLanguageBox::get_active ( ) const
inline

Definition at line 99 of file langbox.hxx.

LanguageType SvxLanguageBox::get_active_id ( ) const

Definition at line 112 of file langbox.cxx.

References LANGUAGE_DONTKNOW, and m_xControl.

bool SvxLanguageBox::get_active_id_changed_from_saved ( ) const
inline

Definition at line 93 of file langbox.hxx.

OUString SvxLanguageBox::get_active_text ( ) const
inline

Definition at line 101 of file langbox.hxx.

int SvxLanguageBox::get_count ( ) const
inline

Definition at line 111 of file langbox.hxx.

LanguageType SvxLanguageBox::get_id ( int  nPos) const

Definition at line 131 of file langbox.cxx.

References m_xControl.

LanguageType SvxLanguageBox::get_saved_active_id ( ) const
inline

Definition at line 92 of file langbox.hxx.

OUString SvxLanguageBox::get_text ( int  nPos) const
inline

Definition at line 110 of file langbox.hxx.

bool SvxLanguageBox::get_visible ( ) const
inline

Definition at line 102 of file langbox.hxx.

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

Definition at line 112 of file langbox.hxx.

EditedAndValid SvxLanguageBox::GetEditedAndValid ( ) const
inline

Definition at line 85 of file langbox.hxx.

void SvxLanguageBox::grab_focus ( )
inline

Definition at line 90 of file langbox.hxx.

void SvxLanguageBox::hide ( )
inline

Definition at line 95 of file langbox.hxx.

void SvxLanguageBox::ImplClear ( )
private

Definition at line 189 of file langbox.cxx.

References m_xControl.

Referenced by SetLanguageList().

int SvxLanguageBox::ImplTypeToPos ( LanguageType  eType) const
private

Definition at line 293 of file langbox.cxx.

References m_xControl.

Referenced by AddLanguages(), BuildEntry(), SaveEditedAsEntry(), and set_active_id().

void SvxLanguageBox::InsertDefaultLanguage ( sal_Int16  nType)

Definition at line 314 of file langbox.cxx.

References InsertLanguage(), and LANGUAGE_SYSTEM.

void SvxLanguageBox::InsertLanguage ( const LanguageType  nLangType,
sal_Int16  nType 
)
private
void SvxLanguageBox::InsertLanguage ( const LanguageType  nLangType)

Definition at line 309 of file langbox.cxx.

References InsertLanguage().

void SvxLanguageBox::remove_id ( const LanguageType  eLangType)

Definition at line 136 of file langbox.cxx.

References m_xControl.

void SvxLanguageBox::save_active_id ( )
inline

Definition at line 91 of file langbox.hxx.

sal_Int32 SvxLanguageBox::SaveEditedAsEntry ( )
void SvxLanguageBox::set_active ( int  nPos)
inline

Definition at line 98 of file langbox.hxx.

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

Definition at line 126 of file langbox.cxx.

References m_xControl.

void SvxLanguageBox::set_sensitive ( bool  bSensitive)
inline

Definition at line 97 of file langbox.hxx.

void SvxLanguageBox::set_visible ( bool  bShow)
inline

Definition at line 96 of file langbox.hxx.

void SvxLanguageBox::SetLanguageList ( SvxLanguageListFlags  nLangList,
bool  bHasLangNone,
bool  bLangNoneIsLangAll = false,
bool  bCheckSpellAvail = false 
)
void SvxLanguageBox::show ( )
inline

Definition at line 94 of file langbox.hxx.

Member Data Documentation

OUString const SvxLanguageBox::m_aAllString
private

Definition at line 61 of file langbox.hxx.

Referenced by BuildEntry().

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

Definition at line 60 of file langbox.hxx.

bool SvxLanguageBox::m_bHasLangNone
private

Definition at line 65 of file langbox.hxx.

Referenced by BuildEntry(), and SetLanguageList().

bool SvxLanguageBox::m_bLangNoneIsLangAll
private

Definition at line 66 of file langbox.hxx.

Referenced by BuildEntry(), and SetLanguageList().

bool SvxLanguageBox::m_bWithCheckmark
private

Definition at line 67 of file langbox.hxx.

Referenced by BuildEntry(), and SetLanguageList().

EditedAndValid SvxLanguageBox::m_eEditedAndValid
private

Definition at line 64 of file langbox.hxx.

Referenced by SaveEditedAsEntry().

LanguageType SvxLanguageBox::m_eSavedLanguage
private

Definition at line 63 of file langbox.hxx.

std::unique_ptr<weld::ComboBox> SvxLanguageBox::m_xControl
private
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: