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

#include <txencbox.hxx>

Public Member Functions

 SvxTextEncodingBox (std::unique_ptr< weld::ComboBox > pControl)
 
 ~SvxTextEncodingBox ()
 
void FillFromTextEncodingTable (bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags=0, sal_uInt32 nButIncludeInfoFlags=0)
 Fill with all known encodings but exclude those matching one or more given flags as defined in rtl/tencinfo.h. More...
 
void FillFromDbTextEncodingMap (bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags=0)
 Fill with all encodings known to the dbtools::OCharsetMap but exclude those matching one or more given flags as defined in rtl/tencinfo.h. More...
 
void FillWithMimeAndSelectBest ()
 Fill with all known MIME encodings and select the best according to <method>GetBestMimeEncoding</method> More...
 
void InsertTextEncoding (const rtl_TextEncoding nEnc)
 
void InsertTextEncoding (const rtl_TextEncoding nEnc, const OUString &rEntry)
 
void SelectTextEncoding (const rtl_TextEncoding nEnc)
 
rtl_TextEncoding GetSelectTextEncoding () const
 
void connect_changed (const Link< weld::ComboBox &, void > &rLink)
 
void set_sensitive (bool bSensitive)
 
void grab_focus ()
 
int get_active () const
 
void set_active (int nActive)
 
void show ()
 
void hide ()
 

Private Attributes

std::unique_ptr< weld::ComboBoxm_xControl
 

Detailed Description

Definition at line 26 of file txencbox.hxx.

Constructor & Destructor Documentation

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

Definition at line 119 of file txencbox.cxx.

References m_xControl.

SvxTextEncodingBox::~SvxTextEncodingBox ( )

Definition at line 131 of file txencbox.cxx.

Member Function Documentation

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

Definition at line 90 of file txencbox.hxx.

void SvxTextEncodingBox::FillFromDbTextEncodingMap ( bool  bExcludeImportSubsets,
sal_uInt32  nExcludeInfoFlags = 0 
)

Fill with all encodings known to the dbtools::OCharsetMap but exclude those matching one or more given flags as defined in rtl/tencinfo.h.

If nButIncludeInfoFlags is given, encodings are included even if they match nExcludeInfoFlags. Thus it is possible to exclude 16/32-bit Unicode with RTL_TEXTENCODING_INFO_UNICODE but to include UTF7 and UTF8 with RTL_TEXTENCODING_INFO_MIME

Parameters
bExcludeImportSubsetsIf <TRUE>, some specific encodings are not listed, as they are a subset of another encoding. This is the case for RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK, RTL_TEXTENCODING_MS_936, which are covered by RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to <TRUE> whenever the box is used in import dialogs.

Definition at line 99 of file txencbox.cxx.

References InsertTextEncoding(), and m_xControl.

void SvxTextEncodingBox::FillFromTextEncodingTable ( bool  bExcludeImportSubsets,
sal_uInt32  nExcludeInfoFlags = 0,
sal_uInt32  nButIncludeInfoFlags = 0 
)

Fill with all known encodings but exclude those matching one or more given flags as defined in rtl/tencinfo.h.

If nButIncludeInfoFlags is given, encodings are included even if they match nExcludeInfoFlags. Thus it is possible to exclude 16/32-bit Unicode with RTL_TEXTENCODING_INFO_UNICODE but to include UTF7 and UTF8 with RTL_TEXTENCODING_INFO_MIME

Parameters
bExcludeImportSubsetsIf <TRUE>, some specific encodings are not listed, as they are a subset of another encoding. This is the case for RTL_TEXTENCODING_GB_2312, RTL_TEXTENCODING_GBK, RTL_TEXTENCODING_MS_936, which are covered by RTL_TEXTENCODING_GB_18030. Normally, this flag should be set to <TRUE> whenever the box is used in import dialogs.

Definition at line 188 of file txencbox.cxx.

References first(), InsertTextEncoding(), m_xControl, and SvxResId().

Referenced by FillWithMimeAndSelectBest().

void SvxTextEncodingBox::FillWithMimeAndSelectBest ( )

Fill with all known MIME encodings and select the best according to <method>GetBestMimeEncoding</method>

Definition at line 215 of file txencbox.cxx.

References FillFromTextEncodingTable(), SvtSysLocale::GetBestMimeEncoding(), and SelectTextEncoding().

int SvxTextEncodingBox::get_active ( ) const
inline

Definition at line 93 of file txencbox.hxx.

rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding ( ) const

Definition at line 252 of file txencbox.cxx.

References m_xControl, and sId.

void SvxTextEncodingBox::grab_focus ( )
inline

Definition at line 92 of file txencbox.hxx.

void SvxTextEncodingBox::hide ( )
inline

Definition at line 96 of file txencbox.hxx.

void SvxTextEncodingBox::InsertTextEncoding ( const rtl_TextEncoding  nEnc)
void SvxTextEncodingBox::InsertTextEncoding ( const rtl_TextEncoding  nEnc,
const OUString &  rEntry 
)

Definition at line 222 of file txencbox.cxx.

References m_xControl.

void SvxTextEncodingBox::SelectTextEncoding ( const rtl_TextEncoding  nEnc)

Definition at line 270 of file txencbox.cxx.

References m_xControl.

Referenced by FillWithMimeAndSelectBest().

void SvxTextEncodingBox::set_active ( int  nActive)
inline

Definition at line 94 of file txencbox.hxx.

void SvxTextEncodingBox::set_sensitive ( bool  bSensitive)
inline

Definition at line 91 of file txencbox.hxx.

void SvxTextEncodingBox::show ( )
inline

Definition at line 95 of file txencbox.hxx.

Member Data Documentation

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

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