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