equal
deleted
inserted
replaced
132 const TInt16 KStrokeUnicode = 0x2461; |
132 const TInt16 KStrokeUnicode = 0x2461; |
133 const TInt16 KZhuyinIndicator = 0x2462; |
133 const TInt16 KZhuyinIndicator = 0x2462; |
134 |
134 |
135 // Local method declarations. |
135 // Local method declarations. |
136 LOCAL_C TInt RemapVietnameseAccentedCharacter(TUint16 aChr); |
136 LOCAL_C TInt RemapVietnameseAccentedCharacter(TUint16 aChr); |
|
137 LOCAL_C TBool IsRegionalLang(TInt aVariantCode, TInt& aMainCode) |
|
138 { |
|
139 TBool ret = ETrue; |
|
140 switch(aVariantCode) |
|
141 { |
|
142 case ELangBrazilianPortuguese: |
|
143 aMainCode = ELangPortuguese; |
|
144 break; |
|
145 case ELangCanadianFrench: |
|
146 aMainCode = ELangFrench; |
|
147 break; |
|
148 case ELangLatinAmericanSpanish: |
|
149 aMainCode = ELangSpanish; |
|
150 break; |
|
151 case ELangEnglish_Taiwan: |
|
152 aMainCode = ELangEnglish; |
|
153 break; |
|
154 default: |
|
155 aMainCode = aVariantCode; |
|
156 ret = EFalse; |
|
157 } |
|
158 return ret; |
|
159 } |
|
160 LOCAL_C TBool AlreadyExistLang(CArrayPtrFlat<CPtiCoreLanguage>* aLangArray, TInt aLangCode) |
|
161 { |
|
162 if (aLangArray) |
|
163 { |
|
164 for (TInt i=0; i < aLangArray->Count(); i++) |
|
165 { |
|
166 if (aLangArray->At(i)->LanguageCode() == aLangCode) |
|
167 { |
|
168 return ETrue; |
|
169 } |
|
170 } |
|
171 } |
|
172 return EFalse; |
|
173 } |
137 const TUid KXt9ImplementationUid = {0x102830B9}; |
174 const TUid KXt9ImplementationUid = {0x102830B9}; |
138 |
175 |
139 // |
176 // |
140 // CPtiEngineImpl implementation |
177 // CPtiEngineImpl implementation |
141 // |
178 // |
285 } |
322 } |
286 } |
323 } |
287 #endif |
324 #endif |
288 for (TInt i = 0; i < count; i++) |
325 for (TInt i = 0; i < count; i++) |
289 { |
326 { |
|
327 TInt code = 0; |
290 if ((iLanguages->At(i)->LanguageCode() != ELangNumeric) |
328 if ((iLanguages->At(i)->LanguageCode() != ELangNumeric) |
291 #ifdef RD_HINDI_PHONETIC_INPUT |
329 #ifdef RD_HINDI_PHONETIC_INPUT |
292 && (iLanguages->At(i)->LanguageCode() != KLangHindiPhonetic) |
330 && (iLanguages->At(i)->LanguageCode() != KLangHindiPhonetic) |
293 #endif |
331 #endif |
294 ) |
332 ) |
295 { |
333 { |
296 aResult->AppendL(iLanguages->At(i)->LanguageCode()); |
334 if(IsRegionalLang(iLanguages->At(i)->LanguageCode(),code)) |
|
335 { |
|
336 if(AlreadyExistLang(iLanguages,code)) |
|
337 { |
|
338 continue; |
|
339 } |
|
340 } |
|
341 aResult->AppendL(code); |
297 #ifdef RD_HINDI_PHONETIC_INPUT |
342 #ifdef RD_HINDI_PHONETIC_INPUT |
298 if (iLanguages->At(i)->LanguageCode() == ELangHindi && isIndicPhoneticInputPresent) |
343 if (iLanguages->At(i)->LanguageCode() == ELangHindi && isIndicPhoneticInputPresent) |
299 aResult->AppendL(KLangHindiPhonetic); |
344 aResult->AppendL(KLangHindiPhonetic); |
300 #endif |
345 #endif |
301 } |
346 } |
2892 aResult.Reset(); |
2937 aResult.Reset(); |
2893 |
2938 |
2894 const TInt count = iLanguages->Count(); |
2939 const TInt count = iLanguages->Count(); |
2895 for (TInt i = 0; i < count; i++) |
2940 for (TInt i = 0; i < count; i++) |
2896 { |
2941 { |
|
2942 TInt code = 0; |
2897 if (iLanguages->At(i)->LanguageCode() != ELangNumeric) |
2943 if (iLanguages->At(i)->LanguageCode() != ELangNumeric) |
2898 { |
2944 { |
2899 aResult.AppendL(iLanguages->At(i)->LanguageCode()); |
2945 if(IsRegionalLang(iLanguages->At(i)->LanguageCode(),code)) |
2900 } |
2946 { |
2901 } |
2947 if(AlreadyExistLang(iLanguages,code)) |
|
2948 { |
|
2949 continue; |
|
2950 } |
|
2951 } |
|
2952 aResult.AppendL(code); |
|
2953 } |
|
2954 } |
2902 CleanupStack::Pop(); |
2955 CleanupStack::Pop(); |
2903 } |
2956 } |
2904 |
2957 |
2905 |
2958 |
2906 // --------------------------------------------------------------------------- |
2959 // --------------------------------------------------------------------------- |