SvxTextEncodingBox Class Reference

#include <txencbox.hxx>

Inheritance diagram for SvxTextEncodingBox:

Inheritance graph
[legend]
Collaboration diagram for SvxTextEncodingBox:

Collaboration graph
[legend]

List of all members.

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 SvxTextEncodingTableGetTextEncodingTable () 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 SvxTextEncodingTablem_pEncTable


Detailed Description

Definition at line 40 of file txencbox.hxx.


Constructor & Destructor Documentation

SvxTextEncodingBox::SvxTextEncodingBox ( Window pParent,
const ResId &  rResId 
)

Definition at line 44 of file txencbox.cxx.

References m_pEncTable.

SvxTextEncodingBox::~SvxTextEncodingBox (  ) 

Definition at line 53 of file txencbox.cxx.

References m_pEncTable.


Member Function Documentation

USHORT SvxTextEncodingBox::EncodingToPos_Impl ( rtl_TextEncoding  nEnc  )  const [private]

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

Parameters:
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

Parameters:
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 
)

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  ) 

void SvxTextEncodingBox::SelectTextEncoding ( const rtl_TextEncoding  nEnc,
BOOL  bSelect = TRUE 
)

rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding (  )  const

const String& SvxTextEncodingBox::GetSelectTextString (  )  const

BOOL SvxTextEncodingBox::IsTextEncodingSelected ( const rtl_TextEncoding  nEnc  )  const


Member Data Documentation


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

Generated on Thu Apr 29 15:54:49 2010 for ooo-build Module svx (ooo/OOO320_m15) by  doxygen 1.5.6