1b3b8c23bd
2005/09/05 17:47:29 rt 1.2.246.1: #i54170# Change license header: remove SISSL
82 lines
3.2 KiB
C++
82 lines
3.2 KiB
C++
/*************************************************************************
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* $RCSfile: wtt.h,v $
|
|
*
|
|
* $Revision: 1.3 $
|
|
*
|
|
* last change: $Author: rt $ $Date: 2005-09-07 16:59:38 $
|
|
*
|
|
* The Contents of this file are made available subject to
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
|
*
|
|
*
|
|
* GNU Lesser General Public License Version 2.1
|
|
* =============================================
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License version 2.1, as published by the Free Software Foundation.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
* MA 02111-1307 USA
|
|
*
|
|
************************************************************************/
|
|
#ifndef _I18N_WTT_H_
|
|
#define _I18N_WTT_H_
|
|
|
|
namespace com { namespace sun { namespace star { namespace i18n {
|
|
|
|
/*
|
|
* Thai character type definition.
|
|
*/
|
|
|
|
#define CT_CTRL 0 // Control character
|
|
#define CT_NON 1 // Non-composible
|
|
#define CT_CONS 2 // Consonant
|
|
#define CT_LV 3 // Leading vowel
|
|
#define CT_FV1 4 // Following vowel
|
|
#define CT_FV2 5 // Following vowel
|
|
#define CT_FV3 6
|
|
#define CT_BV1 7 // Below vowel
|
|
#define CT_BV2 8
|
|
#define CT_BD 9 // Below diacritic
|
|
#define CT_TONE 10 // Tone
|
|
#define CT_AD1 11 // Above diacritic
|
|
#define CT_AD2 12
|
|
#define CT_AD3 13
|
|
#define CT_AV1 14 // Above vowel
|
|
#define CT_AV2 15
|
|
#define CT_AV3 16
|
|
|
|
#define MAX_CT 17
|
|
|
|
static const sal_uInt16 thaiCT[128] = { // Thai character type
|
|
CT_NON, CT_CONS, CT_CONS, CT_CONS, CT_CONS,CT_CONS, CT_CONS, CT_CONS, //0E00
|
|
CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS,
|
|
CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, //0E10
|
|
CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS,
|
|
CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_FV3, CT_CONS, CT_FV3, CT_CONS, //0E20
|
|
CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_CONS, CT_NON,
|
|
CT_FV1, CT_AV2, CT_FV1, CT_FV1, CT_AV1, CT_AV3, CT_AV2, CT_AV3, //0E30
|
|
CT_BV1, CT_BV2, CT_BD, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON,
|
|
CT_LV, CT_LV, CT_LV, CT_LV, CT_LV, CT_FV2, CT_NON, CT_AD2, //0E40
|
|
CT_TONE, CT_TONE, CT_TONE, CT_TONE, CT_AD1, CT_AD1, CT_AD3, CT_NON,
|
|
CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, //0E50
|
|
CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_NON, CT_CTRL };
|
|
|
|
#define getCharType(x) ((x >= 0x0E00 && x < 0x0E60) ? thaiCT[x - 0x0E00] : CT_NON)
|
|
|
|
} } } }
|
|
|
|
#endif // _I18N_WTT_H_
|