xref: /trunk/main/i18npool/inc/textToPronounce_zh.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _I18N_TRANSLITERATION_TEXTTOPRONOUNCE_ZH_HXX_
24 #define _I18N_TRANSLITERATION_TEXTTOPRONOUNCE_ZH_HXX_
25 
26 #include <transliteration_Ignore.hxx>
27 #include <indexentrysupplier_asian.hxx>
28 
29 namespace com { namespace sun { namespace star { namespace i18n {
30 
31 class TextToPronounce_zh : public transliteration_Ignore
32 {
33 protected:
34         oslModule hModule;
35         sal_uInt16 **idx;
36         const sal_Unicode* SAL_CALL getPronounce(const sal_Unicode ch);
37 
38 public:
39         TextToPronounce_zh(const sal_Char* func_name);
40         ~TextToPronounce_zh();
41 
42         rtl::OUString SAL_CALL
43         folding(const rtl::OUString & inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 > & offset);
44 
45         sal_Int16 SAL_CALL getType();
46 
47         sal_Bool SAL_CALL
48         equals( const rtl::OUString & str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32 & nMatch1, const rtl::OUString & str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32 & nMatch2);
49 
50         rtl::OUString SAL_CALL
51         transliterateChar2String( sal_Unicode inChar);
52 
53         sal_Unicode SAL_CALL
54         transliterateChar2Char( sal_Unicode inChar);
55 };
56 
57 #define TRANSLITERATION_TextToPronounce_zh( name ) \
58 class name : public TextToPronounce_zh \
59 { \
60 public: \
61         name (); \
62 };
63 
64 #ifdef TRANSLITERATION_ALL
65 TRANSLITERATION_TextToPronounce_zh( TextToPinyin_zh_CN)
66 TRANSLITERATION_TextToPronounce_zh( TextToChuyin_zh_TW)
67 #endif
68 #undef TRANSLITERATION_TextToPronounce_zh
69 
70 } } } }
71 
72 #endif
73