Revision: 201015 RCL_3 PDK_3.0.i
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 16:59:43 +0300
branchRCL_3
changeset 9 e6a39382bb9c
parent 8 4eb1ae11334f
child 11 c8fb4cf7b3ae
Revision: 201015 Kit: 201017
fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingData.cpp
fep/aknfep/inc/AknFepManager.h
fep/aknfep/inc/AknFepPluginManager.h
fep/aknfep/peninputplugins/PeninputPluginKr/group/PeninputPluginKr.mmp
fep/aknfep/peninputplugins/PeninputPluginKr/inc/PeninputPluginKr.h
fep/aknfep/peninputplugins/PeninputPluginKr/inc/peninputpluginkrcombinelistquerydialog.h
fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp
fep/aknfep/peninputplugins/PeninputPluginKr/src/peninputpluginkrcombinelistquerydialog.cpp
fep/aknfep/peninputplugins/peninputimeplugincn/src/pluginfepmanagerbase.cpp
fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp
fep/aknfep/peninputplugins/peninputimepluginitut/src/peninputimepluginitut.cpp
fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp
fep/aknfep/src/AknFepManager.cpp
fep/aknfep/src/AknFepPluginManager.cpp
fep/aknfep/src/AknFepSharedDataInterface.cpp
fep/aknfep/src/AknFepUiInputStateEntryVietnamesePredictive.cpp
fep/aknfep/src/aknfepuispellcontainer.cpp
inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h
inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h
inputmethods_plat/ptiengine_hwr_api/tsrc/group/testdomecom.mmp
inputmethods_pub/ptiengine_iti_api/inc/PtiDefs.h
textinput/GSLangPlugin/src/GSLangModel.cpp
textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF
textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.inl
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutchoicelist.h
textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h
textinput/peninputarc/src/peninputclient/penclientimpl.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutaknchoicelist.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbasecontrol.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutchoicelist.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayouteditareabase.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmicfcustomdraw.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutrootctrl.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp
textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp
textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF
textinput/peninputcommonctrls/inc/peninputselectionlist/peninputscrollablelist.h
textinput/peninputcommonctrls/src/peninputbasewindow/peninputbasewindowext.cpp
textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp
textinput/peninputcommonctrls/src/peninputselectionlist/peninputcommonchoicelist.cpp
textinput/peninputcommonctrls/src/peninputselectionlist/peninputlayoutinputmodechoice.cpp
textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp
textinput/peninputcommonctrls/src/peninputselectionlist/peninputselectionlist.cpp
textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp
textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp
textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp
textinput/peninputfingerhwr/src/peninputfingerhwrlafmanager.cpp
textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp
textinput/peninputgenerichwr/src/peninputgenerichwrwindow.cpp
textinput/peninputgenerichwr/src/peninputhwrarabicwindow.cpp
textinput/peninputgenericitut/inc/peninputgenericitutdatamgr.h
textinput/peninputgenericitut/src/peninputcommonbgctrl.cpp
textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp
textinput/peninputgenericitut/src/peninputgenericitutwindowmanager.cpp
textinput/peninputgenericitut/src/peninputitutchnuistatepredict.cpp
textinput/peninputgenericitut/src/peninputitutchnuistatestandby.cpp
textinput/peninputgenericitut/src/peninputitutwesternuistatematchselection.cpp
textinput/peninputgenericitut/src/peninputitutwesternuistatenonpredict.cpp
textinput/peninputgenericitut/src/peninputitutwesternuistatespelling.cpp
textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h
textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp
textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp
textinput/peninputhwrboxcn/ctrlsrc/peninputhwrbxwnd.cpp
textinput/peninputsplititut/inc/peninputsplititutdatamgr.h
textinput/peninputsplititut/src/peninputcommonbgctrl.cpp
textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp
textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp
textinput/peninputvkbcn/ctrlinc/peninputvkbwindow.h
textinput/peninputvkbcn/ctrlsrc/peninputvkbwindow.cpp
textinput/peninputvkbcn/src/peninputvkblayout.cpp
textinput/peninputvkbkr/inc/PeninputVkbKrWindow.h
textinput/peninputvkbkr/src/PeninputVkbKrLayout.cpp
textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp
textinput/ptienginev2/group/VariantParser.pl
textinput/ptienginev2/inc/PtiEngineImpl.h
textinput/ptienginev2/languages/PtiFactory_ITUT_01.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_02.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_03.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_04.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_05.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_06.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_07.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_08.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_09.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_102.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_103.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_13.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_14.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_15.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_16.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_17.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_18.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_25.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_26.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_27.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_28.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_29.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_30.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_31.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_33.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_37.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_39.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_42.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_44.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_45.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_49.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_50.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_54.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_57.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_58.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_59.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_65.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_67.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_68.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_70.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_72.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_78.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_79.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_93.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_94.cpp
textinput/ptienginev2/languages/PtiFactory_ITUT_96.cpp
textinput/ptienginev2/src/PtiEngine.cpp
textinput/ptienginev2/src/PtiEngineImpl.cpp
textinput/ptienginev2/src/PtiHwrRecognizer.cpp
textinput/ptienginev2/src/PtiKeyMapData.cpp
textinput/ptienginev2/src/PtiKeyMappings.cpp
textinput/ptienginev2/src/PtiKeyboardDatabase.cpp
textinput/ptienginev2/src/PtiLanguage.cpp
textinput/ptienginev2/src/PtiLanguageDatabase.cpp
textinput/ptienginev2/src/PtiSymbolList.cpp
textinput/ptienginev2/src/Ptiqwertykeymappings.cpp
--- a/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingData.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingData.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -100,7 +100,7 @@
 		RProperty::Get( KPSUidAknFep, KAknFepVirtualKeyboardType, 
 						keyboardType );      
 		}
-#else if
+#else
 	// Get physical keyboard type
 	RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType );	    
 #endif
@@ -132,7 +132,7 @@
 	    // Get physical keyboard type
 	    RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType );	    
 		}
-#else if
+#else
     // Get physical keyboard type
     RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType );		
 #endif // RD_SCALABLE_UI_V2
--- a/fep/aknfep/inc/AknFepManager.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/inc/AknFepManager.h	Tue Apr 27 16:59:43 2010 +0300
@@ -2457,7 +2457,17 @@
      * Return the chinese input mode used last time
      */
 	inline TInt LastChineseInputMode() const;
-	
+
+    /**
+     * Return active input language, only used for languages popup list
+     */
+    inline TInt ActiveInputLanguage() const;
+
+    /**
+     * Set active input language, only used for languages popup list
+     */	    
+    inline void SetActiveInputLanguage(TInt aInputLanguage);
+    
 private:
        
     /**
@@ -2801,6 +2811,11 @@
     TBool iShiftAndSpace;
     CAknFepThaiSCTSelector* iAknFepThaiSCTSelector;
     
+    /**
+     * Active input language, only used for languages pop up list,
+     * can not changed in other cases, e.g. in latin-only editor
+     */
+    TInt iActiveInputLanguage;
 public:
 
     //the follow 8 functions for phrase creation 
@@ -3181,6 +3196,23 @@
     {
     iGainForeground = aGainForeground;
     }
+
+/**
+* Return active input language, only used for languages popup list
+*/    
+inline TInt CAknFepManager::ActiveInputLanguage() const
+    {
+    return iActiveInputLanguage;
+    }
+
+/**
+* Set active input language, only used for languages popup list
+*/ 
+inline void CAknFepManager::SetActiveInputLanguage( TInt aInputLanguage )  
+    {
+    iActiveInputLanguage = aInputLanguage;
+    }
+
 #endif
 
 // End of file
--- a/fep/aknfep/inc/AknFepPluginManager.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/inc/AknFepPluginManager.h	Tue Apr 27 16:59:43 2010 +0300
@@ -85,7 +85,8 @@
     EPluginSwitchToPortrait,
     EPluginSwitchToLandscape,
     EPluginSwitchMode,
-    EPluginUpdatePenInputITIStatus
+    EPluginUpdatePenInputITIStatus,
+	EPluginEnableFetchDimState
     };
 
 /** 
@@ -844,6 +845,8 @@
     TBool IsEditorSupportSplitIme();
     
     void SetICFTextForSpellL();
+    
+    void SendMatchListCmd(const RArray<TPtrC>& aList);
 private:    // Data
     
     /**
@@ -1056,6 +1059,16 @@
 
     CConnectAo* iConnectAo;
     TBool iInSpellMode;
+	
+    /**
+     * Indicate if need fetch the dim state from peninputserver
+     */ 	
+	TBool iNeedFetchDimState;
+
+    /**
+     * save the current dim state
+     */ 	
+    TBool iCurrentDimState;
     };
 
 class CConnectAo : public CActive
--- a/fep/aknfep/peninputplugins/PeninputPluginKr/group/PeninputPluginKr.mmp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/peninputplugins/PeninputPluginKr/group/PeninputPluginKr.mmp	Tue Apr 27 16:59:43 2010 +0300
@@ -41,6 +41,7 @@
 SOURCE        PluginKrFepManagerHwr.cpp
 SOURCE        PluginKrFepManagerVkb.cpp
 SOURCE	      PluginKrFepManagerItut.cpp
+SOURCE        peninputpluginkrcombinelistquerydialog.cpp
 
 LANG          sc 01 65
 
@@ -72,5 +73,7 @@
 LIBRARY       avkon.lib
 LIBRARY       eikcoctl.lib
 LIBRARY       centralrepository.lib
+LIBRARY       eikdlg.lib
+LIBRARY       eikcore.lib 
 
 DEBUGLIBRARY  flogger.lib
--- a/fep/aknfep/peninputplugins/PeninputPluginKr/inc/PeninputPluginKr.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/peninputplugins/PeninputPluginKr/inc/PeninputPluginKr.h	Tue Apr 27 16:59:43 2010 +0300
@@ -22,10 +22,12 @@
 #include <e32std.h>	 // TBuf
 #include <aknfeppeninputimeplugin.h>
 #include <centralrepository.h>
+#include <aknlistquerydialog.h>
 
 class RPeninputServer;
 class CPtiEngine;
 class CPluginKrFepManagerBase;
+class CPeninputPluginKrCombineListQueryDialog;
 
 class CPeninputPluginKr : public CAknFepPenInputImePlugin
     {
@@ -201,7 +203,7 @@
      */
     CPluginKrFepManagerBase* GetFSQUiL(TInt aLang);
     
-    void ShowListQueryL( const TInt aResourceId );
+    void ShowListQueryL( const TInt aResourceId, CRepository* aRepository );
     
 private:
     
@@ -218,7 +220,8 @@
     
     CPluginKrFepManagerBase* iPluginKrFepManager;
     
-    CRepository* iRepository;
+    CPeninputPluginKrCombineListQueryDialog* iCombineQueryDialg;
+    
     
     TInt iResId;
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fep/aknfep/peninputplugins/PeninputPluginKr/inc/peninputpluginkrcombinelistquerydialog.h	Tue Apr 27 16:59:43 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:           Korean Combining Word List Query Dialg 
+*
+*/
+
+
+#ifndef C_PENINPUTPLUGINKRCOMBINELISTQUERYDIALOG_H
+#define C_PENINPUTPLUGINKRCOMBINELISTQUERYDIALOG_H
+#include <aknlistquerydialog.h>
+
+class CPeninputPluginKrCombineListQueryDialog : public CAknListQueryDialog 
+    {
+public:
+    /**
+     * C++ default constructor.
+     *
+     * @since S60 v5.0
+     * @param aIndex After the query is dismissed, the index will 
+     *        hold the value of selected item.
+     */
+    CPeninputPluginKrCombineListQueryDialog(TInt* aIndex);
+
+    /**
+     * C++ default constructor.
+     *
+     * @since S60 v5.0
+     * @param aSelectionIndexArray Will hold the values of selected
+     *        items (in multiselection list).
+     */
+    CPeninputPluginKrCombineListQueryDialog(
+              CListBoxView::CSelectionIndexArray* aSelectionIndexArray);
+protected:
+    /**
+     * from CCoeControl
+     *
+     * Handles a change to the control's resources. 
+     * @since S60 v5.0
+     * @param aType aType A message UID valuey
+     */
+    void HandleResourceChange( TInt aType );
+    };
+
+#endif //C_PENINPUTPLUGINKRCOMBINELISTQUERYDIALOG_H
+
+// End of File
--- a/fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -41,6 +41,7 @@
 #include "PluginKrFepManagerHwr.h"
 #include "PluginKrFepManagerVkb.h"
 #include "PluginKrFepManagerItut.h"
+#include "peninputpluginkrcombinelistquerydialog.h"
 
 //_LIT(KFscImeName, "Korean FSC");
 //_LIT(KHwrImeName, "Korean HWR");
@@ -127,13 +128,11 @@
     BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resourceName);
     iResId = coeEnv->AddResourceFileL(resourceName);
     
-    iRepository=CRepository::NewL(KCRUidAknFep);
-    
     }
 
 CPeninputPluginKr::~CPeninputPluginKr()
     {
-    delete iRepository;
+	
     CCoeEnv::Static()->DeleteResourceFile(iResId);
     DeActivate();
     iUiLayoutImpIdList.Close();
@@ -322,18 +321,21 @@
     {
     LOG("FEP.IMEPLG.KR.HandleMenuCommandL");
     TInt ret(EFalse);
+    CRepository* repository = CRepository::NewLC(KCRUidAknFep);
     if (aCommandId==EPeninputPluginKrDoubleConsonentCmd)
         {
         TInt settingValue;
-        iRepository->Get(KAknFepKoreanCombineWordFlag,settingValue);
+        repository ->Get(KAknFepKoreanCombineWordFlag,settingValue);
         settingValue |= EKoreanWordCombineConsonantOnSetting;
-        iRepository->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
-        TRAP_IGNORE(ShowListQueryL(R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY));
-        iRepository->Get(KAknFepKoreanCombineWordFlag,settingValue);
+        repository ->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
+        TRAP_IGNORE(ShowListQueryL(R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY,repository ));
+        repository ->Get(KAknFepKoreanCombineWordFlag,settingValue);
         settingValue &= 0xFFFFFEFF;
-        iRepository->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
+        repository ->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
         ret=ETrue;
         }
+    
+    CleanupStack::PopAndDestroy(repository);
     return ret;
     }
 
@@ -575,19 +577,20 @@
 		}
     }
 
-void CPeninputPluginKr::ShowListQueryL(const TInt aResourceId)
+void CPeninputPluginKr::ShowListQueryL(const TInt aResourceId, CRepository* aRepository)
     {
     CArrayFixFlat<TInt>* arraySelected=
         new (ELeave) CArrayFixFlat<TInt>(7);
     CleanupStack::PushL(arraySelected);
-    CAknListQueryDialog* dlg=
-        new (ELeave) CAknListQueryDialog(arraySelected);
+   
+    CPeninputPluginKrCombineListQueryDialog* dlg = 
+    		new(ELeave)CPeninputPluginKrCombineListQueryDialog(arraySelected);
     dlg->PrepareLC(aResourceId);
     
 
     TInt settingValue;
 
-    if( iRepository->Get( KAknFepKoreanCombineWordFlag, settingValue ) == KErrNone )
+    if( aRepository->Get( KAknFepKoreanCombineWordFlag, settingValue ) == KErrNone )
         {
         if( settingValue & EKoreanWordCombineConsonantSsangKiyeok )
             {
@@ -636,7 +639,8 @@
         {
 
         settingValue &= 0xFFFFFF01; 
-        iRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
+        
+        aRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
         for (TInt i=0;i<arraySelected->Count();i++)
             {
             switch (arraySelected->At(i))
@@ -666,9 +670,11 @@
                     break;
                 }
             }
-        }
+
 
-    iRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
+        aRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
+        }
+    
     CleanupStack::PopAndDestroy(arraySelected);
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fep/aknfep/peninputplugins/PeninputPluginKr/src/peninputpluginkrcombinelistquerydialog.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "peninputpluginkrcombinelistquerydialog.h"
+
+// -----------------------------------------------------------------------------
+// CPeninputPluginKrCombineListQueryDialog::CPeninputPluginKrCombineListQueryDialog
+// Construction
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CPeninputPluginKrCombineListQueryDialog::CPeninputPluginKrCombineListQueryDialog(TInt* aIndex)
+    :CAknListQueryDialog(aIndex)
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CPeninputPluginKrCombineListQueryDialog::CPeninputPluginKrCombineListQueryDialog
+// Construction
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+CPeninputPluginKrCombineListQueryDialog::CPeninputPluginKrCombineListQueryDialog(
+          CListBoxView::CSelectionIndexArray* aSelectionIndexArray)
+    :CAknListQueryDialog(aSelectionIndexArray)
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CPeninputPluginKrCombineListQueryDialog::HandleResourceChange
+// Cancel itself when rotating screen  
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CPeninputPluginKrCombineListQueryDialog::HandleResourceChange( TInt aType )
+    {
+    CAknListQueryDialog::HandleResourceChange(aType);
+    if( aType == KEikDynamicLayoutVariantSwitch ) 
+        {
+        CAknListQueryDialog::TryExitL(EAknSoftkeyCancel);
+        }
+    }
+
+
--- a/fep/aknfep/peninputplugins/peninputimeplugincn/src/pluginfepmanagerbase.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/peninputplugins/peninputimeplugincn/src/pluginfepmanagerbase.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -285,6 +285,7 @@
 						}
 					HBufC8* buf8 = HBufC8::NewLC( sizeof(TInt) // For active index
 												 + sizeof(TInt) // For the count of item array
+												 + sizeof(TInt) // langcode
 												 + sizeof(TInt)*( itemArray->Count() ) // For the size of each item
 												 + sumSize// For all of char data 
 												 );
@@ -293,7 +294,9 @@
 					CleanupClosePushL(writeStream);                
 					writeStream.Open( buf8Ptr );                
 					writeStream.WriteInt32L( candidatelist->iActiveIndex );
