1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
36 * Thai character type definition.
39 #define CT_CTRL 0 // Control character
40 #define CT_NON 1 // Non-composible
41 #define CT_CONS 2 // Consonant
42 #define CT_LV 3 // Leading vowel
43 #define CT_FV1 4 // Following vowel
44 #define CT_FV2 5 // Following vowel
46 #define CT_BV1 7 // Below vowel
48 #define CT_BD 9 // Below diacritic
49 #define CT_TONE 10 // Tone
50 #define CT_AD1 11 // Above diacritic
53 #define CT_AV1 14 // Above vowel
59 static const sal_uInt16 thaiCT
[128] = { // Thai character type
60 CT_NON
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
,CT_CONS
, CT_CONS
, CT_CONS
, //0E00
61 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
,
62 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, //0E10
63 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
,
64 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_FV3
, CT_CONS
, CT_FV3
, CT_CONS
, //0E20
65 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_NON
,
66 CT_FV1
, CT_AV2
, CT_FV1
, CT_FV1
, CT_AV1
, CT_AV3
, CT_AV2
, CT_AV3
, //0E30
67 CT_BV1
, CT_BV2
, CT_BD
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
,
68 CT_LV
, CT_LV
, CT_LV
, CT_LV
, CT_LV
, CT_FV2
, CT_NON
, CT_AD2
, //0E40
69 CT_TONE
, CT_TONE
, CT_TONE
, CT_TONE
, CT_AD1
, CT_AD1
, CT_AD3
, CT_NON
,
70 CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, //0E50
71 CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_CTRL
};
73 #define getCharType(x) ((x >= 0x0E00 && x < 0x0E60) ? thaiCT[x - 0x0E00] : CT_NON)
77 #endif // _I18N_WTT_H_