21#include <core_resource.hxx>
22#include <osl/diagnose.h>
24#include <rtl/tencinfo.h>
34 : m_aSystemDisplayName(
DBA_RES( STR_RSC_CHARSETS ))
43 if ( RTL_TEXTENCODING_DONTKNOW == _eEncoding )
73 rtl_TextEncoding eEncoding = RTL_TEXTENCODING_DONTKNOW;
77 OSL_ENSURE( RTL_TEXTENCODING_DONTKNOW != eEncoding,
78 "OCharsetDisplay::find: non-empty display name, but DONTKNOW!" );
86 ,m_sDisplayName(_rSource.m_sDisplayName)
92 ,m_sDisplayName(
std::move(_sDisplayName))
94 OSL_ENSURE( !
m_sDisplayName.isEmpty(),
"CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
99 :m_pContainer(_pContainer)
100 ,m_aPosition(
std::move(_aPosition))
102 OSL_ENSURE(
m_pContainer,
"OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!");
107 OSL_ENSURE( m_aPosition !=
m_pContainer->OCharsetDisplay_Base::end(),
"OCharsetDisplay::ExtendedCharsetIterator::operator* : invalid position!");
109 rtl_TextEncoding eEncoding = (*m_aPosition).getEncoding();
118 OSL_ENSURE( m_aPosition !=
m_pContainer->OCharsetDisplay_Base::end(),
"OCharsetDisplay::ExtendedCharsetIterator::operator++ : invalid position!");
119 if ( m_aPosition !=
m_pContainer->OCharsetDisplay_Base::end() )
static rtl_TextEncoding GetTextEncoding(const OUString &rStr)
static OUString GetTextString(const rtl_TextEncoding nEnc)
CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper &_rSource)
base_iterator m_aPosition
ExtendedCharsetIterator(const OCharsetDisplay *_pContainer, base_iterator _aPosition)
CharsetDisplayDerefHelper operator*() const
const OCharsetDisplay * m_pContainer
const ExtendedCharsetIterator & operator++()
prefix increment
container::CharsetIterator base_iterator
const_iterator findIanaName(std::u16string_view _rIanaName) const
const_iterator findEncoding(const rtl_TextEncoding _eEncoding) const
virtual bool approveEncoding(const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo &_rInfo) const override
OUString m_aSystemDisplayName
const_iterator findDisplayName(const OUString &_rDisplayName) const
ExtendedCharsetIterator const_iterator
const_iterator begin() const
get access to the first element of the charset collection
const_iterator end() const
get access to the (last + 1st) element of the charset collection