-					writeStream.WriteInt32L( itemArray->Count() );                
+					writeStream.WriteInt32L( itemArray->Count() );
+					writeStream.WriteInt32L( candidatelist->iLangCode );
+					
 					for ( TInt i = 0; i < itemArray->Count(); i++  )
 						{
 						writeStream.WriteInt32L( (*itemArray)[i].Size() );
--- a/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/peninputplugins/peninputimeplugingeneric/src/pluginfepmanagerbase.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -283,7 +283,7 @@
             TFepITICandidateList* candidatelist 
                                = reinterpret_cast<TFepITICandidateList*>( aParam );            
             CDesCArray* itemArray = candidatelist->iItemArray;
-            if ( itemArray )
+            if ( itemArray && itemArray->Count() > 0 )
                 {           
                 TInt sumSize = 0;     
                 for ( TInt i = 0; i < itemArray->Count(); i++ )
@@ -292,6 +292,7 @@
                     }
                 HBufC8* buf8 = HBufC8::NewLC( sizeof(TInt) // For active index
                                              + sizeof(TInt) // For the count of item array
+                                             + sizeof(TInt) // for langcode
                                              + sizeof(TInt)*( itemArray->Count() ) // For the size of each item
                                              + sumSize// For all of char data 
                                              );
@@ -300,7 +301,9 @@
                 CleanupClosePushL(writeStream);                
                 writeStream.Open( buf8Ptr );                
                 writeStream.WriteInt32L( candidatelist->iActiveIndex );
-                writeStream.WriteInt32L( itemArray->Count() );                
+                writeStream.WriteInt32L( itemArray->Count() ); 
+                writeStream.WriteInt32L(candidatelist->iLangCode);
+                
                 for ( TInt i = 0; i < itemArray->Count(); i++  )
                     {
                     writeStream.WriteInt32L( (*itemArray)[i].Size() );
--- a/fep/aknfep/peninputplugins/peninputimepluginitut/src/peninputimepluginitut.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/peninputplugins/peninputimepluginitut/src/peninputimepluginitut.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -382,6 +382,7 @@
 TInt CPenInputImePluginItut::SupportModesL(CPtiEngine* /*aPtiEngine*/,
                                              RArray<TImePlguinImplDetail>& aSupportList) const 
     {
+	CleanupClosePushL( aSupportList );
     RImplInfoPtrArray infoArray;
     TUid id;
     id.iUid = KHwrLayoutInterfaceId;
@@ -467,7 +468,7 @@
         }    
 
     CleanupStack::PopAndDestroy(&infoArray); // infoArray    
-    
+    CleanupStack::Pop( &aSupportList );
     return 0;
     }
 
--- a/fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/peninputplugins/peninputimepluginitut/src/pluginfepmanagerbase.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -212,15 +212,17 @@
             break;
         case ECmdPenInputFingerMatchList:
             {
-            TFepInputAllCandidates* pCanData = reinterpret_cast<TFepInputAllCandidates*>(aParam);
-            TInt count = (*pCanData).iCandidates.Count();
+            TFepITICandidateList* pCanData = reinterpret_cast<TFepITICandidateList*>(aParam);
+            const RArray<TPtrC>* listArray = pCanData->iItemArray2;
+            TInt count = listArray->Count();
 
-            TInt transferSize = 2 * sizeof(TInt);
+            TInt transferSize = 3 * sizeof(TInt);
             RArray<TInt> sizeArray;
             for (TInt i = 0; i < count; i++)
                 {
-                sizeArray.Append((*pCanData).iCandidates[i].Size());
-                transferSize += sizeArray[i] + sizeof(TInt);
+				TInt size = (*listArray)[i].Size();
+                sizeArray.Append(size);
+                transferSize += size + sizeof(TInt);
                 }
 
             HBufC8* buf = HBufC8::NewLC(transferSize);
@@ -232,12 +234,13 @@
 
             writeStream.WriteInt32L(count);
             writeStream.WriteInt32L(transferSize);
+            writeStream.WriteInt32L(pCanData->iLangCode);
 
             for (TInt i = 0; i < count; i++)
                 {
                 writeStream.WriteInt32L(sizeArray[i]);
-                const TUint16* piData = (*pCanData).iCandidates[i].Ptr();
-                writeStream.WriteL(piData, sizeArray[i]/2);
+                const TUint16* piData = (*listArray)[i].Ptr();
+                writeStream.WriteL(piData, sizeArray[i] / 2);
                 }
 			
             writeStream.CommitL();
--- a/fep/aknfep/src/AknFepManager.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/src/AknFepManager.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -3538,7 +3538,10 @@
             	}
         #endif
             // Close UI
-            FepUI()->CloseUI();
+            if ( FepUI())
+                {
+                FepUI()->CloseUI();
+                }
             }
         else
             {            
@@ -7009,6 +7012,8 @@
     return;
     }
 #endif
+    // dim state changed, need fetch it again.
+    SendEventsToPluginManL(EPluginEnableFetchDimState);
 
     //The CCPU flag ECcpuStateShiftkeyWasPressedBeforeLosingFocus suggests that the candidate list was closed
     //with a long key press of shift key. If so then, FEP needs to set the EFlagShiftKeyDepressed for the CCPU mode to work 
@@ -13959,6 +13964,8 @@
             
 			aPositionOfInsertionPointInInlineText = decoratedInlineEdit->Length();
 
+			iUncommittedText.iCursorPos = iUncommittedText.iAnchorPos + aPositionOfInsertionPointInInlineText;
+			
             iInputCapabilities.FepAwareTextEditor()->UpdateFepInlineTextL(
                 bufferPtr, aPositionOfInsertionPointInInlineText);
             	
@@ -15800,6 +15807,7 @@
         //Hindi Change Bug Fix
         iSharedDataInterface->SetInputTextLanguage(languages->At(index));
         CAknEnv::Static()->SettingCache().Update(KEikInputLanguageChange);
+        SetActiveInputLanguage( languages->At(index) );
         ChangeInputLanguageL(languages->At(index));           
         SetFlag( EFlagNewSharedDataInputLanguage | EFlagNewSharedDataInputMode );
 	  	// This pice of code TSW Fute error fixing.
@@ -17357,20 +17365,20 @@
         }
         
     if (iLanguageCapabilities.iArabicIndicDigitsAllowed &&
-        AknTextUtils::DigitModeQuery(editorType) && 
+            (AknTextUtils::DigitModeQuery(editorType) || iMode == ENativeNumber) && 
         !ASCIIDigits)
         {
         aDestination = EDigitTypeArabicIndic;
         }
     else if (iLanguageCapabilities.iEasternArabicIndicDigitsAllowed &&
-        AknTextUtils::DigitModeQuery(editorType)&& 
+            (AknTextUtils::DigitModeQuery(editorType) || iMode == ENativeNumber) && 
         !ASCIIDigits)
         {
         aDestination = EDigitTypeEasternArabicIndic;
         }    
     /*Hindi*/    
     else if ( iLanguageCapabilities.iIndicDigitsAllowed &&
-                    AknTextUtils::DigitModeQuery(editorType) && 
+            (AknTextUtils::DigitModeQuery(editorType) || iMode == ENativeNumber) && 
         !ASCIIDigits)    
         {
         aDestination = EDigitTypeDevanagari;    
@@ -18212,7 +18220,9 @@
         {
     	currentEditorSCTResId = charMap;
         }
-    if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap && R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY == currentEditorSCTResId)
+    if(R_AKNFEP_SCT_NUMERIC_MODE_CHARS_PLAIN == charMap && 
+       ( R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_LATIN_ONLY == currentEditorSCTResId || 
+         R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG == currentEditorSCTResId ) )
         {
         TBool isEmpty = ETrue;
         TRAP_IGNORE(isEmpty = GetSctLengthL(charMap));
@@ -18367,29 +18377,9 @@
             {
             PrepareFepAfterDialogExitL(fepUid);
             SetCcpuFlag(ECcpuStateSupressCursorMoveToEnd);
-
-#ifdef RD_SCALABLE_UI_V2 
-            
-            if( iFepFullyConstructed && iFepPluginManager)
-                {
-                 if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut ||
-                     iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
-                     iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
-                    {
-                    SetStopProcessFocus(EFalse);
-                    }            
-                 else
-                    {
-                    HandleChangeInFocus();
-                    }
-                }
-            else
-                {
-                HandleChangeInFocus();
-                }   
-            // Set the flag, not change focus for next.
-            iDisalbleFocusChangeForSCT = ETrue;           
-#endif
+			// after closing SCT, need change dim state.
+            SendEventsToPluginManL(EPluginEnableFetchDimState);
+
 
             //Removes auto-complition part if SCT is launched and any special character is selected 
 #ifdef RD_INTELLIGENT_TEXT_INPUT
@@ -18442,6 +18432,9 @@
                                                                    iUncommittedText.iAnchorPos);
                                 }
                             }
+                        // Get new InputCapabilities immediatly.
+                        CCoeEnv* coeEnv = CCoeEnv::Static();
+                        iInputCapabilities = static_cast<const CCoeAppUi*>(coeEnv->AppUi())->InputCapabilities();
                         if (EditorState())
                             {
                             if (charAsDesc[0] == CEditableText::EParagraphDelimiter)
@@ -18466,11 +18459,11 @@
                                     TKeyEvent delKey = {8, EStdKeyBackspace, 1, 0};        
                                     CCoeEnv::Static()->SimulateKeyEventL(delKey, EEventKey);                                                                
                                     }                               
-                                InsertTextFromDialogL(charAsDesc, cursorSelection);
 //There may be several char to be inserted, need disable Focus change to avoid multi-focus change.
 #ifdef RD_SCALABLE_UI_V2 
                                 iDisalbleFocusChangeForSCT = ETrue;
-#endif
+#endif       
+                                InsertTextFromDialogL(charAsDesc, cursorSelection);
                                 }
                             // Clear dead key, vowel sequence and vietnamese tone mark states.                         
                             iPtiEngine->HandleCommandL(EPtiCommandGetAndClearLastVietnameseChar, 
@@ -18483,6 +18476,28 @@
                         }
                     }
                 }
+#ifdef RD_SCALABLE_UI_V2 
+            
+            if( iFepFullyConstructed && iFepPluginManager)
+                {
+                 if (iFepPluginManager->PluginInputMode() == EPluginInputModeItut ||
+                     iFepPluginManager->PluginInputMode() == EPluginInputModeFSQ ||
+                     iFepPluginManager->PluginInputMode() == EPluginInputModeFingerHwr)
+                    {
+                    SetStopProcessFocus(EFalse);
+                    }            
+                 else
+                    {
+                    HandleChangeInFocus();
+                    }
+                }
+            else
+                {
+                HandleChangeInFocus();
+                }   
+            // Set the flag, not change focus for next.
+            iDisalbleFocusChangeForSCT = ETrue;           
+#endif
             }
         else
             {
--- a/fep/aknfep/src/AknFepPluginManager.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/src/AknFepPluginManager.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -258,6 +258,7 @@
     iClosePluginInputMode = EFalse;
     iDimGainForeground = ETrue;
     iAlignment = 0;
+	iNeedFetchDimState = ETrue;
     }
 
 // ---------------------------------------------------------------------------
@@ -628,6 +629,26 @@
                     }    
                 }
                 break;
+            case ESignalShowCandidate:
+                {
+                // Get candidate list
+                TInt activeIdx = 0;
+                CDesCArray* candidates = new (ELeave) CDesCArrayFlat
+                                                 ( KDefaultCandidateArraySize );
+        		CleanupStack::PushL( candidates );
+        		iFepMan.GetCandidatesL(*candidates, activeIdx);
+
+        		TFepITICandidateList candidateListData;
+        		candidateListData.iItemArray = candidates;
+        		candidateListData.iActiveIndex 
+        		            = ( candidates->Count() >= 2 ) ? 1 : activeIdx;  
+        		candidateListData.iLangCode = iFepMan.CurrentInputLangCode();
+        		
+        		ShowCandidateListL( candidateListData );        		
+        		CleanupStack::PopAndDestroy( candidates );                
+                }
+                break;
+                
             case ESignalSelectMatchSelectionText:
                 {
                 TInt* ptrData = (TInt*)(pBuf.Ptr());
@@ -709,22 +730,6 @@
                     }
                 }
                 break;
-            case ESignalShowCandidate:
-                {
-                // Get candidate list
-                TInt activeIdx = 0;
-                CDesCArray* candidates = new (ELeave) CDesCArrayFlat
-                                                 ( KDefaultCandidateArraySize );
-        		CleanupStack::PushL( candidates );
-        		iFepMan.GetCandidatesL( *candidates, activeIdx );
-        		TFepITICandidateList candidateListData;
-        		candidateListData.iItemArray = candidates;
-        		candidateListData.iActiveIndex 
-        		            = ( candidates->Count() >= 2 ) ? 1 : activeIdx;        		
-        		ShowCandidateListL( candidateListData );        		
-        		CleanupStack::PopAndDestroy( candidates );                
-                }
-                break;
             case ESignalSelectCandidate:
                 {
                 // Select candidate word on fsq
@@ -996,6 +1001,11 @@
         		}
         	}
         	break;
+        case EPluginEnableFetchDimState:
+        	{
+        	iNeedFetchDimState = ETrue;
+        	}
+        	break;
         default:
             break;
         }
@@ -1925,11 +1935,11 @@
     	    aMenuPane->SetItemDimmed(EPenInputCmdVITUT, EFalse);
     	    }
     	
-    	if ( iFepMan.IsArabicInputLanguage() && ( curInputMode != EPluginInputModeFingerHwr )
-    			&& !( disabledInputMode & EPluginInputModeFingerHwr ))
-    	    {
-    	    aMenuPane->SetItemDimmed( EPeninputCmdHwr, EFalse );
-    	    }
+    	//if ( iFepMan.IsArabicInputLanguage() && ( curInputMode != EPluginInputModeFingerHwr )
+    	//		&& !( disabledInputMode & EPluginInputModeFingerHwr ))
+    	//    {
+    	//    aMenuPane->SetItemDimmed( EPeninputCmdHwr, EFalse );
+    	//    }
         //For arabic finger hwr input orientation.
         TInt index = 0;        
         if(iPluginInputMode == EPluginInputModeFingerHwr
@@ -2011,7 +2021,7 @@
         return;    
         }
     
