21#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
53 sal_Int32 nStartPos,
const lang::Locale& rLocale,
54 sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone )
56 if (nCharacterIteratorMode == CharacterIteratorMode::SKIPCELL ) {
63 nCharacterIteratorMode,
nCount, nDone);
75 for (nDone = 0; nDone < nCount && nStartPos > 0; nDone++)
76 Text.iterateCodePoints(&nStartPos, -1);
83 sal_Int32 nStartPos,
const lang::Locale& rLocale,
84 sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone)
86 sal_Int32 len =
Text.getLength();
87 if (nCharacterIteratorMode == CharacterIteratorMode::SKIPCELL ) {
89 if (nStartPos < len) {
94 nCharacterIteratorMode,
nCount, nDone);
106 for (nDone = 0; nDone <
nCount && nStartPos <
Text.getLength(); nDone++)
107 Text.iterateCodePoints(&nStartPos);
115 const OUString& Text, sal_Int32 nStartPos,
116 const lang::Locale& rLocale, sal_Int32 nMinBreakPos,
117 const LineBreakHyphenationOptions& hOptions,
118 const LineBreakUserOptions& bOptions )
121 rLocale, nMinBreakPos, hOptions, bOptions );
122 if (lbr.breakIndex <
Text.getLength()) {
129#define SARA_AM 0x0E33
145 {
ST_NDP,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT },
146 {
ST_NDP,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT },
147 {
ST_NDP,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_NXT,
ST_COM,
ST_COM,
ST_COM,
ST_COM,
ST_COM,
ST_COM,
ST_COM,
ST_COM,
ST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Pos--;
212 sal_Int32 endPos = nStartPos;
213 while (endPos < len &&
is_Thai(str[endPos])) endPos++;
219 while (
pos < endPos) {
virtual sal_Int32 SAL_CALL previousCharacters(const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32 &nDone) override
virtual sal_Int32 SAL_CALL nextCharacters(const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32 &nDone) override
virtual css::i18n::LineBreakResults SAL_CALL getLineBreak(const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int32 nMinBreakPos, const css::i18n::LineBreakHyphenationOptions &hOptions, const css::i18n::LineBreakUserOptions &bOptions) override
const char * cBreakIterator
BreakIterator_th()
Constructor.
virtual sal_Int32 SAL_CALL previousCharacters(const OUString &text, sal_Int32 start, const css::lang::Locale &nLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count, sal_Int32 &nDone) override
virtual ~BreakIterator_th() override
Deconstructor.
virtual sal_Int32 SAL_CALL nextCharacters(const OUString &text, sal_Int32 start, const css::lang::Locale &rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count, sal_Int32 &nDone) override
void makeIndex(const OUString &text, sal_Int32 pos)
std::vector< sal_Int32 > m_aPreviousCellIndex
std::vector< sal_Int32 > m_aNextCellIndex
virtual css::i18n::LineBreakResults SAL_CALL getLineBreak(const OUString &Text, sal_Int32 nStartPos, const css::lang::Locale &nLocale, sal_Int32 nMinBreakPos, const css::i18n::LineBreakHyphenationOptions &hOptions, const css::i18n::LineBreakUserOptions &bOptions) override
Constant values shared between i18npool and, for example, the number formatter.
static sal_uInt16 getCombState(const sal_Unicode *text, sal_Int32 pos)
const sal_Int16 thaiCompRel[MAX_CT][MAX_CT]
static constexpr sal_uInt16 getCharType(sal_Unicode x)
static sal_Int32 getACell(const sal_Unicode *text, sal_Int32 pos, sal_Int32 len)
const sal_uInt32 is_ST_COM
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)