1*514f4c20SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*514f4c20SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*514f4c20SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*514f4c20SAndrew Rist * distributed with this work for additional information 6*514f4c20SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*514f4c20SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*514f4c20SAndrew Rist * "License"); you may not use this file except in compliance 9*514f4c20SAndrew Rist * with the License. You may obtain a copy of the License at 10*514f4c20SAndrew Rist * 11*514f4c20SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*514f4c20SAndrew Rist * 13*514f4c20SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*514f4c20SAndrew Rist * software distributed under the License is distributed on an 15*514f4c20SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*514f4c20SAndrew Rist * KIND, either express or implied. See the License for the 17*514f4c20SAndrew Rist * specific language governing permissions and limitations 18*514f4c20SAndrew Rist * under the License. 19*514f4c20SAndrew Rist * 20*514f4c20SAndrew Rist *************************************************************/ 21*514f4c20SAndrew Rist 22*514f4c20SAndrew Rist 23cdf0e10cSrcweir #ifndef _I18N_WTT_H_ 24cdf0e10cSrcweir #define _I18N_WTT_H_ 25cdf0e10cSrcweir 26cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace i18n { 27cdf0e10cSrcweir 28cdf0e10cSrcweir /* 29cdf0e10cSrcweir * Thai character type definition. 30cdf0e10cSrcweir */ 31cdf0e10cSrcweir 32cdf0e10cSrcweir #define CT_CTRL 0 // Control character 33cdf0e10cSrcweir #define CT_NON 1 // Non-composible 34cdf0e10cSrcweir #define CT_CONS 2 // Consonant 35cdf0e10cSrcweir #define CT_LV 3 // Leading vowel 36cdf0e10cSrcweir #define CT_FV1 4 // Following vowel 37cdf0e10cSrcweir #define CT_FV2 5 // Following vowel 38cdf0e10cSrcweir #define CT_FV3 6 39cdf0e10cSrcweir #define CT_BV1 7 // Below vowel 40cdf0e10cSrcweir #define CT_BV2 8 41cdf0e10cSrcweir #define CT_BD 9 // Below diacritic 42cdf0e10cSrcweir #define CT_TONE 10 // Tone 43cdf0e10cSrcweir #define CT_AD1 11 // Above diacritic 44cdf0e10cSrcweir #define CT_AD2 12 45cdf0e10cSrcweir #define CT_AD3 13 46cdf0e10cSrcweir #define CT_AV1 14 // Above vowel 47cdf0e10cSrcweir #define CT_AV2 15 48cdf0e10cSrcweir #define CT_AV3 16 49cdf0e10cSrcweir 50cdf0e10cSrcweir #define MAX_CT 17 51cdf0e10cSrcweir 52cdf0e10cSrcweir static const sal_uInt16 thaiCT[128] = { // Thai character type 53cdf0e10cSrcweir CT_NON, CT_CONS, CT_CONS, CT_CONS, CT_CONS,CT_CONS, CT_CONS, CT_CONS, //0E00 54cdf0e10cSrcweir CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, 55cdf0e10cSrcweir CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, //0E10 56cdf0e10cSrcweir CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, 57cdf0e10cSrcweir CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_FV3, CT_CONS, CT_FV3, CT_CONS, //0E20 58cdf0e10cSrcweir CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_NON, 59cdf0e10cSrcweir CT_FV1, CT_AV2, CT_FV1, CT_FV1, CT_AV1, CT_AV3, CT_AV2, CT_AV3, //0E30 60cdf0e10cSrcweir CT_BV1, CT_BV2, CT_BD, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, 61cdf0e10cSrcweir CT_LV, CT_LV, CT_LV, CT_LV, CT_LV, CT_FV2, CT_NON, CT_AD2, //0E40 62cdf0e10cSrcweir CT_TONE, CT_TONE, CT_TONE, CT_TONE, CT_AD1, CT_AD1, CT_AD3, CT_NON, 63cdf0e10cSrcweir CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, //0E50 64cdf0e10cSrcweir CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_CTRL }; 65cdf0e10cSrcweir 66cdf0e10cSrcweir #define getCharType(x) ((x >= 0x0E00 && x < 0x0E60) ? thaiCT[x - 0x0E00] : CT_NON) 67cdf0e10cSrcweir 68cdf0e10cSrcweir } } } } 69cdf0e10cSrcweir 70cdf0e10cSrcweir #endif // _I18N_WTT_H_ 71