-    if ( iFepMan.StopProcessFocus()  )
+    if ( !iForegroundChange && iFepMan.StopProcessFocus()  )
         {
         if (iFepMan.CloseUiOnFocusChange())
             {
@@ -2077,6 +2087,13 @@
             bOpen = EFalse;						
         }*/
 
+    // The state means: when current app with dim state lose foreground by non-capserver or notify server
+    // Need to cancel dim state
+    if ( iForegroundChange && !aGainForeground && !IsGlobalNotesApp( focusAppId ) && iInMenu )
+    	{
+		ResetMenuState();
+    	}  
+    
     if ( aGainForeground && iFepMan.FepAwareTextEditor() && IsCurrentWindInOpenList() )
         {
         if(!iPenInputSvrConnected) 
@@ -2397,7 +2414,7 @@
         aLastEditorContent.Compare( aCurrentEditorContent ) == 0 )
     	{
         if ( aIcfData.iCurSel.HigherPos() > edit->DocumentLengthForFep() || 
-         aIcfData.iCurSel.LowerPos() < 0 )
+         aIcfData.iCurSel.LowerPos() < 0 || IsDimed() )
             {
             return EFalse;
             }
@@ -2877,6 +2894,10 @@
 //
 void CAknFepPluginManager::LaunchPenInputMenuL(TInt aResourceId, TBool aRemeber)
     {
+	// when launch option menu, dim state changes, 
+	// so need fetch the state next time.
+	iNeedFetchDimState = ETrue;
+	
     TInt previousModes = iCurPermitModes;
     TBool previousSCT  = isLanuchSCT;
     TInt inputmode = PluginInputMode();
@@ -3260,10 +3281,17 @@
                         // check if need to change current text case
                         TPtiTextCase textCase = 
                         CaseForMappedCharacter( TChar( keyEvent.iCode ) );                                                        
-						if ( !IsDeadKeyCode( keyEvent.iCode ) && IsNeedToChangeTextCase( textCase ) )
+						if ( IsNeedToChangeTextCase( textCase ) )
                             {
                             iFepMan.PtiEngine()->SetCase( textCase );
-                            }                        
+                            }
+                                                                       
+						env->SimulateKeyEventL(keyEvent, EEventKeyDown);
+						env->SimulateKeyEventL(keyEvent, EEventKey);
+						env->SimulateKeyEventL(keyEvent, EEventKeyUp);
+                        }
+                    else if ( keyEvent.iScanCode == EStdKeySpace )
+                        {
                         TRawEvent eventDown; 
                         eventDown.Set( TRawEvent::EKeyDown, keyEvent.iScanCode ); 
                         iAvkonAppUi->DisableNextKeySound( keyEvent.iScanCode ); 
@@ -3323,9 +3351,11 @@
 // -----------------------------------------------------------------------------
 //
 void CAknFepPluginManager::OnPenInputServerKeyEventL(const TDesC& aData)
-    {
-    
-    iFepMan.PtiEngine()->CancelTimerActivity();
+    {	
+    if ( !EnableITIOnFSQ() )
+    	{
+        iFepMan.PtiEngine()->CancelTimerActivity();
+    	}    
     
     if( aData.Length() <= 0 )
         {
@@ -3897,7 +3927,12 @@
                                               
     iCurrentPluginInputFepUI->HandleCommandL( ECmdPenInputDimArrowKeys, 
                                               enableArrowBtn);    
-                                                                                        
+    if ( PluginInputMode() == EPluginInputModeFSQ )
+    	{
+        iCurrentPluginInputFepUI->HandleCommandL( ECmdPenInputDimEnterKey, 
+        		                                  iFepMan.IsFindPaneEditor() );
+    	}
+
     SetIcfAlignment();
     
     iModeChanged = ETrue;
@@ -4265,10 +4300,20 @@
 
     for (TInt i = 0; i < iCandidateList.Count(); i++)
         iSendAllList.iCandidates.Append(iCandidateList[i]->Des());
+    
+    SendMatchListCmd(iSendAllList.iCandidates);
+    }
+
+void CAknFepPluginManager::SendMatchListCmd(const RArray<TPtrC>& aList)
+	{
+    TFepITICandidateList list;
+    list.iActiveIndex = 0;
+    list.iItemArray2 = &aList;
+    list.iLangCode = iFepMan.CurrentInputLangCode();
 
     TRAP_IGNORE(iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerMatchList, 
-                                                         reinterpret_cast<TInt>(&iSendAllList)));
-    }
+                                                         reinterpret_cast<TInt>(&list)));
+	}
 
 TBool CAknFepPluginManager::GetIndicatorImgID(const TInt IndicatorUID,TInt &aImage, TInt &aMask)
     {
@@ -5017,7 +5062,12 @@
         {
         return EFalse;
         }    
-    return iPenInputServer.IsDimmed();    
+    if( iNeedFetchDimState )
+        {
+        iCurrentDimState = iPenInputServer.IsDimmed();  
+        iNeedFetchDimState = EFalse;
+        }
+    return iCurrentDimState;
     }
 void CAknFepPluginManager::HandleiDimGainForeground(TBool aGain)
     {
@@ -5455,14 +5505,11 @@
 // 1. Not in keymapping: some function keys, space, enter, backspace
 // 2. In keymappings: keys on AB/Native range.
 #ifdef RD_INTELLIGENT_TEXT_INPUT
-    if ( aKeyEvent.iScanCode == EStdKeySpace
-    	 || aKeyEvent.iScanCode == EStdKeyEnter
-    	 || aKeyEvent.iScanCode == EStdKeyBackspace
-    	 || ( aKeyEvent.iScanCode != EPtiKeyNone 
-    	      && ( iPluginPrimaryRange == ERangeNative 
-    	           || iPluginPrimaryRange == ERangeEnglish
-    	           || ( iPluginPrimaryRange == 0 && iFepMan.InputMode() != ENumber 
-    	                   && iFepMan.InputMode() != ENativeNumber ) ) ) )
+    if ( aKeyEvent.iScanCode != EPtiKeyNone 
+    	  && ( iPluginPrimaryRange == ERangeNative 
+    	       || iPluginPrimaryRange == ERangeEnglish
+    	       || ( iPluginPrimaryRange == 0 && iFepMan.InputMode() != ENumber 
+    	               && iFepMan.InputMode() != ENativeNumber ) ) )
         {
         return ETrue;
         }
@@ -5519,6 +5566,12 @@
 TBool CAknFepPluginManager::IsNeedToChangeTextCase( const TPtiTextCase& aTextCase )
     {
 #ifdef RD_INTELLIGENT_TEXT_INPUT
+	// Not need change case if it is supported in language
+	if ( iCaseMan.IsAbleChangeCase() )
+		{
+	    return EFalse;
+		}
+	
     TPtiTextCase textCase = aTextCase;
     if( EPtiKeyboardHalfQwerty != iFepMan.PtiEngine()->KeyboardType() )
 		{
--- a/fep/aknfep/src/AknFepSharedDataInterface.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/src/AknFepSharedDataInterface.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -586,14 +586,18 @@
 
 void CAknFepSharedDataInterface::HandleInputTextLanguageGSChange()
     {
-    iFepManager->SetFlag(CAknFepManager::EFlagNewSharedDataInputLanguage);
-    ESubVariantFlag subVariant = AknLayoutUtils::SubVariant();
-    if((AknLayoutUtils::Variant() == EApacVariant)
-        && ((subVariant == EPrcSubVariant)
-        || (subVariant == EHongKongSubVariant)
-        || (subVariant == ETaiwanSubVariant)))
+    if( iFepManager->ActiveInputLanguage() != PenInputLanguage() )
         {
-        iFepManager->SetFlag(CAknFepManager::EFlagNewSharedDataInputMode);
+        iFepManager->SetFlag(CAknFepManager::EFlagNewSharedDataInputLanguage);
+        ESubVariantFlag subVariant = AknLayoutUtils::SubVariant();
+        if((AknLayoutUtils::Variant() == EApacVariant)
+            && ((subVariant == EPrcSubVariant)
+            || (subVariant == EHongKongSubVariant)
+            || (subVariant == ETaiwanSubVariant)))
+            {
+            iFepManager->SetFlag(CAknFepManager::EFlagNewSharedDataInputMode);
+            }
+        iFepManager->SetActiveInputLanguage( PenInputLanguage() );
         }
     }
 
@@ -768,7 +772,7 @@
 		RProperty::Get( KPSUidAknFep, KAknFepVirtualKeyboardType, 
 						keyboardType );      
 		}
-#else if
+#else
 	// Get physical keyboard type
 	RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType );	    
 #endif
--- a/fep/aknfep/src/AknFepUiInputStateEntryVietnamesePredictive.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/src/AknFepUiInputStateEntryVietnamesePredictive.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -32,6 +32,7 @@
 #include "AknFepUIManagerStateInterface.h"      //MAknFepUIManagerStateInterface
 #include "AknFepCaseManager.h"
 #include "AknFepVietnameseToneManager.h"
+#include "AknFepPluginManager.h"
 
 #include <uikon.hrh>
 #include <PtiEngine.h>                          //CPtiEngine
@@ -191,6 +192,17 @@
         {
         if (fepMan->IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction))
             {
+#ifdef RD_SCALABLE_UI_V2
+            if ( (iIsLastWord || ptiengine->NumberOfCandidates() == 1) 
+                 && ( fepMan->PluginUIManager()->PluginInputMode() == EPluginInputModeItut ) )
+                {
+                fepMan->PluginUIManager()->SetFingerMatchSelectionState(ETrue);
+                fepMan->PluginUIManager()->ShowAllCandidates();
+                iMatchState = EWordMatchNone;
+                iIsLastWord = EFalse;
+                return ETrue;
+                }
+#endif //RD_SCALABLE_UI_V2
             if (fepMan->IsFlagSet(CAknFepManager::EFlagNoMatches))
                 {
                 //no more matches
--- a/fep/aknfep/src/aknfepuispellcontainer.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/fep/aknfep/src/aknfepuispellcontainer.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -90,17 +90,19 @@
 // 
 void CAknFepUiSpellContainer::SetInputWinFocus( TBool aFocus )
 	{
-	if( iInputPane->IsFocused() != aFocus )
+	if ( IsFocused() == aFocus )
 		{
-	    iInputPane->SetFocus( aFocus );
+		return;
 		}
+	
 	// When release focus, remove from stack.
 	if( aFocus )
-		{
+		{		
 	    iEikonEnv->EikAppUi()->AddToStackL( this, ECoeStackPriorityDialog );
 		}
 	else
 		{
+	    SetFocus( EFalse );
 	    iEikonEnv->EikAppUi()->RemoveFromStack( this );
 		}
 	}
--- a/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/inputmethods_plat/aknfep_pen_support_api/inc/aknfeppeninputenums.h	Tue Apr 27 16:59:43 2010 +0300
@@ -178,6 +178,7 @@
     ECmdPeninputITIStatus,
     ECmdPeninputSpellLanguageMode,
 	ECmdPeninputSpellICFDisplayContent,
+	ECmdPenInputDimEnterKey,
     ECmdPenInputImeCmdBase = 2000
     };
 
--- a/inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputcmdparam.h	Tue Apr 27 16:59:43 2010 +0300
@@ -133,8 +133,13 @@
  */
 struct TFepITICandidateList
     {
-    CDesCArray* iItemArray;
+	union
+		{
+		CDesCArray* iItemArray;
+		const RArray<TPtrC>* iItemArray2;
+		};
     TInt iActiveIndex;
+    TInt iLangCode;
     };
 
 class CPtiEngine;
@@ -157,4 +162,4 @@
 	TPtrC iICFText;
 	TPtrC iPromptText;
 	};
-#endif
\ No newline at end of file
+#endif
--- a/inputmethods_plat/ptiengine_hwr_api/tsrc/group/testdomecom.mmp	Wed Apr 14 16:18:34 2010 +0300
+++ b/inputmethods_plat/ptiengine_hwr_api/tsrc/group/testdomecom.mmp	Tue Apr 27 16:59:43 2010 +0300
@@ -41,7 +41,7 @@
 
 SOURCEPATH     ../data
 START RESOURCE  testdomecom.rss
-TARGET  /resource/plugins/testdomecom.rsc
+TARGET  testdomecom.rsc
 END
 
 USERINCLUDE     ../inc
--- a/inputmethods_pub/ptiengine_iti_api/inc/PtiDefs.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/inputmethods_pub/ptiengine_iti_api/inc/PtiDefs.h	Tue Apr 27 16:59:43 2010 +0300
@@ -499,7 +499,7 @@
     EPtiPinyin   = 0x02,
     EPtiBopomofo = 0x04,
     EPtiZhuyin   = 0x08,
-    EPtiCangJie  = 0x16,
+    EPtiCangJie  = 0x10,
     EPtiEasyCangjie = 0x20,
     EPtiAdvCangjie = 0x40
     };
--- a/textinput/GSLangPlugin/src/GSLangModel.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/GSLangPlugin/src/GSLangModel.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1346,7 +1346,16 @@
     {
     TInt physicalKeyboards = 0;
     User::LeaveIfError( iAknFepRepository->Get(  KAknFepPhysicalKeyboards, physicalKeyboards ));
-
+    // Check virtual keyboards
+    if ( FeatureManager::FeatureSupported(KFeatureIdVirtualItutInput) )
+        {
+        physicalKeyboards = physicalKeyboards | 0x01;
+        }
+    if ( FeatureManager::FeatureSupported(KFeatureIdVirtualFullscrQwertyInput) )
+        {
+        physicalKeyboards = physicalKeyboards | 0x02;
+        }
+    // Check virtual keyboards end
     TBool firstFound = EFalse;
     for(TUint i = 0x01; i <= 0xF0; i = i << 1)
         {
@@ -1381,6 +1390,16 @@
     {
     TInt physicalKeyboards = 0;
     User::LeaveIfError( iAknFepRepository->Get(  KAknFepPhysicalKeyboards, physicalKeyboards ));
+    // Check virtual keyboards
+    if ( FeatureManager::FeatureSupported(KFeatureIdVirtualItutInput) )
+        {
+        physicalKeyboards = physicalKeyboards | 0x01;
+        }
+    if ( FeatureManager::FeatureSupported(KFeatureIdVirtualFullscrQwertyInput) )
+        {
+        physicalKeyboards = physicalKeyboards | 0x02;
+        }
+    // Check virtual keyboards end
     return physicalKeyboards;
     }
 
--- a/textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/bwins/peninputlayoutcontrolU.DEF	Tue Apr 27 16:59:43 2010 +0300
@@ -592,4 +592,5 @@
 	?DrawLine@CTransparentHwrWndExt@@EAE?AVTRect@@ABVTPoint@@0H@Z @ 591 NONAME ; class TRect CTransparentHwrWndExt::DrawLine(class TPoint const &, class TPoint const &, int)
 	?EndStrokeL@CHwrWndBase@@UAEXH@Z @ 592 NONAME ; void CHwrWndBase::EndStrokeL(int)
 	?SetStarIcon@CVirtualKeyboard@@QAEXPAVCPenInputColorIcon@@@Z @ 593 NONAME ; void CVirtualKeyboard::SetStarIcon(class CPenInputColorIcon *)
+	?SetTextAlignment@CFepLayoutChoiceList@@QAEXW4TTextAlign@CGraphicsContext@@@Z @ 594 NONAME ; void CFepLayoutChoiceList::SetTextAlignment(enum CGraphicsContext::TTextAlign)
 
--- a/textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/eabi/peninputlayoutcontrolU.DEF	Tue Apr 27 16:59:43 2010 +0300
@@ -726,4 +726,5 @@
 	_ZN21CTransparentHwrWndExt8DrawLineERK6TPointS2_i @ 725 NONAME
 	_ZN21CTransparentHwrWndExt9DrawPointERK6TPointi @ 726 NONAME
 	_ZN16CVirtualKeyboard11SetStarIconEP18CPenInputColorIcon @ 727 NONAME
+	_ZN20CFepLayoutChoiceList16SetTextAlignmentEN16CGraphicsContext10TTextAlignE @ 728 NONAME
 
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h	Tue Apr 27 16:59:43 2010 +0300
@@ -30,6 +30,7 @@
 #include "peninputlayoutbasecontrol.h"
 #include "peninputcmdparam.h"
 
+class MAknsSkinInstance;
 class CFepUiCursor;
 
 class CControlGroup;
@@ -544,6 +545,22 @@
 	 */      
 	//Advanced Tactile feedback REQ417-47932
 	IMPORT_C void ChangeFeedbackType(TInt aId, TInt aNewTactileType);  
+	
+    /**
+     * Get the layout SkinInstance
+     *
+     * @since S60 v4.0        
+     * @return SkinInstance
+     */
+    inline MAknsSkinInstance* SkinInstance();
+    
+    /**
+     * Get the layout TouchFeedbackInstance
+     *
+     * @since S60 v4.0        
+     * @return TouchFeedbackInstance
+     */
+    inline MTouchFeedback* TouchFeedbackInstance();
 
 protected:
     /**
@@ -611,6 +628,24 @@
      */
     void SendEditorTextAndCursorPosL(TUint8* aData);
 
+private:
+    NONSHARABLE_CLASS( CFepUiLayoutExt) : public CBase
+        {
+        public:
+			TBool iTactileSupported;
+    	
+			/**
+			 * Used to Cache skins instance 
+			 */ 
+			MAknsSkinInstance*  iSkinInstance;
+			
+			/**
+			 * Used to Cache TouchFeedback instance 
+			 */ 
+			MTouchFeedback*   iTouchFeedbackInstance;    
+            
+        };
+ 
 private:  
     /**
      * Layout dragging position. Same as iLayoutPos, but only used when layout is
@@ -660,15 +695,12 @@
      */
      TInt iLayoutReady;     
     
+     CFepUiLayoutExt* iExtension;
     /**
      * Reserved item1
      */
      TInt iReserved1;     
-     
-    /**
-     * Flag for tactile feedback support
-     */        
-    TBool iTactileSupported;
+    
 };
 
 #include "peninputlayout.inl"
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.inl	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.inl	Tue Apr 27 16:59:43 2010 +0300
@@ -92,4 +92,22 @@
     {
     return iLockedAreaOwner;
     }
+
+// ---------------------------------------------------------------------------
+// get skins instance
+// ---------------------------------------------------------------------------
+//
+inline MAknsSkinInstance* CFepUiLayout::SkinInstance()
+	{
+	return iExtension->iSkinInstance;
+	}
+
+// ---------------------------------------------------------------------------
+// get skins TouchFeedback instance
+// ---------------------------------------------------------------------------
+//
+inline MTouchFeedback* CFepUiLayout::TouchFeedbackInstance()
+	{
+	return iExtension->iTouchFeedbackInstance;
+	}
 //end of file    
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutchoicelist.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayoutchoicelist.h	Tue Apr 27 16:59:43 2010 +0300
@@ -309,6 +309,8 @@
      */       
     IMPORT_C void SetCurrentFocusedIndex(const TInt aIndex);
     
+    
+    IMPORT_C void SetTextAlignment(const CGraphicsContext::TTextAlign aAlign);
 protected:
 
     /**
@@ -503,6 +505,11 @@
      */
      TAknsItemID iSubItemSkinID;
      TAknsItemID iBackgroundSkinID;
+     
+     /*
+      * iText alignment
+      */        
+     CGraphicsContext::TTextAlign iAlign;
     };
 
 #include "peninputlayoutchoicelist.inl"
--- a/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h	Tue Apr 27 16:59:43 2010 +0300
@@ -163,6 +163,12 @@
      */
     void Draw( const TRect &aRect ) const;
     
+public:
+    /**
+     * Auto refresh timer callback, refresh pen ui. (for NGA)
+     */
+    void RefreshUI();
+    
 private:
 
     /**
@@ -197,6 +203,16 @@
      */
     TUid WindowGroupNameAppUidL( RWsSession& aWS,TInt aWGId  );
     
+    /**
+     * Restart auto refresh timer. (for NGA)
+     */
+    void RestartRefreshTimer();
+    
+    /**
+     * stop auto refresh timer. (for NGA)
+     */
+    void StopRefreshTimer();
+    
 
 private: // Data
     RWindowGroup& iWndGroup;
@@ -222,6 +238,13 @@
     //TBool iUiLayoutChange;
     TBool iInGlobalEditorState;
     TRect iLayoutClipRect;
+    
+    /**
+     * Auto refresh timer
+     * own
+     */
+    CPeriodic* iAutoRefreshTimer;
+    
     };
 class CInternalBkCtrl : public CCoeControl
     {
--- a/textinput/peninputarc/src/peninputclient/penclientimpl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputclient/penclientimpl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -930,6 +930,7 @@
 //
 void RPeninputServerImpl::ReadIntArrayFromBufL(const TDesC8& aBuf, RArray<TInt>& aResult)
     {
+	CleanupClosePushL( aResult );
 	RDesReadStream readStream;
 	readStream.Open(aBuf);
 	CleanupClosePushL(readStream);
@@ -941,6 +942,7 @@
 		}
 		
     CleanupStack::PopAndDestroy(&readStream);
+    CleanupStack::Pop( &aResult );
     }
 
 // ---------------------------------------------------------------------------
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutaknchoicelist.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutaknchoicelist.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -208,7 +208,7 @@
         gc->Activate( BitmapDevice() );
 
         const TRect& r = Rect();
-        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        MAknsSkinInstance* skin = UiLayout()->SkinInstance();
         TRAP_IGNORE(CWindowGc& sysgc = *(RootControl()->GetRWindowGcL()));
         //if ( !AknsDrawUtils::Background( skin, iBgContext, sysgc, r ) )
             {
@@ -277,7 +277,7 @@
     TRgb color( KRgbBlack );  // sane default for nonskinned case
     if ( AknsUtils::AvkonSkinEnabled() )
         {
-        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
                                color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
         }
 
@@ -286,7 +286,7 @@
 
     if ( AknsUtils::AvkonSkinEnabled() )
         {
-        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
                                color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
         }
 
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbasecontrol.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbasecontrol.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -692,9 +692,7 @@
     }
 
 TBool CFepUiBaseCtrl::IsOnTopOf(CFepUiBaseCtrl* aCtrl)
-    {
-    __ASSERT_DEBUG(aCtrl,EUiNullParam);
-    
+    {           
     return OrderPos() < aCtrl->OrderPos();
     }
     
@@ -1319,11 +1317,7 @@
 
 EXPORT_C void CFepUiBaseCtrl::SetParent(CFepUiBaseCtrl* aParent)
     {
-    //parent control must be type of control group.
-    if(aParent)
-        {
-        __ASSERT_DEBUG(aParent->IsKindOfControl(ECtrlControlGroup),EUiLayoutBadParentType);
-        }
+    //parent control must be type of control group.    
     iParentCtrl = aParent;
     }
 
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -234,7 +234,8 @@
 	// Draw background
 	if ( iBgSkinId.iMajor )
 	    {
-    	AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+	
+    	AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), //UiLayout()->SkinInstace()
                          *gc,
                          rect,
                          innerRect,
@@ -243,7 +244,7 @@
 	    }
 	else if( iFirstBmpId.iMajor && iMiddleBmpId.iMajor && iLastBmpId.iMajor )
 		{
-		AknPenInputDrawUtils::Draw3PiecesFrame( AknsUtils::SkinInstance(),
+		AknPenInputDrawUtils::Draw3PiecesFrame( UiLayout()->SkinInstance(),
 						 *gc,
 						 rect,
 						 innerRect,
@@ -301,7 +302,7 @@
         TRgb color( KRgbBlack );  // sane default for nonskinned case
 	    if ( AknsUtils::AvkonSkinEnabled() )
 	        {
-	        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+	        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
 	                               color, KAknsIIDQsnTextColors, iTextColorIndex );
 	        }
 	     textLayout.DrawText(*gc, *iText, ETrue, color);
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutchoicelist.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutchoicelist.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -238,6 +238,7 @@
     SetControlType(ECtrlPopupChoiceList);
 	iSubItemSkinID 		= KAknsIIDNone;
 	iBackgroundSkinID   = KAknsIIDNone;
+	iAlign              = CGraphicsContext::ELeft;
     }
 
 // CFepLayoutChoiceList::HitTest
@@ -445,7 +446,7 @@
        	    iSubItemSkinID.iMinor != EAknsMinorNone)
        		{
        		gc->Activate( BitmapDevice() ); 
-			AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+			AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
                          *gc, 
                          rtFocusRect, 
                          rtInnerRect,
@@ -481,7 +482,7 @@
         gc->SetPenColor(iFontColor);
         gc->SetPenStyle(CGraphicsContext::ESolidPen);
 
-        gc->DrawText(aItem.iText, aRect, iBaseline, CGraphicsContext::ELeft, iMargin);
+        gc->DrawText(aItem.iText, aRect, iBaseline, iAlign, iMargin);
 
         gc->DiscardFont();
         }
@@ -504,7 +505,7 @@
 	    CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
 	    
 	    gc->Activate( BitmapDevice() ); 
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 	                     *gc, 
 	                     aRect, 
 	                     rtInnerRect,
@@ -652,4 +653,9 @@
     {
     TRAP_IGNORE(AfterDisplayedL());
     }
+
+EXPORT_C void CFepLayoutChoiceList::SetTextAlignment(const CGraphicsContext::TTextAlign aAlign)
+	{
+	iAlign = aAlign;
+	}
 //End Of File
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayouteditareabase.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayouteditareabase.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -553,7 +553,7 @@
 
     	    if ( AknsUtils::AvkonSkinEnabled() )
     	        {
-    	        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+    	        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
     	                 color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG60 );
     	        }
             }
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmicfcustomdraw.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmicfcustomdraw.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -160,13 +160,15 @@
     switch (aCode)
         {
         case 0x0020: // unicode for space
+            return MTmCustom::EBkLineBreakClass;//ELineBreakClasses;
         case 0x0023: // unicode for #
-        case 0x005f: // unicode for _
         case 0x002a: // unicode for *
         case 0x0040: // unicode for @
         case 0x0026: // unicode for &
         case 0x003d: // unicode for =
-            return MTmCustom::EBkLineBreakClass;//ELineBreakClasses;
+        	return MTmCustom::EB2LineBreakClass;
+        case 0x005f: // unicode for _
+            return MTmCustom::EBaLineBreakClass;
         default:
             break; // carry on
         }
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutmultilineicfeditor.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -997,6 +997,11 @@
             }
         }
     
+    if ( editArea->iCursorVisible )
+    	{
+        editArea->SetSelectionL( editArea->iCursorSel );
+        editArea->Draw();
+    	}
     editArea->UpdateArea(editArea->Rect(),EFalse);
     return KErrNone;
     }
@@ -1131,7 +1136,7 @@
         TRect innerrect = Rect();
   	    //innerrect.Shrink(4, 4);
 
-        AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), 
+        AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), 
    		                         *gc, 
    		                         Rect(), 
    		                         innerrect,
@@ -1198,7 +1203,7 @@
 
     if (iSkinIdSet)
         {
-   		AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), 
+   		AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), 
     	                         *gc, 
     	                         Rect(), 
     	                         Rect(),
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutrootctrl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutrootctrl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -865,7 +865,7 @@
 
     if ( AknsUtils::AvkonSkinEnabled() )
         {
-        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
                                penCor, KAknsIIDQsnTextColors, clrIndex );
         }
 
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -129,7 +129,7 @@
 				TRgb color( KRgbBlack );  // sane default for nonskinned case			    
 			    if ( AknsUtils::AvkonSkinEnabled() )
 			        {
-			        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+			        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
 				                               color, 
 				                               KAknsIIDQsnTextColors, 
 				                               iKeyboard->KeyTextColorGroup() );
@@ -178,7 +178,7 @@
 	    if ( AknsUtils::AvkonSkinEnabled() || 
 	    	 iKeyboard->KeyTextColorGroup() != INVALID_COLOR_GROUP )
 	        {
-	        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+	        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
 		                               color, 
 		                               KAknsIIDQsnTextColors, 
 		                               iKeyboard->KeyTextColorGroup() );
@@ -228,7 +228,7 @@
         TRect innerRect = Rect();
 		innerRect.Shrink( 4, 0 );
 		    
