fep/aknfep/src/AknFepManager.cpp
branchRCL_3
changeset 8 4eb1ae11334f
parent 7 6defe5d1bd39
child 9 e6a39382bb9c
equal deleted inserted replaced
7:6defe5d1bd39 8:4eb1ae11334f
  3377 
  3377 
  3378         if(lang == ELangTaiwanChinese||
  3378         if(lang == ELangTaiwanChinese||
  3379            lang == ELangHongKongChinese ||
  3379            lang == ELangHongKongChinese ||
  3380            lang == ELangPrcChinese)    
  3380            lang == ELangPrcChinese)    
  3381             {        
  3381             {        
  3382             if( iPtiEngine->CurrentLanguage()->LanguageCode()== ELangEnglish 
  3382             if( CurrentInputLangCode() == ELangEnglish 
  3383                 && IsFlagSet(EFlagQwertyShiftMode)
  3383                 && IsFlagSet(EFlagQwertyShiftMode)
  3384                 && !IsFlagSet(EFlagLongShiftKeyPress))
  3384                 && !IsFlagSet(EFlagLongShiftKeyPress))
  3385                 {
  3385                 {
  3386                 ClearFlag(EFlagQwertyShiftMode); 
  3386                 ClearFlag(EFlagQwertyShiftMode); 
  3387                 UpdateIndicators();  
  3387                 UpdateIndicators();  
  4089         CommitInlineEditL();
  4089         CommitInlineEditL();
  4090         HBufC* spell = iFepPluginManager->SpellTextInput();
  4090         HBufC* spell = iFepPluginManager->SpellTextInput();
  4091         
  4091         
  4092         iFepPluginManager->SetITUTSpellingStateL(EFalse); 
  4092         iFepPluginManager->SetITUTSpellingStateL(EFalse); 
  4093         iFepPluginManager->HideSpellEditor();
  4093         iFepPluginManager->HideSpellEditor();
       
  4094         iFepPluginManager->SetInSpellModeFlag( EFalse );
  4094         
  4095         
  4095         if (spell)
  4096         if (spell)
  4096             {
  4097             {
  4097             CleanupStack::PushL(spell);
  4098             CleanupStack::PushL(spell);
  4098             TPtr text = spell->Des();
  4099             TPtr text = spell->Des();
  4148 #ifdef RD_SCALABLE_UI_V2
  4149 #ifdef RD_SCALABLE_UI_V2
  4149     if (iFepPluginManager->IsSpellVisible())
  4150     if (iFepPluginManager->IsSpellVisible())
  4150         {
  4151         {
  4151         TRAP_IGNORE(iFepPluginManager->SetITUTSpellingStateL(EFalse)); 
  4152         TRAP_IGNORE(iFepPluginManager->SetITUTSpellingStateL(EFalse)); 
  4152         iFepPluginManager->HideSpellEditor();
  4153         iFepPluginManager->HideSpellEditor();
       
  4154         iFepPluginManager->SetInSpellModeFlag( EFalse );
  4153 
  4155 
  4154         TRAP_IGNORE(UpdateCbaL(NULL)); 
  4156         TRAP_IGNORE(UpdateCbaL(NULL)); 
  4155         if (iFepPluginManager->CaseUpdatesSupressed())
  4157         if (iFepPluginManager->CaseUpdatesSupressed())
  4156             {
  4158             {
  4157             SetFlag(EFlagSupressAutoUpdate);
  4159             SetFlag(EFlagSupressAutoUpdate);
  4652             iFepPluginManager->ResetMenuState();            
  4654             iFepPluginManager->ResetMenuState();            
  4653             }
  4655             }
  4654 #endif             
  4656 #endif             
  4655             break;
  4657             break;
  4656         case EAknCmdT9PredictiveEditWord:
  4658         case EAknCmdT9PredictiveEditWord:
  4657             SetStopProcessFocus(ETrue);
  4659             SetStopProcessFocus( ETrue, EFalse );
  4658             HandleChangeInFocus();
  4660             HandleChangeInFocus();
  4659 #ifdef RD_INTELLIGENT_TEXT_INPUT
  4661 #ifdef RD_INTELLIGENT_TEXT_INPUT
  4660                 RemoveSuggestedAdvanceCompletionL();
  4662                 RemoveSuggestedAdvanceCompletionL();
  4661 #endif // RD_INTELLIGENT_TEXT_INPUT   
  4663 #endif // RD_INTELLIGENT_TEXT_INPUT   
  4662             LaunchEditWordQueryL();
  4664             LaunchEditWordQueryL();
  5353         	{
  5355         	{
  5354             	// This part of code fixing TSW Errors
  5356             	// This part of code fixing TSW Errors
  5355             	// "Edit word" option is not available under edit menu in ITU-T mode.
  5357             	// "Edit word" option is not available under edit menu in ITU-T mode.
  5356             	// "Insert word" Should not be available QWERTY mode.
  5358             	// "Insert word" Should not be available QWERTY mode.
  5357           	if (IsKoreanInputLanguage() || 
  5359           	if (IsKoreanInputLanguage() || 
  5358                     iPtiEngine->CurrentLanguage()->LanguageCode() == ELangPrcChinese || 
  5360           			CurrentInputLangCode() == ELangPrcChinese || 
  5359                     iPtiEngine->CurrentLanguage()->LanguageCode() == ELangTaiwanChinese || 
  5361           			CurrentInputLangCode() == ELangTaiwanChinese || 
  5360                     iPtiEngine->CurrentLanguage()->LanguageCode() == ELangHongKongChinese  )
  5362           			CurrentInputLangCode() == ELangHongKongChinese  )
  5361           		{
  5363           		{
  5362           		// No text prediction for korean.
  5364           		// No text prediction for korean.
  5363           		aMenuPane->SetItemDimmed(EAknFepCmdPredActivate, ETrue );
  5365           		aMenuPane->SetItemDimmed(EAknFepCmdPredActivate, ETrue );
  5364           		aMenuPane->SetItemDimmed(EAknFepCmdPredDeactivate,ETrue );
  5366           		aMenuPane->SetItemDimmed(EAknFepCmdPredDeactivate,ETrue );
  5365                 aMenuPane->SetItemDimmed( EAknFepCmdPredSettings, ETrue );
  5367                 aMenuPane->SetItemDimmed( EAknFepCmdPredSettings, ETrue );
  7575     else if (!(iPermittedInputModes & editorMode))
  7577     else if (!(iPermittedInputModes & editorMode))
  7576         {
  7578         {
  7577         isModePermitted = EFalse;
  7579         isModePermitted = EFalse;
  7578         }
  7580         }
  7579     else if (((aMode == EPinyin) || (aMode == EZhuyin) || (aMode == EStroke) || (aMode == ECangJie)
  7581     else if (((aMode == EPinyin) || (aMode == EZhuyin) || (aMode == EStroke) || (aMode == ECangJie)
  7580         ||   (aMode == EHiraganaKanji) || (aMode == EKatakana)
  7582         ||   (aMode == EHiraganaKanji) || (aMode == EKatakana) || ( aMode == EHangul )
  7581         || (((aMode == ELatin) || (aMode == ENumber) || iMode == ENativeNumber ) && (iCharWidth == EFullWidthChar)))
  7583         || (((aMode == ELatin) || (aMode == ENumber) || iMode == ENativeNumber ) && (iCharWidth == EFullWidthChar)))
  7582         && (iAknEditorFlags & EAknEditorFlagLatinInputModesOnly))
  7584         && (iAknEditorFlags & EAknEditorFlagLatinInputModesOnly))
  7583         {
  7585         {
  7584         //the editor does not allow Chinese modes
  7586         //the editor does not allow Chinese modes
  7585         isModePermitted = EFalse;
  7587         isModePermitted = EFalse;
  8446                   // Predictive QWERTY (XT9) changes <----
  8448                   // Predictive QWERTY (XT9) changes <----
  8447                 TRAP_IGNORE(StartInlineEditL(iUncommittedText, aTextToUncommit,
  8449                 TRAP_IGNORE(StartInlineEditL(iUncommittedText, aTextToUncommit,
  8448                         aTextToUncommit.Length(), EFalse));
  8450                         aTextToUncommit.Length(), EFalse));
  8449 
  8451 
  8450     }
  8452     }
       
  8453 void CAknFepManager::GetCandidatesWithIndexL(CDesCArray* aArray,
       
  8454         TInt& aActiveIdx, TInt& aSecondaryIdx)
       
  8455     {
       
  8456 #ifndef RD_INTELLIGENT_TEXT_INPUT
       
  8457 	return;
       
  8458 #endif
       
  8459     aActiveIdx = -1;
       
  8460     aSecondaryIdx = -1;
       
  8461     iPtiEngine->HandleCommandL(
       
  8462             EPtiCommandUserActionGetCurrentIndexOfCandidates, &aActiveIdx);
       
  8463 
       
  8464     if (iKeyBackSpaceHit)
       
  8465         aSecondaryIdx = aActiveIdx;
       
  8466     else
       
  8467         iPtiEngine->HandleCommandL(
       
  8468                 EPtiCommandUserActionGetIndexOfSecondaryCandidate,
       
  8469                 &aSecondaryIdx);
       
  8470 
       
  8471     if (aArray == NULL || aActiveIdx == aSecondaryIdx)
       
  8472         return;
       
  8473 
       
  8474     iPtiEngine->GetCandidateListL(*aArray);
       
  8475     iPtiEngine->HandleCommandL(
       
  8476             EPtiCommandUserActionGetCurrentIndexOfCandidates, &aActiveIdx);
       
  8477     iPtiEngine->HandleCommandL(
       
  8478             EPtiCommandUserActionGetIndexOfSecondaryCandidate, &aSecondaryIdx);
       
  8479     }
       
  8480 
  8451 void CAknFepManager::ShowExactWordPopupIfNecessaryL()
  8481 void CAknFepManager::ShowExactWordPopupIfNecessaryL()
  8452     {
  8482     {
       
  8483     // Ok, I have to do it here, same logics are in
       
  8484     // TryPopExactWordInICFL and ShowExactWordPopupIfNecessaryL.
       
  8485     // the code follows the old code's logic: this is a
       
  8486     // equivalent of the OLD ShowExactWordPopupIfNecessaryL; but
       
  8487     // now I can call TryPopExactWordInICFL and 
       
  8488     // TryPopExactWordInOtherPlaceL directly after extracting them from
       
  8489     // the OLD ShowExactWordPopupIfNecessaryL.
  8453     iExactWordPopupContent->HidePopUp();
  8490     iExactWordPopupContent->HidePopUp();
  8454     
  8491     SendEventsToPluginManL(EPluginHideTooltip);
       
  8492     if (!iWesternPredictive || !IsFlagSet(EFlagInsideInlineEditingTransaction))
       
  8493         return;
       
  8494 
       
  8495     if (EPtiKeyboardHalfQwerty == KeyboardLayout())
       
  8496         {
       
  8497         if (IsFlagSet(CAknFepManager::EFlagNoMatches))
       
  8498             UpdateCbaL(R_AKNFEP_SOFTKEYS_SPELL_EMPTY);
       
  8499         return;
       
  8500         }
       
  8501 
       
  8502     TryPopExactWordInICFL();
       
  8503     if (iFepPluginManager && !iFepPluginManager->IsTooltipOpenOnFSQ())
       
  8504         TryPopExactWordInOtherPlaceL();
       
  8505     }
       
  8506 
       
  8507 void CAknFepManager::TryPopExactWordInICFL()
       
  8508     {
       
  8509 #ifndef RD_INTELLIGENT_TEXT_INPUT
       
  8510 	return;
       
  8511 #endif
       
  8512 	
  8455     // Before open tooltip,  
  8513     // Before open tooltip,  
  8456     // also need to check and close tooltip on it.
  8514     // also need to check and close tooltip on it.
  8457     SendEventsToPluginManL( EPluginHideTooltip );
  8515     SendEventsToPluginManL(EPluginHideTooltip);
  8458     
  8516     if (!iWesternPredictive || !IsFlagSet(EFlagInsideInlineEditingTransaction))
  8459     if ( iWesternPredictive && iQwertyInputMode 
  8517         return;
  8460     	 && IsFlagSet( EFlagInsideInlineEditingTransaction ) 
  8518 
  8461     	 && (EPtiKeyboardHalfQwerty != KeyboardLayout()))
  8519     TInt activeIdx, secondaryIdx;
  8462         {
  8520     GetCandidatesWithIndexL(NULL, activeIdx, secondaryIdx);
  8463         // In the proactive mode this popup is used to show the exact input if it differs from the
  8521     if (activeIdx == secondaryIdx)
  8464         // default candidate shown inline.
  8522         return;
  8465         // In the reactive mode it is used to show the best guess candidate if it differs from the
  8523 
  8466         // exact word shown inline.
  8524     CDesCArray* candidates = new (ELeave) CDesCArrayFlat(16);
  8467         
  8525     CleanupStack::PushL(candidates);
  8468         TInt activeIdx = KErrNotFound;
  8526     GetCandidatesWithIndexL(candidates, activeIdx, secondaryIdx);
  8469         TInt secondaryIdx = KErrNotFound;
  8527     CleanupStack::PopAndDestroy(candidates);
  8470                      
  8528     if (activeIdx == secondaryIdx)
  8471         iPtiEngine->HandleCommandL( EPtiCommandUserActionGetCurrentIndexOfCandidates, &activeIdx );
  8529         return;
  8472         iPtiEngine->HandleCommandL( EPtiCommandUserActionGetIndexOfSecondaryCandidate, 
  8530 
  8473         							&secondaryIdx );
  8531     if (iFepPluginManager)
  8474         
  8532         SendEventsToPluginManL(EPluginShowTooltip, secondaryIdx);
  8475         TBool popupBelowInline = EFalse; // ETrue -> popup is above inline editor                                                                   
  8533     }
  8476                 
  8534 
  8477        if(iKeyBackSpaceHit)
  8535 void CAknFepManager::TryPopExactWordInOtherPlaceL()
  8478     	    secondaryIdx = activeIdx;
  8536     {
  8479 
  8537 #ifndef RD_INTELLIGENT_TEXT_INPUT
  8480         if ( activeIdx  != secondaryIdx )
  8538 	return;
  8481             {
  8539 #endif
  8482             popupBelowInline = EFalse;
  8540 	
  8483             
  8541     iExactWordPopupContent->HidePopUp();
  8484             CDesCArray* candidates = new (ELeave) CDesCArrayFlat(16);
  8542     if (!iWesternPredictive || !IsFlagSet(EFlagInsideInlineEditingTransaction))
  8485             CleanupStack::PushL(candidates);
  8543         return;
  8486             GetCandidatesL(*candidates, activeIdx);
  8544     // In the proactive mode this popup is used to show the exact input if it differs from the
  8487             
  8545     // default candidate shown inline.
  8488             // There is a possibility that the secondary index of the candidate changes
  8546     // In the reactive mode it is used to show the best guess candidate if it differs from the
  8489             iPtiEngine->HandleCommandL( EPtiCommandUserActionGetIndexOfSecondaryCandidate, 
  8547     // exact word shown inline.
  8490                                         &secondaryIdx );
  8548 
  8491             // In case the active index and the secondary index is same, then we do not need to display the
  8549     TBool popupBelowInline = EFalse; // ETrue -> popup is above inline editor
  8492             // popup
  8550     TInt activeIdx, secondaryIdx;
  8493             if ( activeIdx  == secondaryIdx )
  8551     GetCandidatesWithIndexL(NULL, activeIdx, secondaryIdx);
  8494                 {
  8552     if (activeIdx == secondaryIdx)
  8495                 CleanupStack::PopAndDestroy(candidates);
  8553         return;
  8496                 return;
  8554 
  8497                 }
  8555     CDesCArray* candidates = new (ELeave) CDesCArrayFlat(16);
  8498             
  8556     CleanupStack::PushL(candidates);
  8499             TPtrC secondaryWord = (*candidates)[secondaryIdx];
  8557     GetCandidatesWithIndexL(candidates, activeIdx, secondaryIdx);
  8500             iExactWordPopupContent->SetTextL( secondaryWord );
  8558 
  8501             iExactWordPopupContent->SetArrowDirection( MAknFepUiWordPopupContent::EUpwards );
  8559     // In case the active index and the secondary index is same, 
  8502             CleanupStack::PopAndDestroy(candidates);
  8560     // then we do not need to display the popup
  8503 
  8561     if (activeIdx == secondaryIdx)
  8504             // Open FSQ tooltip if FSQ is opened
  8562         {
  8505      	    SendEventsToPluginManL( EPluginShowTooltip, secondaryIdx );
  8563         CleanupStack::PopAndDestroy(candidates);
  8506 
  8564         return;
  8507           
  8565         }
  8508             // For addtion of ITI features on FSQ.
  8566 
  8509             // Showing tooltip on avkon editor and FSQ ICF editor at same time probably 
  8567     TPtrC secondaryWord = (*candidates)[secondaryIdx];
  8510             // cause flicker problem. Add this condition to ensure not to show tooltip on
  8568     iExactWordPopupContent->SetTextL(secondaryWord);
  8511             // avkon editor when it is being displayed on FSQ.
  8569     iExactWordPopupContent->SetArrowDirection(
  8512             if ( iFepPluginManager && !( iFepPluginManager->IsTooltipOpenOnFSQ() ) )
  8570             MAknFepUiWordPopupContent::EUpwards);
  8513                 {
  8571     CleanupStack::PopAndDestroy(candidates);
  8514                 TPoint  popupTopRight;
  8572 
  8515                 TInt    height;
  8573     TPoint popupTopRight;
  8516                 TInt    ascent;
  8574     TInt height;
  8517                 TInt    documentOffset = iPtiEngine->CurrentWord().Length();
  8575     TInt ascent;
  8518                 
  8576     TInt documentOffset = iPtiEngine->CurrentWord().Length();
  8519                 GetScreenCoordinatesL(popupTopRight, height, ascent, documentOffset);
  8577 
  8520 
  8578     GetScreenCoordinatesL(popupTopRight, height, ascent, documentOffset);
  8521                 iExactWordPopupContent->UpdateContentSize();
  8579     iExactWordPopupContent->UpdateContentSize();
  8522 
  8580 
  8523                 TBool rightToLeftLang = IsRightToLeftParagraph( DocPos() );
  8581     TBool rightToLeftLang = IsRightToLeftParagraph(DocPos());
  8524                 if ( !rightToLeftLang )
  8582     if (!rightToLeftLang)
  8525                     {
  8583         {
  8526                     popupTopRight.iX += iExactWordPopupContent->Size().iWidth;       
  8584         popupTopRight.iX += iExactWordPopupContent->Size().iWidth;
  8527                     }
  8585         }
  8528                     
  8586 
  8529                 if ( popupBelowInline )
  8587     if (popupBelowInline)
  8530                     {
  8588         {
  8531                     popupTopRight.iY += ascent / 2;                                   
  8589         popupTopRight.iY += ascent / 2;
  8532                     }
  8590         }
  8533                 else
  8591     else
  8534                     {
  8592         {
  8535                     popupTopRight.iY -= height + iExactWordPopupContent->Size().iHeight;
  8593         popupTopRight.iY -= height + iExactWordPopupContent->Size().iHeight;
  8536                     }
  8594         }
  8537                     
  8595 
  8538                 iExactWordPopupContent->SetPosition( popupTopRight );
  8596     iExactWordPopupContent->SetPosition(popupTopRight);
  8539                 iExactWordPopupContent->ShowPopUp();         
  8597     iExactWordPopupContent->ShowPopUp();
  8540                 }                
       
  8541             }  
       
  8542         }
       
  8543 		else if(iWesternPredictive 
       
  8544     	 && IsFlagSet( EFlagInsideInlineEditingTransaction ) 
       
  8545     	 && IsFlagSet(CAknFepManager::EFlagNoMatches)) 
       
  8546     	{
       
  8547     	UpdateCbaL(R_AKNFEP_SOFTKEYS_SPELL_EMPTY);
       
  8548     	}
       
  8549     }
  8598     }
  8550 
  8599 
  8551 void CAknFepManager::LaunchPredictiveSettingDialogL()
  8600 void CAknFepManager::LaunchPredictiveSettingDialogL()
  8552 	{
  8601 	{
  8553 #ifdef RD_SCALABLE_UI_V2	
  8602 #ifdef RD_SCALABLE_UI_V2	
  8582 	  fixedToolbar->SetDimmed(ETrue);
  8631 	  fixedToolbar->SetDimmed(ETrue);
  8583 	  fixedToolbar->DrawDeferred();
  8632 	  fixedToolbar->DrawDeferred();
  8584 	  }
  8633 	  }
  8585     TUid fepUid = CCoeEnv::Static()->FepUid();
  8634     TUid fepUid = CCoeEnv::Static()->FepUid();
  8586     ClearExtendedFlag(EExtendedFlagEdwinEditorDestroyed);
  8635     ClearExtendedFlag(EExtendedFlagEdwinEditorDestroyed);
  8587 	
  8636 		
  8588 	RProperty::Set(KPSUidAknFep,KAknFepSettingDialogState,1);
  8637     if ( iFepPluginManager && iFepPluginManager->IsSupportITIOnFSQ() )
       
  8638         {
       
  8639 	    RProperty::Set( KPSUidAknFep, KAknFepSettingDialogState, 2 );
       
  8640 	    }
       
  8641     else
       
  8642         {
       
  8643 	    RProperty::Set( KPSUidAknFep, KAknFepSettingDialogState, 1 );
       
  8644 		}
       
  8645     
  8589 	UiInterface()->LaunchPredictiveSettingDialogL(R_PREDICTIVESETTING_DIALOG,
  8646 	UiInterface()->LaunchPredictiveSettingDialogL(R_PREDICTIVESETTING_DIALOG,
  8590 												  R_PREDICTIVESETTINGDIALOG_MENUBAR,
  8647 												  R_PREDICTIVESETTINGDIALOG_MENUBAR,
  8591 												  R_PREDICTIVETEXTOFF_CONFIRMATION_QUERY,
  8648 												  R_PREDICTIVETEXTOFF_CONFIRMATION_QUERY,
  8592 												  R_AKNFEP_PRED_INPUT_SETTINGS_TITLE);
  8649 												  R_AKNFEP_PRED_INPUT_SETTINGS_TITLE);
  8593     PrepareFepAfterDialogExitL(fepUid);	
  8650     PrepareFepAfterDialogExitL(fepUid);	
 13252     else
 13309     else
 13253         {
 13310         {
 13254         aNewState = EIndicatorStateMultitapHindi;
 13311         aNewState = EIndicatorStateMultitapHindi;
 13255         }
 13312         }
 13256     }
 13313     }
       
 13314 
       
 13315 TInt CAknFepManager::CurrentInputLangCode()
       
 13316 	{
       
 13317 	ASSERT(iPtiEngine);
       
 13318 	
       
 13319 	MPtiLanguage* lang = iPtiEngine->CurrentLanguage();
       
 13320 	ASSERT(lang);
       
 13321 	
       
 13322 	return lang->LanguageCode();
       
 13323 	}
       
 13324 
 13257 TBool CAknFepManager::GetIndicatorImgID(TInt& aIndicatorImgID, TInt& aIndicatorTextID)
 13325 TBool CAknFepManager::GetIndicatorImgID(TInt& aIndicatorImgID, TInt& aIndicatorTextID)
 13258     {
 13326     {
 13259     if (iPreviousEditingState == EStateNone)
 13327     if (iPreviousEditingState == EStateNone)
 13260         {
 13328         {
 13261         UpdateIndicators();
 13329         UpdateIndicators();
 13536         {
 13604         {
 13537         // The editor doesn't allow SCT.
 13605         // The editor doesn't allow SCT.
 13538         return EFalse;
 13606         return EFalse;
 13539         }
 13607         }
 13540     
 13608     
 13541     TInt numberModeSctId = NumericModeSCTResourceId(); 
       
 13542     if (iMode == ENumber || iMode == ENativeNumber)
 13609     if (iMode == ENumber || iMode == ENativeNumber)
 13543         {
 13610         {
 13544         if (iPermittedInputModes == EAknEditorNumericInputMode || !numberModeSctId) 
 13611         if (iPermittedInputModes == EAknEditorNumericInputMode || !NumericModeSCTResourceId()) 
 13545             {
 13612             {
 13546             // SCT is not launched if the number mode is the only input mode or
 13613             // SCT is not launched if the number mode is the only input mode or
 13547             // if there is not keymap resource for the current numeric keymap mode.
 13614             // if there is not keymap resource for the current numeric keymap mode.
 13548             ableToLaunchSCT = EFalse;
 13615             ableToLaunchSCT = EFalse;
 13549             }
 13616             }
 13553             {
 13620             {
 13554             // SCT is launched in the number mode if requested by editor flag
 13621             // SCT is launched in the number mode if requested by editor flag
 13555             // EAknEditorFlagUseSCTNumericCharmap or if also text input modes are
 13622             // EAknEditorFlagUseSCTNumericCharmap or if also text input modes are
 13556             // allowed and the keymap is EAknEditorAlphanumericNumberModeKeymap.
 13623             // allowed and the keymap is EAknEditorAlphanumericNumberModeKeymap.
 13557             ableToLaunchSCT = ETrue;
 13624             ableToLaunchSCT = ETrue;
 13558             }
 13625             }      
 13559         
       
 13560         if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == numberModeSctId)
       
 13561            {
       
 13562            TBool isEmpty = ETrue;
       
 13563            TRAP_IGNORE(isEmpty = GetSctLengthL(numberModeSctId));
       
 13564            if(isEmpty)
       
 13565                {
       
 13566                ableToLaunchSCT = EFalse;
       
 13567                }
       
 13568             }
       
 13569         
       
 13570         }
 13626         }
 13571     if (!(EditorHasFreeSpace() && EditorState() 
 13627     if (!(EditorHasFreeSpace() && EditorState() 
 13572         && EditorState()->SpecialCharacterTableResourceId()))
 13628         && EditorState()->SpecialCharacterTableResourceId()))
 13573         {
 13629         {
 13574         ableToLaunchSCT = EFalse;
 13630         ableToLaunchSCT = EFalse;
 13575         }
 13631         }
 13576     
       
 13577    
       
 13578     
 13632     
 13579     return ableToLaunchSCT;
 13633     return ableToLaunchSCT;
 13580     }
 13634     }
 13581 
 13635 
 13582 TBool CAknFepManager::QueryPredictiveState(const TAknEditingState aState)
 13636 TBool CAknFepManager::QueryPredictiveState(const TAknEditingState aState)
 13666     return isAbleToLaunch;
 13720     return isAbleToLaunch;
 13667     }
 13721     }
 13668 
 13722 
 13669 TBool CAknFepManager::IsAbleToLaunchSmiley() const
 13723 TBool CAknFepManager::IsAbleToLaunchSmiley() const
 13670     {
 13724     {
       
 13725 	if(iLanguageCapabilities.iRightToLeftLanguage)
       
 13726 		{
       
 13727 	       return EFalse;
       
 13728 		}
       
 13729 	
 13671     TBool ableToLaunchSmiley(EFalse);
 13730     TBool ableToLaunchSmiley(EFalse);
 13672     
 13731     
 13673     CAknEdwinState* edwinState = EditorState();
 13732     CAknEdwinState* edwinState = EditorState();
 13674     if ( edwinState && EditorHasFreeSpace() )
 13733     if ( edwinState && EditorHasFreeSpace() )
 13675         {
 13734         {
 18151         
 18210         
 18152     if ( charMap == ENoCharacters && !IsAbleToLaunchSCT())
 18211     if ( charMap == ENoCharacters && !IsAbleToLaunchSCT())
 18153         {
 18212         {
 18154     	currentEditorSCTResId = charMap;
 18213     	currentEditorSCTResId = charMap;
 18155         }
 18214         }
       
 18215     if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap && R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY == currentEditorSCTResId)
       
 18216         {
       
 18217         TBool isEmpty = ETrue;
       
 18218         TRAP_IGNORE(isEmpty = GetSctLengthL(charMap));
       
 18219         if(isEmpty)
       
 18220            {
       
 18221            return;
       
 18222            }
       
 18223         }
 18156 
 18224 
 18157     if (currentEditorSCTResId)
 18225     if (currentEditorSCTResId)
 18158         {
 18226         {
 18159         TBuf<32> specialChars;
 18227         TBuf<32> specialChars;
 18160 
 18228 
 18252             {
 18320             {
 18253              if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut ||
 18321              if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut ||
 18254                  iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
 18322                  iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
 18255                  iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
 18323                  iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
 18256                 {
 18324                 {
 18257                 SetStopProcessFocus(ETrue, ETrue);
 18325                 SetStopProcessFocus(ETrue, EFalse);
 18258                 iFepPluginManager->SetMenuState();            
 18326                 iFepPluginManager->SetMenuState();            
 18259                 }            
 18327                 }            
 18260              else if (!iFepPluginManager->IsGlobleNotes())
 18328              else if (!iFepPluginManager->IsGlobleNotes())
 18261                 {
 18329                 {
 18262                 iFepPluginManager->ClosePluginInputUiL( ETrue );
 18330                 iFepPluginManager->ClosePluginInputUiL( ETrue );
 19798 // Predictive QWERTY changes (XT9) ---->
 19866 // Predictive QWERTY changes (XT9) ---->
 19799 
 19867 
 19800 void CAknFepManager::GetCandidatesL( CDesCArray& aArray, TInt& aActiveIdx )
 19868 void CAknFepManager::GetCandidatesL( CDesCArray& aArray, TInt& aActiveIdx )
 19801     {
 19869     {
 19802     iPtiEngine->GetCandidateListL(aArray);
 19870     iPtiEngine->GetCandidateListL(aArray);
 19803     iPtiEngine->HandleCommandL( EPtiCommandUserActionGetCurrentIndexOfCandidates, &aActiveIdx );
 19871     iPtiEngine->HandleCommandL(
 19804     }  
 19872             EPtiCommandUserActionGetCurrentIndexOfCandidates, &aActiveIdx);
       
 19873     }
 19805 
 19874 
 19806 void CAknFepManager::GetUpdateCandidatePositionL(TRect& aRect)
 19875 void CAknFepManager::GetUpdateCandidatePositionL(TRect& aRect)
 19807     {
 19876     {
 19808      if(iCandidatePopup && iFepFullyConstructed && iPtiEngine)
 19877      if(iCandidatePopup && iFepFullyConstructed && iPtiEngine)
 19809         {
 19878         {