diff -r eb1f2e154e89 -r f5a1e66df979 fep/aknfep/src/aknfepinputstatecandidatepinyinphrasecreation.cpp --- a/fep/aknfep/src/aknfepinputstatecandidatepinyinphrasecreation.cpp Tue Feb 02 01:02:04 2010 +0200 +++ b/fep/aknfep/src/aknfepinputstatecandidatepinyinphrasecreation.cpp Fri Feb 19 23:09:27 2010 +0200 @@ -209,7 +209,7 @@ // --------------------------------------------------------- // TBool TAknFepInputStateCandidatePinyinPhraseCreation::CommitInlineEEPL( const TDesC& aText ) - { + {//select from phrase candidates MAknFepUICtrlPinyinPopup* popup = UIContainer()->PinyinPopupWindow(); CDesCArrayFlat* keystrokeArray = popup->ShowKeystrokeArray(); CDesCArrayFlat* validKeystroke = popup->InEffectKeystrokeArray(); @@ -223,12 +223,22 @@ popup->SetPhraseCreationState( ETrue ); + //stroe spelling + CDesCArrayFlat* spellingArray = popup->PhoneticSpellingArray();//spelling array + TInt selection = popup->CurrentSelection();//selection index of spelling array + CDesCArrayFlat* chooseChineseCharacterArraySpelling = popup->ChooseChineseCharacterArraySpelling();//phrase spelling array + TInt delCount = chooseChineseCharacterArraySpelling->Count() - chooseChineseCharacterArray->Count(); + if(delCount > 0)//we can sure delCount>=0,impossible <0 + {//remove unwanted spelling + chooseChineseCharacterArraySpelling->Delete(chooseChineseCharacterArray->Count(),delCount); + } + chooseChineseCharacterArraySpelling->AppendL(spellingArray->MdcaPoint(selection)); + for ( TInt i = 0; i < keyCount; i++ ) { keystroke.Append( keystrokeArray->MdcaPoint( 0 ) ); keystrokeArray->Delete( 0 ); } - chooseChineseCharacterArray->AppendL( aText ); chooseChineseCharacterArrayKeystroke->AppendL( keystroke ); validKeystroke->Reset();