21#include <com/sun/star/uno/Sequence.hxx>
31 if (0x30a0 <= inChar && inChar <= 0x30ff) {
32 sal_Int16
i = inChar - 0x3040;
42OUString widthfolding::decompose_ja_voiced_sound_marks (
const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
Sequence< sal_Int32 >* pOffset )
47 rtl_uString * newStr = rtl_uString_alloc(nCount * 2);
49 sal_Int32 *
p =
nullptr;
53 pOffset->realloc( nCount * 2 );
54 p = pOffset->getArray();
63 while (nCount -- > 0) {
69 if (0x30a0 <= c && c <= 0x30ff) {
70 int i =
int(c - 0x3040);
72 if (first != 0x0000) {
88 newStr->length = sal_Int32(dst - newStr->buffer);
90 pOffset->realloc(newStr->length);
91 return OUString(newStr, SAL_NO_ACQUIRE);
94oneToOneMapping& widthfolding::getfull2halfTable()
104OUString widthfolding::compose_ja_voiced_sound_marks (
const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
Sequence< sal_Int32 >* pOffset, sal_Int32 nFlags )
109 rtl_uString * newStr = rtl_uString_alloc(nCount);
112 const sal_Unicode* src = inStr.getStr() + startPos;
127 sal_Int32 *
p =
nullptr;
131 pOffset->realloc( nCount );
132 p = pOffset->getArray();
141 while (-- nCount > 0) {
142 currentChar = *src ++;
149 int j = currentChar - 0x3099;
151 if (2 <= j && j <= 3)
154 if (0 <= j && j <= 1) {
157 int i =
int(previousChar - 0x3040);
158 bool bCompose =
false;
173 previousChar = *src ++;
180 *dst ++ = previousChar;
181 previousChar = currentChar;
187 *dst ++ = previousChar;
192 newStr->length = sal_Int32(dst - newStr->buffer);
195 pOffset->realloc(newStr->length);
196 return OUString(newStr, SAL_NO_ACQUIRE);
199oneToOneMapping& widthfolding::gethalf2fullTable()
212oneToOneMapping& widthfolding::getfull2halfTableForASC()
220oneToOneMapping& widthfolding::gethalf2fullTableForJIS()
228oneToOneMapping& widthfolding::getfullKana2halfKanaTable()
235oneToOneMapping& widthfolding::gethalfKana2fullKanaTable()
constexpr OUStringLiteral first
UnicodePairWithFlag const half2full[]
const decomposition_table_entry_t decomposition_table[]
const sal_Unicode composition_table[][2]
UnicodePairWithFlag const full2half[]
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
sal_Unicode decomposited_character_1
sal_Unicode decomposited_character_2
#define WIDTHFOLDING_DONT_USE_COMBINED_VU
#define HALF2FULL_JIS_FUNCTION
#define FULL2HALF_ASC_FUNCTION
#define HALF2FULL_KATAKANA_ONLY
#define FULL2HALF_KATAKANA_ONLY