-		AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(),
+		AknPenInputDrawUtils::Draw3PiecesFrame(UiLayout()->SkinInstance(),
 								   *gc,
 								   Rect(),
 								   innerRect,
@@ -245,7 +245,7 @@
         TRect innerrect = rect;
         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
         
-        AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(),
+        AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(),
                                  *gc,
                                  rect,
                                  innerrect,
@@ -337,7 +337,7 @@
         TRect innerRect = Rect();
 		innerRect.Shrink( 4, 0 );
 		    
-		AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(),
+		AknPenInputDrawUtils::Draw3PiecesFrame(UiLayout()->SkinInstance(),
 								   *gc,
 								   Rect(),
 								   innerRect,
@@ -354,7 +354,7 @@
         TRect innerrect = rect;
         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
 
-        AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), 
+        AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), 
                                  *gc, 
                                  rect, 
                                  innerrect,
@@ -419,7 +419,7 @@
         TRect innerRect = Rect();
 		innerRect.Shrink( 4, 0 );
 		    
-		AknPenInputDrawUtils::Draw3PiecesFrame(AknsUtils::SkinInstance(),
+		AknPenInputDrawUtils::Draw3PiecesFrame(UiLayout()->SkinInstance(),
 								   *gc,
 								   Rect(),
 								   innerRect,
@@ -439,7 +439,7 @@
         TRect innerrect = rect;
         innerrect.Shrink( KDefaultKeyMargin, KDefaultKeyMargin );
 
-        AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), 
+        AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), 
                                  *gc, 
                                  rect, 
                                  innerrect,
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -28,6 +28,8 @@
 #include <AknDef.h>
 #include <AknsConstants.h>
 #include <coemain.h>
+#include <aknsutils.h> 
+#include <aknsskininstance.h> 
 
 #ifdef RD_TACTILE_FEEDBACK
 #include <touchfeedback.h>
@@ -50,9 +52,6 @@
                             GetDefaultScreenSizeAndRotation(ptSize);
     //set the screen size in case any one need use it.                            
     iScreenSize = ptSize.iPixelSize;  
-#ifdef RD_TACTILE_FEEDBACK
-    iTactileSupported = EFalse;
-#endif // RD_TACTILE_FEEDBACK
     }
 
 // ---------------------------------------------------------------------------
@@ -66,7 +65,8 @@
     //remove all registered area
     SignalOwner(ESignalDeRegisterAllFeedbackArea);
 #endif // RD_TACTILE_FEEDBACK 
-    delete iRootCtrl;        
+    delete iRootCtrl;   
+    delete iExtension;
     } 
 
 // ---------------------------------------------------------------------------
@@ -77,7 +77,13 @@
 EXPORT_C void CFepUiLayout::BaseConstructL()
     {
     iRootCtrl = CFepUiLayoutRootCtrl::NewL(this);
-    __ASSERT_DEBUG(iLayoutOwner,User::Leave(EUiLayoutNotReady));     
+    __ASSERT_DEBUG(iLayoutOwner,User::Leave(EUiLayoutNotReady));  
+    iExtension = new(ELeave) CFepUiLayoutExt;
+#ifdef RD_TACTILE_FEEDBACK
+    iExtension->iTactileSupported = EFalse;
+#endif // RD_TACTILE_FEEDBACK
+    iExtension->iSkinInstance = AknsUtils::SkinInstance();
+    iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance();
     }
 
 // ---------------------------------------------------------------------------
@@ -448,7 +454,7 @@
     iLayoutReady = ETrue;
     iRootCtrl->OnActivate();
 #ifdef RD_TACTILE_FEEDBACK  
-    iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
+    iExtension->iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
 #endif // RD_TACTILE_FEEDBACK      
     }
     
@@ -791,7 +797,7 @@
     {
     TBool tactileSupported;
 #ifdef RD_TACTILE_FEEDBACK
-    tactileSupported = iTactileSupported;
+    tactileSupported = iExtension->iTactileSupported;
 #endif // RD_TACTILE_FEEDBACK
 	return tactileSupported;
     }
@@ -804,7 +810,7 @@
 EXPORT_C void CFepUiLayout::DoTactileFeedback(TInt aType)
     {
 #ifdef RD_TACTILE_FEEDBACK
-    MTouchFeedback::Instance()->InstantFeedback((TTouchLogicalFeedback)aType);
+	iExtension->iTouchFeedbackInstance->InstantFeedback((TTouchLogicalFeedback)aType);
 #endif // RD_TACTILE_FEEDBACK    
     }
 
@@ -818,16 +824,16 @@
 #ifdef RD_TACTILE_FEEDBACK
 	if (aAudioEnable && aVibraEnable)
 		{
-		MTouchFeedback::Instance()->InstantFeedback((TTouchLogicalFeedback)aType);
+	    iExtension->iTouchFeedbackInstance->InstantFeedback((TTouchLogicalFeedback)aType);
 		}
 	else
 		{
-		TBool vibraEnabled = MTouchFeedback::Instance()->FeedbackEnabledForThisApp( ETouchFeedbackVibra );
-		TBool audioEnabled = MTouchFeedback::Instance()->FeedbackEnabledForThisApp( ETouchFeedbackAudio );
+		TBool vibraEnabled = iExtension->iTouchFeedbackInstance->FeedbackEnabledForThisApp( ETouchFeedbackVibra );
+		TBool audioEnabled = iExtension->iTouchFeedbackInstance->FeedbackEnabledForThisApp( ETouchFeedbackAudio );
 		
-		MTouchFeedback::Instance()->SetFeedbackEnabledForThisApp(aVibraEnable, aAudioEnable);
-		MTouchFeedback::Instance()->InstantFeedback((TTouchLogicalFeedback)aType);
-		MTouchFeedback::Instance()->SetFeedbackEnabledForThisApp(vibraEnabled, audioEnabled);
+		iExtension->iTouchFeedbackInstance->SetFeedbackEnabledForThisApp(aVibraEnable, aAudioEnable);
+		iExtension->iTouchFeedbackInstance->InstantFeedback((TTouchLogicalFeedback)aType);
+		iExtension->iTouchFeedbackInstance->SetFeedbackEnabledForThisApp(vibraEnabled, audioEnabled);
 		}
 #endif // RD_TACTILE_FEEDBACK  
 	}
--- a/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -30,10 +30,24 @@
 #include <avkondomainpskeys.h>
 #endif
 
+#ifndef FIX_FOR_NGA
+#define FIX_FOR_NGA
+#endif
 
 const TInt KAknCapServerUid = 0x10207218;
 const TInt KAknNotifySrvUid = 0x10281EF2;  
-    
+
+const TInt KAutoRefreshTimer = 10; //ms
+const TInt KAutoRefreshLongTimer = 1000; //ms
+
+TInt AutoRefreshTimerCallback( TAny* aObject )
+    {
+    CPenUiWndCtrl* wnd = static_cast<CPenUiWndCtrl*>( aObject );
+    wnd->RefreshUI();
+
+    return 0;
+    }
+
 CPenUiWndCtrl::CPenUiWndCtrl(RWindowGroup& aWndGroup,CFbsBitmap * aBitmap)
     :iWndGroup(aWndGroup),
      iBitmap(aBitmap),
@@ -54,8 +68,13 @@
         // if aknnote gets destroyed without user interaction or timers
         GfxTransEffect::NotifyExternalState( ENotifyGlobalAbort );
         GfxTransEffect::Deregister(this); //Always deregister in destructor.
+        }    
+#endif   
+    if ( iAutoRefreshTimer && iAutoRefreshTimer->IsActive() )
+        {
+        iAutoRefreshTimer->Cancel();
         }
-#endif    	
+    delete iAutoRefreshTimer;    
 }
 
 void CPenUiWndCtrl::ConstructL()
@@ -75,6 +94,8 @@
 #endif    
   //  ActivateL();
     iPopupWnd = CPenUiPopWnd::NewL(iWndGroup,iBitmap,this);
+    
+    iAutoRefreshTimer = CPeriodic::NewL( CActive::EPriorityStandard );
 }
 
 
@@ -95,6 +116,23 @@
     gc.BitBlt(aRect.iTl,iBitmap,aRect);
     }
 
+void CPenUiWndCtrl::RefreshUI()
+    {
+    StopRefreshTimer();
+    
+    if ( iShowPopup )
+        {
+        iPopupWnd->DrawNow();
+        }
+    else
+        {
+        DrawNow();
+        }
+    CCoeEnv::Static()->WsSession().Flush();
+    CCoeEnv::Static()->WsSession().Finish();
+    
+    }
+
 TInt CPenUiWndCtrl::WndPriority()
     {
     return iPriority;
@@ -280,17 +318,15 @@
         iPopupWnd->Invalidate(aRect);
         iPopupWnd->MakeVisible(ETrue);//This is a temproary fix due to pop up UI not updated.
         iPopupWnd->Invalidate(aRect);
-        iPopupWnd->DrawNow();
         }
     else
-        //DrawNow(aRect);
         {
         iInvalidateRect = aRect;
         Window().Invalidate(aRect);
-        DrawNow(aRect);
         }
-    CCoeEnv::Static()->WsSession().Flush();
-    CCoeEnv::Static()->WsSession().Finish(); 
+#ifdef FIX_FOR_NGA
+    RestartRefreshTimer();
+#endif
     }
 
 void CPenUiWndCtrl::OnActivate(EditorType aType)
@@ -429,6 +465,24 @@
     iResourceChange = aResourceChange;
     }
     
+
+void CPenUiWndCtrl::RestartRefreshTimer()
+    {
+    StopRefreshTimer();
+
+    TTimeIntervalMicroSeconds32 t1 = KAutoRefreshTimer * 1000;
+    TTimeIntervalMicroSeconds32 t2 = KAutoRefreshLongTimer * 1000;
+    iAutoRefreshTimer->Start( t1, t2, TCallBack(AutoRefreshTimerCallback, this) );
+    }
+
+void CPenUiWndCtrl::StopRefreshTimer()
+    {
+    if ( iAutoRefreshTimer->IsActive() )
+        {
+        iAutoRefreshTimer->Cancel();
+        }
+    }
+
 //End Of File
 // class CInternalBkCtrl
 CInternalBkCtrl::CInternalBkCtrl(RWindowGroup& aWndGroup)    
--- a/textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/eabi/peninputcommonctrlsU.DEF	Tue Apr 27 16:59:43 2010 +0300
@@ -460,7 +460,7 @@
 	_ZN24CFepLayoutScrollableListC2EP12CFepUiLayouti5TSizeiiS2_S2_ @ 459 NONAME
 	_ZN25CPeninputCommonChoiceListC1EP12CFepUiLayouti11TAknsItemIDS2_22ECommonChoiceListStyle @ 460 NONAME
 	_ZN25CPeninputCommonChoiceListC2EP12CFepUiLayouti11TAknsItemIDS2_22ECommonChoiceListStyle @ 461 NONAME
-	_ZThn768_N24CFepLayoutScrollableList18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 462 NONAME ; #<thunk>#
+	_ZThn772_N24CFepLayoutScrollableList18HandleControlEventEiP14CFepUiBaseCtrlRK7TDesC16 @ 462 NONAME ; #<thunk>#
 	_ZN23CAknFepCtrlRepeatButton18CancelPointerDownLEv @ 463 NONAME
 	_ZN20CFepCtrlDropdownList4NewLEP12CFepUiLayoutii6TPointPK5CFont5TSizeiiiiiiNS_11THDirectionEi @ 464 NONAME
 	_ZN20CFepCtrlDropdownList16SetSecondaryListER6RArrayIiEi @ 465 NONAME
--- a/textinput/peninputcommonctrls/inc/peninputselectionlist/peninputscrollablelist.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/inc/peninputselectionlist/peninputscrollablelist.h	Tue Apr 27 16:59:43 2010 +0300
@@ -121,7 +121,6 @@
     
     IMPORT_C virtual void DrawPageInfo();
 
-
     void ScrollPageUp();
     
     void ScrollPageDown();
