fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp
branchRCL_3
changeset 44 ecbabf52600f
equal deleted inserted replaced
43:ebd48d2de13c 44:ecbabf52600f
       
     1 /*
       
     2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include <featmgr.h>
       
    19 #include <implementationinformation.h>
       
    20 #include <aknfeppeninputenums.h>
       
    21 #include <aknfepuiinterface.h>
       
    22 #include <aknfepuimenus.h>
       
    23 #include <aknlistquerydialog.h>
       
    24 
       
    25 #include <coemain.h>
       
    26 #include <bautils.h>
       
    27 #include <StringLoader.h>
       
    28 
       
    29 #include <peninputcmd.h>
       
    30 #include <peninputpluginkrres.rsg>
       
    31 #include <peninputclient.h>
       
    32 #include <AknFepInternalCRKeys.h>
       
    33 
       
    34 
       
    35 
       
    36 #include "PeninputPluginKrDbg.h"
       
    37 #include "PeninputPluginKr.hrh"   // CPeninputPluginKr
       
    38 #include "PeninputPluginKr.h"	// CPeninputPluginKr
       
    39 #include "PeninputPluginKr.pan"	  	// panic codes
       
    40 #include "PluginKrFepManagerBase.h"     // panic codes
       
    41 #include "PluginKrFepManagerHwr.h"
       
    42 #include "PluginKrFepManagerVkb.h"
       
    43 #include "PluginKrFepManagerItut.h"
       
    44 #include "peninputpluginkrcombinelistquerydialog.h"
       
    45 
       
    46 //_LIT(KFscImeName, "Korean FSC");
       
    47 //_LIT(KHwrImeName, "Korean HWR");
       
    48 _LIT(KVkbImeName, "Korean VKB");
       
    49 _LIT(KFsqImeName, "Korean FSQ");
       
    50 //_LIT(KFsqImeNameEng, "English FSQ");
       
    51 _LIT(KItutImeName, "Korean ITUT");
       
    52 
       
    53 _LIT(KPeninputPluginKrResourceFileName, "z:\\resource\\fep\\PeninputPluginKrRes.rsc");
       
    54 
       
    55 const TInt KItutUiIndex = 0;
       
    56 const TInt KVkbUiIndex = 1;
       
    57 const TInt KFSQUiIndex = 2;
       
    58 //const TInt KFSQUiEngIndex = 3;
       
    59 const TInt KInvalidImplId = 0;
       
    60 
       
    61 enum TPeninputKoreanWordCombineFlags
       
    62     {
       
    63     EKoreanWordCombineVersion = 0x00000001,
       
    64     EKoreanWordCombineConsonantSsangKiyeok = 0x00000002,
       
    65     EKoreanWordCombineConsonantSsangTikeut = 0x00000004,
       
    66     EKoreanWordCombineConsonantSsangPieup =  0x00000008,
       
    67     EKoreanWordCombineConsonantSsangSios =   0x00000010,
       
    68     EKoreanWordCombineConsonantCieuc =       0x00000020,
       
    69     EKoreanWordCombineConsonantYaPlusI =     0x00000040,
       
    70     EKoreanWordCombineConsonantYuPlusI =     0x00000080,
       
    71     EKoreanWordCombineConsonantOnSetting =   0x00000100
       
    72     };
       
    73 
       
    74 LOCAL_C void Cleanup( TAny* aAny )
       
    75     {
       
    76     RImplInfoPtrArray* implArray = 
       
    77         reinterpret_cast< RImplInfoPtrArray*> ( aAny );
       
    78     implArray->ResetAndDestroy();
       
    79     implArray->Close();
       
    80     }
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 // Constructors & Destructors
       
    84 // ---------------------------------------------------------------------------
       
    85 //
       
    86 
       
    87 CPeninputPluginKr* CPeninputPluginKr::NewLC(TAny* aInitParams)
       
    88     {
       
    89     CPeninputPluginKr* self = new (ELeave) CPeninputPluginKr(
       
    90         static_cast<RPeninputServer*>(aInitParams));
       
    91     CleanupStack::PushL(self);
       
    92     self->ConstructL();
       
    93     return self;
       
    94     }
       
    95 
       
    96 CPeninputPluginKr* CPeninputPluginKr::NewL(TAny* aInitParams)
       
    97     {
       
    98     CPeninputPluginKr* self = CPeninputPluginKr::NewLC(aInitParams);
       
    99     CleanupStack::Pop(self);
       
   100     return self;
       
   101     }
       
   102 
       
   103 CPeninputPluginKr::CPeninputPluginKr(RPeninputServer* aServer)
       
   104     : iPeninputServer(*aServer)
       
   105     {
       
   106     }
       
   107 
       
   108 void CPeninputPluginKr::ConstructL()
       
   109     {
       
   110     /*
       
   111     LOG("FEP.IMEPLG.KR.ConstructL");
       
   112     FindUiLayoutImplementationL();
       
   113     */
       
   114     FindUiLayoutImplementationL();
       
   115     //Append NULL to save HWR manager position
       
   116     iAllUiManagers.Append(NULL);
       
   117     //Append NULL to save VKB manager position
       
   118     iAllUiManagers.Append(NULL);
       
   119     //Append NULL to save ITUT manager position
       
   120     iAllUiManagers.Append(NULL);
       
   121     //Append NULL to save Mini ITUT manager position
       
   122     iAllUiManagers.Append(NULL);
       
   123     //Append NULL to save FSQ manager position
       
   124     iAllUiManagers.Append(NULL);
       
   125     
       
   126     TFileName resourceName(KPeninputPluginKrResourceFileName);
       
   127     CCoeEnv* coeEnv = CCoeEnv::Static();
       
   128     BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resourceName);
       
   129     iResId = coeEnv->AddResourceFileL(resourceName);
       
   130     
       
   131     }
       
   132 
       
   133 CPeninputPluginKr::~CPeninputPluginKr()
       
   134     {
       
   135 	
       
   136     CCoeEnv::Static()->DeleteResourceFile(iResId);
       
   137     DeActivate();
       
   138     iUiLayoutImpIdList.Close();
       
   139     delete iPluginKrFepManager;
       
   140     iAllUiManagers.ResetAndDestroy();
       
   141     REComSession::FinalClose();//cleanup ecom
       
   142     }
       
   143 
       
   144 // ---------------------------------------------------------------------------
       
   145 // from CAknFepPenInputImePlugin
       
   146 // ---------------------------------------------------------------------------
       
   147 //
       
   148 
       
   149 MAknFepManagerInterface* CPeninputPluginKr::GetInputMethodUiL(
       
   150         MAknFepManagerUIInterface* aFepManager,
       
   151         TLanguage aLanguage, 
       
   152         TInt aMode,
       
   153         const TDesC8& /*aData*/,
       
   154         const TBool /*aIsSplitView*/ )
       
   155     {
       
   156     iFepManager = aFepManager;
       
   157     iLanguage = aLanguage;
       
   158     CPluginKrFepManagerBase* fepmanager = NULL;
       
   159 
       
   160     TUid layoutId;
       
   161     TInt i;
       
   162 
       
   163     switch(aMode)
       
   164         {
       
   165         case EPluginInputModeVkb:
       
   166             layoutId.iUid = KVkbUiId;
       
   167             fepmanager = GetVkbUiL();
       
   168             break;
       
   169         /*   
       
   170         case EPluginInputModeItut:
       
   171             layoutId.iUid = KItutUiId;
       
   172             fepmanager = GetItutUiL();
       
   173             break;*/
       
   174             
       
   175         case EPluginInputModeFSQ:
       
   176         	{
       
   177         	/*if(iLanguage == ELangEnglish)
       
   178         		{
       
   179         		layoutId.iUid = KFsqUiEngId;
       
   180         		}
       
   181         	else*/
       
   182         		{
       
   183         		layoutId.iUid = KFsqUiId;
       
   184         		}
       
   185         	fepmanager = GetFSQUiL(aLanguage);
       
   186         	}
       
   187             break;
       
   188         default:
       
   189             return NULL;
       
   190         }
       
   191     
       
   192     for(i = 0; i < iUiLayoutImpIdList.Count(); ++i)
       
   193         {
       
   194         if(iUiLayoutImpIdList[i] == layoutId.iUid )
       
   195             {
       
   196             break;
       
   197             }
       
   198         }
       
   199 
       
   200     if( i < iUiLayoutImpIdList.Count() )
       
   201         {
       
   202         iPenInputMode = aMode;
       
   203         TInt errCode = iPeninputServer.SetUiLayoutId(layoutId);
       
   204         if( errCode == KErrNone )
       
   205             {
       
   206             fepmanager->OnInit();
       
   207             return fepmanager;
       
   208             }
       
   209         }
       
   210         
       
   211     return NULL;
       
   212     }
       
   213 
       
   214 MAknFepManagerInterface* CPeninputPluginKr::GetInputMethodUiL(
       
   215         MAknFepManagerUIInterface* /*aFepManager*/,
       
   216         TInt /*aLayoutId*/,
       
   217         const TDesC8& /*aData*/)
       
   218     {
       
   219     LOG("FEP.IMEPLG.KR.GetInputMethodUiL");
       
   220     MAknFepManagerInterface* ret(NULL);
       
   221     return ret;    
       
   222     }
       
   223 
       
   224 void CPeninputPluginKr::Activate()
       
   225     {
       
   226     LOG("FEP.IMEPLG.KR.Activate");
       
   227     iPeninputServer.ActivateLayout(ETrue);        
       
   228     }
       
   229 
       
   230 void CPeninputPluginKr::DeActivate()
       
   231     {
       
   232     LOG("FEP.IMEPLG.KR.DeActivate");
       
   233     if (&iPeninputServer && iPeninputServer.IsVisible())        
       
   234         {
       
   235         iPeninputServer.ActivateLayout(EFalse);
       
   236         }
       
   237     }
       
   238 
       
   239 TInt CPeninputPluginKr::ImeImplId()
       
   240     {
       
   241     LOG("FEP.IMEPLG.KR.ImeImplId");
       
   242     return KAknFepImePluginImplementationId;
       
   243     }
       
   244 
       
   245 TInt CPeninputPluginKr::LayoutUiImplId()
       
   246     {
       
   247     LOG("FEP.IMEPLG.KR.LayoutUiImplId");
       
   248     TInt id;
       
   249     switch ( iPenInputMode )
       
   250         {
       
   251         case EPluginInputModeVkb:
       
   252             {
       
   253             id = KVkbUiId;
       
   254             }
       
   255             break;
       
   256         case EPluginInputModeFSQ:
       
   257             {
       
   258             id = KFsqUiId;
       
   259             }
       
   260             break;
       
   261         case EPluginInputModeItut:
       
   262         	{
       
   263         	id = KItutUiId;
       
   264         	}
       
   265         	
       
   266         	break;
       
   267         default:
       
   268             {
       
   269             id = KInvalidImplId;
       
   270             }
       
   271             break;
       
   272         }
       
   273     return id;
       
   274     }
       
   275 
       
   276 TBool CPeninputPluginKr::HandleServerEventL(
       
   277         TInt aEventId, 
       
   278         const TDesC& aData)
       
   279     {
       
   280     LOG1("FEP.IMEPLG.KR.HandleServerEventL %d",aEventId);
       
   281     TBool bHandled = EFalse;
       
   282     switch ( aEventId )
       
   283         {
       
   284         case ESignalLayoutICFLengthChanged:
       
   285             {
       
   286             GetCurrentUi()->RetrieveEditorMaxLength();
       
   287             }
       
   288             break;
       
   289         case ESignalCaseMode:
       
   290             {
       
   291             TInt data = *(TInt*)( aData.Ptr() );
       
   292             if (data>=ECaseInvalide)
       
   293                 {
       
   294                 GetCurrentUi()->UpdateCaseMode( data );                 
       
   295                 }
       
   296             }
       
   297             break;
       
   298         default:
       
   299             break;
       
   300         }
       
   301         
       
   302     return bHandled;
       
   303     }
       
   304 
       
   305 TInt CPeninputPluginKr::SupportModes(
       
   306         CPtiEngine* aPtiEngine, 
       
   307         RArray<TImePlguinImplDetail>& aSupportList) const
       
   308     {
       
   309     LOG("FEP.IMEPLG.KR.SupportModes");
       
   310     TRAPD( ret, SupportModesL( aPtiEngine, aSupportList ) );
       
   311     return ret;
       
   312     }
       
   313 
       
   314 TInt CPeninputPluginKr::CurrentMode() const
       
   315     {
       
   316     LOG("FEP.IMEPLG.KR.CurrentMode");
       
   317     return iPenInputMode;
       
   318     }
       
   319 
       
   320 TBool CPeninputPluginKr::HandleMenuCommandL(TInt aCommandId)
       
   321     {
       
   322     LOG("FEP.IMEPLG.KR.HandleMenuCommandL");
       
   323     TInt ret(EFalse);
       
   324     CRepository* repository = CRepository::NewLC(KCRUidAknFep);
       
   325     if (aCommandId==EPeninputPluginKrDoubleConsonentCmd)
       
   326         {
       
   327         TInt settingValue;
       
   328         repository ->Get(KAknFepKoreanCombineWordFlag,settingValue);
       
   329         settingValue |= EKoreanWordCombineConsonantOnSetting;
       
   330         repository ->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
       
   331         TRAP_IGNORE(ShowListQueryL(R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY,repository ));
       
   332         repository ->Get(KAknFepKoreanCombineWordFlag,settingValue);
       
   333         settingValue &= 0xFFFFFEFF;
       
   334         repository ->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
       
   335         ret=ETrue;
       
   336         }
       
   337     
       
   338     CleanupStack::PopAndDestroy(repository);
       
   339     return ret;
       
   340     }
       
   341 
       
   342 void CPeninputPluginKr::DynInitMenuPaneL(
       
   343         CAknFepUiInterfaceMenuPane* aMenuPane)
       
   344     {
       
   345     LOG("FEP.IMEPLG.KR.DynInitMenuPaneL");
       
   346     TInt index;
       
   347     /*
       
   348     if ((iPenInputMode == EPluginInputModeVkb ||
       
   349         iPenInputMode == EPluginInputModeFSQ) &&
       
   350         aMenuPane->MenuItemExists(EPenInputCmdSetting, index))
       
   351         {
       
   352         aMenuPane->SetItemDimmed(EPenInputCmdSetting, EFalse);   
       
   353         }
       
   354     aMenuPane->SetItemDimmed(EPenInputCmdHwrTraining, ETrue);
       
   355     */           
       
   356     if (
       
   357         ( iLanguage == ELangKorean ) &&
       
   358         (iPenInputMode == EPluginInputModeVkb ||
       
   359         iPenInputMode == EPluginInputModeFSQ))
       
   360         {
       
   361         aMenuPane->MenuItemExists(EFepInputCmdHelp, index);
       
   362         if (index!=KErrNotFound)
       
   363             {
       
   364             TBuf<255> menuStr;
       
   365             StringLoader::Load(menuStr, R_PENINPUT_PLUGIN_KR_DOUBLECONSONENT_SETTING);
       
   366             CAknFepUiInterfaceMenuPane::SItemData data;
       
   367             data.iCommandId=EPeninputPluginKrDoubleConsonentCmd;
       
   368             data.iCascadeId=0;
       
   369             data.iFlags=0;
       
   370             data.iText=menuStr.Mid(1, menuStr.Length() - 1);
       
   371             aMenuPane->InsertMenuItemL(data,index);
       
   372             }
       
   373         }
       
   374     }
       
   375 
       
   376 // ---------------------------------------------------------------------------
       
   377 // Internal Utilities
       
   378 // ---------------------------------------------------------------------------
       
   379 //
       
   380 
       
   381 void CPeninputPluginKr::FindUiLayoutImplementationL()
       
   382     {
       
   383     RImplInfoPtrArray infoArray;
       
   384     TUid id;
       
   385     id.iUid = KHwrLayoutInterfaceId;
       
   386     
       
   387     iUiLayoutImpIdList.Reset();
       
   388     CleanupStack::PushL( TCleanupItem( Cleanup, &infoArray ) );
       
   389     REComSession::ListImplementationsL(id, infoArray);
       
   390 
       
   391     LOG1("FEP.IMEPLG.KR.FindUiLayoutImplementationL %d",infoArray.Count());
       
   392     for (TInt i = 0; i < infoArray.Count(); ++i)
       
   393         {
       
   394         LOG1("FEP.IMEPLG.KR.  0x%08X",infoArray[i]->ImplementationUid().iUid);
       
   395 #ifdef _DEBUG
       
   396         TPtrC ptr(infoArray[i]->DisplayName());
       
   397         LOG1("FEP.IMEPLG.KR.  %S",&ptr);
       
   398 #endif
       
   399         iUiLayoutImpIdList.AppendL(infoArray[i]->ImplementationUid().iUid);
       
   400         
       
   401         }
       
   402 
       
   403     CleanupStack::PopAndDestroy(&infoArray); // infoArray    
       
   404     }
       
   405 
       
   406 CPluginKrFepManagerBase* CPeninputPluginKr::GetPluginUiL( TInt /*aMode*/ )
       
   407     {
       
   408     return NULL;
       
   409     }
       
   410 
       
   411 TInt CPeninputPluginKr::SupportModesL(
       
   412         CPtiEngine* /*aPtiEngine*/,
       
   413         RArray<TImePlguinImplDetail>& aSupportList) const
       
   414     {
       
   415     RImplInfoPtrArray infoArray;
       
   416     TUid id;
       
   417     id.iUid = KHwrLayoutInterfaceId;
       
   418     //TBool hwr = EFalse;
       
   419     TBool vkb = EFalse;
       
   420     TBool itut = EFalse;
       
   421     //TBool miniitut = EFalse;
       
   422     TBool fsq = EFalse;
       
   423     //TBool fsqEng = EFalse;
       
   424 
       
   425     CleanupStack::PushL( TCleanupItem( Cleanup, &infoArray ) );
       
   426     REComSession::ListImplementationsL(id, infoArray);
       
   427 
       
   428     for (TInt i = 0; i < infoArray.Count(); ++i)
       
   429         {
       
   430         if(infoArray[i]->ImplementationUid().iUid == KVkbUiId 
       
   431         		&& FeatureManager::FeatureSupported(KFeatureIdVirtualKeyboardInput))
       
   432             {
       
   433             vkb = ETrue;
       
   434             }
       
   435         /*    
       
   436         if(infoArray[i]->ImplementationUid().iUid == KItutUiId )
       
   437             {
       
   438             itut = ETrue;
       
   439             }*/
       
   440         if(infoArray[i]->ImplementationUid().iUid == KFsqUiId
       
   441         		&& FeatureManager::FeatureSupported(KFeatureIdVirtualFullscrQwertyInput))
       
   442             {
       
   443             fsq = ETrue;
       
   444             }
       
   445         /*if(infoArray[i]->ImplementationUid().iUid == KFsqUiEngId )
       
   446             {
       
   447             fsqEng = ETrue;
       
   448             }*/
       
   449         }
       
   450 
       
   451     TImePlguinImplDetail detail;
       
   452 
       
   453     detail.iImplementationId = KAknFepImePluginImplementationId;
       
   454 
       
   455     if( vkb )
       
   456         {
       
   457         detail.iMode = EPluginInputModeVkb;
       
   458         detail.iMeritValue = EImeMerit_Preferred;
       
   459         detail.iDisplayName.Copy(KVkbImeName());
       
   460         detail.iLanguage = ELangKorean;
       
   461         aSupportList.Append(detail);
       
   462         }
       
   463 
       
   464     if( itut )
       
   465         {
       
   466         detail.iMode = EPluginInputModeItut;
       
   467         detail.iMeritValue = EImeMerit_Preferred;
       
   468         detail.iDisplayName.Copy(KItutImeName());
       
   469         detail.iLanguage = ELangKorean;
       
   470         aSupportList.Append(detail);
       
   471         }
       
   472 
       
   473     if( fsq )
       
   474         {
       
   475         detail.iMode = EPluginInputModeFSQ;
       
   476         detail.iMeritValue = EImeMerit_Preferred;
       
   477         detail.iDisplayName.Copy(KFsqImeName());
       
   478         detail.iLanguage = ELangKorean;
       
   479         aSupportList.Append(detail);
       
   480         }
       
   481      /*if( fsqEng )
       
   482         {
       
   483         detail.iMode = EPluginInputModeFSQ;
       
   484         detail.iMeritValue = EImeMerit_Preferred;
       
   485         detail.iDisplayName.Copy(KFsqImeNameEng());
       
   486         detail.iLanguage = ELangEnglish;
       
   487         aSupportList.Append(detail);
       
   488         }*/
       
   489 
       
   490     CleanupStack::PopAndDestroy(&infoArray); // infoArray
       
   491 
       
   492     return 0;
       
   493     }
       
   494 
       
   495 inline CPluginKrFepManagerBase* CPeninputPluginKr::GetCurrentUi()
       
   496     {
       
   497     switch ( iPenInputMode )
       
   498         {
       
   499         case EPluginInputModeVkb:
       
   500             return iAllUiManagers[KVkbUiIndex];
       
   501         case EPluginInputModeItut:
       
   502             return iAllUiManagers[KItutUiIndex];
       
   503         case EPluginInputModeFSQ:
       
   504         	{
       
   505         	/*if(iLanguage == ELangEnglish)
       
   506         		{
       
   507 				return iAllUiManagers[KFSQUiEngIndex];
       
   508         		}
       
   509         	else*/
       
   510         		{
       
   511         		return iAllUiManagers[KFSQUiIndex];	
       
   512         		}
       
   513         	}
       
   514         default:
       
   515             return NULL;
       
   516         }
       
   517     }
       
   518 
       
   519 
       
   520 // -----------------------------------------------------------------------------
       
   521 // CPeninputPluginKr::GetVkbUi
       
   522 // Get VKB UI interface.
       
   523 // (other items were commented in a header).
       
   524 // -----------------------------------------------------------------------------
       
   525 //
       
   526 CPluginKrFepManagerBase* CPeninputPluginKr::GetVkbUiL()
       
   527     {
       
   528     if( !iAllUiManagers[KVkbUiIndex] )
       
   529         {
       
   530         iAllUiManagers[KVkbUiIndex] = CPluginKrFepManagerVkb::NewL(*this, iPeninputServer);
       
   531         }
       
   532 
       
   533     return iAllUiManagers[KVkbUiIndex];
       
   534     }
       
   535 
       
   536 // -----------------------------------------------------------------------------
       
   537 // CPeninputPluginKr::GetItutUi
       
   538 // Get Itut UI interface.
       
   539 // (other items were commented in a header).
       
   540 // -----------------------------------------------------------------------------
       
   541 //
       
   542 CPluginKrFepManagerBase* CPeninputPluginKr::GetItutUiL()
       
   543     {
       
   544     if( iAllUiManagers[KItutUiIndex] == NULL )
       
   545         {
       
   546         iAllUiManagers[KItutUiIndex] = CPluginKrFepManagerItut::NewL(*this, iPeninputServer);
       
   547         }
       
   548 
       
   549     return iAllUiManagers[KItutUiIndex];
       
   550     }
       
   551 
       
   552 // -----------------------------------------------------------------------------
       
   553 // CPeninputPluginKr::GetFSQUi
       
   554 // Get FSQ UI interface.
       
   555 // (other items were commented in a header).
       
   556 // -----------------------------------------------------------------------------
       
   557 //
       
   558 CPluginKrFepManagerBase* CPeninputPluginKr::GetFSQUiL(TInt aLang)
       
   559     {
       
   560     if( iAllUiManagers[KFSQUiIndex] == NULL )
       
   561         {
       
   562         iAllUiManagers[KFSQUiIndex] = CPluginKrFepManagerVkb::NewL(*this, iPeninputServer);
       
   563         }
       
   564         
       
   565    /* if( iAllUiManagers[KFSQUiEngIndex] == NULL )
       
   566         {
       
   567         iAllUiManagers[KFSQUiEngIndex] = CPluginKrFepManagerVkb::NewL(*this, iPeninputServer);
       
   568         }*/
       
   569 	
       
   570 	/*if (aLang == ELangEnglish)
       
   571 		{
       
   572 		return iAllUiManagers[KFSQUiEngIndex];
       
   573 		}
       
   574 	else*/
       
   575 		{
       
   576 		return iAllUiManagers[KFSQUiIndex];
       
   577 		}
       
   578     }
       
   579 
       
   580 void CPeninputPluginKr::ShowListQueryL(const TInt aResourceId, CRepository* aRepository)
       
   581     {
       
   582     CArrayFixFlat<TInt>* arraySelected=
       
   583         new (ELeave) CArrayFixFlat<TInt>(7);
       
   584     CleanupStack::PushL(arraySelected);
       
   585    
       
   586     CPeninputPluginKrCombineListQueryDialog* dlg = 
       
   587     		new(ELeave)CPeninputPluginKrCombineListQueryDialog(arraySelected);
       
   588     dlg->PrepareLC(aResourceId);
       
   589     
       
   590 
       
   591     TInt settingValue;
       
   592 
       
   593     if( aRepository->Get( KAknFepKoreanCombineWordFlag, settingValue ) == KErrNone )
       
   594         {
       
   595         if( settingValue & EKoreanWordCombineConsonantSsangKiyeok )
       
   596             {
       
   597             arraySelected->AppendL(0);
       
   598             }
       
   599 
       
   600 
       
   601         if( settingValue & EKoreanWordCombineConsonantSsangTikeut )
       
   602             {
       
   603             arraySelected->AppendL(1);
       
   604             }
       
   605 
       
   606 
       
   607         if( settingValue & EKoreanWordCombineConsonantSsangPieup )
       
   608             {
       
   609             arraySelected->AppendL(2);
       
   610             }
       
   611 
       
   612 
       
   613         if( settingValue & EKoreanWordCombineConsonantSsangSios )
       
   614             {
       
   615             arraySelected->AppendL(3);
       
   616             }
       
   617 
       
   618 
       
   619         if( settingValue & EKoreanWordCombineConsonantCieuc )
       
   620             {
       
   621             arraySelected->AppendL(4);
       
   622             }
       
   623 
       
   624 
       
   625         if( settingValue & EKoreanWordCombineConsonantYaPlusI )
       
   626             {
       
   627             arraySelected->AppendL(5);
       
   628             }
       
   629 
       
   630 
       
   631         if( settingValue & EKoreanWordCombineConsonantYuPlusI )
       
   632             {
       
   633             arraySelected->AppendL(6);
       
   634             }
       
   635         }
       
   636     dlg->ListBox()->SetSelectionIndexesL(arraySelected);
       
   637     
       
   638     if (dlg->RunLD())
       
   639         {
       
   640 
       
   641         settingValue &= 0xFFFFFF01; 
       
   642         
       
   643         aRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
       
   644         for (TInt i=0;i<arraySelected->Count();i++)
       
   645             {
       
   646             switch (arraySelected->At(i))
       
   647                 {
       
   648                 case 0:
       
   649                     settingValue |= EKoreanWordCombineConsonantSsangKiyeok; 
       
   650                     break;
       
   651                 case 1:
       
   652                     settingValue |= EKoreanWordCombineConsonantSsangTikeut; 
       
   653                     break;
       
   654                 case 2:
       
   655                     settingValue |= EKoreanWordCombineConsonantSsangPieup;
       
   656                     break;
       
   657                 case 3:
       
   658                     settingValue |= EKoreanWordCombineConsonantSsangSios;
       
   659                     break;
       
   660                 case 4:
       
   661                     settingValue |= EKoreanWordCombineConsonantCieuc;
       
   662                     break;
       
   663                 case 5:
       
   664                     settingValue |= EKoreanWordCombineConsonantYaPlusI;
       
   665                     break;
       
   666                 case 6:
       
   667                     settingValue |= EKoreanWordCombineConsonantYuPlusI;
       
   668                     break;
       
   669                 default:
       
   670                     break;
       
   671                 }
       
   672             }
       
   673 
       
   674 
       
   675         aRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
       
   676         }
       
   677     
       
   678     CleanupStack::PopAndDestroy(arraySelected);
       
   679     }
       
   680 
       
   681 //End Of File