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