#include <txencbox.hxx>


Public Member Functions | |
| SvxTextEncodingBox (Window *pParent, const ResId &rResId) | |
| ~SvxTextEncodingBox () | |
| void | FillFromTextEncodingTable (sal_Bool bExcludeImportSubsets=FALSE, 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. | |
| void | FillFromDbTextEncodingMap (sal_Bool bExcludeImportSubsets=FALSE, sal_uInt32 nExcludeInfoFlags=0, sal_uInt32 nButIncludeInfoFlags=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. | |
| void | FillWithMimeAndSelectBest () |
| Fill with all known MIME encodings and select the best according to <method>GetBestMimeEncoding</method>. | |
| const SvxTextEncodingTable * | GetTextEncodingTable () const |
| void | InsertTextEncoding (const rtl_TextEncoding nEnc, USHORT nPos=LISTBOX_APPEND) |
| void | InsertTextEncoding (const rtl_TextEncoding nEnc, const String &rEntry, USHORT nPos=LISTBOX_APPEND) |
| void | RemoveTextEncoding (const rtl_TextEncoding nEnc) |
| void | SelectTextEncoding (const rtl_TextEncoding nEnc, BOOL bSelect=TRUE) |
| rtl_TextEncoding | GetSelectTextEncoding () const |
| const String & | GetSelectTextString () const |
| BOOL | IsTextEncodingSelected (const rtl_TextEncoding nEnc) const |
Static Public Member Functions | |
| static rtl_TextEncoding | GetBestMimeEncoding () |
| Get the best MIME encoding matching the system locale, or if that isn't determinable one that matches the UI locale, or UTF8 if everything else fails. | |
Private Member Functions | |
| SVX_DLLPRIVATE USHORT | EncodingToPos_Impl (rtl_TextEncoding nEnc) const |
Private Attributes | |
| const SvxTextEncodingTable * | m_pEncTable |
Definition at line 40 of file txencbox.hxx.
| SvxTextEncodingBox::SvxTextEncodingBox | ( | Window * | pParent, | |
| const ResId & | rResId | |||
| ) |
| SvxTextEncodingBox::~SvxTextEncodingBox | ( | ) |
| USHORT SvxTextEncodingBox::EncodingToPos_Impl | ( | rtl_TextEncoding | nEnc | ) | const [private] |
Definition at line 60 of file txencbox.cxx.
References ListBox::GetEntryCount(), ListBox::GetEntryData(), and LISTBOX_ENTRY_NOTFOUND.
Referenced by IsTextEncodingSelected(), RemoveTextEncoding(), and SelectTextEncoding().
| void SvxTextEncodingBox::FillFromTextEncodingTable | ( | sal_Bool | bExcludeImportSubsets = FALSE, |
|
| 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
| bExcludeImportSubsets | If <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 73 of file txencbox.cxx.
References BOOL, FALSE, InsertTextEncoding(), m_pEncTable, and TRUE.
Referenced by FillWithMimeAndSelectBest().
| void SvxTextEncodingBox::FillFromDbTextEncodingMap | ( | sal_Bool | bExcludeImportSubsets = FALSE, |
|
| sal_uInt32 | nExcludeInfoFlags = 0, |
|||
| sal_uInt32 | nButIncludeInfoFlags = 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
| bExcludeImportSubsets | If <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 123 of file txencbox.cxx.
References BOOL, FALSE, svxform::ODataAccessCharsetHelper::getSupportedTextEncodings(), InsertTextEncoding(), and TRUE.
| void SvxTextEncodingBox::FillWithMimeAndSelectBest | ( | ) |
Fill with all known MIME encodings and select the best according to <method>GetBestMimeEncoding</method>.
Definition at line 204 of file txencbox.cxx.
References FillFromTextEncodingTable(), GetBestMimeEncoding(), and SelectTextEncoding().
Referenced by OfaHtmlTabPage::OfaHtmlTabPage().
| rtl_TextEncoding SvxTextEncodingBox::GetBestMimeEncoding | ( | ) | [static] |
Get the best MIME encoding matching the system locale, or if that isn't determinable one that matches the UI locale, or UTF8 if everything else fails.
Definition at line 179 of file txencbox.cxx.
References Application::GetSettings().
Referenced by FillWithMimeAndSelectBest(), and SvxHtmlOptions::GetTextEncoding().
| const SvxTextEncodingTable* SvxTextEncodingBox::GetTextEncodingTable | ( | ) | const [inline] |
Definition at line 104 of file txencbox.hxx.
| void SvxTextEncodingBox::InsertTextEncoding | ( | const rtl_TextEncoding | nEnc, | |
| USHORT | nPos = LISTBOX_APPEND | |||
| ) |
Definition at line 222 of file txencbox.cxx.
References SvxTextEncodingTable::GetTextString(), and m_pEncTable.
Referenced by FillFromDbTextEncodingMap(), and FillFromTextEncodingTable().
| void SvxTextEncodingBox::InsertTextEncoding | ( | const rtl_TextEncoding | nEnc, | |
| const String & | rEntry, | |||
| USHORT | nPos = LISTBOX_APPEND | |||
| ) |
Definition at line 213 of file txencbox.cxx.
References ListBox::InsertEntry(), and ListBox::SetEntryData().
| void SvxTextEncodingBox::RemoveTextEncoding | ( | const rtl_TextEncoding | nEnc | ) |
Definition at line 239 of file txencbox.cxx.
References EncodingToPos_Impl(), LISTBOX_ENTRY_NOTFOUND, and ListBox::RemoveEntry().
| void SvxTextEncodingBox::SelectTextEncoding | ( | const rtl_TextEncoding | nEnc, | |
| BOOL | bSelect = TRUE | |||
| ) |
Definition at line 261 of file txencbox.cxx.
References EncodingToPos_Impl(), LISTBOX_ENTRY_NOTFOUND, and ListBox::SelectEntryPos().
Referenced by FillWithMimeAndSelectBest(), and OfaHtmlTabPage::Reset().
| rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding | ( | ) | const |
Definition at line 249 of file txencbox.cxx.
References ListBox::GetEntryData(), ListBox::GetSelectEntryPos(), and LISTBOX_ENTRY_NOTFOUND.
Referenced by OfaHtmlTabPage::FillItemSet(), and OfaHtmlTabPage::Reset().
| const String& SvxTextEncodingBox::GetSelectTextString | ( | ) | const |
| BOOL SvxTextEncodingBox::IsTextEncodingSelected | ( | const rtl_TextEncoding | nEnc | ) | const |
Definition at line 271 of file txencbox.cxx.
References BOOL, EncodingToPos_Impl(), FALSE, ListBox::IsEntryPosSelected(), and LISTBOX_ENTRY_NOTFOUND.
const SvxTextEncodingTable* SvxTextEncodingBox::m_pEncTable [private] |
Definition at line 43 of file txencbox.hxx.
Referenced by FillFromTextEncodingTable(), InsertTextEncoding(), SvxTextEncodingBox(), and ~SvxTextEncodingBox().
1.5.6