1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
31 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
34 * Thai character type definition.
37 #define CT_CTRL 0 // Control character
38 #define CT_NON 1 // Non-composible
39 #define CT_CONS 2 // Consonant
40 #define CT_LV 3 // Leading vowel
41 #define CT_FV1 4 // Following vowel
42 #define CT_FV2 5 // Following vowel
44 #define CT_BV1 7 // Below vowel
46 #define CT_BD 9 // Below diacritic
47 #define CT_TONE 10 // Tone
48 #define CT_AD1 11 // Above diacritic
51 #define CT_AV1 14 // Above vowel
57 static const sal_uInt16 thaiCT
[128] = { // Thai character type
58 CT_NON
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
,CT_CONS
, CT_CONS
, CT_CONS
, //0E00
59 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
,
60 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, //0E10
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_FV3
, CT_CONS
, CT_FV3
, CT_CONS
, //0E20
63 CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_CONS
, CT_NON
,
64 CT_FV1
, CT_AV2
, CT_FV1
, CT_FV1
, CT_AV1
, CT_AV3
, CT_AV2
, CT_AV3
, //0E30
65 CT_BV1
, CT_BV2
, CT_BD
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
,
66 CT_LV
, CT_LV
, CT_LV
, CT_LV
, CT_LV
, CT_FV2
, CT_NON
, CT_AD2
, //0E40
67 CT_TONE
, CT_TONE
, CT_TONE
, CT_TONE
, CT_AD1
, CT_AD1
, CT_AD3
, CT_NON
,
68 CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, //0E50
69 CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_NON
, CT_CTRL
};
71 #define getCharType(x) ((x >= 0x0E00 && x < 0x0E60) ? thaiCT[x - 0x0E00] : CT_NON)
75 #endif // _I18N_WTT_H_
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */