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