--- a/textinput/peninputcommonctrls/src/peninputbasewindow/peninputbasewindowext.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputbasewindow/peninputbasewindowext.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -428,7 +428,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     for ( TInt i = 0; i < KShadowBmpBr + 1; i++ )
     	{
@@ -500,7 +500,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     const TInt16 bmpId = resReader.ReadInt16();
     const TInt16 bmpMskId = resReader.ReadInt16();
     skinitemid = resReader.ReadInt16();   
@@ -549,7 +549,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     const TInt16 icfbgId = aResReader.ReadInt16();
     const TInt16 icfbgmaskId = aResReader.ReadInt16();
@@ -622,7 +622,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     const TInt16 icfbgId = aResReader.ReadInt16();
     const TInt16 icfbgmaskId = aResReader.ReadInt16();
--- a/textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputbuttons/peninputbutton.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -162,7 +162,7 @@
 
         	if (bmpMskId != KInvalidBmp)
         		{
-        		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         		                       id,
         		                       bmp,
         		                       maskbmp,
@@ -176,7 +176,7 @@
                 }
             else
                 {
-        	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         	                           id,
         	                           bmp,
         	                           bmpFileName,
@@ -243,7 +243,7 @@
 
         	if (bmpMskId != KInvalidBmp)
         		{
-        		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         		                       id,
         		                       bmp,
         		                       maskbmp,
@@ -257,7 +257,7 @@
                 }
             else
                 {
-        	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         	                           id,
         	                           bmp,
         	                           bmpFileName,
@@ -548,7 +548,7 @@
 
         	if (bmpMskId != KInvalidBmp)
         		{
-        		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         		                       id,
         		                       bmp,
         		                       maskbmp,
@@ -561,7 +561,7 @@
                 }
             else
                 {
-        	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         	                           id,
         	                           bmp,
         	                           bmpFileName,
@@ -604,7 +604,7 @@
     		{
     		if( colorGroup == KInvalidColorGroup )
     			{
-	    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                        id,
                        iForgroundBmp,
                        iForgroundBmpMask,
@@ -614,7 +614,7 @@
     			}
 			else
 				{
-			    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+			    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                              id,
                              KAknsIIDQsnIconColors,
                              colorGroup,
@@ -637,7 +637,7 @@
     		}
     		else
 	        {
-		    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+		    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 		                           id,
 		                           iForgroundBmp,
 		                           bmpFileName,
@@ -699,7 +699,7 @@
 
         	if (bmpMskId != KInvalidBmp)
         		{
-        		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         		                       id,
         		                       bmp,
         		                       maskbmp,
@@ -712,7 +712,7 @@
                 }
             else
                 {
-        	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         	                           id,
         	                           bmp,
         	                           bmpFileName,
@@ -766,7 +766,7 @@
     		{
     		if( colorGroup == KInvalidColorGroup )
     			{
-	    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                        id,
                        iForgroundBmp,
                        iForgroundBmpMask,
@@ -776,7 +776,7 @@
     			}
 			else
 				{
-			    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+			    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                              id,
                              KAknsIIDQsnIconColors,
                              colorGroup,
@@ -798,7 +798,7 @@
     		}
     		else
 	        {
-		    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+		    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 		                           id,
 		                           iForgroundBmp,
 		                           bmpFileName,
@@ -983,7 +983,7 @@
 	// Draw background    
  	if( IsDimmed() ) // Dimmed state
     	{
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 		                         *gc, 
 		                         rect, 
 		                         innerRect,
@@ -1004,7 +1004,7 @@
     	{
 		// Normal state or pressed state
 		TAknsItemID ImgID = (IsDragging() | PointerDown()) ? iPressedImgID : iNormalImgID;
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 	                     *gc, 
 	                     rect, 
 	                     innerRect,
@@ -1234,7 +1234,7 @@
     TAknsItemID id;
     
     id.Set(TInt(colorMajorSkinId), skinitemid);
-    TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                            iFontColor,
                                            id,
                                            textcoloridx);
@@ -1246,7 +1246,7 @@
     
     SetFontColor(iFontColor);    
     
-    error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                       iShadowFontColor,
                                       id,
                                       shadowtextcoloridx);
@@ -1337,7 +1337,7 @@
     TAknsItemID id;
     
     id.Set(TInt(colorMajorSkinId), skinitemid);
-    TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                            iFontColor,
                                            id,
                                            textcoloridx);
@@ -1349,7 +1349,7 @@
     
     SetFontColor(iFontColor);    
     
-    error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                       iShadowFontColor,
                                       id,
                                       shadowtextcoloridx);
@@ -1452,7 +1452,7 @@
         	        {
         	        if( colorGroup == KInvalidColorGroup )
 	        	    	{
-	        		    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	        		    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 	        		                           id,
 	        		                           bmp,
 	        		                           maskbmp,
@@ -1462,7 +1462,7 @@
 	        	    	}
         	    	else
 	        	    	{
-	        	    	AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+	        	    	AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
 				                             id,
 				                             KAknsIIDQsnIconColors,
 				                             colorGroup,
@@ -1483,7 +1483,7 @@
         	        }
         	    else
         	        {
-        	        AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        	        AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         	                               id,
         	                               bmp,
         	                               bmpFileName,
@@ -1934,6 +1934,7 @@
 //
 void CAknFepCtrlMultiModeButton::GetRangeListL(RArray<TInt>& aList)
     {
+	CleanupClosePushL( aList );
     for (TInt i = 0; i < NumberOfModes(); i++)
         {
         if (aList.Find(iModesList[i]->iRangeId) == KErrNotFound)
@@ -1941,6 +1942,7 @@
             aList.AppendL(iModesList[i]->iRangeId);
             }
         }
+    CleanupStack::Pop();
     }
 
 // -----------------------------------------------------------------------------
@@ -2844,7 +2846,7 @@
     		{
     		if( colorGroup == KInvalidColorGroup )
     			{
-	    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                        id,
                        iForgroundBmp,
                        iForgroundBmpMask,
@@ -2854,7 +2856,7 @@
     			}
 			else
 				{
-			    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+			    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                              id,
                              KAknsIIDQsnIconColors,
                              colorGroup,
@@ -2876,7 +2878,7 @@
     		}
     	else
 	        {
-		    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+		    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 		                           id,
 		                           iForgroundBmp,
 		                           bmpFileName,
@@ -2936,7 +2938,7 @@
 		{
 		if( colorGroup == KInvalidColorGroup )
 			{
-    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                    id,
                    iForgroundBmp,
                    iForgroundBmpMask,
@@ -2946,7 +2948,7 @@
 			}
 		else
 			{
-		    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+		    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                          id,
                          KAknsIIDQsnIconColors,
                          colorGroup,
@@ -2968,7 +2970,7 @@
 		}
     else
         {
-	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 	                           id,
 	                           iForgroundBmp,
 	                           bmpFileName,
@@ -3017,7 +3019,7 @@
     // Draw background    
     if( IsDimmed() ) // Dimmed state
     	{
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 		                         *gc, 
 		                         rect, 
 		                         innerRect,
@@ -3048,7 +3050,7 @@
 			ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID;
 			}
 		
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 	                     *gc, 
 	                     rect, 
 	                     innerRect,
@@ -3101,7 +3103,7 @@
 			TRgb color( KRgbBlack );  // sane default for nonskinned case
 			if ( AknsUtils::AvkonSkinEnabled() )
 				{
-				AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+				AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
 				               color, KAknsIIDQsnTextColors, iTextColorIndex );
 				}	
 			if( IsDimmed() )
@@ -3531,7 +3533,7 @@
     		{
     		if( colorGroup == KInvalidColorGroup )
     			{
-	    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                        id,
                        iForground1Bmp,
                        iForground1BmpMask,
@@ -3541,7 +3543,7 @@
     			}
 			else
 				{
-			    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+			    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                              id,
                              KAknsIIDQsnIconColors,
                              colorGroup,
@@ -3563,7 +3565,7 @@
     		}
     	else
 	        {
-		    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+		    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 		                           id,
 		                           iForground1Bmp,
 		                           bmpFileName,
@@ -3590,7 +3592,7 @@
     		{
     		if( colorGroup == KInvalidColorGroup )
     			{
-	    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                        id2,
                        iForground2Bmp,
                        iForground2BmpMask,
@@ -3600,7 +3602,7 @@
     			}
 			else
 				{
-			    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+			    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                              id2,
                              KAknsIIDQsnIconColors,
                              colorGroup,
@@ -3622,7 +3624,7 @@
     		}
     	else
 	        {
-		    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+		    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 		                           id2,
 		                           iForground2Bmp,
 		                           bmpFileName,
@@ -3679,7 +3681,7 @@
 		{
 		if( colorGroup == KInvalidColorGroup )
 			{
-    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                    id,
                    iForground1Bmp,
                    iForground1BmpMask,
@@ -3689,7 +3691,7 @@
 			}
 		else
 			{
-		    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+		    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                          id,
                          KAknsIIDQsnIconColors,
                          colorGroup,
@@ -3710,7 +3712,7 @@
 		}
     else
         {
-	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 	                           id,
 	                           iForground1Bmp,
 	                           bmpFileName,
@@ -3746,7 +3748,7 @@
 		{
 		if( colorGroup == KInvalidColorGroup )
 			{
-    		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+    		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
                    id2,
                    iForground2Bmp,
                    iForground2BmpMask,
@@ -3756,7 +3758,7 @@
 			}
 		else
 			{
-		    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+		    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
                          id,
                          KAknsIIDQsnIconColors,
                          colorGroup,
@@ -3777,7 +3779,7 @@
 		}
     else
         {
-	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
 	                           id,
 	                           iForground2Bmp,
 	                           bmpFileName,
@@ -3832,7 +3834,7 @@
 		// Draw background    
 		if( IsDimmed() ) // Dimmed state
     	{
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 		                         *gc, 
 		                         rect, 
 		                         innerRect,
@@ -3873,7 +3875,7 @@
 			ImgID = /*iPressed*/PointerDown()? iPressedImgID : iNormalImgID;
 			}
 		
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 	                     *gc, 
 	                     rect, 
 	                     innerRect,
--- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputcommonchoicelist.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputselectionlist/peninputcommonchoicelist.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -192,7 +192,7 @@
 	    gc->Activate( BitmapDevice() ); 
 	    gc->SetBrushColor( KRgbWhite );
 	    gc->Clear( Rect() ); 
-		AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+		AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
 	                     *gc, 
 	                     Rect(), 
 	                     rtInnerRect,
@@ -217,7 +217,7 @@
        		{
        		CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
        		gc->Activate( BitmapDevice() ); 
-			AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
+			AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), 
                          *gc, 
                          rtFocusRect, 
                          rtInnerRect,
@@ -236,7 +236,7 @@
 
     if ( AknsUtils::AvkonSkinEnabled() )
         {
-        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
                                color, KAknsIIDQsnTextColors, clrIndex );
         }
 
--- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputlayoutinputmodechoice.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputselectionlist/peninputlayoutinputmodechoice.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -267,7 +267,7 @@
 TBool CPeninputLayoutInputmodelChoice::CreateItemIconL(TResourceReader &aReader, 
     CFbsBitmap** aImg, TPtrC& aBmpFileName, TInt32 aMajorSkinId)
     {
-    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skinInstance = UiLayout()->SkinInstance();
     
     const TInt bmpId = aReader.ReadInt16();
     const TInt bmpMaskId = aReader.ReadInt16();
--- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputselectionlist/peninputscrollablelist.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -121,7 +121,7 @@
         {
     	if (bmpMskId != KInvalidBmp)
     		{
-		    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+		    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
 						         id,
 						         KAknsIIDQsnIconColors,
 						         EAknsCIQsnIconColorsCG30,
@@ -134,7 +134,7 @@
             }
         else
             {
-    	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+    	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
     	                           id,
     	                           iSeperationBmp,
     	                           bmpFileName,
@@ -199,7 +199,7 @@
     gc->Activate(BitmapDevice());
     gc->Clear(rect);
 
-	AknsDrawUtils::DrawFrame(AknsUtils::SkinInstance(), 
+	AknsDrawUtils::DrawFrame(UiLayout()->SkinInstance(), 
 	                         *gc, 
 	                         rect, 
 	                         innerRect,
@@ -241,7 +241,7 @@
 
 	    if ( AknsUtils::AvkonSkinEnabled() )
 	        {
-	        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+	        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
 	                               color, KAknsIIDQsnTextColors, clrIndex );
 	        }
 
@@ -346,15 +346,28 @@
 
 EXPORT_C void CFepLayoutScrollableList::CalculateItemWidth()
     {
+	TBuf<KDisplayTextLen> buf;
+	CFont::TMeasureTextInput::TFlags flg = CFont::TMeasureTextInput::EFVisualOrder;
+	if(iAlign == CGraphicsContext::ERight)
+		flg = CFont::TMeasureTextInput::EFVisualOrderRightToLeft;
+	
+	const CFont* font = iFont;
+	if(iTextLineSet)
+		{
+		TAknLayoutText textLayout;
+		textLayout.LayoutText(TRect(0, 0, 1, 1), iTextLine);
+		font = textLayout.Font();
+		}
+	ASSERT(font);
+	
     iItemSize.iWidth = iInitItemWidth;
     const RPointerArray<SItem>& allItems = ItemArray();
-    for( TInt i = 0; i < allItems.Count() ; ++i )
+    for(TInt i = 0; i < allItems.Count(); ++i)
         {
-        TInt itemWidth = iFont->TextWidthInPixels( allItems[i]->iText );
-        if( itemWidth > iItemSize.iWidth )
-            {
+		TInt itemWidth = AknBidiTextUtils::MeasureTextBoundsWidth(
+				*font, allItems[i]->iText, flg);
+        if(itemWidth > iItemSize.iWidth)
             iItemSize.iWidth = itemWidth;
-            }
         }
      
     TPixelsTwipsAndRotation ptScreenSize;             
@@ -431,7 +444,7 @@
         gc->Activate(BitmapDevice());   
 
 	      // draw frame
-        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        MAknsSkinInstance* skin = UiLayout()->SkinInstance();
 	    TRect innerRect = itemRect;
 	    innerRect.Shrink(7, 7);
         AknsDrawUtils::DrawFrame(skin, 
@@ -441,61 +454,45 @@
                                  aItemActive ? iItemActiveFrId : iItemFrId,
                                  KAknsIIDDefault); 
         }
-
+    
+    CFepLayoutChoiceList::SItem* item = ItemArray()[aItemIndex];
+    const CFont* font = iFont;
+    TRgb color = iFontColor;
+    TInt baseLine = iBaselineOffset;
+    
     // draw text
     if (iTextLineSet)
         {
-        gc->SetBrushStyle(CGraphicsContext::ENullBrush);
-        gc->SetBrushColor(KRgbBlack); 
-	    TRgb color( KRgbBlack );  // sane default for nonskinned case
-               
         TAknLayoutText textLayout;
-        textLayout.LayoutText(itemRect, 
-                              iTextLine);
+        textLayout.LayoutText(itemRect, iTextLine);
+        
 	    TAknsQsnTextColorsIndex clrIndex;
 	    clrIndex = isFocus ? EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG20;
 
-	    if ( AknsUtils::AvkonSkinEnabled() )
-	        {
-	        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
+	    color = KRgbBlack;
+	    if (AknsUtils::AvkonSkinEnabled())
+	        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
 	                               color, KAknsIIDQsnTextColors, clrIndex );
-	        }
-
-	    textLayout.DrawText(*gc, ItemArray()[aItemIndex]->iText, ETrue, color);
+	    font = textLayout.Font();
+	    itemRect = textLayout.TextRect();
+	    baseLine = itemRect.Height() / 2 + font->AscentInPixels() / 2;
         }
-    else if (iFont)
-        {
-        gc->UseFont(iFont);
-
-        gc->SetBrushStyle(CGraphicsContext::ENullBrush);
-        gc->SetBrushColor(KRgbBlack);
-        gc->SetPenColor(iFontColor);
-        gc->SetPenStyle(CGraphicsContext::ESolidPen);
-        gc->SetPenSize(PenSize());
 
-        if (iFont->TextWidthInPixels(ItemArray()[aItemIndex]->iText) > itemRect.Width())
-            {
-            TBuf<KDisplayTextLen> buf;
-            AknBidiTextUtils::ConvertToVisualAndClip(ItemArray()[aItemIndex]->iText,
-                                                     buf,
-                                                     *iFont,
-                                                     itemRect.Width(),
-                                                     itemRect.Width());
-            gc->DrawText(buf, 
-                         itemRect,
-                         iBaselineOffset,
-                         CGraphicsContext::ELeft);  
-            }
-        else
-            {
-            gc->DrawText(ItemArray()[aItemIndex]->iText,
-                         itemRect,
-                         iBaselineOffset,
-                         CGraphicsContext::ELeft);
-            }
+    if(font == NULL)
+    	return;
+    
+	gc->UseFont(font);
+	gc->SetBrushStyle(CGraphicsContext::ENullBrush);
+	gc->SetBrushColor(KRgbBlack);
+	gc->SetPenColor(color);
+	gc->SetPenStyle(CGraphicsContext::ESolidPen);
+	gc->SetPenSize(PenSize());
 
-        gc->DiscardFont();
-        }    
+	TBuf<KDisplayTextLen> buf;
+	AknBidiTextUtils::ConvertToVisualAndClip(item->iText, buf, *iFont,
+										 itemRect.Width(), itemRect.Width());
+	gc->DrawText(buf, itemRect, baseLine, iAlign);
+	gc->DiscardFont();
     }
 
 EXPORT_C void CFepLayoutScrollableList::ConstructL()
@@ -606,7 +603,7 @@
             }
         }
     }
-    
+
 EXPORT_C void CFepLayoutScrollableList::UpdatePageInfoL( TInt aCurrentPage, TInt aTotalPage )
 	{
 	if( iPageInfoResID == 0 )
--- a/textinput/peninputcommonctrls/src/peninputselectionlist/peninputselectionlist.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputselectionlist/peninputselectionlist.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -171,7 +171,7 @@
             {
             if (maskid != KInvalidBmp)
                 {
-        		AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        		AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         		                       id,
         		                       bmp,
         		                       maskbmp,
@@ -183,7 +183,7 @@
                 }
             else
                 {
-        	    AknsUtils::CreateIconL(AknsUtils::SkinInstance(),
+        	    AknsUtils::CreateIconL(UiLayout()->SkinInstance(),
         	                           id,
         	                           bmp,
         	                           bmpFileName,
@@ -371,7 +371,7 @@
     gc->Activate(BitmapDevice());   
 
 	// draw frame
-	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	MAknsSkinInstance* skin = UiLayout()->SkinInstance();
 
     TRect outerRect;
     TRect innerRect;
--- a/textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonctrls/src/peninputvkbctrl/peninputvkbctrlext.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -211,7 +211,8 @@
         }  
     SetFontColor( textColor );
     
-    Draw();
+    // Remove that draw operation to improve performance
+    //Draw();
     }
 
 // --------------------------------------------------------------------------
--- a/textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1635,7 +1635,7 @@
 EXPORT_C void CPeninputLayoutWindow::SetSwitchBtnTextColor(CAknFepCtrlEventButton& aSwitchBtn)
     {
     TRgb textColor;
-    TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                            textColor,
                                            KAknsIIDQsnTextColors,
                                            EAknsCIQsnTextColorsCG59);
@@ -1648,7 +1648,7 @@
     aSwitchBtn.SetFontColor( textColor );   
     
     TRgb shadowTextColor;    
-    error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                       shadowTextColor,
                                       KAknsIIDQsnTextColors,
                                       EAknsCIQsnTextColorsCG62);
@@ -1844,7 +1844,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     for ( TInt i = 0; i < KShadowBmpBr + 1; i++ )
     	{
@@ -1915,7 +1915,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     const TInt16 bmpId = resReader.ReadInt16();
     const TInt16 bmpMskId = resReader.ReadInt16();
     skinitemid = resReader.ReadInt16();   
@@ -1963,7 +1963,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     const TInt16 icfbgId = aResReader.ReadInt16();
     const TInt16 icfbgmaskId = aResReader.ReadInt16();
@@ -2174,7 +2174,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     const TInt16 icfbgId = resReader.ReadInt16();
     const TInt16 icfbgmaskId = resReader.ReadInt16();
--- a/textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputcommonlayout/src/peninputlayoutwindowext.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1475,7 +1475,7 @@
 EXPORT_C void CPeninputLayoutWindowExt::SetSwitchBtnTextColor(CAknFepCtrlEventButton& aSwitchBtn)
     {
     TRgb textColor;
-    TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                            textColor,
                                            KAknsIIDQsnTextColors,
                                            EAknsCIQsnTextColorsCG59);
@@ -1488,7 +1488,7 @@
     aSwitchBtn.SetFontColor( textColor );   
     
     TRgb shadowTextColor;    
-    error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                       shadowTextColor,
                                       KAknsIIDQsnTextColors,
                                       EAknsCIQsnTextColorsCG62);
--- a/textinput/peninputfingerhwr/src/peninputfingerhwrlafmanager.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputfingerhwr/src/peninputfingerhwrlafmanager.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -699,8 +699,10 @@
 //
 TAknTextLineLayout CPeninputFingerHwrLAFManager::FixSctpadKeyTxtLayout()
     {
+    //TAknTextLineLayout layout = AknLayoutScalable_Avkon::
+    //    cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
     TAknTextLineLayout layout = AknLayoutScalable_Avkon::
-        cell_fshwr2_syb_bg_pane_t1(0).LayoutLine();
+    	fshwr2_func_candi_cell_pane_t1(0).LayoutLine();
     return layout;
     }
 
--- a/textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1504,7 +1504,7 @@
 
             if ( bmpMskId != KInvalidImg )
                 {
-                AknsUtils::CreateIconL( AknsUtils::SkinInstance(),
+                AknsUtils::CreateIconL( UiLayout()->SkinInstance(),
                    id, bmp, maskbmp, bmpFileName, bmpId, bmpMskId );
                 
                 // set maskbmp and size
@@ -1514,7 +1514,7 @@
                 }
             else
                 {
-                AknsUtils::CreateIconL( AknsUtils::SkinInstance(), id, 
+                AknsUtils::CreateIconL( UiLayout()->SkinInstance(), id, 
                     bmp, bmpFileName, bmpId );
                 }
             // set bmp and size
@@ -2091,7 +2091,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     for ( TInt i = 0; i < KShadowBmpBr + 1; i++ )
     	{
@@ -2163,7 +2163,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     const TInt16 bmpId = resReader.ReadInt16();
     const TInt16 bmpMskId = resReader.ReadInt16();
     skinitemid = resReader.ReadInt16();   
@@ -2212,7 +2212,7 @@
     colorid.Set( TInt( colorMajorSkinId ), skinitemid );
 
     TRgb icftextcolor;
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     TInt error = AknsUtils::GetCachedColor( skininstance, icftextcolor,
             colorid, coloridx );
 
@@ -2276,7 +2276,7 @@
     colorid.Set( TInt( colorMajorSkinId ), skinitemid );
 
     TRgb boxcolor;
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     TInt error = AknsUtils::GetCachedColor( skininstance, 
                                            boxcolor, 
                                            colorid, 
@@ -2387,7 +2387,7 @@
     CFbsBitmap* bmpImage = NULL;
     CFbsBitmap* bmpMask = NULL;
     
-    //AknsUtils::CreateIconL(AknsUtils::SkinInstance(), id, bmpImage, bmpMask, bmpFileName, imageid,maskid);
+    //AknsUtils::CreateIconL(UiLayout()->SkinInstance(), id, bmpImage, bmpMask, bmpFileName, imageid,maskid);
     
     TRgb colorBkgnd = iWritingBoxBkColor;
     TRgb colorGuideLine = AKN_LAF_COLOR( 0 ); 
@@ -2409,7 +2409,7 @@
         colorGuideLine = TRgb(r,g,b);
         }
     
-    AknsUtils::CreateColorIconL( AknsUtils::SkinInstance(),
+    AknsUtils::CreateColorIconL( UiLayout()->SkinInstance(),
             id, KAknsIIDQsnIconColors, -1,
             bmpImage, bmpMask, fileName, imageid, maskid,
             colorGuideLine );
--- a/textinput/peninputgenerichwr/src/peninputgenerichwrwindow.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenerichwr/src/peninputgenerichwrwindow.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -768,7 +768,7 @@
     
     id.Set(KWriteBoxFrameBackColorMajor, KWriteBoxFrameBackColorGrp);
 
-    TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                            frameColor,
                                            id,
                                            KWriteBoxFrameBackColorIdx);
--- a/textinput/peninputgenerichwr/src/peninputhwrarabicwindow.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenerichwr/src/peninputhwrarabicwindow.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1029,7 +1029,7 @@
     
     id.Set(KWriteBoxFrameBackColorMajor, KWriteBoxFrameBackColorGrp);
 
-    TInt error = AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+    TInt error = AknsUtils::GetCachedColor(UiLayout()->SkinInstance(),
                                            frameColor,
                                            id,
                                            KWriteBoxFrameBackColorIdx);
--- a/textinput/peninputgenericitut/inc/peninputgenericitutdatamgr.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/inc/peninputgenericitutdatamgr.h	Tue Apr 27 16:59:43 2010 +0300
@@ -387,6 +387,7 @@
     TAknTextLineLayout iVkAlphaText3ForPrtWest;
     TAknTextLineLayout iVkNumTextForPrtWest;
     TAknTextLineLayout iVkBigNumTextForPrtWest;
+    TAknTextLineLayout iVkTextPlusForNumbericOnlyForPrtWest;
     TRect iCloseRectForPrtWest;
     TRect iCloseInnerRectForPrtWest;
     TRect iArrowLeftRectForPrtWest;
--- a/textinput/peninputgenericitut/src/peninputcommonbgctrl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputcommonbgctrl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -175,7 +175,7 @@
 										 TAknsItemID aFrameID,
 										 TAknsItemID aCenterID )
 	{
-	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	MAknsSkinInstance* skin = UiLayout()->SkinInstance();
     TRect innerRect = aRect;
     innerRect.Shrink( 4, 4 );
 	
--- a/textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -325,6 +325,10 @@
 	// Key text row 2                               
 	iVkAlphaText2ForPrtWest = AknLayoutScalable_Avkon::cell_ituss_key_t3(1).LayoutLine();
 	
+	// Plus for Numberic Only keypad
+	iVkTextPlusForNumbericOnlyForPrtWest = 
+			AknLayoutScalable_Avkon::cell_ituss_key_t5(0).LayoutLine();
+	
 	// close button
 	TAknWindowLineLayout funcbtn, funcbtnbg, funcbtninner;
 	TAknLayoutRect funcrect, funcbgrect, funcinnerrect, arrowleftinnerrect, arrowrightinnerrect;
@@ -628,12 +632,12 @@
     rect.Move(-iLayoutOffset.iX, -iLayoutOffset.iY);
     iIcfChnRect = rect;
     //iIcfChnRect.iTl.iY += 10;
-#ifdef LAF_MODIFY
+//#ifdef LAF_MODIFY
     //if(IsChinese())
-        {
-        iIcfChnRect.Move(0,-iIcfChnRect.iTl.iY + 14);
-        }
-#endif
+//        {
+//        iIcfChnRect.Move(0,-iIcfChnRect.iTl.iY + 14);
+//        }
+//#endif
 
     // Keypad
     TInt keypadvariety = iLandScape ? 1 : 0;
@@ -1352,7 +1356,14 @@
                 }
             else
                 {
-                return &iVkAlphaText1ForPrtWest;
+				if ( iInputMode == ENumber || iInputMode == ENativeNumber )
+					{
+					return &iVkTextPlusForNumbericOnlyForPrtWest;
+					}
+				else
+					{
+					return &iVkAlphaText1ForPrtWest;
+					}
                 }
             }
         case EKeypadRightTextLine2:
--- a/textinput/peninputgenericitut/src/peninputgenericitutwindowmanager.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputgenericitutwindowmanager.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -479,27 +479,15 @@
         {
         if ( iDataMgr->IsPortraitWest() && (!iDataMgr->IsChineseSpellMode()))
             {
-			iWindow->Icf()->HideBubble();
+                  //iWindow->Icf()->HideBubble();
             iWindow->SetIndiWithTextFlag( ETrue );
             iWindow->IndiBubbleWithText();
-            
-            if ( iDataMgr->IndicatorData().iIndicatorImgID != 0 &&
-                 iDataMgr->IndicatorData().iIndicatorMaskID != 0 && 
-                 iDataMgr->IndicatorData().iIndicatorTextImgID != 0 &&
-                 iDataMgr->IndicatorData().iIndicatorTextMaskID != 0 )
-                {
-                iWindow->SetIndiBubbleImageL( 
-                        iDataMgr->IndicatorData().iIndicatorImgID,
-                        iDataMgr->IndicatorData().iIndicatorMaskID,
-                        iDataMgr->IndicatorData().iIndicatorTextImgID,
-                        iDataMgr->IndicatorData().iIndicatorTextMaskID);
-                }
             }
         else
-        	{
-			iWindow->Icf()->HideBubble();
-			iWindow->MsgBubbleForChinese();
-        	}
+            {
+                  //iWindow->Icf()->HideBubble();
+                  iWindow->MsgBubbleForChinese();
+            }
         iWindow->Icf()->ShowBubble(aInfo,iWindow->Icf()->MsgBubbleCtrl()->Rect());
         }
     else
@@ -510,26 +498,14 @@
             }
         else
             {
-			if ( itutLayoutOwner->UiMgr()->CurrentState() &&
-			     itutLayoutOwner->UiMgr()->CurrentState()->StateType() !=
-			            CGenericItutUiMgrBase::EStateSpelling )
-				{
-				iWindow->Icf()->HideBubble();
-				iWindow->SetIndiWithTextFlag( EFalse );
-				iWindow->IndiBubbleWithoutText();
-				}
-				
-				if ( iDataMgr->IndicatorData().iIndicatorImgID != 0 &&
-					 iDataMgr->IndicatorData().iIndicatorMaskID != 0 && 
-					 iDataMgr->IndicatorData().iIndicatorTextImgID != 0 &&
-					 iDataMgr->IndicatorData().iIndicatorTextMaskID != 0 )
-					{
-					iWindow->SetIndiBubbleImageL( 
-							iDataMgr->IndicatorData().iIndicatorImgID,
-							iDataMgr->IndicatorData().iIndicatorMaskID,
-							iDataMgr->IndicatorData().iIndicatorTextImgID,
-							iDataMgr->IndicatorData().iIndicatorTextMaskID);
-					}
+                  if ( itutLayoutOwner->UiMgr()->CurrentState() &&
+                       itutLayoutOwner->UiMgr()->CurrentState()->StateType() !=
+                              CGenericItutUiMgrBase::EStateSpelling )
+                        {
+                        //iWindow->Icf()->HideBubble();
+                        iWindow->SetIndiWithTextFlag( EFalse );
+                        iWindow->IndiBubbleWithoutText();
+                        }
             
             iWindow->Icf()->ShowBubble( KEmptyString, 
                     iWindow->Icf()->MsgBubbleCtrl()->Rect());
--- a/textinput/peninputgenericitut/src/peninputitutchnuistatepredict.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputitutchnuistatepredict.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -139,10 +139,11 @@
     
     //show indicator 
     iOwner->LayoutContext()->Control(ECtrlIdIndicator)->Hide(EFalse);
+    
     // Hide ICF, Backspace, Arrow contrls when exit to avoid flick
-    iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
-    iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide(ETrue);
-    iOwner->LayoutContext()->ShowArrowBtn(0);
+    //iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
+    //iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide(ETrue);
+    //iOwner->LayoutContext()->ShowArrowBtn(0);
     
     }
 
--- a/textinput/peninputgenericitut/src/peninputitutchnuistatestandby.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputitutchnuistatestandby.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -102,10 +102,10 @@
     {
     // hide input mode indicator
 
-   // Hide ICF, Backspace, Arrow contrls when exit to avoid flick
-    iOwner->LayoutContext()->ShowArrowBtn(0);
-    iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
-    iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide(ETrue);
+    // Hide ICF, Backspace, Arrow contrls when exit to avoid flick
+    //iOwner->LayoutContext()->ShowArrowBtn(0);
+    //iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
+    //iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide(ETrue);
     }
 
 TBool CChnItutUiStateStandby::HandleKeyL(TInt aCmd, TInt aKey)
--- a/textinput/peninputgenericitut/src/peninputitutwesternuistatematchselection.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputitutwesternuistatematchselection.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -103,9 +103,9 @@
 void CWesternItutUiStateMatchSelection::OnExit()
     {
     // Hide ICF, Backspace, Arrow contrls when exit to avoid flick
-    iOwner->LayoutContext()->ShowArrowBtn(0);
-    iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
-    iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide( ETrue );
+    //iOwner->LayoutContext()->ShowArrowBtn(0);
+    //iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
+    //iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide( ETrue );
     iSelList->CloseWindow();
     iIcf->SetOverLapState(EFalse);
     }
@@ -186,22 +186,30 @@
         case ECmdPenInputFingerMatchList:
             {
             RDesReadStream readStream;
-            TPtr8 countPtr(aData, 2*sizeof(TInt), 2*sizeof(TInt));
+            TPtr8 countPtr(aData, 3 * sizeof(TInt), 3 * sizeof(TInt));
             readStream.Open(countPtr);
             CleanupClosePushL(readStream);
 
             TInt candcount = readStream.ReadInt32L();
             TInt totalsize = readStream.ReadInt32L();
+			TInt langcode = readStream.ReadInt32L();
+			TInt align = TBidiText::ScriptDirectionality((TLanguage)langcode);
+			if(align != TBidiText::ELeftToRight)
+				align = CGraphicsContext::ERight;
+			else
+				align = CGraphicsContext::ELeft;
+			
             CleanupStack::PopAndDestroy(&readStream);
 
-            TPtr8 ptr(aData + 2*sizeof(TInt), totalsize - 2*sizeof(TInt), 
-                      totalsize - 2*sizeof(TInt));
+            TPtr8 ptr(aData + 3 * sizeof(TInt), totalsize - 3 * sizeof(TInt), 
+                      totalsize - 3 * sizeof(TInt));
             readStream.Open(ptr);
             CleanupClosePushL(readStream);
 
             iCandlist.ResetAndDestroy();
 
             iSelList->ClearItemsL();
+            iSelList->SetTextAlignment((CGraphicsContext::TTextAlign) align);
             CFepLayoutChoiceList::SItem item;
 
             for (TInt i = 0; i < candcount; i++)
--- a/textinput/peninputgenericitut/src/peninputitutwesternuistatenonpredict.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputitutwesternuistatenonpredict.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -101,9 +101,9 @@
 void CWesternItutUiStateNonPredict::OnExit()
     {
     // Hide ICF, Backspace, Arrow controls when exit to avoid flick
-    iOwner->LayoutContext()->ShowArrowBtn(0);
-    iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
-    iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide(ETrue);
+    //iOwner->LayoutContext()->ShowArrowBtn(0);
+    //iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( ETrue );
+    //iOwner->LayoutContext()->Control(ECtrlIdBackspace)->Hide(ETrue);
     }
 
 CGenericItutUiMgrBase::TUiState CWesternItutUiStateNonPredict::StateType()
--- a/textinput/peninputgenericitut/src/peninputitutwesternuistatespelling.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputitutwesternuistatespelling.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -140,6 +140,22 @@
     	}
     //
 
+    if ( iOwner->DataMgr()->IsChineseSpellMode())
+    	{
+		CAknFepCtrlRawKeyButton* leftbtn = 
+				static_cast<CAknFepCtrlRawKeyButton *>( iOwner->LayoutContext()->Control( ECtrlIdArrowLeft ));
+		if( leftbtn )
+			{
+			leftbtn->Hide( ETrue );
+			}
+		
+		CAknFepCtrlRawKeyButton* rightbtn = 
+				static_cast<CAknFepCtrlRawKeyButton *>( iOwner->LayoutContext()->Control( ECtrlIdArrowRight ));
+		if( rightbtn )
+			{
+			rightbtn->Hide( ETrue );
+			}
+    	}
 
     TAknTextLineLayout btntextformat = TItutDataConverter::AnyToTextLine(
                                                iOwner->DataMgr()->RequestData(EBtnTextLine));
@@ -164,9 +180,7 @@
     iOwner->LayoutContext()->Control(ECtrlIdICF)->Hide( EFalse );
     CAknFepCtrlLabel* indilabel = static_cast<CAknFepCtrlLabel*>
                                   (iOwner->LayoutContext()->Control(ECtrlIdSpellIndicator));
-    // Modify begin
     if ( indilabel && iOwner->DataMgr()->IsChineseSpellMode())
-    // Modify end
         {
         indilabel->Hide( EFalse );
         }
--- a/textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericvkb/inc/peninputgenericvkbwindow.h	Tue Apr 27 16:59:43 2010 +0300
@@ -256,7 +256,8 @@
      * @return None
      */
     void DimArrowKeys( TBool aDimArrow );
-
+    
+    void DimEnterKey( TBool aDimmed );
 
     /**
      * Pop up switcher windows
@@ -364,7 +365,7 @@
      * @param aActiveIndex, the default index     
      * @return None
      */	
-    void ShowCandidateListL( const CDesCArray* aItemArray,
+    void ShowCandidateListL( TInt aAlign, const CDesCArray* aItemArray,
                             TInt aActiveIndex );    
     
     /**
--- a/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericvkb/src/peninputgenericvkblayout.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -253,6 +253,12 @@
             vkbWindow->DimArrowKeys( IsDimArrowKeys );
             }
             break;
+        case ECmdPenInputDimEnterKey:
+            {
+            TBool isDimEnterKey = *((TUint16*)( aData ));            
+            vkbWindow->DimEnterKey( isDimEnterKey );            
+            }
+            break;
         case ECmdPenInputSetPromptText:
             {
             if ( iLayoutType == EPluginInputModeFSQ )
@@ -400,45 +406,20 @@
             { 
             if ( aInfo.Length() > 0 && !iInEditWordQueryDlg)
                 {
-				icf->HideBubble();
+				//icf->HideBubble();
                 CPeninputGenericVkbWindow* vkbWindow = 
                     static_cast<CPeninputGenericVkbWindow*>(iLayoutWindow);
                 vkbWindow->SetIndiWithTextFlag( ETrue );
                 vkbWindow->IndiBubbleWithText();
-                
-                if ( vkbWindow->IndicatorData().iIndicatorImgID != 0 && 
-                     vkbWindow->IndicatorData().iIndicatorMaskID != 0 && 
-                     vkbWindow->IndicatorData().iIndicatorTextImgID != 0 &&
-                     vkbWindow->IndicatorData().iIndicatorTextMaskID != 0 )
-                    {
-					TRAP_IGNORE( vkbWindow->SetIndiBubbleImageL( 
-                            vkbWindow->IndicatorData().iIndicatorImgID,
-                            vkbWindow->IndicatorData().iIndicatorMaskID,
-                            vkbWindow->IndicatorData().iIndicatorTextImgID,
-                            vkbWindow->IndicatorData().iIndicatorTextMaskID ));
-                    }
                 icf->ShowBubble(aInfo,icf->MsgBubbleCtrl()->Rect());
                 }
             else
                 {
-                icf->HideBubble();
+                //icf->HideBubble();
                 CPeninputGenericVkbWindow* vkbWindow = 
                     static_cast<CPeninputGenericVkbWindow*>(iLayoutWindow);
                 vkbWindow->SetIndiWithTextFlag( EFalse );
                 vkbWindow->IndiBubbleWithoutText();
-                
-                if ( vkbWindow->IndicatorData().iIndicatorImgID != 0 && 
-                     vkbWindow->IndicatorData().iIndicatorMaskID != 0 && 
-                     vkbWindow->IndicatorData().iIndicatorTextImgID != 0 &&
-                     vkbWindow->IndicatorData().iIndicatorTextMaskID != 0 )
-                    {
-					TRAP_IGNORE( vkbWindow->SetIndiBubbleImageL( 
-                            vkbWindow->IndicatorData().iIndicatorImgID,
-                            vkbWindow->IndicatorData().iIndicatorMaskID,
-                            vkbWindow->IndicatorData().iIndicatorTextImgID,
-                            vkbWindow->IndicatorData().iIndicatorTextMaskID));
-                    }
-                
                 icf->ShowBubble(KEmptyString, icf->MsgBubbleCtrl()->Rect());
                 }
             }            
@@ -532,27 +513,26 @@
     {
     CPeninputGenericVkbWindow* vkbWindow = 
     				static_cast<CPeninputGenericVkbWindow*>(iLayoutWindow);
-    if ( !vkbWindow )
+    if (!vkbWindow)
         {
         return;
         }
     
-    TPtr8 buf8( aData, sizeof(TInt32), sizeof(TInt32) );
+    TPtr8 buf8(aData, sizeof(TInt32), sizeof(TInt32));
     RDesReadStream readStream;
-    readStream.Open( buf8 );
-    CleanupClosePushL( readStream );
+    readStream.Open(buf8);
+    CleanupClosePushL(readStream);
     TInt dataSize = readStream.ReadInt32L();
-    CleanupStack::PopAndDestroy( &readStream );
-    if ( dataSize > 0 )
+    CleanupStack::PopAndDestroy(&readStream);
+    if (dataSize > 0)
         {
-        TUint16* dataAddress = (TUint16*)( aData + sizeof(TInt32) );
-        HBufC* tooltipText = ReadTextInfoHBufCL( dataAddress, 
-                                                 ( dataSize + 1 )/ 2 );
-        if ( tooltipText )
+        TUint16* dataAddress = (TUint16*)( aData + sizeof(TInt32));
+        HBufC* tooltipText = ReadTextInfoHBufCL(dataAddress, (dataSize + 1) / 2);
+        if (tooltipText)
             {
-            CleanupStack::PushL( tooltipText );
-            vkbWindow->ShowTooltipL( *tooltipText );
-            CleanupStack::PopAndDestroy( tooltipText );
+            CleanupStack::PushL(tooltipText);
+            vkbWindow->ShowTooltipL(*tooltipText);
+            CleanupStack::PopAndDestroy(tooltipText);
             }        
         }     
     }
@@ -573,7 +553,7 @@
     // Read candidate data from a block of memory staring from aData
     // The format is activeIndex | count of candiates | 
     // length 1 | text 1 | length 2 | text 2 |...
-    TPtr8 buf8( aData, sizeof( TInt32 )*2, sizeof( TInt32 )*2 );
+    TPtr8 buf8( aData, sizeof( TInt32 )* 3, sizeof( TInt32 )* 3 );
     RDesReadStream readStream;
     readStream.Open( buf8 );
     CleanupClosePushL( readStream );
@@ -581,12 +561,18 @@
     TInt activeIndex = readStream.ReadInt32L();
     // Get coutn of candidates
     TInt count = readStream.ReadInt32L();    
+	TInt langCode = readStream.ReadInt32L();
+	TInt align = TBidiText::ScriptDirectionality((TLanguage)langCode);
+	if(align != TBidiText::ELeftToRight)
+		align = CGraphicsContext::ERight;
+	else
+		align = CGraphicsContext::ELeft;
     CleanupStack::PopAndDestroy( &readStream );
     
     CDesCArray* itemArray = NULL;
     if ( count > 0 )
         {        
-        TUint8* curPointer = aData + sizeof(TInt) * 2;
+        TUint8* curPointer = aData + sizeof(TInt) * 3;
         itemArray = new (ELeave) CDesCArrayFlat( count );
         CleanupStack::PushL( itemArray );
         for ( TInt i = 0; i < count; i++ )
@@ -614,13 +600,13 @@
                 curPointer += textSize;
                 }
             }
-        vkbWindow->ShowCandidateListL( itemArray, activeIndex );
+        vkbWindow->ShowCandidateListL( align, itemArray, activeIndex );
         CleanupStack::PopAndDestroy( itemArray );
         }
     else
         {
         // Open empty candidate list.
-        vkbWindow->ShowCandidateListL( NULL, activeIndex );        
+        vkbWindow->ShowCandidateListL( align, NULL, activeIndex );        
         }    
     }
 
--- a/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputgenericvkb/src/peninputgenericvkbwindow.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1409,7 +1409,7 @@
 
     TAknsItemID id;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     TInt popWinBmpId = aRes.ReadInt16();
     TInt popWinBmpMaskId = aRes.ReadInt16();
@@ -1695,6 +1695,17 @@
         }	    	
     }
 
+void CPeninputGenericVkbWindow::DimEnterKey( TBool aDimmed )
+    {
+	CAknFepCtrlEventButton* enterBtn = static_cast<CAknFepCtrlEventButton*>
+	                              ( Control(EPeninutWindowCtrlIdEnterBtn) );	
+    if(iLayoutContext->LayoutType() == EPluginInputModeFSQ 
+       && enterBtn )
+        {
+        enterBtn->SetDimmed( aDimmed );        
+        }
+    }
+
 // ---------------------------------------------------------------------------
 // CAknFepVkbWindow::PopupAccentWindow
 // (other items were commented in a header).
@@ -2365,7 +2376,15 @@
         item.iText.Copy( KVietAccentList2 );
         iAccentCmdList.Append( item );
         }
-    
+    else if( aLangId == ELangRussian || aLangId == ELangUkrainian || aLangId == ELangBulgarian )
+    	{
+        _LIT( KCyrillicAccent, "\x00E0 - \x017E" );
+        CFepLayoutChoiceList::SItem item;
+
+        item.iCommand = EPeninputVkbLayoutAccented1;
+        item.iText.Copy( KCyrillicAccent );      
+        iAccentCmdList.Append( item );        
+    	}
     // 10X3
     else if ( is10x3 )
         {
@@ -2514,7 +2533,7 @@
 // Show candidate list
 // --------------------------------------------------------------------------
 //
-void CPeninputGenericVkbWindow::ShowCandidateListL( const CDesCArray* aItemArray,
+void CPeninputGenericVkbWindow::ShowCandidateListL( TInt aAlign, const CDesCArray* aItemArray,
                                                    TInt aActiveIndex )
     {
     if ( !iCandidateList )
@@ -2522,21 +2541,25 @@
         return;
         }                
     iCandidateList->ClearItemsL();
+	iCandidateList->SetTextAlignment((CGraphicsContext::TTextAlign) aAlign);
+
     if ( aItemArray )
-        {        
-        for ( TInt i = 0; i < aItemArray->Count(); i++ )
+        {
+		CFepLayoutChoiceList::SItem item;
+		item.iCommand = 0;
+		
+        for (TInt i = 0; i < aItemArray->Count(); ++i)
             {
-            CFepLayoutChoiceList::SItem item;
-            item.iCommand = 0;
-            if ( (*aItemArray)[i].Length() <= item.iText.MaxLength() )
+            if ((*aItemArray)[i].Length() <= item.iText.MaxLength())
                 {
-                item.iText.Copy( (*aItemArray)[i] );
+                item.iText.Copy((*aItemArray)[i]);
                 }
             else
                 {
                 // Given longer than maxlength, display the part of less than max
-                item.iText.Copy( (*aItemArray)[i].Left( item.iText.MaxLength() ) );
+                item.iText.Copy((*aItemArray)[i].Left(item.iText.MaxLength()));
                 }
+			
             iCandidateList->AddItemL( item );
             }
         }
@@ -2612,7 +2635,7 @@
 //
 TRgb CPeninputGenericVkbWindow::CandidateListTextColor()
     {
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     TRgb matchlistcolor = KRgbBlack;
     AknsUtils::GetCachedColor( skininstance, 
                                 matchlistcolor, 
@@ -2627,7 +2650,7 @@
 //
 TRgb CPeninputGenericVkbWindow::AutoCompletionPartColor()
     {
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     TRgb matchlistcolor = KRgbBlack;
     AknsUtils::GetCachedColor( skininstance, 
                                 matchlistcolor, 
@@ -2641,7 +2664,7 @@
                                               const TInt aImgID2,
                                               const TInt aMaskID2 )
     {
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     CFbsBitmap* bmp1 = NULL;
     CFbsBitmap* mask1 = NULL;
--- a/textinput/peninputhwrboxcn/ctrlsrc/peninputhwrbxwnd.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputhwrboxcn/ctrlsrc/peninputhwrbxwnd.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -159,7 +159,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     for (TInt i = 0; i < KShadowBmpBr + 1; i++)
     	{
@@ -331,7 +331,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     for (TInt i = 0; i < KShadowBmpBr + 1; i++)
     	{
@@ -1081,7 +1081,7 @@
     TAknsItemID id;
     TInt skinitemid;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
     const TInt16 bmpId = resReader.ReadInt16();
     const TInt16 bmpMskId = resReader.ReadInt16();
     skinitemid = resReader.ReadInt16();   
--- a/textinput/peninputsplititut/inc/peninputsplititutdatamgr.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputsplititut/inc/peninputsplititutdatamgr.h	Tue Apr 27 16:59:43 2010 +0300
@@ -495,6 +495,7 @@
     TAknTextLineLayout iVkAlphaText2;
     TAknTextLineLayout iVkAlphaText3;
     TAknTextLineLayout iVkNumText;
+    TAknTextLineLayout iVkTextPlusForNumbericOnly;
 
     // resource id for generic itut resource file
     TInt iCommonResId;
--- a/textinput/peninputsplititut/src/peninputcommonbgctrl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputcommonbgctrl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -217,7 +217,7 @@
 										 TAknsItemID aFrameID,
 										 TAknsItemID aCenterID )
 	{
-	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	MAknsSkinInstance* skin = UiLayout()->SkinInstance();
     TRect innerRect = aRect;
     innerRect.Shrink( 4, 4 );
 	
--- a/textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -235,6 +235,10 @@
     // Key text row 2                               
     iVkAlphaText2 = AknLayoutScalable_Avkon::cell_ituss_key_t3(1).LayoutLine();
     
+	// Plus for Numberic Only keypad
+	iVkTextPlusForNumbericOnly = 
+			AknLayoutScalable_Avkon::cell_ituss_key_t5(0).LayoutLine();
+	
     // close button
     TAknWindowLineLayout funcbtn, funcbtnbg, funcbtninner;
     TAknLayoutRect funcrect, funcbgrect, funcinnerrect, arrowleftinnerrect, arrowrightinnerrect;
@@ -605,7 +609,14 @@
 				return &iVkNumText;
         		}
         case EKeypadRightTextLine1:
-            return &iVkAlphaText1;
+			if ( iInputMode == ENumber || iInputMode == ENativeNumber )
+				{
+				return &iVkTextPlusForNumbericOnly;
+				}
+			else
+				{
+				return &iVkAlphaText1;
+				}
         case EKeypadRightTextLine2:
             return &iVkAlphaText2;
         case EKeypadRightTextLine3:
--- a/textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertywindow.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -337,9 +337,10 @@
     iLastUsedTotalColumns = keyColumns;
     iLastUsedTotalRows = keyRows;
     
-    TRect winRect( Rect().iTl, iLafMgr->EntirePaneRect().Size() );
-        
-    SetWindowRect( winRect );  
+    TRect winRect( Rect().iTl, iLafMgr->EntirePaneRect().Size() );        
+    SetWindowRect( winRect );    
+    UiLayout()->LayoutOwner()->SetPosition( iLafMgr->EntirePaneRect().iTl );
+    
     ReorgnizeTitleBar();
     
     const TInt count = controlList.Count();
@@ -924,7 +925,16 @@
         item.iText.Copy( KVietAccentList2 );
         iAccentCmdList.Append( item );
         }
-    
+    else if( aLangId == ELangRussian || aLangId == ELangUkrainian || aLangId == ELangBulgarian )
+    	{
+	    _LIT( KCyrillicAccent, "\x00E0 - \x017E" );
+	    
+        CFepLayoutChoiceList::SItem item;
+
+        item.iCommand = EPeninputVkbLayoutAccented1;
+        item.iText.Copy( KCyrillicAccent );      
+        iAccentCmdList.Append( item );
+    	}    
     // 10X3
     else if ( is10x3 )
         {
@@ -1511,7 +1521,7 @@
 
     TAknsItemID id;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     TInt popWinBmpId = aRes.ReadInt16();
     TInt popWinBmpMaskId = aRes.ReadInt16();
--- a/textinput/peninputvkbcn/ctrlinc/peninputvkbwindow.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputvkbcn/ctrlinc/peninputvkbwindow.h	Tue Apr 27 16:59:43 2010 +0300
@@ -204,6 +204,9 @@
      * @return None
      */          
     void DimArrowKeys( TBool aDimArrow );
+    
+    void DimEnterKey( TBool aDimmed );
+    
     /**
      * Get current control who has focus
      *
@@ -319,7 +322,7 @@
      * @param aActiveIndex, the default index     
      * @return None
      */	
-    void ShowCandidateListOnFSQL( const CDesCArray* aItemArray,
+    void ShowCandidateListOnFSQL( TInt aAlign, const CDesCArray* aItemArray,
                             TInt aActiveIndex );    
     
     /**
--- a/textinput/peninputvkbcn/ctrlsrc/peninputvkbwindow.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputvkbcn/ctrlsrc/peninputvkbwindow.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -793,7 +793,6 @@
     CleanupStack::PopAndDestroy(); // reader
 
     //add item
-    
     CFepLayoutChoiceList::SItem item;
 
     item.iCommand = EAknFepVkbVkbAccented1;
@@ -863,7 +862,18 @@
         iClientArea->DimArrowKeys( aDimArrow );
         }	    	
     }
-    
+
+void CAknFepVkbWindow::DimEnterKey( TBool aDimmed )
+    {
+	CAknFepCtrlEventButton* enterBtn = static_cast<CAknFepCtrlEventButton*>
+	                              ( Control(EAknFepVkbCtrlIdEnterBtn) );	
+    if( UiLayout()->PenInputType() == EPluginInputModeFSQ 
+       && enterBtn )
+        {
+        enterBtn->SetDimmed( aDimmed );        
+        }
+    }
+
 // --------------------------------------------------------------------------
 // CAknFepVkbWindow::GetPopupWndInfoFromRes
 // (other items were commented in a header)
@@ -876,7 +886,7 @@
 
     TAknsItemID id;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     TInt popWinBmpId = aReader.ReadInt16();
     TInt popWinBmpMaskId = aReader.ReadInt16();
@@ -1274,45 +1284,47 @@
 // Show candidate list
 // --------------------------------------------------------------------------
 //
-void CAknFepVkbWindow::ShowCandidateListOnFSQL( const CDesCArray* aItemArray,
-                                                   TInt aActiveIndex )
+void CAknFepVkbWindow::ShowCandidateListOnFSQL(TInt aAlign, const CDesCArray* aItemArray,
+                                                   TInt aActiveIndex)
     {
-    if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
-        {
+    if (UiLayout()->PenInputType() != EPluginInputModeFSQ)
         return;
-        }                
+             
     iCandidateList->ClearItemsL();
-    if ( aItemArray )
-        {        
-        for ( TInt i = 0; i < aItemArray->Count(); i++ )
+    iCandidateList->SetTextAlignment((CGraphicsContext::TTextAlign) aAlign);
+
+    if (aItemArray)
+        {
+		CFepLayoutChoiceList::SItem item;
+		item.iCommand = 0;
+		
+        for (TInt i = 0; i < aItemArray->Count(); ++i)
             {
-            CFepLayoutChoiceList::SItem item;
-            item.iCommand = 0;
-            if ( (*aItemArray)[i].Length() <= item.iText.MaxLength() )
+            if ((*aItemArray)[i].Length() <= item.iText.MaxLength())
                 {
-                item.iText.Copy( (*aItemArray)[i] );
+                item.iText.Copy((*aItemArray)[i]);
                 }
             else
                 {
                 // Given longer than maxlength, display the part of less than max
-                item.iText.Copy( (*aItemArray)[i].Left( item.iText.MaxLength() ) );
+                item.iText.Copy((*aItemArray)[i].Left(item.iText.MaxLength()));
                 }
-            iCandidateList->AddItemL( item );
+            iCandidateList->AddItemL(item);
             }
-        
-			iCandidateList->SetCurrentFocusedIndex( aActiveIndex );
+
+        iCandidateList->SetCurrentFocusedIndex(aActiveIndex);
         }
     
     CFepLayoutMultiLineIcf* icf = static_cast<CFepLayoutMultiLineIcf*>
          (Control(EPeninputWindowCtrlIdMultiLineICF)); 
 
-    TPoint posBelow( 0, 0 );
-    TPoint posRight( 0, 0 );
+    TPoint posBelow(0, 0);
+    TPoint posRight(0, 0);
     posBelow = posRight = icf->Rect().iTl;
-    icf->InlineTextPos( posBelow, posRight );
+    icf->InlineTextPos(posBelow, posRight);
     TPoint tlPos = posRight;
-    iCandidateList->Display( TRect( tlPos, tlPos ), 
-                             CFepLayoutPopupWnd::EDispBottomRight );
+    iCandidateList->Display(TRect(tlPos, tlPos), 
+                            CFepLayoutPopupWnd::EDispBottomRight);
     }
 
 // --------------------------------------------------------------------------
@@ -1320,7 +1332,7 @@
 // --------------------------------------------------------------------------
 //
 void CAknFepVkbWindow::HandleCandidateListSelectedOnFSQL
-                         ( CFepUiBaseCtrl* aCtrl, const TDesC& aEventData )
+                         ( CFepUiBaseCtrl* /*aCtrl*/, const TDesC& aEventData )
     {
     if ( UiLayout()->PenInputType() != EPluginInputModeFSQ )
         {
@@ -1381,7 +1393,7 @@
     TRgb matchlistcolor = KRgbBlack;
     if ( UiLayout()->PenInputType() == EPluginInputModeFSQ )
         {
-        MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+        MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
         AknsUtils::GetCachedColor( skininstance, 
                                     matchlistcolor, 
                                     KAknsIIDQsnTextColors,
@@ -1400,7 +1412,7 @@
     TRgb matchlistcolor = KRgbBlack;
     if ( UiLayout()->PenInputType() == EPluginInputModeFSQ )
         {
-        MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+        MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
         AknsUtils::GetCachedColor( skininstance, 
                                     matchlistcolor, 
                                     KAknsIIDQsnTextColors,
--- a/textinput/peninputvkbcn/src/peninputvkblayout.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputvkbcn/src/peninputvkblayout.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -281,6 +281,12 @@
             iVkbWindow->DimArrowKeys( IsDimArrowKeys );
             }
             break;
+        case ECmdPenInputDimEnterKey:
+            {
+            TBool isDimEnterKey = *((TUint16*)( aData ));
+            iVkbWindow->DimEnterKey( isDimEnterKey );           
+            }
+            break;
         case ECmdPenInputSetPromptText:
             {
             if( iLayoutType == EPluginInputModeFSQ )
@@ -1124,28 +1130,28 @@
 //
 void CAknFepVkbLayout::HandleShowTooltipOnFSQCmdL( TUint8* aData )
     {
-    if ( !iITIEnabled || iLayoutType != EPluginInputModeFSQ )
+    if (!iITIEnabled || iLayoutType != EPluginInputModeFSQ)
 		{
 		return;
 		}
     
-    TPtr8 buf8( aData, sizeof(TInt32), sizeof(TInt32) );
+    TPtr8 buf8(aData, sizeof(TInt32), sizeof(TInt32));
     RDesReadStream readStream;
-    readStream.Open( buf8 );
-    CleanupClosePushL( readStream );
+    readStream.Open(buf8);
+    CleanupClosePushL(readStream);
     TInt dataSize = readStream.ReadInt32L();
-    CleanupStack::PopAndDestroy( &readStream );
-    if ( dataSize > 0 )
+    CleanupStack::PopAndDestroy(&readStream);
+    
+    if (dataSize > 0)
         {
-        TUint16* dataAddress = (TUint16*)( aData + sizeof(TInt32) );
-        HBufC* tooltipText = ReadTextInfoHBufCL( dataAddress, 
-                                                 ( dataSize + 1 )/ 2 );
-        if ( tooltipText )
+        TUint16* dataAddress = (TUint16*)(aData + sizeof(TInt32));
+        HBufC* tooltipText = ReadTextInfoHBufCL(dataAddress, (dataSize + 1) / 2);
+        if (tooltipText)
             {
-            CleanupStack::PushL( tooltipText );
-            iVkbWindow->ShowTooltipOnFSQL( *tooltipText );
-            CleanupStack::PopAndDestroy( tooltipText );
-            }        
+            CleanupStack::PushL(tooltipText);
+            iVkbWindow->ShowTooltipOnFSQL(*tooltipText);
+            CleanupStack::PopAndDestroy(tooltipText);
+            }
         }     
     }
 
@@ -1163,20 +1169,26 @@
     // Read candidate data from a block of memory staring from aData
     // The format is activeIndex | count of candiates | 
     // length 1 | text 1 | length 2 | text 2 |...
-    TPtr8 buf8( aData, sizeof( TInt32 )*2, sizeof( TInt32 )*2 );
+    TPtr8 buf8( aData, sizeof( TInt32 )* 3, sizeof( TInt32 )* 3 );
     RDesReadStream readStream;
     readStream.Open( buf8 );
     CleanupClosePushL( readStream );
     // Get activeIndex
     TInt activeIndex = readStream.ReadInt32L();
     // Get count of candidates
-    TInt count = readStream.ReadInt32L();    
+    TInt count = readStream.ReadInt32L();   
+	TInt langCode = readStream.ReadInt32L();
+	TInt align = TBidiText::ScriptDirectionality((TLanguage)langCode); 
+	if(align != TBidiText::ELeftToRight)
+		align = CGraphicsContext::ERight;
+	else
+		align = CGraphicsContext::ELeft;
     CleanupStack::PopAndDestroy( &readStream );
     
     CDesCArray* itemArray = NULL;
     if ( count > 0 )
         {        
-        TUint8* curPointer = aData + sizeof(TInt) * 2;
+        TUint8* curPointer = aData + sizeof(TInt) * 3;
         itemArray = new (ELeave) CDesCArrayFlat( count );
         CleanupStack::PushL( itemArray );
         for ( TInt i = 0; i < count; i++ )
@@ -1205,7 +1217,7 @@
                 }
             }
         
-        iVkbWindow->ShowCandidateListOnFSQL( itemArray, activeIndex );
+        iVkbWindow->ShowCandidateListOnFSQL( align, itemArray, activeIndex );
         CleanupStack::PopAndDestroy( itemArray );
         }  
     }
--- a/textinput/peninputvkbkr/inc/PeninputVkbKrWindow.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputvkbkr/inc/PeninputVkbKrWindow.h	Tue Apr 27 16:59:43 2010 +0300
@@ -215,6 +215,8 @@
     
     void DimArrowKeys( TBool aDimArrow );
     
+    void DimEnterKey( TBool aDimmed );
+    
     void ShowBubble(TInt aShow);
     
     void PreProcessRange(const TInt& aRange);
--- a/textinput/peninputvkbkr/src/PeninputVkbKrLayout.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputvkbkr/src/PeninputVkbKrLayout.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -205,6 +205,12 @@
             LOG("Vkb.Layout.HandleCommand ECmdPenInputDimArrowKeys");
             vkbWindow->DimArrowKeys( *aData );
             break;
+        case ECmdPenInputDimEnterKey:
+            {
+            TBool isDimEnterKey = *((TUint16*)( aData ));            
+            vkbWindow->DimEnterKey( isDimEnterKey );            
+            }
+            break;
         case ECmdPenInputSendEditorTextAndCurPos:
             LOG("Vkb.Layout.HandleCommand ECmdPenInputSendEditorTextAndCurPos");
             break;
--- a/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/peninputvkbkr/src/PeninputVkbKrWindow.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1208,7 +1208,7 @@
     /* for CButtonBase
     TRgb color( KRgbBlack );  // sane default for nonskinned case
     AknsUtils::GetCachedColor( 
-        AknsUtils::SkinInstance(),
+        UiLayout()->SkinInstance(),
         color,
         KAknsIIDQsnTextColors,
         EAknsCIQsnTextColorsCG59);
@@ -1384,7 +1384,7 @@
 
     TAknsItemID id;
     
-    MAknsSkinInstance* skininstance = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skininstance = UiLayout()->SkinInstance();
 
     TInt popWinBmpId = aRes.ReadInt16();
     TInt popWinBmpMaskId = aRes.ReadInt16();
@@ -1539,6 +1539,17 @@
         }           
     }
 
+void CPeninputVkbKrWindow::DimEnterKey( TBool aDimmed )
+    {
+	CAknFepCtrlEventButton* enterBtn = static_cast<CAknFepCtrlEventButton*>
+	                              ( Control(EPeninutWindowCtrlIdEnterBtn) );	
+    if( iLayoutContext->LayoutType() == EPluginInputModeFSQ 
+       && enterBtn )
+        {
+        enterBtn->SetDimmed( aDimmed );        
+        }
+    }
+
 void CPeninputVkbKrWindow::ShowBubble(TInt aShow)
     {
     if (aShow > 0)
--- a/textinput/ptienginev2/group/VariantParser.pl	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/group/VariantParser.pl	Tue Apr 27 16:59:43 2010 +0300
@@ -59,7 +59,7 @@
 print(INFFILE "* This component and the accompanying materials are made available\n");
 print(INFFILE "* under the terms of the License \"Eclipse Public License v1.0\"\n");
 print(INFFILE "* which accompanies this distribution, and is available\n");
-print(INFFILE "* at the URL "http://www.eclipse.org/legal/epl-v10.html".\n");
+print(INFFILE "* at the URL \"http://www.eclipse.org/legal/epl-v10.html\". \n");
 print(INFFILE "*\n");
 print(INFFILE "* Initial Contributors:\n");
 print(INFFILE "* Nokia Corporation - initial contribution.\n");
@@ -128,6 +128,7 @@
 				print(CFFFILE "\n");
 				print(CFFFILE "void CPtiVariant${variant_name}DataFactory::ListLanguagesL(RArray<TInt>& aResult)\n");
 				print(CFFFILE "    {\n");
+				print(CFFFILE "    CleanupClosePushL(aResult);\n");
 
 				for ($ii = 0; $ii < scalar(@lang_name_array); $ii++)
 				{
@@ -140,7 +141,7 @@
 						print(CFFFILE "    aResult.AppendL(ELang@lang_name_array[$ii]);\n");
 					}
 				}
-
+                print(CFFFILE "    CleanupStack::Pop();\n");
 				print(CFFFILE "    }\n");
 				print(CFFFILE "\n");
 				print(CFFFILE "// End of file\n");
@@ -199,7 +200,7 @@
 				print(RESFILE "* This component and the accompanying materials are made available\n");
 				print(RESFILE "* under the terms of the License \"Eclipse Public License v1.0\"\n");
 				print(RESFILE "* which accompanies this distribution, and is available\n");
-				print(RESFILE "* at the URL "http://www.eclipse.org/legal/epl-v10.html".\n");
+				print(RESFILE "* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n");
 				print(RESFILE "*\n");
 				print(RESFILE "* Initial Contributors:\n");
 				print(RESFILE "* Nokia Corporation - initial contribution.\n");
@@ -259,7 +260,7 @@
 				print(MMPFILE "* This component and the accompanying materials are made available\n");
 				print(MMPFILE "* under the terms of the License \"Eclipse Public License v1.0\"\n");
 				print(MMPFILE "* which accompanies this distribution, and is available\n");
-				print(MMPFILE "* at the URL "http://www.eclipse.org/legal/epl-v10.html".\n");
+				print(MMPFILE "* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n");
 				print(MMPFILE "*\n");
 				print(MMPFILE "* Initial Contributors:\n");
 				print(MMPFILE "* Nokia Corporation - initial contribution.\n");
@@ -340,7 +341,7 @@
 				print(IBYFILE "* This component and the accompanying materials are made available\n");
 				print(IBYFILE "* under the terms of the License \"Eclipse Public License v1.0\"\n");
 				print(IBYFILE "* which accompanies this distribution, and is available\n");
-				print(IBYFILE "* at the URL "http://www.eclipse.org/legal/epl-v10.html".\n");
+				print(IBYFILE "* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n");
 				print(IBYFILE "*\n");
 				print(IBYFILE "* Initial Contributors:\n");
 				print(IBYFILE "* Nokia Corporation - initial contribution.\n");
@@ -394,7 +395,7 @@
 				print(CPPFILE "* This component and the accompanying materials are made available\n");
 				print(CPPFILE "* under the terms of the License \"Eclipse Public License v1.0\"\n");
 				print(CPPFILE "* which accompanies this distribution, and is available\n");
-				print(CPPFILE "* at the URL "http://www.eclipse.org/legal/epl-v10.html".\n");
+				print(CPPFILE "* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n");
 				print(CPPFILE "*\n");
 				print(CPPFILE "* Initial Contributors:\n");
 				print(CPPFILE "* Nokia Corporation - initial contribution.\n");
@@ -430,7 +431,7 @@
 				print(CHHFILE "* This component and the accompanying materials are made available\n");
 				print(CHHFILE "* under the terms of the License \"Eclipse Public License v1.0\"\n");
 				print(CHHFILE "* which accompanies this distribution, and is available\n");
-				print(CHHFILE "* at the URL "http://www.eclipse.org/legal/epl-v10.html".\n");
+				print(CHHFILE "* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n");
 				print(CHHFILE "*\n");
 				print(CHHFILE "* Initial Contributors:\n");
 				print(CHHFILE "* Nokia Corporation - initial contribution.\n");
@@ -467,7 +468,7 @@
 				print(CFFFILE "* This component and the accompanying materials are made available\n");
 				print(CFFFILE "* under the terms of the License \"Eclipse Public License v1.0\"\n");
 				print(CFFFILE "* which accompanies this distribution, and is available\n");
-				print(CFFFILE "* at the URL "http://www.eclipse.org/legal/epl-v10.html".\n");
+				print(CFFFILE "* at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n");
 				print(CFFFILE "*\n");
 				print(CFFFILE "* Initial Contributors:\n");
 				print(CFFFILE "* Nokia Corporation - initial contribution.\n");
@@ -478,8 +479,8 @@
 				print(CFFFILE "*\n");
 				print(CFFFILE "*/\n");
 				print(CFFFILE "\n\n\n\n\n\n\n\n\n\n\n\n");
-				print(CFFFILE "#include <ECom/ImplementationProxy.h>\n");
-				print(CFFFILE "\n#include <Languages.hrh>\n");
+				print(CFFFILE "#include <ecom/implementationproxy.h>\n");
+				print(CFFFILE "\n#include <languages.hrh>\n");
 				print(CFFFILE "\n");
 				print(CFFFILE "#include \"${output_dll}${variant_name}.h\"\n");
 				print(CFFFILE "\n");
@@ -647,7 +648,7 @@
 print(CFFFILE "\n");
 print(CFFFILE "void CPtiVariant${variant_name}DataFactory::ListLanguagesL(RArray<TInt>& aResult)\n");
 print(CFFFILE "    {\n");
-     
+print(CFFFILE "    CleanupClosePushL(aResult);\n");
 for ($ii = 0; $ii < scalar(@lang_name_array); $ii++)
      {    
      if (@lang_name_array[$ii] eq "Basque" || @lang_name_array[$ii] eq "Galician")
@@ -659,7 +660,7 @@
             print(CFFFILE "    aResult.AppendL(ELang@lang_name_array[$ii]);\n");
             }
      }
-
+print(CFFFILE "    CleanupStack::Pop();\n");
 print(CFFFILE "    }\n");
 print(CFFFILE "\n");
 print(CFFFILE "// End of file\n");
--- a/textinput/ptienginev2/inc/PtiEngineImpl.h	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/inc/PtiEngineImpl.h	Tue Apr 27 16:59:43 2010 +0300
@@ -231,6 +231,7 @@
 #ifdef FF_DUAL_LANGUAGE_SUPPORT
         void  SearchKeySequenceInSecLang(TPtrC aIn, TDes8& aOut);
 #endif // FF_DUAL_LANGUAGE_SUPPORT        
+        TBool IsCurrentCoreSupportCaseInfo();
 	private:	
 	    /*
 	    * Pointer to PtiEngine front end.
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_01.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_01.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_01DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangEnglish);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_02.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_02.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_02DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangFrench);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_03.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_03.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_03DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangGerman);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_04.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_04.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_04DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangSpanish);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_05.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_05.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_05DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangItalian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_06.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_06.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_06DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangSwedish);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_07.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_07.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_07DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangDanish);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_08.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_08.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_08DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangNorwegian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_09.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_09.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_09DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangFinnish);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_102.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_102.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_102DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(KLangBasque);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_103.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_103.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_103DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(KLangGalician);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_13.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_13.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_13DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangPortuguese);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_14.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_14.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_14DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangTurkish);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_15.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_15.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_15DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangIcelandic);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_16.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_16.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_16DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangRussian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_17.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_17.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_17DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangHungarian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_18.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_18.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_18DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangDutch);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_25.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_25.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_25DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangCzech);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_26.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_26.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_26DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangSlovak);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_27.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_27.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_27DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangPolish);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_28.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_28.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_28DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangSlovenian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_29.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_29.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_29DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangTaiwanChinese);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_30.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_30.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_30DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangHongKongChinese);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_31.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_31.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_31DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangPrcChinese);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_33.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_33.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_33DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangThai);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_37.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_37.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_37DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangArabic);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_39.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_39.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_39DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangTagalog);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_42.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_42.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_42DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangBulgarian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_44.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_44.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_44DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangCatalan);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_45.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_45.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_45DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangCroatian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_49.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_49.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_49DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangEstonian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_50.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_50.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_50DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangFarsi);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_54.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_54.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_54DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangGreek);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_57.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_57.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_57DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangHebrew);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_58.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_58.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_58DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangHindi);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_59.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_59.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_59DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangIndonesian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_65.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_65.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_65DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangKorean);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_67.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_67.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_67DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangLatvian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_68.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_68.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_68DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangLithuanian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_70.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_70.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_70DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangMalay);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_72.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_72.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_72DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangMarathi);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_78.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_78.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_78DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangRomanian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_79.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_79.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_79DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangSerbian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_93.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_93.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_93DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangUkrainian);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_94.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_94.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_94DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangUrdu);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/languages/PtiFactory_ITUT_96.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/languages/PtiFactory_ITUT_96.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1,8 +1,8 @@
 /*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
@@ -74,7 +74,9 @@
 
 void CPtiVariantITUT_96DataFactory::ListLanguagesL(RArray<TInt>& aResult)
     {
+    CleanupClosePushL(aResult);
     aResult.AppendL(ELangVietnamese);
+    CleanupStack::Pop();
     }
 
 // End of file
--- a/textinput/ptienginev2/src/PtiEngine.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiEngine.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -1204,8 +1204,10 @@
 //	
 EXPORT_C void CPtiEngine::ListAvailablePhysicalKeyboardsL(RArray<TPtiKeyboardType>& aResult)
     {
+	CleanupClosePushL( aResult );
   	// Add real implementation later.	
     User::LeaveIfError(aResult.Append(EPtiKeyboard12Key));        	    
+    CleanupStack::Pop();
     }    
     
         
--- a/textinput/ptienginev2/src/PtiEngineImpl.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiEngineImpl.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -134,6 +134,7 @@
 
 // Local method declarations.
 LOCAL_C TInt RemapVietnameseAccentedCharacter(TUint16 aChr);
+const TUid KXt9ImplementationUid = {0x102830B9};
 	
 //
 // CPtiEngineImpl implementation
@@ -2052,7 +2053,7 @@
 	// Predictive QWERTY (XT9) changes ---->
 	// PtiXt9Core handles the capitalization it self, and it should not be overriden 
 	// byt the PtiEngine.
-	if ( iInputMode==EPtiEngineQwertyPredictive )
+	if ( IsCurrentCoreSupportCaseInfo() )
 	    {
 	    return;
 	    }
@@ -2657,6 +2658,7 @@
 //
 void CPtiEngineImpl::GetModeNameIndexL(TPtiChineseVariant aVariant, RArray<TInt>& aResult)
 	{
+	CleanupClosePushL( aResult );
 	TResourceReader reader;	
 	TFileName fileName;
 
@@ -2703,6 +2705,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(3);   // fsSession, rsFile, rBuffer
+    CleanupStack::Pop();
 	}
 
 
@@ -2885,6 +2888,7 @@
 //	
 void CPtiEngineImpl::GetAvailableLanguagesL(RArray<TInt>& aResult)
 	{
+	CleanupClosePushL( aResult ); 
 	aResult.Reset();
 	
 	const TInt count = iLanguages->Count();
@@ -2895,6 +2899,7 @@
 			aResult.AppendL(iLanguages->At(i)->LanguageCode());
 			}
 		}	
+    CleanupStack::Pop();
 	}
 
 
@@ -3253,6 +3258,7 @@
                                                TBool aUseExtendedSet,
                                                TPtiKeyboardType aKeyboardType)
 	{
+	CleanupClosePushL( aResult );
 	aResult.Reset();		
 	TPtiNumericKeyBinding bind;		
 	
@@ -3271,6 +3277,7 @@
 	if (keyboardType == EPtiKeyboard12Key ||
 	    keyboardType == EPtiKeyboardNone)
 	    {
+		CleanupStack::Pop();
 	    // No qwerty data available, can't go on.
 	    return;
 	    }
@@ -3289,6 +3296,7 @@
 			bind = NumericModeKeysForNonLatinNumberLanguages[i];
 			User::LeaveIfError(aResult.Append(bind));		
 			}	
+		CleanupStack::Pop();
 		
 		return;			
 		}
@@ -3372,6 +3380,7 @@
                 }				
 			}			      
 		}		
+	CleanupStack::Pop();
 	}	
 	
 	
@@ -3815,6 +3824,7 @@
 void CPtiEngineImpl::KeyboardTypesSupportedByLanguageL(TInt aLanguage,
                                                        RArray<TPtiKeyboardType>& aResult)
     {
+	CleanupClosePushL( aResult );
     CPtiCoreLanguage* lang = NULL;
     
     if (iCurrentLanguage && iCurrentLanguage->LanguageCode() == aLanguage)
@@ -3876,6 +3886,7 @@
             User::LeaveIfError(aResult.Append(EPtiKeyboardHalfQwerty));
             }            
         }                
+    CleanupStack::Pop();
     }
 
 
@@ -3907,7 +3918,7 @@
 		RProperty::Get( KPSUidAknFep, KAknFepVirtualKeyboardType, 
 						keyboardType );      
 		}
-#else if
+#else
 	// Get physical keyboard type
 	RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardType );	    
 #endif
@@ -4229,5 +4240,16 @@
     
     }
 #endif //FF_DUAL_LANGUAGE_SUPPORT
+TBool CPtiEngineImpl::IsCurrentCoreSupportCaseInfo()
+    {
+    if ( Core() )
+        {
+        if ( Core()->GetCoreInfo()->Uid() == KXt9ImplementationUid.iUid )
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
 // End of file
 
--- a/textinput/ptienginev2/src/PtiHwrRecognizer.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiHwrRecognizer.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -200,6 +200,7 @@
 // 
 void CHwrRecognizer::AppendMatchedLanguagesL(const TDesC8& aImplementationData, RArray<TInt>& aResult)
 	{
+	CleanupClosePushL( aResult );
     TInt lower, upper, i;
     const TInt separatorLength = KDataSeparator().Length();
         
@@ -253,6 +254,7 @@
             	}
             }
         }
+    CleanupStack::Pop();
 	}
 
 // ---------------------------------------------------------------------------
--- a/textinput/ptienginev2/src/PtiKeyMapData.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiKeyMapData.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -296,6 +296,7 @@
 EXPORT_C void CPtiKeyMapData::GetNumericModeKeysL(TPtiKeyboardType aKeyboardType,
                                                   RArray<TPtiNumericKeyBinding>& aResult) const
 	{	
+	CleanupClosePushL( aResult );
 	TInt numItems = 0;
 	const TPtiNumericKeyBinding* data = NumericModeKeysTable(aKeyboardType, numItems);
 
@@ -308,6 +309,7 @@
 			User::LeaveIfError(aResult.Append(data[i]));
 			}
 		}
+    CleanupStack::Pop();
 	}	 	 	
 	 	 		 
 	       	
@@ -479,6 +481,7 @@
 //			
 EXPORT_C void CPtiKeyMapDataFactory::ListImplementationsL(RArray<TInt>& aResult)
     {
+	CleanupClosePushL( aResult );
 	RImplInfoPtrArray infoArray;
 	TInt i;
 
@@ -492,6 +495,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(); // infoArray     
+    CleanupStack::Pop();
     }
         	
         	
--- a/textinput/ptienginev2/src/PtiKeyMappings.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiKeyMappings.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -608,6 +608,7 @@
 // 
 void CPtiHalfQwertyKeyMappings::GetNumericModeKeysFromDataL(RArray<TPtiNumericKeyBinding>& aResult)
 	{
+	CleanupClosePushL( aResult );
 	__ASSERT_DEBUG(iKeyMapData, User::Panic(KPtiNoKeyMapDataPanic, KErrCorrupt));
 	
 	TInt numEntries = 0;
@@ -618,6 +619,7 @@
 		{
 		User::LeaveIfError(aResult.Append(dataEntries[i]));
 		}
+    CleanupStack::Pop();
 	}    
 	
 	
--- a/textinput/ptienginev2/src/PtiKeyboardDatabase.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiKeyboardDatabase.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -88,6 +88,7 @@
 EXPORT_C TInt CPtiKeyboardDatabaseFactory::CreateMappingTableWithOpaqueL(TInt aInterfaceUid,
                                                   RArray<TPtiKeyboardDatabaseMappingOpaque>& aResult)
     {
+	CleanupClosePushL( aResult );
 	TInt res = 0;
 	TPtiKeyboardDatabaseMappingOpaque map;	
 	RImplInfoPtrArray infoArray;
@@ -106,6 +107,7 @@
 		
 	CleanupStack::PopAndDestroy(); // infoArray    
 
+    CleanupStack::Pop();
 	return res;    
     }
 		
@@ -134,6 +136,7 @@
 EXPORT_C void CPtiKeyboardDatabaseFactory::ListImplementationsL(TInt aCoreUid, 
                                                                 RArray<TInt>& aResult)
     {
+	CleanupClosePushL( aResult );
 	RImplInfoPtrArray infoArray;
 	TInt i;
 
@@ -146,6 +149,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(); // infoArray     
+    CleanupStack::Pop();
     }
         
 // ---------------------------------------------------------------------------
--- a/textinput/ptienginev2/src/PtiLanguage.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiLanguage.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -424,6 +424,7 @@
 // 
 EXPORT_C void CPtiCoreLanguage::GetAvailableInputModesL(RArray<TInt>& aResult)
 	{
+	CleanupClosePushL( aResult );
 	if (!iKeyMapData)	
 		{
 		TRAP_IGNORE(LoadKeymappingsL());	
@@ -433,6 +434,7 @@
 		{
 		aResult.AppendL(iCores[i].iInputMode);
 		}	
+    CleanupStack::Pop();
 	}
 	
 
--- a/textinput/ptienginev2/src/PtiLanguageDatabase.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiLanguageDatabase.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -386,6 +386,7 @@
 //
 EXPORT_C TInt CPtiLanguageDatabase::CreateMappingTableL(TInt aCoreUid, RArray<TPtiLangDatabaseMapping>& aResult)
 	{
+	CleanupClosePushL( aResult );
 	TInt res = 0, i, lc;
 	TPtiLangDatabaseMapping map;
 	CArrayFix<TInt>* dbs = ListDatabasesLC(aCoreUid);
@@ -413,6 +414,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(); // dbs
+	CleanupStack::Pop( &aResult );
 	return res;
 	}
 
@@ -424,6 +426,7 @@
 //		
 EXPORT_C TInt CPtiLanguageDatabase::CreateMappingTableWithOpaqueL(TInt aCoreUid, RArray<TPtiLangDatabaseMappingOpaque>& aResult)
     {
+	CleanupClosePushL( aResult );
   	TInt res = 0, lc;
 	TPtiLangDatabaseMappingOpaque map;	
 	RImplInfoPtrArray infoArray;
@@ -458,7 +461,7 @@
 		}
 
 	CleanupStack::PopAndDestroy(); // infoArray    
-
+	CleanupStack::Pop( &aResult );
 	return res;
     }
 	
--- a/textinput/ptienginev2/src/PtiSymbolList.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/PtiSymbolList.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -181,7 +181,7 @@
     }
 
 void CSymbolList::GetSymbolModelL(const TDesC& aChar, RArray<TPoint>& aModel ,TUint& aUnicode, const THwrUdmRange& aRange )
-    {
+    {CleanupClosePushL( aModel );
     TInt idx = -1;
     if ( GetSymbolIndex( aChar, idx, aRange ) != KErrNone )
         {
@@ -203,7 +203,8 @@
     for ( int i = 0; i < symbol->iPointVectorLen; i++ )
         {
         aModel.AppendL( symbol->iPointVector[i] );    
-        }    
+        }  
+    CleanupStack::Pop( &aModel );
     }
 
 void CSymbolList::DeleteSymbolModelL(const TDesC& aChar ,const THwrUdmRange& aRange )
@@ -291,7 +292,8 @@
     }
     
 void CSymbolList::GetModelIndexListL( RArray<TInt>& aList, const THwrUdmRange& aRange)
-    {
+    {CleanupClosePushL( aList );
+    
     aList.Reset();
     for ( int i = 0; i < iSymbolList.Count(); i++ )
         {
@@ -313,6 +315,7 @@
                 }
             }
         }
+    CleanupStack::Pop( &aList );
     }
 
 void CSymbolList::InternalizeL(const TDesC& /*aFile*/)
@@ -530,19 +533,20 @@
     }
 
 void CSymbolList::GetAllPresetSymbolsL( RArray<TUint>& aPresets )
-    {
+    {CleanupClosePushL( aPresets );
     User::LeaveIfNull( iPresetModels );
     
     for ( int i = 0; i < iPresetModels->iSymbolList.Count(); i ++ )
         {
         aPresets.AppendL( iPresetModels->iSymbolList[i]->iPresetCode );
         }
+    CleanupStack::Pop( &aPresets );
     }
 
 void CSymbolList::GetPresetSymbolByUnicodeL( TUint aUnicode, RArray<TPoint>& aModel, TDes& aShortcut )
     {
-    User::LeaveIfNull( iPresetModels );
-    
+	CleanupClosePushL( aModel );
+    User::LeaveIfNull( iPresetModels ); 
     for ( int i = 0; i < iPresetModels->iSymbolList.Count(); i ++ )
         {
         CSymbol* sym = iPresetModels->iSymbolList[i];
@@ -557,11 +561,13 @@
             for ( int i = 0; i < sym->iPointVectorLen; i++ )
                 {
                 aModel.AppendL( sym->iPointVector[i] );    
-                }    
+                }
+            CleanupStack::Pop( &aModel );   
             return;
             }
         }
-    User::Leave( KErrNotFound );    
+    CleanupStack::Pop( &aModel );
+    User::Leave( KErrNotFound ); 
     }
     
 void CSymbolList::SignalMutex(TAny* aMutex)
--- a/textinput/ptienginev2/src/Ptiqwertykeymappings.cpp	Wed Apr 14 16:18:34 2010 +0300
+++ b/textinput/ptienginev2/src/Ptiqwertykeymappings.cpp	Tue Apr 27 16:59:43 2010 +0300
@@ -872,6 +872,7 @@
 void CPtiQwertyKeyMappings::GetNumericModeKeysFromDataL(RArray<TPtiNumericKeyBinding>& aResult)
 	{
 	__ASSERT_DEBUG(iKeyMapData, User::Panic(KPtiNoQwertyKeyMapDataPanic, KErrCorrupt));
+	CleanupClosePushL( aResult );
 	
 	TInt numEntries = 0;
 	const TPtiNumericKeyBinding* dataEntries = iKeyMapData->NumericModeKeysTable(iKeyboardType, 
@@ -881,6 +882,7 @@
 		{
 		User::LeaveIfError(aResult.Append(dataEntries[i]));
 		}
+	CleanupStack::Pop( &aResult );
 	}