equal
deleted
inserted
replaced
83 TText CAknFepVietnameseToneManager::GetVowelWithToneMark() const |
83 TText CAknFepVietnameseToneManager::GetVowelWithToneMark() const |
84 { |
84 { |
85 // First vowel row lists those tone marks themselves |
85 // First vowel row lists those tone marks themselves |
86 return VietToneMatrix[iVowelIndex+1][iToneIndex]; |
86 return VietToneMatrix[iVowelIndex+1][iToneIndex]; |
87 } |
87 } |
|
88 |
|
89 void CAknFepVietnameseToneManager::StartKeyLooping(TInt aKey) |
|
90 { |
|
91 iLoopingKey = aKey; |
|
92 iIsKeyLooping = ETrue; |
|
93 iIsLoopingCombined = EFalse; |
|
94 } |
|
95 |
|
96 void CAknFepVietnameseToneManager::StopKeyLooping() |
|
97 { |
|
98 iLoopingKey = 0; |
|
99 iIsKeyLooping = EFalse; |
|
100 iIsLoopingCombined = EFalse; |
|
101 } |
|
102 |
|
103 TInt CAknFepVietnameseToneManager::ToneMarkIndex() const |
|
104 { |
|
105 const TText prevChr = iFepMan->PreviousChar(); |
|
106 |
|
107 // All tone mark is after number in product key mapping. |
|
108 // Notice: The order in product key mapping should be the same with in tone mark array. |
|
109 for (TUint i = 0; i < KNumberOfToneMarks; ++i) |
|
110 { |
|
111 TBuf<1> num; |
|
112 num.Num( i + 2 ); |
|
113 if (prevChr == num [0]) |
|
114 { |
|
115 return i; |
|
116 } |
|
117 } |
|
118 |
|
119 return KErrNotFound; |
|
120 } |
|
121 |
|
122 TBool CAknFepVietnameseToneManager::GetLoopingToneMarkVowel( TText& aText ) const |
|
123 { |
|
124 const TText prev2prevChr = iFepMan->PreviousToPreviousChar( ETrue ); |
|
125 |
|
126 // Judge if the previous to previous Character is a vowel or not |
|
127 TInt vowelIndex = KErrNotFound; |
|
128 for (TUint i = 0; i < sizeof(VietVowelList) / sizeof(TText); ++i) |
|
129 { |
|
130 if ( prev2prevChr == VietVowelList[i] ) |
|
131 { |
|
132 vowelIndex = i; |
|
133 break; |
|
134 } |
|
135 } |
|
136 |
|
137 if (vowelIndex >= 0) |
|
138 { |
|
139 aText = VietToneMatrix[vowelIndex+1][ ToneMarkIndex() ]; |
|
140 return ETrue; |
|
141 } |
|
142 |
|
143 return EFalse; |
|
144 } |
|
145 |