Revision: 201001
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 18 Jan 2010 20:20:33 +0200
changeset 0 3ee3dfdd8d69
child 1 a662ab7f60a8
Revision: 201001 Kit: 201003
extras/about/aboutgsplugin/Src/aboutgsplugin.cpp
extras/about/aboutgsplugin/Src/aboutgspluginimplementationtable.cpp
extras/about/aboutgsplugin/data/aboutgsplugin.rss
extras/about/aboutgsplugin/data/aboutgspluginrsc.rss
extras/about/aboutgsplugin/group/aboutgsplugin.mmp
extras/about/aboutgsplugin/group/aboutgspluginicons.mk
extras/about/aboutgsplugin/group/bld.inf
extras/about/aboutgsplugin/inc/aboutgsplugin.h
extras/about/aboutgsplugin/loc/aboutgsplugin.loc
extras/about/aif/aboutaif.rss
extras/about/data/about.rss
extras/about/data/about_caption.rss
extras/about/data/about_reg.rss
extras/about/group/About.pkg
extras/about/group/about.mmp
extras/about/group/about_icons.mk
extras/about/group/about_icons_aif_bitmaps.mk
extras/about/group/about_icons_aif_bitmaps_dc.mk
extras/about/group/about_icons_aif_scalable.mk
extras/about/group/about_icons_aif_scalable_dc.mk
extras/about/group/about_icons_dc.mk
extras/about/group/bld.inf
extras/about/inc/AboutApp.h
extras/about/inc/AboutAppUi.h
extras/about/inc/AboutContainer.h
extras/about/inc/AboutDocument.h
extras/about/inc/AboutImage.h
extras/about/inc/about.hrh
extras/about/inc/about.rh
extras/about/inc/about_test.hrh
extras/about/loc/about.loc
extras/about/rom/About.iby
extras/about/rom/AboutResources.iby
extras/about/src/AboutApp.cpp
extras/about/src/AboutAppUi.cpp
extras/about/src/AboutContainer.cpp
extras/about/src/AboutDocument.cpp
extras/about/src/AboutImage.cpp
extras/calcsoft/aif/CalcAif.rss
extras/calcsoft/aif/Calcsoft_caption.rss
extras/calcsoft/group/Calcsoft.mmp
extras/calcsoft/group/Calcsoft.rss
extras/calcsoft/group/Calcsoft_reg.rss
extras/calcsoft/group/backup_registration.xml
extras/calcsoft/group/bld.inf
extras/calcsoft/group/iconlist.txt
extras/calcsoft/group/icons_aif_bitmaps_calcsoft.mk
extras/calcsoft/group/icons_aif_scalable_calcsoft.mk
extras/calcsoft/group/icons_calcsoft.mk
extras/calcsoft/group/icons_scalable_calcsoft.mk
extras/calcsoft/help/data/xhtml.zip
extras/calcsoft/help/group/bld.inf
extras/calcsoft/help/inc/calc.hlp.hrh
extras/calcsoft/help/rom/calcsofthelps_variant.iby
extras/calcsoft/inc/CalcApp.h
extras/calcsoft/inc/CalcAppUi.h
extras/calcsoft/inc/CalcAppUi.inl
extras/calcsoft/inc/CalcCmdBtn.h
extras/calcsoft/inc/CalcCont.h
extras/calcsoft/inc/CalcCont.inl
extras/calcsoft/inc/CalcDoc.h
extras/calcsoft/inc/CalcDrawingConst.laf
extras/calcsoft/inc/CalcEdit.h
extras/calcsoft/inc/CalcEdit.inl
extras/calcsoft/inc/CalcEditLine.inl
extras/calcsoft/inc/CalcEditline.h
extras/calcsoft/inc/CalcEnv.h
extras/calcsoft/inc/CalcEnv.inl
extras/calcsoft/inc/CalcFunc.h
extras/calcsoft/inc/CalcHistory.h
extras/calcsoft/inc/CalcOutSheet.h
extras/calcsoft/inc/CalcOutSheet.inl
extras/calcsoft/inc/CalcView.h
extras/calcsoft/inc/calc.hrh
extras/calcsoft/loc/calc.loc
extras/calcsoft/rom/Calcsoft.iby
extras/calcsoft/rom/CalculatorResources.iby
extras/calcsoft/src/CalcApp.cpp
extras/calcsoft/src/CalcAppUi.cpp
extras/calcsoft/src/CalcCmdBtn.cpp
extras/calcsoft/src/CalcCont.cpp
extras/calcsoft/src/CalcDoc.cpp
extras/calcsoft/src/CalcEdit.cpp
extras/calcsoft/src/CalcEditline.cpp
extras/calcsoft/src/CalcEnv.cpp
extras/calcsoft/src/CalcFunc.cpp
extras/calcsoft/src/CalcHistory.cpp
extras/calcsoft/src/CalcOutSheet.cpp
extras/calcsoft/src/CalcView.cpp
extras/converter/BMARM/CONVERTERENGINEu.def
extras/converter/BWINS/CONVERTERENGINEu.def
extras/converter/BWinsCw/CONVERTERENGINEu.def
extras/converter/BWinsCw/ConverterEngine_EKA2u.def
extras/converter/Ui/Src/CCnvAppUi.cpp
extras/converter/Ui/Src/CCnvAppUi.h
extras/converter/Ui/Src/CCnvApplication.cpp
extras/converter/Ui/Src/CCnvApplication.h
extras/converter/Ui/Src/CCnvDocument.cpp
extras/converter/Ui/Src/CCnvDocument.h
extras/converter/Ui/Src/CCnvMainForm.cpp
extras/converter/Ui/Src/CCnvMainForm.h
extras/converter/Ui/Src/CCnvRatesForm.cpp
extras/converter/Ui/Src/CCnvRatesForm.h
extras/converter/Ui/Src/Converter.hrh
extras/converter/Ui/Src/Converter.rh
extras/converter/aif/ConverterAif.rss
extras/converter/eabi/ConverterEngine_EKA2u.def
extras/converter/eabi/ConverterEngineu.def
extras/converter/engine/Inc/CCnvConverter.h
extras/converter/engine/Inc/TCnvCategory.h
extras/converter/engine/Src/CCnvCategory.cpp
extras/converter/engine/Src/CCnvCategory.h
extras/converter/engine/Src/CCnvConverter.cpp
extras/converter/engine/Src/DllMain.cpp
extras/converter/engine/Src/TCnvCategory.cpp
extras/converter/engine/Src/TCnvUnit.cpp
extras/converter/engine/Src/TCnvUnit.h
extras/converter/group/Converter.rss
extras/converter/group/Converter_caption.rss
extras/converter/group/backup_registration.xml
extras/converter/group/bld.inf
extras/converter/group/converter_icons_aif_bitmaps.mk
extras/converter/group/converter_icons_aif_bitmaps_dc.mk
extras/converter/group/converter_icons_aif_scalable.mk
extras/converter/group/converter_icons_aif_scalable_dc.mk
extras/converter/group/converter_reg.rss
extras/converter/group/engine.mmp
extras/converter/group/ui.mmp
extras/converter/help/data/xhtml.zip
extras/converter/help/group/bld.inf
extras/converter/help/inc/cnv.hlp.hrh
extras/converter/help/rom/converterhelps_variant.iby
extras/converter/loc/Converter.loc
extras/converter/loc/ConverterEngine.loc
extras/converter/rom/Converter.iby
extras/converter/rom/ConverterResources.iby
extras/converter/rom/Converterengine.iby
extras/group/bld.inf
group/bld.inf
layers.sysdef.xml
package_definition.xml
sysdef_1_4_0.dtd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/Src/aboutgsplugin.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,248 @@
+/*
+* 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""
+* 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:  Source file for CAboutGsPlugin class
+*
+*/
+
+
+#include <aknViewAppUi.h>
+#include <ConeResLoader.h>
+#include <barsread.h>       // For TResourceReader
+#include <StringLoader.h>
+#include <apgcli.h>
+#include <AknLaunchAppService.h>
+#include <bautils.h>
+
+// Includes from GS framework:
+#include <gsfwviewuids.h>
+#include <gsprivatepluginproviderids.h>
+
+
+// Plugin includes:
+#include <aboutgspluginrsc.rsg>
+#include <aboutgsplugin.mbg>
+
+
+// Includes
+#include "aboutgsplugin.h"
+
+#define ABOUTAPPUID  0x10005a22
+
+const TUid KAboutGsPluginUid = { 0x102833A0 };
+
+// svg icons
+_LIT( KGSAboutGsPluginIconFileName, "\\resource\\apps\\aboutgsplugin.mif");
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::CAboutGsPlugin()
+//
+// ---------------------------------------------------------------------------
+//
+CAboutGsPlugin::CAboutGsPlugin()
+    : iPlgResourceLoader( *iCoeEnv ), iNullService( NULL )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::~CAboutGsPlugin()
+//
+// ---------------------------------------------------------------------------
+//
+CAboutGsPlugin::~CAboutGsPlugin()
+    {
+    iPlgResourceLoader.Close();
+    if ( iNullService )
+    	{
+    	delete iNullService;
+    	iNullService = NULL;
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::ConstructL()
+//
+// ---------------------------------------------------------------------------
+//
+void CAboutGsPlugin::ConstructL()
+    {
+    OpenLocalizedResourceFileL();
+    }
+
+
+void CAboutGsPlugin::OpenLocalizedResourceFileL()
+    {
+    TFileName resourceFileName;
+    TPtrC driveLetter = TParsePtrC( RProcess().FileName() ).Drive();
+    _LIT( KResoureFileName, "aboutgspluginrsc.rsc" );
+   
+    resourceFileName.Copy( driveLetter );  
+    resourceFileName.Append( KDC_ECOM_RESOURCE_DIR );
+    resourceFileName.Append( KResoureFileName );
+
+    RFs fsSession;
+    User::LeaveIfError( fsSession.Connect() );
+
+    // Find the resource file:
+    TParse parse;
+    parse.Set( resourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
+    TFileName fileName( parse.FullName() );
+
+    // Get language of resource file:
+    BaflUtils::NearestLanguageFile( fsSession, fileName );
+
+    // Open resource file:
+    iPlgResourceLoader.OpenL( fileName );
+
+    // If leave occurs before this, close is called automatically when the
+    // thread exits.
+    fsSession.Close ( );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::NewL()
+//
+// ---------------------------------------------------------------------------
+//
+CAboutGsPlugin* CAboutGsPlugin::NewL( TAny* /*aInitParams*/ )
+  {
+  	CAboutGsPlugin* self = new( ELeave ) CAboutGsPlugin();
+  	CleanupStack::PushL( self );
+  	self->ConstructL();
+  	CleanupStack::Pop( self );
+  	return self;
+  }
+
+// ---------------------------------------------------------------------------
+// CGSParentPlugin::Id()
+//
+// ---------------------------------------------------------------------------
+//
+TUid CAboutGsPlugin::Id() const
+    {
+    return KAboutGsPluginUid;
+    }
+
+// ---------------------------------------------------------------------------
+// CGSParentPlugin::DoActivateL()
+//
+// ---------------------------------------------------------------------------
+//
+void CAboutGsPlugin::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
+                                  TUid /*aCustomMessageId*/,
+                                  const TDesC8& /*aCustomMessage*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CGSParentPlugin::DoDeactivate()
+//
+// ---------------------------------------------------------------------------
+//
+void CAboutGsPlugin::DoDeactivate()
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::GetCaptionL()
+//
+// ---------------------------------------------------------------------------
+//
+void CAboutGsPlugin::GetCaptionL( TDes& aCaption ) const
+	{
+	HBufC* result = StringLoader::LoadL( R_ABOUT_GS_VIEW_CAPTION );
+	aCaption.Copy( *result );
+	delete result;
+	result = NULL;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::PluginProviderCategory()
+//
+// ---------------------------------------------------------------------------
+//
+TInt CAboutGsPlugin::PluginProviderCategory() const
+    {
+    return KGSPluginProviderInternal;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::CreateIconL
+// Return the icon, if has one.
+// ---------------------------------------------------------------------------
+//
+CGulIcon* CAboutGsPlugin::CreateIconL( const TUid aIconType )
+    {
+    CGulIcon* icon;
+
+    if( aIconType == KGSIconTypeLbxItem )
+        {
+        icon = AknsUtils::CreateGulIconL(
+        AknsUtils::SkinInstance(),
+        KAknsIIDQgnPropCpDevAbout,
+        KGSAboutGsPluginIconFileName,
+        EMbmAboutgspluginQgn_prop_cp_dev_about,
+        EMbmAboutgspluginQgn_prop_cp_dev_about_mask );
+        }
+     else
+        {
+        icon = CGSPluginInterface::CreateIconL( aIconType );
+        }
+
+    return icon;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::ItemType
+// ---------------------------------------------------------------------------
+//
+TGSListboxItemTypes CAboutGsPlugin::ItemType()
+    {
+    // See TGSListboxItemTypes for details.
+    return EGSItemTypeSettingDialog;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::HandleSelection
+// ---------------------------------------------------------------------------
+//
+void CAboutGsPlugin::HandleSelection( 
+        const TGSSelectionTypes /*aSelectionType*/ )
+    {
+    // This used as a call-back from paren plugin to handle selection. Because
+    // this plugin is of type EGSItemTypeSettingDialog, DoActivateL is never 
+    // called on selection but only HandleSelection. See TGSListboxItemTypes
+    // for details.
+    TRAP_IGNORE( LaunchAboutAppL() );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CAboutGsPlugin::LaunchAboutAppL
+// ---------------------------------------------------------------------------
+//
+void CAboutGsPlugin::LaunchAboutAppL()
+    {
+    TUid  aboutAppUid;
+    aboutAppUid.iUid = ABOUTAPPUID;
+    iNullService = CAknNullService::NewL( aboutAppUid, NULL );
+    }
+
+
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/Src/aboutgspluginimplementationtable.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* 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""
+* 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:  ECOM proxy table for this plugin
+*
+*/
+
+
+// System includes
+#include <e32std.h>
+#include <implementationproxy.h>
+
+// User includes
+#include "aboutgsplugin.h"
+
+// Constants
+const TImplementationProxy KAboutGsPluginImplementationTable[] = 
+	{
+		IMPLEMENTATION_PROXY_ENTRY( 0x1028338B,	CAboutGsPlugin::NewL )
+	};
+
+
+// ---------------------------------------------------------------------------
+// ImplementationGroupProxy
+// Gate/factory function
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( 
+    TInt& aTableCount )
+	{
+	aTableCount = sizeof( KAboutGsPluginImplementationTable ) 
+        / sizeof( TImplementationProxy );
+	return KAboutGsPluginImplementationTable;
+	}
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/data/aboutgsplugin.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* 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""
+* 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:  ECOM plugin resource file for aboutgsplugin.
+*
+*/
+
+
+// INCLUDES
+#include <registryinfo.rh>
+
+
+
+RESOURCE REGISTRY_INFO theInfo
+	{
+	dll_uid     = 0x102833A0; 
+	interfaces  = 
+		{
+		INTERFACE_INFO
+			{
+			interface_uid   = 0x10207236; // General settings interface uid
+			implementations = 
+				{
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid  = 0x1028338B;
+					version_no          = 1;
+					display_name        = "About Plugin";
+					default_data        = "0x10283317"; // Device Management plugin id
+					opaque_data         = "60";//Order number
+					}
+				};
+			}
+		};
+	}
+
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/data/aboutgspluginrsc.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,139 @@
+/*
+* 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""
+* 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:  Resource file for aboutgsplugin
+*
+*/
+
+
+
+//  RESOURCE IDENTIFIER
+NAME    ABUT // 4 letter ID
+
+//  System Includes
+#include <avkon.loc> 
+#include <avkon.mbg>
+#include <avkon.rsg>
+#include <eikcore.rsg>
+#include <uikon.rh>
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <avkon.rh>
+#include <avkon.hrh>
+
+
+
+// User includes
+#include <aboutgsplugin.loc>
+
+//  RESOURCE DEFINITIONS 
+
+RESOURCE RSS_SIGNATURE
+    {
+    }
+
+//----------------------------------------------------
+//  r_about_gs_view_caption
+// About view caption for plugin
+//----------------------------------------------------
+//
+RESOURCE TBUF r_about_gs_view_caption
+    {
+	    buf = qtn_cp_folder_about;
+    }
+
+//----------------------------------------------------
+//    r_about_gs_view_title
+//    About view title
+//----------------------------------------------------
+//
+
+RESOURCE TITLE_PANE r_about_gs_view_title
+    {
+	    txt = qtn_set_title_settings_About;        
+    }
+
+//----------------------------------------------------
+//    r_about_gs_view
+//    About view's menu
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_about_gs_view 
+    {
+  	  menubar = r_about_gs_menubar_view; 
+ 	  cba = r_about_gs_softkeys;
+    }
+
+//----------------------------------------------------
+//    r_about_gs_menubar_view
+//    About view's menu items
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_about_gs_menubar_view 
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane = r_about_gs_menu_item_exit;},
+        MENU_TITLE { menu_pane = r_about_gs_view_menu;}
+        };
+    }
+
+// -----------------------------------------------------------------------------
+// r_about_gs_menu_item_exit
+// About view menu's EXIT item
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_about_gs_menu_item_exit
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//    r_about_gs_view_menu
+//    About view menu's OPEN item
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_about_gs_view_menu
+    {
+    items=
+        {
+        MENU_ITEM 
+            {
+            command = EAknSoftkeyOpen;
+            txt = qtn_options_open;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//    r_about_gs_softkeys
+//    About gs plugin's softkeys
+//----------------------------------------------------
+//
+RESOURCE CBA r_about_gs_softkeys
+	{
+	buttons =
+		{
+		CBA_BUTTON { id = EAknSoftkeyOptions; txt = text_softkey_option;},
+		CBA_BUTTON { id = EAknSoftkeyBack; txt = text_softkey_exit; },
+		CBA_BUTTON { id = EAknSoftkeyOpen; txt = text_softkey_open;}
+		};
+	}
+//End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/group/aboutgsplugin.mmp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,80 @@
+/*
+* 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""
+* 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:  Project specification file.
+*
+*/
+
+
+
+#include  <data_caging_paths.hrh>    
+#include <platform_paths.hrh>
+
+
+CAPABILITY          CAP_ECOM_PLUGIN
+TARGET              aboutgsplugin.dll
+TARGETTYPE          PLUGIN
+UID                 0x10009D8D 0x102833A0 //dll uid
+VENDORID            VID_DEFAULT
+
+// Source
+SOURCEPATH  ../Src
+SOURCE      aboutgspluginimplementationtable.cpp
+SOURCE      aboutgsplugin.cpp
+
+
+//User include paths
+USERINCLUDE     ../inc
+USERINCLUDE     ../data
+
+
+//System include paths
+SYSTEMINCLUDE   /epoc32/include/ecom
+
+APP_LAYER_SYSTEMINCLUDE
+
+// Resource
+SOURCEPATH      ../data
+
+START RESOURCE  aboutgsplugin.rss
+TARGET          aboutgsplugin.rsc
+END
+
+START RESOURCE  ../data/aboutgspluginrsc.rss
+HEADER
+LANGUAGE_IDS
+END
+
+// Libraries 
+LIBRARY   euser.lib
+LIBRARY   ecom.lib
+LIBRARY   efsrv.lib
+LIBRARY   avkon.lib
+LIBRARY   bafl.lib 
+LIBRARY   cone.lib 
+LIBRARY   eikcoctl.lib 
+LIBRARY   eikcore.lib 
+LIBRARY   egul.lib
+LIBRARY   flogger.lib           // File logging
+LIBRARY   commonengine.lib      // For RConeResourceLoader
+LIBRARY   featmgr.lib           // Feature manager 
+LIBRARY   centralrepository.lib
+LIBRARY   aknskinsrv.lib        // for enhanced skinning
+LIBRARY   aknskins.lib          // for enhanced skinning
+LIBRARY   gsecomplugin.lib
+LIBRARY   hlplch.lib            // for "Help" options menu
+LIBRARY   gsframework.lib       // For base classes
+LIBRARY   gslistbox.lib         // For CGSListBoxItemTextArray
+LIBRARY   apgrfx.lib 
+LIBRARY   apparc.lib
+// End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/group/aboutgspluginicons.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,71 @@
+#
+# Copyright (c) 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: icons makefile for aboutplugin
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\resource\apps
+HEADERDIR=\epoc32\include
+ICONTARGETFILENAME=$(TARGETDIR)\aboutgsplugin.mif
+HEADERFILENAME=$(HEADERDIR)\aboutgsplugin.mbg
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2, \s60\bitmaps.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
+		/c8,8 qgn_prop_cp_dev_about.svg
+
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(HEADERFILENAME)&& \
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 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:  This file provides the information required for building 
+*                AboutGsPlugin
+*
+*/
+
+
+#include  <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export localised loc file
+../loc/aboutgsplugin.loc APP_LAYER_LOC_EXPORT_PATH(aboutgsplugin.loc)
+
+// Only for 5.0 release 
+#ifdef  RD_CONTROL_PANEL
+	PRJ_MMPFILES
+	//gnumakefile aboutgspluginicons.mk
+	aboutgsplugin.mmp
+
+PRJ_EXTENSIONS
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE aboutgsplugin.mif
+OPTION HEADERFILE aboutgsplugin.mbg
+OPTION SOURCES -c8,8 qgn_prop_cp_dev_about
+END
+#endif //RD_CONTROL_PANEL
+
+PRJ_TESTMMPFILES
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/inc/aboutgsplugin.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,125 @@
+/*
+* 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""
+* 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:  Container for the About sub-folder
+*
+*/
+
+
+#ifndef ABOUTGSPLUGIN_H
+#define ABOUTGSPLUGIN_H
+
+// Includes
+#include <aknview.h>
+#include <eikclb.h>
+#include <gsplugininterface.h>
+#include <gsfwviewuids.h>
+#include <ConeResLoader.h>
+#include <AknNullService.h>
+
+// Classes referenced
+class CAknViewAppUi;
+class RConeResourceLoader;
+
+
+// CLASS DECLARATION
+
+/**
+* CAboutGsPlugin view class.
+* @since S60_5.0
+*/
+class CAboutGsPlugin : public CGSPluginInterface
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Symbian OS two-phased constructor
+        * @return
+        */
+        static CAboutGsPlugin* NewL( TAny* aInitParams );
+
+        /**
+        * Destructor.
+        */
+        ~CAboutGsPlugin();
+
+    public: // From CAknView
+
+        /**
+        * See base class.
+        */
+        TUid Id() const;
+
+        /**
+        * See base class.
+        */
+        void DoActivateL( const TVwsViewId& aPrevViewId,
+                          TUid aCustomMessageId,
+                          const TDesC8& aCustomMessage );
+        /**
+        * See base class.
+        */
+        void DoDeactivate();
+
+    public: // From CGSPluginInterface
+
+        /**
+        * See base class.
+        */
+        void GetCaptionL( TDes& aCaption ) const;
+
+        /**
+        * See base class.
+        */
+        TInt PluginProviderCategory() const;
+
+        /**
+        * @see CGSPluginInterface header file.
+        */
+        CGulIcon* CreateIconL( const TUid aIconType );
+
+        /**
+        * See base class.
+        */
+        TGSListboxItemTypes ItemType();
+
+        /**
+        * See base class.
+        */
+        void HandleSelection(const TGSSelectionTypes aSelectionType );
+        
+    protected: // New
+        /**
+        * C++ default constructor.
+        */
+        CAboutGsPlugin();
+    
+     private:
+        /**
+        * Symbian OS default constructor.
+        */
+        void ConstructL();
+        
+        void LaunchAboutAppL();
+        void OpenLocalizedResourceFileL();
+         
+    private: // Data
+
+        // Resource loader.
+        RConeResourceLoader iPlgResourceLoader;
+        CAknNullService *iNullService;
+    };
+
+#endif //ABOUTGSPLUGIN_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aboutgsplugin/loc/aboutgsplugin.loc	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,37 @@
+/*
+* 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""
+* 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:  Localization strings for GSSecurityPlugin
+*
+*/
+
+
+//  LOCALISATION STRINGS
+
+//d:Text of a list item in General folder list
+//d:Item opens Security folder
+//l:list_single_large_graphic_pane_t1
+//w:
+//r: 5.0
+#define qtn_cp_folder_about "About"
+
+//d:Text in title pane
+//d:About view
+//l:title_pane_t2/opt9
+//w:
+//r: 5.0
+#define qtn_set_title_settings_about "About Settings"
+
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/aif/aboutaif.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2002 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:  resource file
+*
+*/
+
+
+#include <aiftool.rh>
+
+RESOURCE AIF_DATA
+    {
+    app_uid = 0x10005A22;
+    num_icons = 1;
+    embeddability = KAppNotEmbeddable;
+    newfile = KAppDoesNotSupportNewFile;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/data/about.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,1097 @@
+/*
+* Copyright (c) 2004 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:  Resource file for about
+*
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME    ABOU // 4 letter ID
+
+//  INCLUDES
+
+#include "about.rh"
+#include "about.hrh"
+#include <about.loc>
+#include <about.mbg>
+
+#include <eikon.rh>
+#include <avkon.rh>
+#include <avkon.loc>
+#include <avkon.rsg>
+#include <avkon.mbg>
+
+#include <appinfo.rh>
+
+#include <data_caging_paths_strings.hrh>
+
+    #define about_mbm APP_BITMAP_DIR"\\about.mbm"
+
+RESOURCE RSS_SIGNATURE {}
+
+RESOURCE TBUF { buf= ""; }
+
+RESOURCE EIK_APP_INFO
+    {
+    	status_pane = r_about_status_pane;
+    	
+    	// for 5.0
+    	#ifdef RD_CONTROL_PANEL
+    		cba = R_AVKON_SOFTKEYS_BACK;
+ 	 	#else
+ 	 		cba = R_AVKON_SOFTKEYS_EXIT;
+ 	 	#endif	
+ 	 		
+ 	 // no menu bar
+    }
+
+
+RESOURCE STATUS_PANE_APP_MODEL r_about_status_pane
+    {
+    panes =
+        {
+        SPANE_PANE
+            {
+            id = EEikStatusPaneUidTitle;
+            type = EAknCtTitlePane;
+            resource = r_about_title_pane;
+            }
+#ifndef __SCALABLE_ICONS
+,
+        SPANE_PANE
+            {
+            id = EEikStatusPaneUidContext;
+            type = EAknCtContextPane;
+            resource =  r_about_title_icon;
+            }
+#endif            
+        };
+    
+}
+
+RESOURCE TITLE_PANE r_about_title_pane
+    {
+    txt = qtn_about_title_text;
+    }
+
+RESOURCE CONTEXT_PANE r_about_title_icon
+    {
+    bmpfile = about_mbm;
+    bmpid = EMbmAboutQgn_menu_about_cxt;
+    bmpmask = EMbmAboutQgn_menu_about_cxt_mask;
+    }
+    
+// Texts and images appear in this order on the about screen.
+// Every new text item starts from a new line.
+
+RESOURCE ABOUT_ITEM_LIST r_about_main_text
+    {
+    items =
+        {     
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_1;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_2;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_3;
+			},
+		ABOUT_IMAGE
+			{
+			bmpfile = about_mbm;
+			bmpid = EMbmAboutQgn_graf_java_logo;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_4;
+            },
+        ABOUT_TEXT
+            {
+            txt = r_about_legal_text_5;
+            },
+        ABOUT_TEXT
+            {
+			txt = r_about_legal_text_6;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_7;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_8;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_9;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_10;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_11;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_12;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_13;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_14;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_15;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_16;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_17;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_18;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_19;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_20;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_21;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_22;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_23;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_24;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_25;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_26;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_27;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_28;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_29;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_30;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_31;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_32;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_33;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_34;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_35;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_36;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_37;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_38;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_39;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_40;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_41;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_42;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_43;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_44;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_45;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_46;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_47;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_48;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_49;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_50;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_51;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_52;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_53;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_54;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_55;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_56;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_57;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_58;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_59;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_60;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_61;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_62;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_63;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_64;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_65;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_66;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_67;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_68;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_69;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_70;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_71;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_72;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_73;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_74;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_75;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_76;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_77;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_78;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_79;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_80;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_81;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_82;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_83;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_84;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_85;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_86;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_87;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_88;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_89;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_90;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_91;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_92;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_93;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_94;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_95;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_96;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_97;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_98;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_99;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_100;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_101;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_102;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_103;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_104;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_105;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_106;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_107;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_108;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_109;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_110;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_111;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_112;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_113;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_114;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_115;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_116;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_117;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_118;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_119;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_120;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_121;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_122;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_123;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_124;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_125;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_126;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_127;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_128;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_129;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_130;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_131;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_132;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_133;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_134;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_135;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_136;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_137;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_138;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_139;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_140;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_141;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_142;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_143;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_144;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_145;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_146;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_147;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_148;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_149;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_150;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_151;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_152;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_153;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_154;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_155;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_156;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_157;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_158;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_159;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_160;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_161;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_162;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_163;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_164;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_165;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_166;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_167;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_168;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_169;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_170;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_171;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_172;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_173;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_174;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_175;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_176;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_177;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_178;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_179;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_180;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_181;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_182;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_183;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_184;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_185;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_186;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_187;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_188;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_189;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_190;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_191;
+			},
+		ABOUT_TEXT
+			{
+			txt = r_about_legal_text_192;
+			}
+		};
+	}
+
+RESOURCE ABOUT_SVGIMAGE r_about_svg_text
+    {  
+    svgid = EMbmAboutQgn_graf_s60_logo;       
+    svgmaskid = EMbmAboutQgn_graf_s60_logo_mask;   
+    height = 70;               
+    width = 46;
+    }
+    
+RESOURCE TBUF r_about_legal_text_1   { buf = qtn_about_legal_text_1; }
+RESOURCE TBUF r_about_legal_text_2   { buf = qtn_about_legal_text_2; }
+RESOURCE TBUF r_about_legal_text_3   { buf = qtn_about_legal_text_3; }
+RESOURCE TBUF r_about_legal_text_4   { buf = qtn_about_legal_text_4; }
+RESOURCE TBUF r_about_legal_text_5   { buf = qtn_about_legal_text_5; }
+RESOURCE TBUF r_about_legal_text_6   { buf = qtn_about_legal_text_6; }
+RESOURCE TBUF r_about_legal_text_7   { buf = qtn_about_legal_text_7; }
+RESOURCE TBUF r_about_legal_text_8	 { buf = qtn_about_legal_text_8; } 
+RESOURCE TBUF r_about_legal_text_9	 { buf = qtn_about_legal_text_9; } 
+RESOURCE TBUF r_about_legal_text_10	 { buf = qtn_about_legal_text_10; } 
+RESOURCE TBUF r_about_legal_text_11  { buf = qtn_about_legal_text_11; } 
+RESOURCE TBUF r_about_legal_text_12	 { buf = qtn_about_legal_text_12; } 
+RESOURCE TBUF r_about_legal_text_13	 { buf = qtn_about_legal_text_13; } 	
+RESOURCE TBUF r_about_legal_text_14	 { buf = qtn_about_legal_text_14; } 
+RESOURCE TBUF r_about_legal_text_15	 { buf = qtn_about_legal_text_15; } 
+RESOURCE TBUF r_about_legal_text_16	 { buf = qtn_about_legal_text_16; } 
+RESOURCE TBUF r_about_legal_text_17	 { buf = qtn_about_legal_text_17; } 
+RESOURCE TBUF r_about_legal_text_18	 { buf = qtn_about_legal_text_18; } 
+RESOURCE TBUF r_about_legal_text_19  { buf = qtn_about_legal_text_19; } 
+RESOURCE TBUF r_about_legal_text_20  { buf = qtn_about_legal_text_20; } 
+RESOURCE TBUF r_about_legal_text_21  { buf = qtn_about_legal_text_21; } 
+RESOURCE TBUF r_about_legal_text_22  { buf = qtn_about_legal_text_22; }
+RESOURCE TBUF r_about_legal_text_23  { buf = qtn_about_legal_text_23; }
+RESOURCE TBUF r_about_legal_text_24  { buf = qtn_about_legal_text_24; }
+RESOURCE TBUF r_about_legal_text_25  { buf = qtn_about_legal_text_25; }
+RESOURCE TBUF r_about_legal_text_26  { buf = qtn_about_legal_text_26; }
+RESOURCE TBUF r_about_legal_text_27  { buf = qtn_about_legal_text_27; }
+RESOURCE TBUF r_about_legal_text_28	 { buf = qtn_about_legal_text_28; } 
+RESOURCE TBUF r_about_legal_text_29	 { buf = qtn_about_legal_text_29; } 
+RESOURCE TBUF r_about_legal_text_30	 { buf = qtn_about_legal_text_30; } 
+RESOURCE TBUF r_about_legal_text_31  { buf = qtn_about_legal_text_31; } 
+RESOURCE TBUF r_about_legal_text_32  { buf = qtn_about_legal_text_32; }
+RESOURCE TBUF r_about_legal_text_33  { buf = qtn_about_legal_text_33; }
+RESOURCE TBUF r_about_legal_text_34  { buf = qtn_about_legal_text_34; }
+RESOURCE TBUF r_about_legal_text_35  { buf = qtn_about_legal_text_35; }
+RESOURCE TBUF r_about_legal_text_36  { buf = qtn_about_legal_text_36; }
+RESOURCE TBUF r_about_legal_text_37  { buf = qtn_about_legal_text_37; }
+RESOURCE TBUF r_about_legal_text_38	 { buf = qtn_about_legal_text_38; } 
+RESOURCE TBUF r_about_legal_text_39	 { buf = qtn_about_legal_text_39; } 
+RESOURCE TBUF r_about_legal_text_40	 { buf = qtn_about_legal_text_40; } 
+RESOURCE TBUF r_about_legal_text_41   { buf = qtn_about_legal_text_41; }
+RESOURCE TBUF r_about_legal_text_42   { buf = qtn_about_legal_text_42; }
+RESOURCE TBUF r_about_legal_text_43   { buf = qtn_about_legal_text_43; }
+RESOURCE TBUF r_about_legal_text_44   { buf = qtn_about_legal_text_44; }
+RESOURCE TBUF r_about_legal_text_45   { buf = qtn_about_legal_text_45; }
+RESOURCE TBUF r_about_legal_text_46   { buf = qtn_about_legal_text_46; }
+RESOURCE TBUF r_about_legal_text_47   { buf = qtn_about_legal_text_47; }
+RESOURCE TBUF r_about_legal_text_48	 { buf = qtn_about_legal_text_48; } 
+RESOURCE TBUF r_about_legal_text_49	 { buf = qtn_about_legal_text_49; } 
+RESOURCE TBUF r_about_legal_text_50	 { buf = qtn_about_legal_text_50; }
+RESOURCE TBUF r_about_legal_text_51   { buf = qtn_about_legal_text_51; }
+RESOURCE TBUF r_about_legal_text_52   { buf = qtn_about_legal_text_52; }
+RESOURCE TBUF r_about_legal_text_53   { buf = qtn_about_legal_text_53; }
+RESOURCE TBUF r_about_legal_text_54   { buf = qtn_about_legal_text_54; }
+RESOURCE TBUF r_about_legal_text_55   { buf = qtn_about_legal_text_55; }
+RESOURCE TBUF r_about_legal_text_56   { buf = qtn_about_legal_text_56; }
+RESOURCE TBUF r_about_legal_text_57   { buf = qtn_about_legal_text_57; }
+RESOURCE TBUF r_about_legal_text_58	 { buf = qtn_about_legal_text_58; } 
+RESOURCE TBUF r_about_legal_text_59	 { buf = qtn_about_legal_text_59; } 
+RESOURCE TBUF r_about_legal_text_60	 { buf = qtn_about_legal_text_60; } 
+RESOURCE TBUF r_about_legal_text_61   { buf = qtn_about_legal_text_61; }
+RESOURCE TBUF r_about_legal_text_62   { buf = qtn_about_legal_text_62; }
+RESOURCE TBUF r_about_legal_text_63   { buf = qtn_about_legal_text_63; }
+RESOURCE TBUF r_about_legal_text_64   { buf = qtn_about_legal_text_64; }
+RESOURCE TBUF r_about_legal_text_65   { buf = qtn_about_legal_text_65; }
+RESOURCE TBUF r_about_legal_text_66   { buf = qtn_about_legal_text_66; }
+RESOURCE TBUF r_about_legal_text_67   { buf = qtn_about_legal_text_67; }
+RESOURCE TBUF r_about_legal_text_68	 { buf = qtn_about_legal_text_68; } 
+RESOURCE TBUF r_about_legal_text_69	 { buf = qtn_about_legal_text_69; } 
+RESOURCE TBUF r_about_legal_text_70	 { buf = qtn_about_legal_text_70; } 
+RESOURCE TBUF r_about_legal_text_71   { buf = qtn_about_legal_text_71; }
+RESOURCE TBUF r_about_legal_text_72   { buf = qtn_about_legal_text_72; }
+RESOURCE TBUF r_about_legal_text_73   { buf = qtn_about_legal_text_73; }
+RESOURCE TBUF r_about_legal_text_74   { buf = qtn_about_legal_text_74; }
+RESOURCE TBUF r_about_legal_text_75   { buf = qtn_about_legal_text_75; }
+RESOURCE TBUF r_about_legal_text_76   { buf = qtn_about_legal_text_76; }
+RESOURCE TBUF r_about_legal_text_77   { buf = qtn_about_legal_text_77; }
+RESOURCE TBUF r_about_legal_text_78	 { buf = qtn_about_legal_text_78; } 
+RESOURCE TBUF r_about_legal_text_79	 { buf = qtn_about_legal_text_79; } 
+RESOURCE TBUF r_about_legal_text_80	 { buf = qtn_about_legal_text_80; }
+RESOURCE TBUF r_about_legal_text_81   { buf = qtn_about_legal_text_81; }
+RESOURCE TBUF r_about_legal_text_82   { buf = qtn_about_legal_text_82; }
+RESOURCE TBUF r_about_legal_text_83   { buf = qtn_about_legal_text_83; }
+RESOURCE TBUF r_about_legal_text_84   { buf = qtn_about_legal_text_84; }
+RESOURCE TBUF r_about_legal_text_85   { buf = qtn_about_legal_text_85; }
+RESOURCE TBUF r_about_legal_text_86   { buf = qtn_about_legal_text_86; }
+RESOURCE TBUF r_about_legal_text_87   { buf = qtn_about_legal_text_87; }
+RESOURCE TBUF r_about_legal_text_88	 { buf = qtn_about_legal_text_88; } 
+RESOURCE TBUF r_about_legal_text_89	 { buf = qtn_about_legal_text_89; } 
+RESOURCE TBUF r_about_legal_text_90	 { buf = qtn_about_legal_text_90; } 
+RESOURCE TBUF r_about_legal_text_91   { buf = qtn_about_legal_text_91; }
+RESOURCE TBUF r_about_legal_text_92   { buf = qtn_about_legal_text_92; }
+RESOURCE TBUF r_about_legal_text_93   { buf = qtn_about_legal_text_93; }
+RESOURCE TBUF r_about_legal_text_94   { buf = qtn_about_legal_text_94; }
+RESOURCE TBUF r_about_legal_text_95   { buf = qtn_about_legal_text_95; }
+RESOURCE TBUF r_about_legal_text_96   { buf = qtn_about_legal_text_96; }
+RESOURCE TBUF r_about_legal_text_97   { buf = qtn_about_legal_text_97; }
+RESOURCE TBUF r_about_legal_text_98	 { buf = qtn_about_legal_text_98; } 
+RESOURCE TBUF r_about_legal_text_99	 { buf = qtn_about_legal_text_99; } 
+RESOURCE TBUF r_about_legal_text_100 { buf = qtn_about_legal_text_100; }
+RESOURCE TBUF r_about_legal_text_101  { buf = qtn_about_legal_text_101; }
+RESOURCE TBUF r_about_legal_text_102  { buf = qtn_about_legal_text_102; }
+RESOURCE TBUF r_about_legal_text_103  { buf = qtn_about_legal_text_103; }
+RESOURCE TBUF r_about_legal_text_104  { buf = qtn_about_legal_text_104; }
+RESOURCE TBUF r_about_legal_text_105  { buf = qtn_about_legal_text_105; }
+RESOURCE TBUF r_about_legal_text_106  { buf = qtn_about_legal_text_106; }
+RESOURCE TBUF r_about_legal_text_107  { buf = qtn_about_legal_text_107; }
+RESOURCE TBUF r_about_legal_text_108  { buf = qtn_about_legal_text_108; }
+RESOURCE TBUF r_about_legal_text_109  { buf = qtn_about_legal_text_109; }
+RESOURCE TBUF r_about_legal_text_110  { buf = qtn_about_legal_text_110; }
+RESOURCE TBUF r_about_legal_text_111  { buf = qtn_about_legal_text_111; }
+RESOURCE TBUF r_about_legal_text_112  { buf = qtn_about_legal_text_112; }
+RESOURCE TBUF r_about_legal_text_113  { buf = qtn_about_legal_text_113; }
+RESOURCE TBUF r_about_legal_text_114  { buf = qtn_about_legal_text_114; }
+RESOURCE TBUF r_about_legal_text_115  { buf = qtn_about_legal_text_115; }
+RESOURCE TBUF r_about_legal_text_116  { buf = qtn_about_legal_text_116; }
+RESOURCE TBUF r_about_legal_text_117  { buf = qtn_about_legal_text_117; }
+RESOURCE TBUF r_about_legal_text_118  { buf = qtn_about_legal_text_118; }
+RESOURCE TBUF r_about_legal_text_119  { buf = qtn_about_legal_text_119; }
+RESOURCE TBUF r_about_legal_text_120  { buf = qtn_about_legal_text_120; }
+RESOURCE TBUF r_about_legal_text_121  { buf = qtn_about_legal_text_121; }
+RESOURCE TBUF r_about_legal_text_122  { buf = qtn_about_legal_text_122; }
+RESOURCE TBUF r_about_legal_text_123  { buf = qtn_about_legal_text_123; }
+RESOURCE TBUF r_about_legal_text_124  { buf = qtn_about_legal_text_124; }
+RESOURCE TBUF r_about_legal_text_125  { buf = qtn_about_legal_text_125; }
+RESOURCE TBUF r_about_legal_text_126  { buf = qtn_about_legal_text_126; }
+RESOURCE TBUF r_about_legal_text_127  { buf = qtn_about_legal_text_127; }
+RESOURCE TBUF r_about_legal_text_128  { buf = qtn_about_legal_text_128; }
+RESOURCE TBUF r_about_legal_text_129  { buf = qtn_about_legal_text_129; }
+RESOURCE TBUF r_about_legal_text_130  { buf = qtn_about_legal_text_130; }
+RESOURCE TBUF r_about_legal_text_131  { buf = qtn_about_legal_text_131; }
+RESOURCE TBUF r_about_legal_text_132  { buf = qtn_about_legal_text_132; }
+RESOURCE TBUF r_about_legal_text_133  { buf = qtn_about_legal_text_133; }
+RESOURCE TBUF r_about_legal_text_134  { buf = qtn_about_legal_text_134; }
+RESOURCE TBUF r_about_legal_text_135  { buf = qtn_about_legal_text_135; }
+RESOURCE TBUF r_about_legal_text_136  { buf = qtn_about_legal_text_136; }
+RESOURCE TBUF r_about_legal_text_137  { buf = qtn_about_legal_text_137; }
+RESOURCE TBUF r_about_legal_text_138  { buf = qtn_about_legal_text_138; }
+RESOURCE TBUF r_about_legal_text_139  { buf = qtn_about_legal_text_139; }
+RESOURCE TBUF r_about_legal_text_140  { buf = qtn_about_legal_text_140; }
+RESOURCE TBUF r_about_legal_text_141  { buf = qtn_about_legal_text_141; }
+RESOURCE TBUF r_about_legal_text_142  { buf = qtn_about_legal_text_142; }
+RESOURCE TBUF r_about_legal_text_143  { buf = qtn_about_legal_text_143; }
+RESOURCE TBUF r_about_legal_text_144  { buf = qtn_about_legal_text_144; }
+RESOURCE TBUF r_about_legal_text_145  { buf = qtn_about_legal_text_145; }
+RESOURCE TBUF r_about_legal_text_146  { buf = qtn_about_legal_text_146; }
+RESOURCE TBUF r_about_legal_text_147  { buf = qtn_about_legal_text_147; }
+RESOURCE TBUF r_about_legal_text_148  { buf = qtn_about_legal_text_148; }
+RESOURCE TBUF r_about_legal_text_149  { buf = qtn_about_legal_text_149; }
+RESOURCE TBUF r_about_legal_text_150  { buf = qtn_about_legal_text_150; }
+RESOURCE TBUF r_about_legal_text_151  { buf = qtn_about_legal_text_151; }
+RESOURCE TBUF r_about_legal_text_152  { buf = qtn_about_legal_text_152; }
+RESOURCE TBUF r_about_legal_text_153  { buf = qtn_about_legal_text_153; }
+RESOURCE TBUF r_about_legal_text_154  { buf = qtn_about_legal_text_154; }
+RESOURCE TBUF r_about_legal_text_155  { buf = qtn_about_legal_text_155; }
+RESOURCE TBUF r_about_legal_text_156  { buf = qtn_about_legal_text_156; }
+RESOURCE TBUF r_about_legal_text_157  { buf = qtn_about_legal_text_157; }
+RESOURCE TBUF r_about_legal_text_158  { buf = qtn_about_legal_text_158; }
+RESOURCE TBUF r_about_legal_text_159  { buf = qtn_about_legal_text_159; }
+RESOURCE TBUF r_about_legal_text_160  { buf = qtn_about_legal_text_160; }
+RESOURCE TBUF r_about_legal_text_161  { buf = qtn_about_legal_text_161; }
+RESOURCE TBUF r_about_legal_text_162  { buf = qtn_about_legal_text_162; }
+RESOURCE TBUF r_about_legal_text_163  { buf = qtn_about_legal_text_163; }
+RESOURCE TBUF r_about_legal_text_164  { buf = qtn_about_legal_text_164; }
+RESOURCE TBUF r_about_legal_text_165  { buf = qtn_about_legal_text_165; }
+RESOURCE TBUF r_about_legal_text_166  { buf = qtn_about_legal_text_166; }
+RESOURCE TBUF r_about_legal_text_167  { buf = qtn_about_legal_text_167; }
+RESOURCE TBUF r_about_legal_text_168  { buf = qtn_about_legal_text_168; }
+RESOURCE TBUF r_about_legal_text_169  { buf = qtn_about_legal_text_169; }
+RESOURCE TBUF r_about_legal_text_170  { buf = qtn_about_legal_text_170; }
+RESOURCE TBUF r_about_legal_text_171  { buf = qtn_about_legal_text_171; }
+RESOURCE TBUF r_about_legal_text_172  { buf = qtn_about_legal_text_172; }
+RESOURCE TBUF r_about_legal_text_173  { buf = qtn_about_legal_text_173; }
+RESOURCE TBUF r_about_legal_text_174  { buf = qtn_about_legal_text_174; }
+RESOURCE TBUF r_about_legal_text_175  { buf = qtn_about_legal_text_175; }
+RESOURCE TBUF r_about_legal_text_176  { buf = qtn_about_legal_text_176; }
+RESOURCE TBUF r_about_legal_text_177  { buf = qtn_about_legal_text_177; }
+RESOURCE TBUF r_about_legal_text_178  { buf = qtn_about_legal_text_178; }
+RESOURCE TBUF r_about_legal_text_179  { buf = qtn_about_legal_text_179; }
+RESOURCE TBUF r_about_legal_text_180  { buf = qtn_about_legal_text_180; }
+RESOURCE TBUF r_about_legal_text_181  { buf = qtn_about_legal_text_181; }
+RESOURCE TBUF r_about_legal_text_182  { buf = qtn_about_legal_text_182; }
+RESOURCE TBUF r_about_legal_text_183  { buf = qtn_about_legal_text_183; }
+RESOURCE TBUF r_about_legal_text_184  { buf = qtn_about_legal_text_184; }
+RESOURCE TBUF r_about_legal_text_185  { buf = qtn_about_legal_text_185; }
+RESOURCE TBUF r_about_legal_text_186  { buf = qtn_about_legal_text_186; }
+RESOURCE TBUF r_about_legal_text_187  { buf = qtn_about_legal_text_187; }
+RESOURCE TBUF r_about_legal_text_188  { buf = qtn_about_legal_text_188; }
+RESOURCE TBUF r_about_legal_text_189  { buf = qtn_about_legal_text_189; }
+RESOURCE TBUF r_about_legal_text_190  { buf = qtn_about_legal_text_190; }
+RESOURCE TBUF r_about_legal_text_191  { buf = qtn_about_legal_text_191; }
+RESOURCE TBUF r_about_legal_text_192  { buf = qtn_about_legal_text_192; }
+
+RESOURCE LOCALISABLE_APP_INFO r_about_localisable_app_info
+    {
+    short_caption = qtn_apps_about_grid;
+    caption_and_icon = 
+    CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_apps_about_list;
+#ifdef __SCALABLE_ICONS
+        number_of_icons = 1;
+        icon_file = APP_BITMAP_DIR"\\about_aif.mif";
+#else
+        number_of_icons = 2;
+        icon_file = APP_BITMAP_DIR"\\about_aif.mbm";
+#endif
+        };
+    }
+
+        
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/data/about_caption.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2002 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:  Resource file for about
+*
+*/
+
+
+#include <about.loc>
+#include <apcaptionfile.rh>
+
+RESOURCE CAPTION_DATA
+    {
+    caption = qtn_apps_about_list;
+    shortcaption = qtn_apps_about_grid;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/data/about_reg.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2004 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: This file contains the application registration resource.
+*
+*/
+
+
+#include <appinfo.rh>
+#include <about.rsg>
+#include <data_caging_paths_strings.hrh>
+#include <about.loc>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x10005A22 // Define your application UID here
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "About";
+  
+    localisable_resource_file = APP_RESOURCE_DIR"\\About";
+    localisable_resource_id = R_ABOUT_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/About.pkg	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2009 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:  package file
+;
+&EN
+;Header
+#{"About"},(0x10005A22),0,0,0
+
+;Supports Series 60 v 0.9
+;This line indicates that this installation is for the Series 60 platform v0.9
+;This line must appear _exactly_ as shown below in the sis file
+;If this line is missing or incorrect, the sis file will not be able
+;to be installed on Series 60 v0.9 platforms
+(0x101F6F88), 0, 0, 0, 
+{"Series60ProductID"}
+
+"\epoc32\release\thumb\urel\About.app"-"!:\system\apps\About\About.app"
+"\epoc32\release\thumb\urel\About.rsc"-"!:\system\apps\About\About.rsc"
+"\epoc32\release\thumb\urel\About_caption.rsc"-"!:\system\apps\About\About_caption.rsc"
+"\epoc32\release\thumb\urel\About.aif"-"!:\system\apps\About\About.aif"
+"\epoc32\release\thumb\urel\About.mbm"-"!:\system\apps\About\About.mbm"
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/about.mmp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2002 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:  Project specification file of  about
+*
+*/
+
+#include "../inc/about_test.hrh"
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+	TARGET 			about.exe
+	TARGETTYPE 		exe
+UID             0x100039CE  0x10005A22
+VENDORID	VID_DEFAULT
+
+// Modified by build team
+CAPABILITY 	CAP_APPLICATION
+
+
+SOURCEPATH     ../src
+SOURCE         AboutApp.cpp 
+SOURCE         AboutAppUi.cpp
+SOURCE         AboutDocument.cpp
+SOURCE         AboutContainer.cpp
+SOURCE         AboutImage.cpp
+
+APP_LAYER_SYSTEMINCLUDE
+START RESOURCE ../data/about.rss
+HEADER
+	TARGETPATH APP_RESOURCE_DIR
+LANGUAGE_IDS
+END
+
+	START RESOURCE ../data/about_reg.rss
+DEPENDS about.rsg
+	TARGETPATH /private/10003a3f/apps
+	END
+
+USERINCLUDE    ../inc
+
+
+LIBRARY        apparc.lib
+LIBRARY        avkon.lib
+LIBRARY        bafl.lib
+LIBRARY        cone.lib
+LIBRARY        eikcoctl.lib
+LIBRARY        eikcore.lib 
+LIBRARY        euser.lib
+LIBRARY        fbscli.lib
+LIBRARY		   efsrv.lib	
+LIBRARY         aknskins.lib //for skin sbackground
+LIBRARY         cdlengine.lib  //for scalable ui
+LIBRARY         gdi.lib
+LIBRARY			aknicon.lib
+LIBRARY         egul.lib
+LIBRARY         aknlayout2scalable.lib
+LIBRARY         sysversioninfo.lib
+LIBRARY         commonengine.lib
+LIBRARY         apgrfx.lib
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/about_icons.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,60 @@
+#
+# Copyright (c) 2003 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: Icons makefile for project about
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+TARGETDIR1=$(ZDIR)\system\apps\about
+
+HEADERDIR=\epoc32\include
+ICONTARGETFILENAME=$(TARGETDIR1)\about.mif
+
+HEADERFILENAME =$(HEADERDIR)\about.mbg
+
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE :
+
+	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
+	/c8,8 qgn_menu_about_cxt.svg \
+	/c8 qgn_graf_java_logo.svg
+
+
+		
+		
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/about_icons_aif_bitmaps.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2004 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: Icons makefile for project about
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\system\apps\about
+ICONTARGETFILENAME=$(TARGETDIR)\about_aif.mbm
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_about_lst.bmp \
+		/c8,8 qgn_menu_about_cxt.bmp
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/about_icons_aif_bitmaps_dc.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2004 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: Icons makefile for project about
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\about_aif.mbm
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_about_lst.bmp \
+		/c8,8 qgn_menu_about_cxt.bmp
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/about_icons_aif_scalable.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2004 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: Icons makefile for project about
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+#  Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\system\apps\about
+ICONTARGETFILENAME=$(TARGETDIR)\about_aif.mif
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_about.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/about_icons_aif_scalable_dc.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2004 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: Icons makefile for project about
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\about_aif.mif
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+#  Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_about.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/about_icons_dc.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,60 @@
+#
+# Copyright (c) 2003 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: Icons makefile for project about
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+TARGETDIR1=$(ZDIR)\resource\apps
+
+HEADERDIR=\epoc32\include
+ICONTARGETFILENAME=$(TARGETDIR1)\about.mif
+
+HEADERFILENAME =$(HEADERDIR)\about.mbg
+
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE :
+
+	mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
+	/c8,8 qgn_menu_about_cxt.svg \
+	/c8 qgn_graf_java_logo.svg\
+	/c8,8 qgn_graf_s60_logo.svg
+
+		
+		
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2002 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:   This file provides the information required for building About
+*               
+*/
+
+
+#include <platform_paths.hrh>
+#include "../aboutgsplugin/group/bld.inf"
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export localised loc file
+../loc/about.loc APP_LAYER_LOC_EXPORT_PATH(about.loc)
+
+// export IBY files
+../rom/About.iby          CORE_APP_LAYER_IBY_EXPORT_PATH(about.iby)
+../rom/AboutResources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(aboutresources.iby)
+
+PRJ_MMPFILES
+
+about.mmp
+
+PRJ_EXTENSIONS
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE about.mif
+OPTION HEADERFILE about.mbg
+OPTION SOURCES -c8,8 qgn_menu_about_cxt\
+               -c8 qgn_graf_java_logo\
+               -c8,8 qgn_graf_s60_logo
+END
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE about_aif.mif
+OPTION SOURCES -c8,8 qgn_menu_about
+END
+
+//PRJ_TESTMMPFILES
+//../tsrc/CVTAbout.mmp  // CVT test case(s)
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/AboutApp.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2002 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:  Declares main application class
+*
+*/
+
+
+#ifndef ABOUTAPP_H
+#define ABOUTAPP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CONSTANTS
+// UID of the application
+const TUid KUidabout = { 0x10005A22 };
+
+// CLASS DECLARATION
+
+/**
+* CAboutApp application class.
+* Provides factory to create concrete document object.
+* 
+*/
+class CAboutApp : public CAknApplication
+    {
+    
+    public: // Functions from base classes
+    private:
+
+        /**
+        * From CApaApplication, creates CAboutDocument document object.
+        * @return A pointer to the created document object.
+        */
+        CApaDocument* CreateDocumentL();
+        
+        /**
+        * From CApaApplication, returns application's UID (KUidabout).
+        * @return The value of KUidabout.
+        */
+        TUid AppDllUid() const;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/AboutAppUi.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2002 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:  Declares UI class for application.
+*
+*/
+
+
+#ifndef ABOUTAPPUI_H
+#define ABOUTAPPUI_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknappui.h>
+#include <aknnavide.h>                 
+
+// FORWARD DECLARATIONS
+class CAboutContainer;
+
+// CONSTANTS
+
+// CLASS DECLARATION
+
+/**
+* Application UI class.
+* Provides support for the following features:
+* - EIKON control architecture
+* 
+*/
+class CAboutAppUi : public CAknAppUi
+    {
+    public: // // Constructors and destructor
+
+        /**
+        * EPOC default constructor.
+        */      
+        void ConstructL();
+
+        /**
+        * Destructor.
+        */      
+        ~CAboutAppUi();
+        
+    public: // New functions
+
+    public: // Functions from base classes
+
+    private:
+        /**
+        * From CEikAppUi, takes care of command handling.
+        * @param aCommand command to be handled
+        */
+        void HandleCommandL( TInt aCommand );
+        
+        /**
+        * Set the name of the product to navi pane.
+        */        
+        void SetNaviPaneLabelL();
+
+    private: // Data
+        CAboutContainer* iAppContainer; 
+        CAknNavigationDecorator* iNaviDecorator; 
+        
+        // record whether server is required or not.
+        TBool iSettingType;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/AboutContainer.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2002 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:  Declares container control for application.
+*
+*/
+
+
+#ifndef ABOUTCONTAINER_H
+#define ABOUTCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <gdi.h>  
+#include <eiksbobs.h> 
+// FORWARD DECLARATIONS
+class CEikScrollBarFrame;
+class CAboutImage;
+class CFont;
+class TRect;
+class TBidiText;
+class   CAknsBasicBackgroundControlContext;
+#include <gulicon.h>
+
+// CLASS DECLARATION
+
+/**
+*  CAboutContainer  container control class.
+*  
+*/
+//About container derived from scrollbarobserver to get events on scrollbar movements
+class CAboutContainer : public CCoeControl, public MEikScrollBarObserver
+    {
+    public: // Constructors and destructor
+        CAboutContainer();
+        void ConstructL( const TRect& aRect );
+
+		void CalculateL(const TRect& aRect);
+		void HandleResourceChange(TInt aType);
+        /**
+        * From MEikScrollBarObserver
+        */
+        void HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType); 
+
+        ~CAboutContainer();
+
+    private: // from CCoeControl
+		
+		/**
+        * From CCoeControl : Control size is set.
+        */
+        void SizeChanged();
+
+        void Draw( const TRect& aRect ) const;
+        void ActivateL();
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                     TEventCode aModifiers );
+
+		TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+    private: // new functions
+
+        void SetTextL( const TDesC& aText , const TInt aItem );
+        void SetImageL( const TDesC& aFileName, TInt aBitmapId );
+        void UpdateScrollIndicatorL();
+
+        // text wrapping
+
+    private: // Data
+
+        CArrayPtr<HBufC>* iText;
+        CArrayPtr<CAboutImage>* iImages;
+        CArrayFixFlat<TInt>* iScreenStarts;
+        TInt iCurrentScreen;
+        TBool iDoNotShowLastLineAgain;
+        CGraphicsContext::TTextAlign iTextAlign;
+        CEikScrollBarFrame* iSBFrame;
+        const CFont* iFont; // not owned
+        TInt iLineWidth;
+        TInt iBaseLineDelta;
+		TInt iTopBaseLineX;
+		TInt iTopBaseLineY;
+		TInt iLinesPerScreen;
+		CAknsBasicBackgroundControlContext* iSkinContext; // skin data
+		CGulIcon* iIcon;
+		
+        // Judge whether scroll bar is dragged. 
+        TBool iScrollBarDragged;
+        TInt iNumItem;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/AboutDocument.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2002 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:  Application Document
+*
+*/
+
+
+#ifndef ABOUTDOCUMENT_H
+#define ABOUTDOCUMENT_H
+
+// INCLUDES
+#include <AknDoc.h>
+   
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class  CEikAppUi;
+
+// CLASS DECLARATION
+
+/**
+*  CAboutDocument application class.
+*/
+class CAboutDocument : public CAknDocument
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        */
+        static CAboutDocument* NewL( CEikApplication& aApp );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CAboutDocument();
+
+    private:
+
+        /**
+        * Constructor.
+        */
+        CAboutDocument( CEikApplication& aApp );
+
+        /**
+        * From CEikDocument, create CAboutAppUi "App UI" object.
+        */
+        CEikAppUi* CreateAppUiL();
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/AboutImage.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2002 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:  Image to be shown in about screen.
+*
+*/
+
+
+#ifndef ABOUTIMAGE_H
+#define ABOUTIMAGE_H
+
+// INCLUDES
+
+// FORWARD DECLARATIONS
+class CFbsBitmap;
+
+// CONSTANTS
+
+const TInt KImageTopMargin = 4 ;
+const TInt KImageBottomMargin = 4;
+
+// CLASS DECLARATION
+
+/**
+*  
+*/
+class CAboutImage : public CBase
+    {
+    public: // Constructors and destructor
+        
+        static CAboutImage* NewLC( const TDesC& aFileName, TInt aBitmapId,
+                                   TInt aStartLine, TInt aBaseLineDelta );
+
+        /**
+        * Destructor
+        */
+        ~CAboutImage();
+
+    public: // New functions
+
+        TInt HeightInPixels() const;
+        TInt WidthInPixels() const;
+        TInt StartLine() const;
+        TInt EndLine() const;
+        TInt Lines() const;
+        const CFbsBitmap* Bitmap() const;
+
+    private: // private constructor
+
+        /**
+        * C++ default constructor.
+        */
+        CAboutImage();
+
+    private:  // Data
+
+        CFbsBitmap* iBitmap; // owned
+        TInt iStartLine;
+        TInt iEndLine;
+    };
+
+#endif // ABOUTIMAGE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/about.hrh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2002 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:  define enumerate for application 
+*
+*/
+
+
+#ifndef ABOUT_HRH
+#define ABOUT_HRH
+
+enum TAboutItemType
+    {
+    EAboutTextItem,
+    EAboutImageItem
+    };
+
+enum TAboutUpdateTimeFlag
+    {    
+    EAboutUpdateTime,
+    EAboutUnUpdateTime	
+    };
+
+#endif // ABOUT_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/about.rh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2002 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:  define struct for application
+*
+*/
+
+
+#ifndef ABOUT_RH
+#define ABOUT_RH
+
+#include "about.hrh"
+
+STRUCT ABOUT_TEXT
+    {
+    BYTE type = EAboutTextItem;
+    BYTE updatetimeflag = EAboutUnUpdateTime;
+    LLINK txt; // set this
+    }
+
+STRUCT ABOUT_IMAGE
+    {
+    BYTE type = EAboutImageItem;
+    LTEXT16 bmpfile = ""; // set this
+    WORD bmpid = 0xffff;  // set this
+    }
+    
+STRUCT ABOUT_SVGIMAGE
+    {    
+    WORD svgid = 0xffff;        // set this
+    WORD svgmaskid = 0xffff;    // set this
+    WORD height = 32;           // set this
+    WORD width = 32;            // set this
+    }
+
+STRUCT ABOUT_ITEM_LIST
+    {
+    STRUCT items[]; // text or image items
+    }
+
+#endif // ABOUT_RH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/inc/about_test.hrh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2002 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:  ABOUT_TEST_HRH
+*
+*/
+
+
+#ifndef ABOUT_TEST_HRH
+#define ABOUT_TEST_HRH
+
+/**
+* Define this to use test resources.
+*/
+// #define __ABOUT_USE_TEST_RESOURCE__
+
+#endif // ABOUT_TEST_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/loc/about.loc	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,1186 @@
+/*
+* Copyright (c) 2004 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: Localization strings for about
+*
+*/
+
+
+// LOCALISATION STRINGS
+
+// d: app name in list
+// l: list_single_large_graphic_pane_t1
+//
+#define qtn_apps_about_list "About Product"
+
+// d: app name in grid
+// l: cell_app_pane_t1
+//
+#define qtn_apps_about_grid "About"
+
+// d: Displayed in title pane
+// l: title_pane_t2/opt9
+//
+#define qtn_about_title_text "Nokia"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_1 "Nokia and Nokia Connecting People are trademarks or registered trademarks of Nokia Corporation."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_2 "Copyright 2009 Nokia. All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_3 "This product is based on Symbian OS S60 5th Edition software."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_4 "Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_5 "JavaTM ME environment: MIDP 2.1, CLDC 1.1."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_6 "Other product and company names mentioned herein may be trademarks or tradenames of their respective owners."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_7 "This product includes certain open source software. The exact terms of the licenses, disclaimers, acknowledgements and notices are provided below. Nokia offers to provide you with the source code as defined in the applicable license. Please send an e-mail to sourcecode.request@nokia.com or a written request to:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_8 "Source Code Requests"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_9 "Nokia Corporation"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_10 "P.O.Box 407"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_11 "FI-00045 Nokia Group"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_12 "Finland"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_13 "This offer is valid for a period of three (3) years from the date of the distribution of this product by Nokia."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_14 "GNU LESSER GENERAL PUBLIC LICENSE"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_15 "Version 2.1, February 1999"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_16 " Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_17 "[This is the first released version of the Lesser GPL.  It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_18 "Preamble"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_19 "The licenses for most software are designed to take away your freedom to share and change it.  By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_20 "This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it.  You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_21 "When we speak of free software, we are referring to freedom of use, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_22 "To protect your rights, we need to make restrictions that forbid distributors to deny you these right or to ask you to surrender these rights.  These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_23 "For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you.  You must make sure that they, too, receive or can get the source code.  If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it.  And you must show them these terms so they know their rights."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_24 " We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_25 "To protect each distributor, we want to make it very clear that there is no warranty for the free library.  Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_26 "Finally, software patents pose a constant threat to the existence of any free program.  We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder.  Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_27 "Most GNU software, including some libraries, is covered by the ordinary GNU General Public License.  This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License.  We use this license for certain libraries in order to permit linking those libraries into non-free programs."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_28 "When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library.  The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom.  The Lesser General Public License permits more lax criteria for linking other code with the library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_29 "We call this license the \"Lesser\" General Public License because it does Less to protect the user's freedom than the ordinary General Public License.  It also provides other free software developers Less of an advantage over competing non-free programs.  These disadvantages are the reason we use the ordinary General Public License for many libraries.  However, the Lesser license provides advantages in certain special circumstances."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_30 "For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard.  To achieve this, non-free programs must be allowed to use the library.  A more frequent case is that a free library does the same job as widely used non-free libraries.  In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_31 "In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software.  For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_32 "Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_33 "The precise terms and conditions for copying, distribution and modification follow.  Pay close attention to the difference between a \"work based on the library\" and a \"work that uses the library\".  The former contains code derived from the library, whereas the latter must be combined with the library in order to run."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_34 "TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_35 "0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called \"this License\"). Each licensee is addressed as \"you\"."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_36 "A \"library\" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_37 "The \"Library\", below, refers to any such software library or work which has been distributed under these terms.  A \"work based on the Library\" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language.  (Hereinafter, translation is included without limitation in the term \"modification\".)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_38 "\"Source code\" for a work means the preferred form of the work for making modifications to it.  For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_39 "Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.  The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_40 "1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_41 "You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_42 "2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_43 "a) The modified work must itself be a software library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_44 "b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_45 "c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_46 "d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_47 "(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application.  Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_48 "These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.  But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_49 "Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_50 "In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_51 "3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library.  To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License.  (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.)  Do not make any other change in these notices."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_52 "Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_53 "This option is useful when you wish to copy part of the code of the Library into a program that is not a library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_54 "4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_55 "If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_56 "5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a \"work that uses the Library\".  Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_57 "However, linking a \"work that uses the Library\" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a \"work that uses the library\".  The executable is therefore covered by this License. Section 6 states terms for distribution of such executables."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_58 "When a \"work that uses the Library\" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library.  The threshold for this to be true is not precisely defined by law."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_59 "If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work.  (Executables containing this object code plus portions of the Library will still fall under Section 6.)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_60 "Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_61 "6. As an exception to the Sections above, you may also combine or link a \"work that uses the Library\" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_62 "You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License.  You must supply a copy of this License.  If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License.  Also, you must do one of these things:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_63 "a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable \"work that uses the Library\", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library.  (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_64 "b) Use a suitable shared library mechanism for linking with the Library.  A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_65 "c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_66 "d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_67 "e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_68 "For an executable, the required form of the \"work that uses the Library\" must include any data and utility programs needed for reproducing the executable from it.  However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_69 "It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system.  Such a contradiction means you cannot use both them and the Library together in an executable that you distribute."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_70 "7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_71 "a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities.  This must be distributed under the terms of the Sections above."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_72 "b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_73 "8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License.  Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License.  However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_74 "9. You are not required to accept this License, since you have not signed it.  However, nothing else grants you permission to modify or distribute the Library or its derivative works.  These actions are prohibited by law if you do not accept this License.  Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_75 "10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_76 "11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all.  For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_77 "If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_78 "It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices.  Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_79 "This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_80 "12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.  In such case, this License incorporates the limitation as if written in the body of this License."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_81 "13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_82 "Each version is given a distinguishing version number.  If the Library specifies a version number of this License which applies to it and \"any later version\", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation.  If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_83 "14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission.  For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this.  Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_84   "NO WARRANTY"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_85   "15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_86   "16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_87   "END OF TERMS AND CONDITIONS"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_88   "How to Apply These Terms to Your New Libraries"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_89   "If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change.  You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License)."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_90   "To apply these terms, attach the following notices to the library.  It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the \"copyright\" line and a pointer to where the full notice is found."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_91   "<one line to give the library's name and a brief idea of what it does.>  Copyright (C) <year>  <name of author>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_92   "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_93   "This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_94   "You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a \"copyright disclaimer\" for the library, if necessary.  Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it!"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_95   "This product includes API header files originally developed by Netscape Communications Corporation, modified by Nokia by changing certain variables for the  purpose of porting the file to Symbian operating system on May 1st, 2004, and available in source code form under the Netscape Public License, v1.1 at  http://www.forum.nokia.com/browserapi."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_96   "Copyright (C) 2005 Apple Computer, Inc.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_97   "Copyright (C) 2007 Apple Inc.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_98   "Copyright (C) 2007 Nokia Inc.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_99   "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_100   "1.  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. "
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_101   "2.  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. "
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_102   "3.  Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_103   "THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_104   "Copyright (C) 2004, Apple Computer, Inc. and The Mozilla Foundation. All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_105   "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_106   "1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_107   "2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_108   "3. Neither the names of Apple Computer, Inc. (\"Apple\") or The Mozilla Foundation (\"Mozilla\") nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_109   "THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_110   "The author of this software is David M. Gay."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_111   "Copyright (c) 1991, 2000, 2001 by Lucent Technologies."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_112   "Permission to use, copy, modify, and distribute this software for any purpose without fee is hereby granted, provided that this entire notice is included in all copies of any software which is or includes a copy or modification of this software and in all copies of the supporting documentation for such software."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_113   "THIS SOFTWARE IS BEING PROVIDED \"AS IS\", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_114   "Copyright (c) 2004, 2005 Apple Computer, Inc."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_115   "Copyright (c) 1997-2005 University of Cambridge All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_116   "Copyright (c) 2005, Google Inc. All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_117   "Copyright (c) 2006, Nokia Corporation"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_118   "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_119   "* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_120   "* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_121   "* Neither the name of the University of Cambridge nor the name of Google Inc. nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_122   "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_123   "Copyright (c) 1994 Hewlett-Packard Company"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_124   "Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.  Hewlett-Packard Company makes no representations about the suitability of this software for any purpose.  It is provided \"as is\" without express or implied warranty."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_125  "Copyright (c) 1996-1998 Silicon Graphics Computer Systems, Inc."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_126   "Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.  Silicon Graphics makes no representations about the suitability of this software for any purpose.  It is provided \"as is\" without express or implied warranty."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_127   "Copyright (c) 1983, 1995, 1996 Eric P. Allman"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_128   "Copyright (c) 1988, 1993  The Regents of the University of California.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_129   "Copyright (C) 2007 Nokia Inc. All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_130   "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_131   "1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_132   "2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_133   "3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_134   "THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_135   "Copyright (c) 1995-2006 International Business Machines Corporation and others All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_136   "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_137   "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_138   "Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_139   "Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_140   "Copyright (C) 2006, 2007 Alexey Proskuryakov (ap@nypop.com)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_141   "Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_142   "Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_143   "Copyright (C) 2006 James G. Speth (speth@end.com)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_144   "Copyright (C) 2006 Jonas Witt <jonas.witt@gmail.com>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_145   "Copyright (C) 2006, 2007 Trolltech ASA"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_146   "Copyright (C) 2005, 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_147   "Copyright (C) 2006 Zack Rusin <zack@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_148   "Copyright (C) 2007 Alp Toker <alp@atoker.com>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_149   "Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_150   "Copyright (C) 2007 Graham Dennis (graham.dennis@gmail.com)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_151   "Copyright (C) 2006 Don Gibson <dgibson77@gmail.com>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_152   "Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com "
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_153   "Copyright (C) 2007 Holger Hans Peter Freyther"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_154   "Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com)."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_155   "Copyright (C) 2006 David Smith (catfish.man@gmail.com)"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_156   "Copyright (C) 2006 George Staikos <staikos@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_157   "Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_158   "Copyright (C) 2006 Rob Buis <buis@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_159   "Copyright (C) 2006 Dirk Mueller <mueller@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_160   "Copyright (C) 2000-2001 Dawit Alemayehu <adawit@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_161   "Copyright (C) 2006, 2007 Eric Seidel <eric@webkit.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_162   "Copyright (C) 2005, 2006 Alexander Kellett <lypanov@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_163   "Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_164   "Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com "
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_165   "Copyright (C) 2006 Enrico Ros <enrico.ros@m31engineering.it>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_166   "Copyright (C) 2007 Staikos Computing Services Inc. <info@staikos.net>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_167   "Copyright (C) 2006 Charles Samuels <charles@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_168   "Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_169   "Copyright (C) 2007 Robin Dunn.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_170   "Copyright     2005 Frerich Raabe <raabe@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_171   "Copyright     2005 Maksim Orlovich <maksim@kde.org>"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_172   "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_173 "1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_174 "2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_175 "THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_176 "Copyright (C) 2007 Apple Inc.  All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_177 "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_178 "1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_179 "2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_180 "3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_181 "THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_182 "Open Dynamics Engine Copyright (c) 2001-2004, Russell L. Smith.All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_183 "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_184 "Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_185 "Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_186 "Neither the names of ODE's copyright owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_187 "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_188 "Copyright (c) 1998 - 2008, Paul Johnston & Contributors All rights reserved."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_189 "Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:"
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_190 "Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_191 "Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission."
+
+// d: Nokia legal text
+// d: Starts from a new line.
+// l: none
+//
+#define qtn_about_legal_text_192 "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/rom/About.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,37 @@
+/*
+* 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""
+* 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:  Image description file for About
+*
+*/
+
+
+#ifndef __ABOUT_IBY__
+#define __ABOUT_IBY__
+
+S60_APP_EXE(ABOUT)
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,About)
+
+
+
+S60_APP_AIF_ICONS(ABOUT)
+S60_APP_AIF_RSC(ABOUT)
+
+#ifdef RD_CONTROL_PANEL  
+	
+	ECOM_PLUGIN( aboutgsplugin.dll, aboutgsplugin.rsc)
+	data=DATAZ_\APP_RESOURCE_DIR\aboutgsplugin.mif 	APP_RESOURCE_DIR\aboutgsplugin.mif
+
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/rom/AboutResources.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* 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""
+* 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:  Image description file for About
+*
+*/
+
+
+
+#ifndef __ABOUT_RESOURCES_IBY__
+#define __ABOUT_RESOURCES_IBY__
+
+
+//Resource file(s) for ABOUT
+
+S60_APP_RESOURCE(About)
+
+#ifdef RD_CONTROL_PANEL  
+	data=DATAZ_\ECOM_RESOURCE_DIR\aboutgspluginrsc.rsc      ECOM_RESOURCE_DIR\aboutgspluginrsc.rsc
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/src/AboutApp.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2002 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:  About Application
+*
+*/
+
+
+// INCLUDE FILES
+#include "AboutApp.h"
+#include "AboutDocument.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CAboutApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CAboutApp::AppDllUid() const
+    {
+    return KUidabout;
+    }
+
+   
+// ---------------------------------------------------------
+// CAboutApp::CreateDocumentL()
+// Creates CAboutDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CAboutApp::CreateDocumentL()
+    {
+    return CAboutDocument::NewL( *this );
+    }
+
+#include <eikstart.h>
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CAboutApp;
+    }
+
+// ---------------------------------------------------------
+// E32Main()
+//  Main startup entry point
+// Returns: KErrNone
+// ---------------------------------------------------------
+//
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication(NewApplication);
+    }
+
+// End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/src/AboutAppUi.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,144 @@
+/*
+* Copyright (c) 2002 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: Application UI. 
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "AboutAppUi.h"
+#include "AboutContainer.h" 
+#include <avkon.hrh>
+#include <sysversioninfo.h>                       
+
+// local constant
+const TUint32 KSettingAppID = 0x100058EC;
+
+// ================= MEMBER FUNCTIONS =======================
+//
+// ----------------------------------------------------------
+// CAboutAppUi::ConstructL()
+// Default constructor
+// ----------------------------------------------------------
+//
+void CAboutAppUi::ConstructL()
+    {
+    BaseConstructL();
+    
+    // Gets whether server is required or not.
+    iSettingType = iEikonEnv->StartedAsServerApp();
+    
+    iAppContainer = new( ELeave ) CAboutContainer;
+    iAppContainer->SetMopParent( this );
+    iAppContainer->ConstructL( ClientRect() );
+    AddToStackL( iAppContainer );
+    SetNaviPaneLabelL();                                     
+    }
+
+// ----------------------------------------------------
+// CAboutAppUi::~CAboutAppUi()
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CAboutAppUi::~CAboutAppUi()
+    {
+    if ( iAppContainer )
+        {
+        RemoveFromStack( iAppContainer );
+        delete iAppContainer;
+        }
+    if ( iNaviDecorator )
+        {
+        delete iNaviDecorator;
+        iNaviDecorator = NULL;
+        }
+    }
+
+// ----------------------------------------------------
+// CAboutAppUi::HandleCommandL( TInt aCommand )
+// Takes care of command handling
+// ----------------------------------------------------
+//
+void CAboutAppUi::HandleCommandL( TInt aCommand )
+    {
+    switch ( aCommand )
+        {
+        case EAknSoftkeyExit:
+        case EAknSoftkeyBack:
+        	{
+            Exit();
+            break;        	
+        	}
+        case EEikCmdExit:
+            {
+            // Close Ctrl.panel after pressing call terminal key.
+            if ( iSettingType )
+                {
+                RWsSession& ws = iCoeEnv->WsSession();
+                TApaTaskList taskList( ws );
+                TUid appUid = { KSettingAppID };
+                TApaTask task = taskList.FindApp( appUid );
+                if ( task.Exists() )
+                    {
+                    task.SendToBackground();
+                    task.EndTask();
+                    }
+                }
+            Exit();
+            break;
+            }
+
+        default:
+            break;
+        }
+    }
+
+// ----------------------------------------------------
+// CAboutAppUi::SetNaviPaneLabel()
+// Set the name of the product to navi pane.
+// ----------------------------------------------------
+//    
+void CAboutAppUi::SetNaviPaneLabelL()
+    {
+    TUid naviPaneUid;
+    naviPaneUid.iUid = EEikStatusPaneUidNavi;
+    CEikStatusPane* statusPane = StatusPane();
+    CEikStatusPaneBase::TPaneCapabilities subPane = statusPane->PaneCapabilities( naviPaneUid );
+  
+    if ( subPane.IsPresent() && subPane.IsAppOwned() )
+        {
+        CAknNavigationControlContainer* naviPane = dynamic_cast<CAknNavigationControlContainer*>
+                                ( statusPane->ControlL( naviPaneUid ) );
+        if ( naviPane )
+            {    
+            TBuf<KSysVersionInfoTextLength> name;
+            SysVersionInfo::TProductVersion info;
+            SysVersionInfo::GetVersionInfo( info );
+            name.Append( info.iModel );
+            
+            if ( iNaviDecorator )
+                {
+                delete iNaviDecorator;
+                iNaviDecorator = NULL;
+                }
+           
+            //set label for the pane
+            iNaviDecorator = naviPane->CreateNavigationLabelL( name );      
+            naviPane->PushL( *iNaviDecorator );      
+            }
+        }
+    }
+// End of File 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/src/AboutContainer.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,807 @@
+/*
+* Copyright (c) 2002 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: application container control.  
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "AboutContainer.h"
+#include "AboutImage.h"
+#include "about.hrh"
+#include "about_test.hrh"
+#include <layoutmetadata.cdl.h>
+#include <about.rsg>
+#include <eiksbfrm.h>
+#include <eikscrlb.h>
+#include <eikrted.h>
+#include <txtrich.h>
+#include <barsread.h>
+#include <eikenv.h>
+#include <aknenv.h>
+#include <AknUtils.h>
+#include <aknconsts.h>
+#include <txtfrmat.h>
+#include <AknBidiTextUtils.h>
+#include <data_caging_path_literals.hrh>
+#include <f32file.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <aknappui.h>
+#include <AknsDrawUtils.h> 
+#include    <AknsBasicBackgroundControlContext.h>
+#include    <AknsConstants.h>
+#include <AknDef.h>
+#include <about.mbg>
+#include <StringLoader.h> 
+
+// CONSTANTS
+
+_LIT( KAboutPanicCategory, "About" );
+
+enum TAboutPanic
+    {
+    EAboutNotSupported = 0
+    };
+
+/**
+* SCROLLING:
+*
+* Scrolling is implemented according to the following rules
+* when scrolling down:
+*
+* (same screens are shown again when scrolling up)
+*
+* - If the last line in previous screen was a text line,
+*   next screen is started with that line, ie. the last
+*   line is shown again in the next screen.
+*
+* - If previous screen ended with an image that did not
+*   fully fit, next screen is started with that image so
+*   that it can be seen as a whole.
+*
+* - If previous screen ended with an image that fit there fully,
+*   next screen is started with next text line or image.
+*/
+
+// constructors
+
+CAboutContainer::CAboutContainer():iNumItem( 0 )
+    {
+    }
+
+void CAboutContainer::ConstructL( const TRect& aRect )
+    {
+    CreateWindowL();
+
+    iScrollBarDragged = EFalse;
+	iSkinContext = NULL;
+	iText = NULL;
+	iImages = NULL;
+	iScreenStarts = NULL;
+	iSBFrame = NULL;
+    CalculateL(aRect); 
+    ActivateL();
+    }
+
+// destructor
+
+CAboutContainer::~CAboutContainer()
+    {
+	delete iSkinContext;
+    delete iSBFrame;
+    delete iScreenStarts;
+    delete iIcon;
+
+    if ( iText )
+        {
+        iText->ResetAndDestroy();
+        delete iText;
+        }
+
+    if ( iImages )
+        {
+        iImages->ResetAndDestroy();
+        delete iImages;
+        }
+    }
+
+void CAboutContainer::SizeChanged()
+    {
+    TRect parentRect(Rect());
+	if (iSkinContext)
+        {
+        iSkinContext->SetRect(parentRect);
+        }
+	}
+// -----------------------------------------------------------------------------
+// CAboutContainer::Draw()
+// -----------------------------------------------------------------------------
+
+void CAboutContainer::Draw( const TRect& aRect ) const
+    {
+    CWindowGc& gc = SystemGc();
+	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	if (iSkinContext)
+		{//Draw the skin background
+		AknsDrawUtils::Background(
+			skin, iSkinContext, this, gc, aRect);
+		}
+	else
+		{//  clear the area
+		gc.SetBrushColor( iEikonEnv->ControlColor( EColorWindowBackground, *this ) );
+		gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+		gc.Clear( aRect );
+		}
+
+    // draw text
+    gc.UseFont( iFont );
+    // index of the first line on the screen in the text array
+    TInt firstLine = 0 ;
+
+    // The value of firstLine can not be the same.
+    if ( !iScrollBarDragged )
+        {
+        if ( ( iScreenStarts ) && (iScreenStarts->Count() >= iCurrentScreen ) )
+            {
+    	    firstLine = ( ( *iScreenStarts )[ iCurrentScreen ] ); 	
+            }        
+        }
+    else
+        {                    
+        if ( iCurrentScreen <= ( ( *iScreenStarts )[ iScreenStarts->Count() - 1 ] ) )
+            {
+            firstLine = iCurrentScreen ;
+            }
+        }
+    // index of the last line on the screen in the text array
+    TInt lastLine( firstLine + iLinesPerScreen - 1 );
+
+    gc.SetBrushStyle( CGraphicsContext::ENullBrush );
+    TPoint position( iTopBaseLineX, iTopBaseLineY );
+    TPoint topLeft;
+    TSize rectSize( iLineWidth, iBaseLineDelta +iFont->DescentInPixels() );
+
+    for ( TInt index = firstLine ;
+          index < iText->Count() && index <= lastLine ;
+          index++, position.iY += iBaseLineDelta )
+        {
+        HBufC* text = (*iText)[ index ];
+
+        if ( text )
+            {
+            topLeft = TPoint( position.iX, position.iY-iBaseLineDelta );
+			TRgb color;			
+			TInt error = AknsUtils::GetCachedColor( skin, 
+							color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
+			
+			if(error == KErrNone)
+				{
+				gc.SetPenColor(color);
+				}		
+            gc.DrawText( *text,
+                         TRect( topLeft, rectSize ),
+                         iBaseLineDelta,
+                         iTextAlign );
+            }
+        }
+
+    gc.DiscardFont();
+
+    // draw images
+
+    for ( TInt i = 0 ; i < iImages->Count() ; i++ )
+        {
+        CAboutImage* image = (*iImages)[ i ];
+
+        // If part of the image resides in visible lines, draw it.
+        if ( image->StartLine() <= lastLine && image->EndLine() >= firstLine )
+            {
+            position.SetXY( iTopBaseLineX, iTopBaseLineY );
+            position.iY += ( image->StartLine() - firstLine ) * iBaseLineDelta;
+
+            position.iY -= iBaseLineDelta - iFont->DescentInPixels();
+            // Now iY is the top line of rectangle where the picture is
+            // centered in.
+            position.iY += ( (image->Lines()+1) * iBaseLineDelta -
+                             iFont->HeightInPixels() -
+                             image->HeightInPixels() ) / 2;
+
+            // If text is right-aligned, also align images to the right.
+
+            if ( iTextAlign == CGraphicsContext::ERight )
+                {
+                position.iX += ( iLineWidth - image->WidthInPixels() );
+                }
+
+            gc.BitBlt( position, image->Bitmap(), aRect );
+            }
+        }
+     /*   if(iCurrentScreen == 0)
+    {
+        TAknWindowLineLayout area = AknLayoutScalable_Apps::mce_icon_pane().LayoutLine();
+ 	    TAknLayoutRect layoutRect;
+ 	    TRect iconrect = Rect();
+ 	    iconrect.iTl.iX = position.iX;
+	    layoutRect.LayoutRect(iconrect, area);
+  	    layoutRect.DrawImage(gc, iIcon->Bitmap(),iIcon->Mask());
+        
+    }*/
+
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutContainer::ActivateL()
+// -----------------------------------------------------------------------------
+
+void CAboutContainer::ActivateL()
+    {
+    CCoeControl::ActivateL();
+    UpdateScrollIndicatorL();
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutContainer::SetTextL()
+// -----------------------------------------------------------------------------
+
+void CAboutContainer::SetTextL( const TDesC& aText , const TInt aItem )
+    {
+    CArrayFix<TPtrC>* wrappedArray =
+        new( ELeave ) CArrayFixFlat<TPtrC>( 10 );
+
+    CleanupStack::PushL( wrappedArray );
+
+    HBufC* dataToDestroy =
+        AknBidiTextUtils::ConvertToVisualAndWrapToArrayL(
+            aText, iLineWidth, *iFont, *wrappedArray
+        );
+
+    TInt numLines( wrappedArray->Count() );
+    for ( TInt i = 0 ; i < numLines ; i++ )
+        {
+        HBufC* line = (*wrappedArray)[i].AllocLC();
+
+        if(!line->Length())
+            {
+            iText->AppendL( NULL );
+			
+            CleanupStack::PopAndDestroy(line);  // line
+            }
+        else
+            {
+            iText->AppendL( line );
+            CleanupStack::Pop(line);  // line
+            }
+        }
+	iText->AppendL( NULL );
+
+    // If the last char was newline, add one extra, since
+    // wrapping automatically removes it.
+    if ( aText[ aText.Length() - 1 ] == '\n' )
+        {
+        iText->AppendL( NULL );
+		}
+
+    CleanupStack::PopAndDestroy(wrappedArray); // wrappedArray
+    delete dataToDestroy;
+
+    // update screen scrolling info array
+
+    TInt lastLine( iText->Count() - 1 );
+    TInt screenStart( (*iScreenStarts)[ iScreenStarts->Count() - 1 ] );
+
+    TBool firstNewScreenHandled( EFalse );
+
+    while ( lastLine >= screenStart + iLinesPerScreen )
+        {
+        if ( !firstNewScreenHandled && iDoNotShowLastLineAgain )
+            {
+            screenStart++;
+            firstNewScreenHandled = ETrue;
+            }
+
+        screenStart += iLinesPerScreen - 1;
+        iScreenStarts->AppendL( screenStart );
+        if ( ( lastLine == screenStart + 1 ) && ( aItem == iNumItem - 1 ) )
+        	{
+        	iScreenStarts->Delete( iScreenStarts->Count() - 1 );
+        	}
+        }
+
+    // if text, last line is shown again in next screen
+    iDoNotShowLastLineAgain = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutContainer::SetImageL()
+// -----------------------------------------------------------------------------
+
+void CAboutContainer::SetImageL( const TDesC& aFileName, TInt aBitmapId )
+    {
+    TInt firstLineOfImage( iText->Count() );
+
+    CAboutImage* image =
+    CAboutImage::NewLC( aFileName, aBitmapId, firstLineOfImage, iBaseLineDelta );
+
+    // new lines to make room for the picture
+
+    for ( TInt i = 0 ; i < image->Lines() ; i++ )
+        {
+        iText->AppendL( NULL );
+        }
+
+    iImages->AppendL( image );
+    CleanupStack::Pop(image); // image
+
+    // update screen scrolling info array
+
+    TInt lastLineOfImage( iText->Count() - 1 );
+    TInt screenStart( (*iScreenStarts)[ iScreenStarts->Count() - 1 ] );
+
+    TBool firstNewScreenHandled( EFalse );
+
+    // If the image was not fully shown in the first screen,
+    // start the next screen with the image.
+
+    if ( firstLineOfImage < screenStart + iLinesPerScreen &&
+         lastLineOfImage >= screenStart + iLinesPerScreen )
+        {
+        screenStart = firstLineOfImage;
+        iScreenStarts->AppendL( screenStart );
+        firstNewScreenHandled = ETrue;
+        }
+
+    while ( lastLineOfImage >= screenStart + iLinesPerScreen )
+        {
+        if ( !firstNewScreenHandled && iDoNotShowLastLineAgain )
+            {
+            screenStart++;
+            firstNewScreenHandled = ETrue;
+            }
+
+        screenStart += iLinesPerScreen - 1;
+        iScreenStarts->AppendL( screenStart );
+        }
+
+    if ( lastLineOfImage == screenStart + iLinesPerScreen - 1 )
+        {
+        iDoNotShowLastLineAgain = ETrue;
+        }
+    else
+        {
+        iDoNotShowLastLineAgain = EFalse;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutContainer::OfferKeyEventL()
+// -----------------------------------------------------------------------------
+
+TKeyResponse CAboutContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                              TEventCode aType )
+    {
+    // Operation is different in dragging and thumbing.
+    if ( ( iScrollBarDragged ) && ( aType == EEventKey ) )
+        {
+        for( TInt i=0; i<iScreenStarts->Count(); i++ )
+            {
+            if ( iCurrentScreen <= ( ( *iScreenStarts )[i] ) ) 
+                {
+                // if last state is dragging, value of iCurrentScreen should be adjusted.
+                switch ( aKeyEvent.iCode )
+                    {
+                    case EKeyUpArrow:
+                        {
+                        iScrollBarDragged = EFalse;
+                        // Do nothing if the scroll bar is on the top, when pressing arrow up.
+                        if ( i != 0 )
+                            {
+                            iCurrentScreen =  ( i - 1 );
+                            }
+                        DrawNow();
+                        UpdateScrollIndicatorL();
+                        break;
+                        }
+                    case EKeyDownArrow:
+                        {
+                        iScrollBarDragged = EFalse;
+                        if ( ( iCurrentScreen == ( *iScreenStarts )[i] )
+                            // Do nothing if the scroll bar is on the bottom, when pressing arrow down.
+                            && ( i != ( iScreenStarts->Count() - 1 ) ) )
+                            {
+                            iCurrentScreen = ( i + 1 );
+                            }
+                       	else
+                            {
+                            iCurrentScreen = i;
+                            }
+                        DrawNow();
+                        UpdateScrollIndicatorL();
+                        break;
+                        }
+                    default:
+                        break;
+                    }
+                return EKeyWasConsumed;
+                }
+            } 
+        }
+        
+    if ( aType == EEventKey && iScreenStarts->Count() > 1 )
+        {
+        switch ( aKeyEvent.iCode )
+            {
+            case EKeyUpArrow:
+                {
+                if ( iCurrentScreen > 0 )
+                    {
+                    iCurrentScreen--;
+                    DrawNow();
+                    UpdateScrollIndicatorL();
+                    }
+                }
+                break;
+
+            case EKeyDownArrow:
+                {
+                if ( iCurrentScreen < iScreenStarts->Count() - 1 )
+                    {
+                    iCurrentScreen++;
+                    DrawNow();
+                    UpdateScrollIndicatorL();
+                    }
+                }
+                break;
+
+            default:
+                break;
+            }
+        return EKeyWasConsumed;
+        }
+
+    // When pressing the Send Key and the event's type is not EEvenKey return EKeyWasNotConsumed
+    return EKeyWasNotConsumed;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutContainer::UpdateScrollIndicatorL()
+// -----------------------------------------------------------------------------
+
+void CAboutContainer::UpdateScrollIndicatorL()
+ {
+    if ( iScreenStarts->Count() <= 1 )
+    {
+        return;
+    }
+
+    if ( !iSBFrame )
+    {
+        iSBFrame = new( ELeave ) CEikScrollBarFrame( this,this, ETrue );
+        
+		// Decide which type of scrollbar is to be shown
+        CAknAppUi* appUi = iAvkonAppUi;
+		if (AknLayoutUtils::DefaultScrollBarType(appUi) == CEikScrollBarFrame::EDoubleSpan)
+		{
+			// For EDoubleSpan type scrollbar
+			iSBFrame->CreateDoubleSpanScrollBarsL(ETrue, EFalse); // non-window owning scrollbar            
+			iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EDoubleSpan);
+		}
+		else
+		{
+			// For EArrowHead type scrollbar
+			iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EArrowHead);
+		}  
+		iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+    }
+
+	TEikScrollBarModel hSbarModel;
+    TEikScrollBarModel vSbarModel;
+
+    // The member of vSbarModel shoul be changed because the state when dragging scroll bar shoul be considered.
+    TInt spanAdjust = iLinesPerScreen - ( iText->Count() - ( *iScreenStarts )[ iScreenStarts->Count() - 1 ] + 1 );
+    if ( iScrollBarDragged )
+    {
+    vSbarModel.iThumbPosition = iCurrentScreen;
+    }
+    else
+    {
+        vSbarModel.iThumbPosition = iCurrentScreen * ( iLinesPerScreen - 1 );
+    }
+    vSbarModel.iScrollSpan = iText->Count() + spanAdjust;
+    vSbarModel.iThumbSpan = ( iLinesPerScreen - 1 );
+	
+	TRect rect(Rect());  
+    TEikScrollBarFrameLayout layout;
+	layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
+
+    if (iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan)
+    {    
+        // For EDoubleSpan type scrollbar
+        if (vSbarModel.iThumbPosition + vSbarModel.iThumbSpan > vSbarModel.iScrollSpan)
+        {
+            // Not let scrollbar values overflow
+            vSbarModel.iThumbPosition = vSbarModel.iScrollSpan - vSbarModel.iThumbSpan;
+        }
+		
+        TAknDoubleSpanScrollBarModel hDsSbarModel(hSbarModel);
+        TAknDoubleSpanScrollBarModel vDsSbarModel(vSbarModel);
+       
+        // When resolution is changed, changing the drawing area of layout for the text.
+        TRect currentRect( iAvkonAppUi->ClientRect() );
+        iSBFrame->TileL(&hDsSbarModel, &vDsSbarModel, currentRect, rect, layout);        
+        iSBFrame->SetVFocusPosToThumbPos(vDsSbarModel.FocusPosition());
+	}  
+	else
+	{
+		iSBFrame->TileL( &hSbarModel, &vSbarModel, rect, rect, layout );
+		iSBFrame->SetVFocusPosToThumbPos( vSbarModel.iThumbPosition );
+	}
+}
+
+
+// End of File
+
+void CAboutContainer::CalculateL(const TRect& aRect)
+    {
+    TRect rect( 0, 0, 0, 0 );
+    iCurrentScreen = 0;
+	
+    if ( iSkinContext )
+        {
+        delete iSkinContext;
+        iSkinContext = NULL;
+        }  
+	
+    // Temporary rect is passed. Correct rect is set in SizeChanged.
+    iSkinContext = CAknsBasicBackgroundControlContext::NewL(
+    KAknsIIDQsnBgAreaMain , rect, EFalse );
+
+    iFont = AknLayoutUtils::FontFromId( EAknLogicalFontSecondaryFont );
+
+    // Calculate various text positioning parameters
+    iBaseLineDelta = iFont->HeightInPixels() * 4 / 3;
+
+    TInt mainPaneWidth( aRect.iBr.iX - aRect.iTl.iX );
+    TInt mainPaneHeight( aRect.iBr.iY - aRect.iTl.iY );
+    // Line width is 87% of client rect, horizontal margins 13%
+    iLineWidth = mainPaneWidth * 87 / 100;
+    iTopBaseLineX = ( mainPaneWidth - iLineWidth ) / 2;
+
+    // top margin is 6.5% of the client rect
+    TInt topMargin = mainPaneHeight * 65 / 1000;    
+    iTopBaseLineY = topMargin + iFont->AscentInPixels();
+
+    // minimum bottom margin is 3% of the client rect
+    TInt bottomMargin = mainPaneHeight * 3 / 100;
+    iLinesPerScreen =
+        ( mainPaneHeight - topMargin - bottomMargin ) / iBaseLineDelta;
+
+    iTextAlign = CGraphicsContext::ELeft;
+   
+    if ( iText )
+        {
+        iText->ResetAndDestroy();
+        delete iText;
+        iText = NULL;
+        }
+
+    // Every text line on screen is one entry in this array
+    iText = new( ELeave ) CArrayPtrFlat<HBufC>( 20 );
+
+    if ( iImages )
+        {
+        iImages->ResetAndDestroy();
+        delete iImages;
+        iImages = NULL;
+        }
+
+    // Every image on screen is one entry in this array
+    iImages = new( ELeave ) CArrayPtrFlat<CAboutImage>( 1 );
+
+    if ( iScreenStarts )
+        {
+        delete iScreenStarts;
+        iScreenStarts = NULL;
+        }
+    // This array contains indices for lines that start the subsequent
+    // screens, for custom scrolling
+    iScreenStarts = new( ELeave ) CArrayFixFlat<TInt>( 5 );
+    // Initialisation: first screen starts at line 0.
+    iScreenStarts->AppendL( 0 );
+
+    // Read text and image items to be shown on the screen from a resource file.
+#ifdef __ABOUT_USE_TEST_RESOURCE__
+    #include <about_test.rsg>
+    // test resource
+    _LIT(KDirAndFile, "Z:about_test.rsc");
+    TParse* fp = new(ELeave) TParse ();
+    fp->Set (KDirAndFile, &KDC_APP_RESOURCE_DIR, NULL);
+    TBuf<254> KAboutTestResourceFileName;
+    KAboutTestResourceFileName.Copy(fp ->FullName());
+    delete fp;
+    fp=NULL;
+
+    TFileName fileName( KAboutTestResourceFileName );
+    BaflUtils::NearestLanguageFile( iEikEnv->FsSession(), filename );
+    TInt testResourceFileOffset = iCoeEnv->AddResourceFileL( fileName );
+    TResourceReader reader;
+    iEikonEnv->CreateResourceReaderLC( reader, R_ABOUT_TEST_MAIN_TEXT );
+#else
+    // real resource
+    TResourceReader reader;
+    iEikonEnv->CreateResourceReaderLC( reader, R_ABOUT_MAIN_TEXT );
+#endif
+    
+    CFbsBitmap* bitmap,*mask;
+    bitmap = NULL;
+    mask= NULL;
+    TFileName bmpPath;
+    _LIT( KMbmFileName, "Z:about.mif" );
+
+    TParse* fpMbm = new(ELeave) TParse ();
+    fpMbm->Set ( KMbmFileName, &KDC_APP_BITMAP_DIR, NULL );
+    bmpPath.Copy( fpMbm ->FullName() );
+    delete fpMbm;
+    fpMbm=NULL;
+
+    TResourceReader readerSVG;                   
+    iEikonEnv->CreateResourceReaderLC( readerSVG, R_ABOUT_SVG_TEXT );
+    TInt svgId = readerSVG.ReadInt16();
+    TInt svgIdmask = readerSVG.ReadInt16();
+    TInt height = readerSVG.ReadInt16();
+    TInt width = readerSVG.ReadInt16();
+    CleanupStack::PopAndDestroy();      // readerSVG
+	  
+    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
+    AknsUtils::CreateIconL( skinInstance, KAknsIIDQgnMenuSmsvoLst, bitmap, mask, bmpPath, svgId, svgIdmask );	
+    //AknsUtils::CreateIconL( skinInstance, KAknsIIDQgnMenuSmsvoLst, bitmap, bmpPath, EMbmAboutQgn_graf_java_logo );	
+    if ( iIcon )
+        {
+        delete( iIcon );
+        iIcon = NULL;
+        }
+    iIcon = CGulIcon::NewL( bitmap,mask );
+    
+    TRect rect1; 
+   	rect1.iTl.iX = 0;
+   	rect1.iTl.iY = 0;
+   	rect1.iBr.iX = height;
+   	rect1.iBr.iY = width;
+	  AknIconUtils::SetSize( iIcon->Bitmap(), rect1.Size() ); 
+	  AknIconUtils::SetSize( iIcon->Mask(), rect1.Size() );
+
+    TInt lines( bitmap->SizeInPixels().iHeight +
+                  KImageTopMargin + 
+                  KImageBottomMargin +
+                  ( iBaseLineDelta - 1 ) / iBaseLineDelta );
+
+/*        for(TInt i =0; i< 2; i++)
+		{
+		    iText->AppendL(NULL);    
+		}*/
+    TInt NumItem( reader.ReadInt16() );
+    iNumItem = NumItem;
+
+    for ( TInt i = 0 ; i < iNumItem ; i++ )
+        {
+        TInt type = reader.ReadInt8();
+
+        if ( type == EAboutTextItem )    
+            { 
+            HBufC* text;  
+            if ( reader.ReadInt8() == EAboutUpdateTime )
+                {  
+                TTime time;
+                time.UniversalTime();
+                TDateTime currentTime = time.DateTime();
+                text = StringLoader::LoadLC( reader.ReadInt32(), 
+                                            currentTime.Year(), CEikonEnv::Static() );
+                }
+            else
+                {
+                text = iEikonEnv->AllocReadResourceLC( reader.ReadInt32() );
+                }
+            SetTextL( *text , i );
+            CleanupStack::PopAndDestroy( text );
+            }
+        else if ( type == EAboutImageItem )
+            {
+            TPtrC bitmapFile = reader.ReadTPtrC();
+            TInt bitmapId = reader.ReadInt16();
+            SetImageL( bitmapFile, bitmapId );
+            }
+        else
+            {
+            User::Panic( KAboutPanicCategory, EAboutNotSupported );
+            }
+        }
+
+    CleanupStack::PopAndDestroy(); // reader
+
+#ifdef __ABOUT_USE_TEST_RESOURCE__
+    if ( testResourceFileOffset )
+        {
+        iCoeEnv->DeleteResourceFile( testResourceFileOffset );
+        }
+#endif
+
+    SetRect( aRect );  
+    UpdateScrollIndicatorL();
+    }
+
+
+ void CAboutContainer::HandleResourceChange(TInt aType)
+ {
+
+switch ( aType )
+  {
+  case KEikDynamicLayoutVariantSwitch :
+       {
+       TRAP_IGNORE(CalculateL(iAvkonAppUi->ClientRect()));   
+       DrawNow();
+       }
+       break;
+        
+  case KAknsMessageSkinChange :
+       {
+       TRAP_IGNORE(iSBFrame->CreateDoubleSpanScrollBarsL(ETrue, EFalse)); // window owning scrollbar            
+       iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EDoubleSpan);
+ 	   TRAP_IGNORE(iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EOn));
+	   TRAP_IGNORE(UpdateScrollIndicatorL());
+       }
+        
+  default:
+       {
+       CCoeControl::HandleResourceChange(aType);
+       }
+	   break;
+  }
+}  
+// ---------------------------------------------------------
+// CAboutContainer::MopSupplyObject()
+// Pass skin information if need.
+// ---------------------------------------------------------
+
+TTypeUid::Ptr CAboutContainer::MopSupplyObject(TTypeUid aId)
+    {
+    if (aId.iUid == MAknsControlContext::ETypeId && iSkinContext)
+        {
+        return MAknsControlContext::SupplyMopObject(aId, iSkinContext);
+        }
+
+    return CCoeControl::MopSupplyObject(aId);
+    }
+
+// ---------------------------------------------------------
+// CAboutContainer::HandleScrollEventL()
+// Capture Touch Events on the Scroll Bar
+// ---------------------------------------------------------
+void CAboutContainer::HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType)
+{
+    //Only on page up/down,scroll up/down and drag events
+    if((aEventType == EEikScrollPageDown) || (aEventType == EEikScrollPageUp) || 
+       (aEventType == EEikScrollThumbDragVert) || (aEventType == EEikScrollUp) ||
+       (aEventType == EEikScrollDown))
+    {
+        //Get the current position from the scroll bar
+        iCurrentScreen = aScrollBar->ThumbPosition();
+        
+        // Reset flag when dragging scroll bar
+        iScrollBarDragged = ETrue;
+        //Refresh now
+        DrawNow();
+        UpdateScrollIndicatorL();
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/src/AboutDocument.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2002 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:  Application Document.
+*
+*/
+
+
+// INCLUDE FILES
+#include "AboutDocument.h"
+#include "AboutAppUi.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// constructor
+CAboutDocument::CAboutDocument( CEikApplication& aApp ) : CAknDocument( aApp )
+    {
+    }
+
+// destructor
+CAboutDocument::~CAboutDocument()
+    {
+    }
+
+// Two-phased constructor.
+CAboutDocument* CAboutDocument::NewL( CEikApplication& aApp )
+    {
+    return new( ELeave ) CAboutDocument( aApp );
+    }
+    
+// -----------------------------------------------------------------------------
+// CAboutDocument::CreateAppUiL()
+// constructs CAboutAppUi
+// -----------------------------------------------------------------------------
+//
+CEikAppUi* CAboutDocument::CreateAppUiL()
+    {
+    return new( ELeave ) CAboutAppUi;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/about/src/AboutImage.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2002 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: offer bitmap for application.
+*
+*/
+
+
+// INCLUDE FILES
+#include <fbs.h>
+#include "AboutImage.h"
+#include <AknIconUtils.h>
+
+// ================= MEMBER FUNCTIONS ==========================================
+
+CAboutImage::CAboutImage()
+    {
+    }
+
+CAboutImage::~CAboutImage()
+    {
+    delete iBitmap;
+    }
+
+CAboutImage* CAboutImage::NewLC( const TDesC& aFileName,
+                                 TInt aBitmapId,
+                                 TInt aStartLine,
+                                 TInt aBaseLineDelta )
+    {
+    CAboutImage* self = new( ELeave ) CAboutImage();
+    CleanupStack::PushL( self );
+
+    /*self->iBitmap = new( ELeave ) CFbsBitmap;
+    self->iBitmap->Load( aFileName, aBitmapId );*/
+
+	self->iBitmap  = AknIconUtils::CreateIconL(aFileName, aBitmapId );
+    self->iStartLine = aStartLine;
+
+    // enough lines so that image and margins fit in them.
+
+    TInt lines( ( self->HeightInPixels() + 
+                  KImageTopMargin + 
+                  KImageBottomMargin +
+                  aBaseLineDelta - 1 ) / aBaseLineDelta );
+
+    self->iEndLine = aStartLine + lines - 1;
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutImage::HeightInPixels()
+// -----------------------------------------------------------------------------
+
+TInt CAboutImage::HeightInPixels() const
+    {
+    return iBitmap->SizeInPixels().iHeight;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutImage::WidthInPixels()
+// -----------------------------------------------------------------------------
+
+TInt CAboutImage::WidthInPixels() const
+    {
+    return iBitmap->SizeInPixels().iWidth;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutImage::StartLine()
+// -----------------------------------------------------------------------------
+
+TInt CAboutImage::StartLine() const
+    {
+    return iStartLine;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutImage::EndLine()
+// -----------------------------------------------------------------------------
+
+TInt CAboutImage::EndLine() const
+    {
+    return iEndLine;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutImage::Lines()
+// -----------------------------------------------------------------------------
+
+TInt CAboutImage::Lines() const
+    {
+    return iEndLine - iStartLine + 1;
+    }
+
+// -----------------------------------------------------------------------------
+// CAboutImage::Bitmap()
+// -----------------------------------------------------------------------------
+
+const CFbsBitmap* CAboutImage::Bitmap() const
+    {
+    return iBitmap;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/aif/CalcAif.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2002 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:  RSS for creating the aif file for Calculator.
+*
+*/
+
+
+#include <aiftool.rh>
+
+#include <Calc.loc>
+
+RESOURCE AIF_DATA
+    {
+    // Application UID
+    app_uid = 0x10005902;
+
+    // Number of icons
+    num_icons = 1;
+
+    // Application capabilities
+    embeddability = KAppNotEmbeddable;
+
+    newfile = KAppDoesNotSupportNewFile;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/aif/Calcsoft_caption.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2002 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:  Define text for application grid and list.
+*
+*/
+
+
+#include <calc.loc>
+#include <apcaptionfile.rh>
+
+RESOURCE CAPTION_DATA
+    {
+    caption = qtn_apps_calculator_list;
+    shortcaption = qtn_apps_calculator_grid;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/Calcsoft.mmp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2002 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:  Project specfication file.
+*                Write all source and resource files, all using libraries, 
+*                all bitmaps.
+*
+*/
+
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+TARGET 			calcsoft.exe
+TARGETTYPE 		exe
+UID             0x100039ce 0x10005902
+
+VENDORID	VID_DEFAULT
+CAPABILITY 	CAP_APPLICATION
+
+APP_LAYER_SYSTEMINCLUDE
+
+START RESOURCE Calcsoft.rss
+	HEADER
+	TARGETPATH APP_RESOURCE_DIR
+	LANGUAGE_IDS	
+END 
+
+USERINCLUDE     ../inc ../src
+
+
+SOURCEPATH      ../src
+SOURCE          CalcApp.cpp   
+SOURCE          CalcDoc.cpp  
+SOURCE          CalcAppUi.cpp
+SOURCE          CalcView.cpp
+SOURCE          CalcCont.cpp
+SOURCE          CalcEdit.cpp 
+SOURCE          CalcOutSheet.cpp
+SOURCE          CalcFunc.cpp
+//SOURCE          CalcCmdBtn.cpp
+SOURCE			CalcEnv.cpp
+SOURCE          CalcHistory.cpp
+SOURCE          CalcEditline.cpp 
+
+STATICLIBRARY    edllstub.lib 
+
+LIBRARY         euser.lib   
+LIBRARY         eikcore.lib    
+LIBRARY         apparc.lib
+LIBRARY         cone.lib
+LIBRARY         estor.lib
+LIBRARY         eikcoctl.lib
+LIBRARY         avkon.lib
+LIBRARY         bafl.lib
+LIBRARY         egul.lib
+LIBRARY		efsrv.lib
+LIBRARY         aknskins.lib
+LIBRARY         servicehandler.lib // For the AiwServiceHandler
+LIBRARY         hlplch.lib  // for "Help" options menu
+LIBRARY         featmgr.lib
+LIBRARY         cdlengine.lib //For Scalable UI
+LIBRARY         aknicon.lib
+LIBRARY		fbscli.lib
+LIBRARY			ptiengine.lib
+LIBRARY         centralrepository.lib
+LIBRARY         cenrepnotifhandler.lib
+LIBRARY		aknlayout2scalable.lib
+
+
+SOURCEPATH      ../group
+START RESOURCE  ./Calcsoft_reg.rss
+DEPENDS calcsoft.rsg
+TARGETPATH /private/10003a3f/apps
+END
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/Calcsoft.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,519 @@
+/*
+* Copyright (c) 2002 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:  Resource file for Calculator.
+*
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME    CALC
+
+
+//  INCLUDES
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <avkon.rh>
+#include <avkon.hrh>
+#include <avkon.rsg>
+#include <fontids.hrh>
+#include <apcaptionfile.rh>
+#include <avkon.loc>
+#include <AiwCommon.rh>
+
+#include "calc.hrh"
+#include <calc.loc>
+#include "CalcDrawingConst.laf"
+#include <appinfo.rh>
+#include <data_caging_paths_strings.hrh>
+//  RESOURCE DEFINITIONS 
+
+// ---------------------------------------------------------
+//   
+//    Define the resource file signature 
+//    This resource should be empty.
+//
+// ---------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE { }
+
+
+// ---------------------------------------------------------
+//   
+//    Default Document FileName
+//
+// ---------------------------------------------------------
+//
+RESOURCE TBUF32
+    {
+    buf = "C:\\system\\data\\Calcsoft";      
+    }
+
+// ---------------------------------------------------------
+//   
+//  Define UI's menu, CBA-key, and status pane.
+//
+// ---------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+    {
+    status_pane = r_calc_status_pane;
+    }
+
+// ---------------------------------------------------------
+//   
+//  r_calc_status_pane
+//  Define status pane of Calculator.
+//
+// ---------------------------------------------------------
+//
+RESOURCE STATUS_PANE_APP_MODEL r_calc_status_pane
+    {
+   //  layout = R_AVKON_STATUS_PANE_LAYOUT_EMPTY;
+    }
+    
+// ---------------------------------------------------------
+//   
+//    r_calc_view_info
+//    Define menubar and cba key of Calculator  
+//
+// ---------------------------------------------------------
+//
+RESOURCE CBA r_calc_cba_center_softkey
+{
+	buttons =
+	        {
+	        CBA_BUTTON {id=EAknSoftkeyOptions; txt = text_softkey_option;},
+	        CBA_BUTTON {id=EAknSoftkeyExit; txt = text_softkey_exit; },
+	        CBA_BUTTON {id=EAknSoftkeySelect; txt =	text_softkey_select;}
+	        };
+}
+RESOURCE AVKON_VIEW r_calc_view_info
+    {
+    menubar = r_calc_menubar;      // menubar
+    cba = r_calc_cba_center_softkey;//R_AVKON_SOFTKEYS_OPTIONS_EXIT;    // CBA
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_calc_menubar
+//   Menubar for Calculator
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_BAR r_calc_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_calc_popupmenu;
+            }
+        };
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_calc_popupmenu
+//   Menu for "Options"
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_calc_popupmenu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = ECalcCmdLastResult;
+            txt = qtn_calc_om_last_result;
+            },
+        MENU_ITEM
+            {
+            command = ECalcCmdMemory;
+            txt = qtn_calc_om_sub_mem;
+            cascade = r_calc_memory_menu;
+            },
+        MENU_ITEM
+            {
+            command = ECalcCmdClearCalcAndHistory;
+            txt = qtn_calc_clear_sheet;
+            },
+       
+        MENU_ITEM
+            {
+            command = ECalcCmdHelp;
+            txt = qtn_options_help;
+            },
+        MENU_ITEM
+            {
+            command=ECmdAiwPlaceHolder;
+            txt = "Place Holder";
+         	cascade = AIW_INTELLIGENT_CASCADE_ID;       
+            },
+        
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+// ---------------------------------------------------------
+//   
+//   r_calc_popupmenu_aiw
+//   Menu for "Options"
+//
+// ---------------------------------------------------------
+//
+
+RESOURCE MENU_PANE r_help_submenu
+{
+    items=
+    {
+        MENU_ITEM { command = ECmdAiwPlaceHolderShowHelp; txt = ""; }
+    };
+}
+
+
+    // To let know what are the services that are provided
+
+RESOURCE AIW_INTEREST r_aiwhelpapp_interest
+
+	{	
+
+		items =
+		
+		{
+		 AIW_CRITERIA_ITEM
+		 
+		 	{
+		 		id = ECmdAiwPlaceHolder;
+		 		// Show help content
+		 		serviceCmd = KAiwCmdHelp;   //from aiwcommon.hrh  
+		 		serviceClass = KAiwClassMenu;   //from aiwcommon.hrh
+		 		contentType = "*";
+		 		// Here, the dll's implementation uid is being used instead of the dll uid.
+		 		// Also the maxProviders can be removed as the dll will be loaded automatically if
+		 		// it is provided.
+		 		defaultProvider = 0x10207465; //AiwHelpProvider.dll uid
+		 		//maxProviders =1;	 		
+		 		
+		 	}
+		
+		
+		};
+
+
+	}
+
+
+//----------------------------------------------------
+//   
+//    r_calc_memory_menu
+//    Define menu about memory
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_calc_memory_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = ECalcCmdMemorySave;
+            txt = qtn_calc_om_mem_save;
+            },
+        MENU_ITEM
+            {
+            command = ECalcCmdMemoryRecall;
+            txt = qtn_calc_om_mem_recall;
+            },
+        MENU_ITEM
+            {
+            command = ECalcCmdMemoryClear;
+            txt = qtn_calc_om_mem_clear;
+            }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_calc_error_outofrange
+//   Error message for overflow  
+//
+// ---------------------------------------------------------
+//
+//Localisation of scalable UI.
+//RESOURCE TBUF256 r_calc_error_outofrange
+RESOURCE TBUF r_calc_error_outofrange
+    {
+    buf = text_out_of_range;
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_calc_error_divisionbyzero
+//   Error message for division by zero  
+//
+// ---------------------------------------------------------
+////Localisation of scalable UI.
+//RESOURCE TBUF256 r_calc_error_divisionbyzero
+RESOURCE TBUF r_calc_error_divisionbyzero
+    {
+    buf = text_calc_division_by_zero;
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_calc_error_negativevaluesqrt
+//   Error message for negative value for square root  
+//
+// ---------------------------------------------------------
+////Localisation of scalable UI.
+//RESOURCE TBUF256 r_calc_error_negativevaluesqrt
+RESOURCE TBUF r_calc_error_negativevaluesqrt
+    {
+    buf = text_calc_negative_value_for_sqrt;
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_calc_outsheet_operator_array
+//   Operator array for OutputSheet.  
+//
+// ---------------------------------------------------------
+//
+RESOURCE ARRAY r_calc_outsheet_operator_array
+    {
+    items=
+        {
+        INT16
+            {
+            value = '+'; 
+            },      
+        INT16
+            {
+            value = 0x2212; 
+            },      
+        INT16
+            {
+            value = 0xD7; 
+            },      
+        INT16
+            {
+            value = 0xF7;
+            },
+        INT16
+            {
+            value = '='; 
+            },
+        INT16
+            {
+            value = 0x221A;
+            },
+        INT16
+            {
+            value = '%'; 
+            },
+        INT16
+            {
+            value = ' ';
+            },
+        INT16
+            {
+            value = '*'; 
+            },
+        INT16
+            {
+            value = '/';
+            }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_calc_editor_operator_array
+//   Operator array for editor.  
+//
+// ---------------------------------------------------------
+//
+RESOURCE ARRAY r_calc_editor_operator_array
+    {
+    items=
+        {
+        INT16
+            {
+            value = '+'; 
+            },      
+        INT16
+            {
+            value = 0x2212; 
+            },      
+        INT16
+            {
+            value = 0xD7; 
+            },      
+        INT16 
+            {
+            value = 0xF7;
+            },
+        INT16
+            {
+            value = '='; 
+            },
+        INT16
+            {
+            value = 0x221A;
+            },
+        INT16
+            {
+            value = '%';  
+            },
+        INT16
+            {
+            value = ' ';
+            },
+        INT16
+            {
+            value = '*'; 
+            },
+        INT16
+            {
+            value = '/';
+            }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_calc_sttus_saved_to_mem
+//   indicator for memory saved status  
+//
+// ---------------------------------------------------------
+//
+RESOURCE TBUF r_calc_sttus_saved_to_mem
+    {
+    buf = qtn_calc_sttus_saved_to_mem;
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_calc_sttus_saved_to_mem_sha
+//   indicator of shadow for memory saved status  
+//
+// ---------------------------------------------------------
+//
+RESOURCE TBUF r_calc_sttus_saved_to_mem_sha
+    {
+    buf = qtn_calc_sttus_saved_to_mem_sha;
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_calc_minus_indicator
+//   Minus indicator, e.g "-"  
+//
+// ---------------------------------------------------------
+//
+RESOURCE TBUF r_calc_minus_indicator
+    {
+    buf = "-";
+    }
+
+//----------------------------------------------------
+//   
+//    r_calc_editor_numberentry_shadow_fontid
+//    Define font id for editor number shadow.
+//
+//----------------------------------------------------
+//
+RESOURCE FONT r_calc_editor_numberentry_shadow_fontid
+    {
+    fontid = CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_FONTID;
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_calc_editor_numberentry_fontid
+//    Define font id for editor number.
+//
+//----------------------------------------------------
+//
+RESOURCE FONT r_calc_editor_numberentry_fontid
+    {
+    fontid = CALC_DRAWCONST_EDITOR_NUMBER_FONTID;
+    }
+
+//----------------------------------------------------
+//   
+//    r_calc_editor_operator_shadow_fontid
+//    Define font id for editor operator shadow.
+//
+//----------------------------------------------------
+//
+RESOURCE FONT r_calc_editor_operator_shadow_fontid
+    {
+    fontid = CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_FONTID; 
+    }
+
+//----------------------------------------------------
+//   
+//    r_calc_editor_operator_fontid
+//    Define font id for editor operator.
+//
+//----------------------------------------------------
+//
+RESOURCE FONT r_calc_editor_operator_fontid
+    {
+    fontid = CALC_DRAWCONST_EDITOR_OPERATOR_FONTID; 
+    }
+
+//----------------------------------------------------
+//   
+//    r_calc_outsheet_operator_fontid
+//    Define font id for outputsheet operator.
+//
+//----------------------------------------------------
+//
+RESOURCE FONT r_calc_outsheet_operator_fontid
+    {
+    fontid = CALC_DRAWCONST_OSHEET_OPERATOR_FONTID;  
+    }
+
+RESOURCE LOCALISABLE_APP_INFO r_calcsoft_localisable_app_info
+    {
+    short_caption = qtn_apps_calculator_grid; //qtn_my_app_short_caption;
+    caption_and_icon = 
+    CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_apps_calculator_list;  //qtn_my_app_caption;
+#ifdef __SCALABLE_ICONS
+        number_of_icons = 1;
+ 		icon_file = APP_BITMAP_DIR"\\Calcsoft_aif.mif";
+ #else
+        number_of_icons = 2;
+		icon_file = APP_BITMAP_DIR"\\Calcsoft_aif.mbm";
+ #endif
+        };
+       
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/Calcsoft_reg.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2004 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:  This file contains the application registration resource.
+* 
+*
+*/
+
+
+#include <appinfo.rh>
+#include <Calcsoft.rsg>
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+
+UID3 0x10005902
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "Calcsoft";
+    localisable_resource_file = APP_RESOURCE_DIR"\\Calcsoft";
+    localisable_resource_id = R_CALCSOFT_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/backup_registration.xml	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+    <passive_backup>
+      <include_directory name = "\"/>
+    </passive_backup>
+    <restore requires_reboot = "no"/>
+</backup_registration>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2002 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:  This file provides the information required for building 
+*                Calculator.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+//  Help exports
+#include "../help/group/bld.inf"
+
+PRJ_EXPORTS
+// export localised loc file 
+../loc/calc.loc        APP_LAYER_LOC_EXPORT_PATH(calc.loc)
+
+./backup_registration.xml /epoc32/data/z/private/10005902/backup_registration.xml
+./backup_registration.xml /epoc32/release/winscw/udeb/z/private/10005902/backup_registration.xml
+./backup_registration.xml /epoc32/release/winscw/urel/z/private/10005902/backup_registration.xml
+
+// export IBY files
+../rom/Calcsoft.iby                 CORE_APP_LAYER_IBY_EXPORT_PATH(calcsoft.iby)
+../rom/CalculatorResources.iby      LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(calculatorresources.iby)
+
+PRJ_MMPFILES
+
+
+
+//#ifdef __SCALABLE_ICONS
+//gnumakefile icons_scalable_calcsoft.mk
+//gnumakefile icons_aif_scalable_calcsoft.mk
+//#else
+//gnumakefile icons_calcsoft.mk
+//gnumakefile icons_aif_bitmaps_calcsoft.mk
+//#endif
+
+
+./Calcsoft.mmp
+
+PRJ_EXTENSIONS
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE calcsoft.mif
+OPTION HEADERFILE calcsoft.mbg
+OPTION SOURCES  -c8,1 qgn_graf_calc_display\
+                -c8,8 qgn_graf_calc_paper\
+                -c8,8 qsn_fr_calc_display_side_l\
+                -c8,8 qsn_fr_calc_display_center\
+                -c8,8 qsn_fr_calc_display_side_r\
+                -c8,8 qgn_graf_calc_results_line\
+                -c8,8 qsn_fr_calc_paper_center\
+                -c8,8 qsn_fr_calc_paper_corner_tl\
+                -c8,8 qsn_fr_calc_paper_corner_tr\
+                -c8,8 qsn_fr_calc_paper_corner_bl\
+                -c8,8 qsn_fr_calc_paper_corner_br\
+                -c8,8 qsn_fr_calc_paper_side_t\
+                -c8,8 qsn_fr_calc_paper_side_b\
+                -c8,8 qsn_fr_calc_paper_side_l\
+                -c8,8 qsn_fr_calc_paper_side_r\
+                -c8,8 qgn_indi_calc_cancel\
+                -c8,8 qgn_indi_calc_seven\
+                -c8,8 qgn_indi_calc_four\
+                -c8,8 qgn_indi_calc_one\
+                -c8,8 qgn_indi_calc_zero\
+                -c8,8 qgn_indi_calc_squareroot\
+                -c8,8 qgn_indi_calc_eight\
+                -c8,8 qgn_indi_calc_five\
+                -c8,8 qgn_indi_calc_two\
+                -c8,8 qgn_indi_calc_separator\
+                -c8,8 qgn_indi_calc_percent\
+                -c8,8 qgn_indi_calc_nine\
+                -c8,8 qgn_indi_calc_six\
+                -c8,8 qgn_indi_calc_three\
+                -c8,8 qgn_indi_calc_sign\
+                -c8,8 qgn_indi_calc_divide\
+                -c8,8 qgn_indi_calc_multiply\
+                -c8,8 qgn_indi_calc_subtract\
+                -c8,8 qgn_indi_calc_add\
+                -c8,8 qgn_indi_calc_equals\
+                -c8,1 qgn_indi_calc_button_plus\
+                -c8,1 qgn_indi_calc_button_minus\
+                -c8,1 qgn_indi_calc_button_multiply\
+                -c8,1 qgn_indi_calc_button_divide\
+                -c8,1 qgn_indi_calc_button_sign\
+                -c8,1 qgn_indi_calc_button_equals\
+                -c8,1 qgn_indi_calc_button_squareroot\
+                -c8,1 qgn_indi_calc_button_percent\
+                -c8,1 qgn_indi_calc_button_up\
+                -c8,1 qgn_indi_calc_button_down\
+                -c8,1 qgn_indi_calc_button_plus_pressed\
+                -c8,1 qgn_indi_calc_button_minus_pressed\
+                -c8,1 qgn_indi_calc_button_multiply_pressed\
+                -c8,1 qgn_indi_calc_button_divide_pressed\
+                -c8,1 qgn_indi_calc_button_sign_pressed\
+                -c8,1 qgn_indi_calc_button_equals_pressed\
+                -c8,1 qgn_indi_calc_button_squareroot_pressed\
+                -c8,1 qgn_indi_calc_button_percent_pressed\
+                -c8,1 qgn_indi_calc_button_up_pressed\
+                -c8,1 qgn_indi_calc_button_down_pressed\
+                -c8,8 qgn_indi_calc_button_up_inactive\
+                -c8,8 qgn_indi_calc_button_down_inactive\
+                -c8,8 qgn_indi_calc_button_sign_inactive\
+                -c8,8 qgn_indi_calc_button_squareroot_inactive\
+                -c8,8 qgn_indi_calc_button_percent_inactive
+END
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE calcsoft_aif.mif
+OPTION SOURCES -c8,8 qgn_menu_calc
+END
+
+PRJ_TESTMMPFILES
+//../tsrc/CVTCalcsoft.mmp  // CVT test case(s)
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/iconlist.txt	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,29 @@
+
+/*
+*
+========================================================================
+====
+*  Name     : iconlist.txt
+*  Part of  : Calcsoft
+*
+*  Description:
+*  Version:
+*
+*  Copyright C 2002 Nokia Corporation.
+*  This material, including documentation and any related 
+*  computer programs, is protected by copyright controlled by 
+*  Nokia Corporation. All rights are reserved. Copying, 
+*  including reproducing, storing,  adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
+*
+========================================================================
+====
+*/
+
+
+/c8,8 ..\data\qgn_menu_note.svg
+/c8,8 ..\data\qgn_menu_phob.svg
+/c8,8 ..\data\qgn_menu_pinb.svg
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/icons_aif_bitmaps_calcsoft.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2004 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:  Icons makefile for project Calcsoft
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\calcsoft_aif.mbm
+
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME)	\
+	/c8,8 qgn_menu_calc_lst.bmp
+	
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/icons_aif_scalable_calcsoft.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,69 @@
+#
+# Copyright (c) 2004 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: Icons makefile for project Calcsoft
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\calcsoft_aif.mif
+
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME)	\
+		/c8,8 qgn_menu_calc.svg
+		
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/icons_calcsoft.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,108 @@
+#
+# Copyright (c) 2004 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: Icons makefile for project Calcsoft
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\resource\apps
+HEADERDIR=\epoc32\include
+ICONTARGETFILENAME=$(TARGETDIR)\calcsoft.mif
+HEADERFILENAME=$(HEADERDIR)\calcsoft.mbg
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME)  /h$(HEADERFILENAME) \
+/c8,1 qgn_graf_calc_display.svg\
+/c8,8 qgn_graf_calc_paper.svg\
+/c8,8 qsn_fr_calc_display_side_l.svg\
+/c8,8 qsn_fr_calc_display_center.svg\
+/c8,8 qsn_fr_calc_display_side_r.svg\
+/c8,8 qsn_fr_calc_paper_center.svg\
+/c8,8 qsn_fr_calc_paper_corner_tl.svg\
+/c8,8 qsn_fr_calc_paper_corner_tr.svg\
+/c8,8 qsn_fr_calc_paper_corner_bl.svg\
+/c8,8 qsn_fr_calc_paper_corner_br.svg\
+/c8,8 qsn_fr_calc_paper_side_t.svg\
+/c8,8 qsn_fr_calc_paper_side_b.svg\
+/c8,8 qsn_fr_calc_paper_side_l.svg\
+/c8,8 qsn_fr_calc_paper_side_r.svg\
+/c8,1 qgn_indi_calc_button_plus.svg\
+/c8,1 qgn_indi_calc_button_minus.svg\
+/c8,1 qgn_indi_calc_button_multiply.svg\
+/c8,1 qgn_indi_calc_button_divide.svg\
+/c8,1 qgn_indi_calc_button_sign.svg\
+/c8,1 qgn_indi_calc_button_equals.svg\
+/c8,1 qgn_indi_calc_button_squareroot.svg\
+/c8,1 qgn_indi_calc_button_percent.svg\
+/c8,1 qgn_indi_calc_button_up.svg\
+/c8,1 qgn_indi_calc_button_down.svg\
+/c8,1 qgn_indi_calc_button_plus_pressed.svg\
+/c8,1 qgn_indi_calc_button_minus_pressed.svg\
+/c8,1 qgn_indi_calc_button_multiply_pressed.svg\
+/c8,1 qgn_indi_calc_button_divide_pressed.svg\
+/c8,1 qgn_indi_calc_button_sign_pressed.svg\
+/c8,1 qgn_indi_calc_button_equals_pressed.svg\
+/c8,1 qgn_indi_calc_button_squareroot_pressed.svg\
+/c8,1 qgn_indi_calc_button_percent_pressed.svg\
+/c8,1 qgn_indi_calc_button_up_pressed.svg\
+/c8,1 qgn_indi_calc_button_down_pressed.svg\
+/c8,8 qgn_indi_calc_button_up_inactive.svg\
+/c8,8 qgn_indi_calc_button_down_inactive.svg\
+/c8,8 qgn_indi_calc_button_sign_inactive.svg\
+/c8,8 qgn_indi_calc_button_squareroot_inactive.svg\
+/c8,8 qgn_indi_calc_button_percent_inactive.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(HEADERFILENAME)&& \
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/group/icons_scalable_calcsoft.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,130 @@
+#
+# Copyright (c) 2004 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: Icons makefile for project Calcsoft
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\resource\apps
+HEADERDIR=\epoc32\include
+ICONTARGETFILENAME=$(TARGETDIR)\calcsoft.mif
+HEADERFILENAME=$(HEADERDIR)\calcsoft.mbg
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME)  /h$(HEADERFILENAME) \
+/c8,1 qgn_graf_calc_display.svg\
+/c8,8 qgn_graf_calc_paper.svg\
+/c8,8 qsn_fr_calc_display_side_l.svg\
+/c8,8 qsn_fr_calc_display_center.svg\
+/c8,8 qsn_fr_calc_display_side_r.svg\
+/c8,8 qgn_graf_calc_results_line.svg\
+/c8,8 qsn_fr_calc_paper_center.svg\
+/c8,8 qsn_fr_calc_paper_corner_tl.svg\
+/c8,8 qsn_fr_calc_paper_corner_tr.svg\
+/c8,8 qsn_fr_calc_paper_corner_bl.svg\
+/c8,8 qsn_fr_calc_paper_corner_br.svg\
+/c8,8 qsn_fr_calc_paper_side_t.svg\
+/c8,8 qsn_fr_calc_paper_side_b.svg\
+/c8,8 qsn_fr_calc_paper_side_l.svg\
+/c8,8 qsn_fr_calc_paper_side_r.svg\
+/c8,8 qgn_indi_calc_cancel.svg\
+/c8,8 qgn_indi_calc_seven.svg\
+/c8,8 qgn_indi_calc_four.svg\
+/c8,8 qgn_indi_calc_one.svg\
+/c8,8 qgn_indi_calc_zero.svg\
+/c8,8 qgn_indi_calc_squareroot.svg\
+/c8,8 qgn_indi_calc_eight.svg\
+/c8,8 qgn_indi_calc_five.svg\
+/c8,8 qgn_indi_calc_two.svg\
+/c8,8 qgn_indi_calc_separator.svg\
+/c8,8 qgn_indi_calc_percent.svg\
+/c8,8 qgn_indi_calc_nine.svg\
+/c8,8 qgn_indi_calc_six.svg\
+/c8,8 qgn_indi_calc_three.svg\
+/c8,8 qgn_indi_calc_sign.svg\
+/c8,8 qgn_indi_calc_divide.svg\
+/c8,8 qgn_indi_calc_multiply.svg\
+/c8,8 qgn_indi_calc_subtract.svg\
+/c8,8 qgn_indi_calc_add.svg\
+/c8,8 qgn_indi_calc_equals.svg\
+/c8,1 qgn_indi_calc_button_plus.svg\
+/c8,1 qgn_indi_calc_button_minus.svg\
+/c8,1 qgn_indi_calc_button_multiply.svg\
+/c8,1 qgn_indi_calc_button_divide.svg\
+/c8,1 qgn_indi_calc_button_sign.svg\
+/c8,1 qgn_indi_calc_button_equals.svg\
+/c8,1 qgn_indi_calc_button_squareroot.svg\
+/c8,1 qgn_indi_calc_button_percent.svg\
+/c8,1 qgn_indi_calc_button_up.svg\
+/c8,1 qgn_indi_calc_button_down.svg\
+/c8,1 qgn_indi_calc_button_plus_pressed.svg\
+/c8,1 qgn_indi_calc_button_minus_pressed.svg\
+/c8,1 qgn_indi_calc_button_multiply_pressed.svg\
+/c8,1 qgn_indi_calc_button_divide_pressed.svg\
+/c8,1 qgn_indi_calc_button_sign_pressed.svg\
+/c8,1 qgn_indi_calc_button_equals_pressed.svg\
+/c8,1 qgn_indi_calc_button_squareroot_pressed.svg\
+/c8,1 qgn_indi_calc_button_percent_pressed.svg\
+/c8,1 qgn_indi_calc_button_up_pressed.svg\
+/c8,1 qgn_indi_calc_button_down_pressed.svg\
+/c8,8 qgn_indi_calc_button_up_inactive.svg\
+/c8,8 qgn_indi_calc_button_down_inactive.svg\
+/c8,8 qgn_indi_calc_button_sign_inactive.svg\
+/c8,8 qgn_indi_calc_button_squareroot_inactive.svg\
+/c8,8 qgn_indi_calc_button_percent_inactive.svg
+
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(HEADERFILENAME)&& \
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
Binary file extras/calcsoft/help/data/xhtml.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/help/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009 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:
+* Export help related files.
+*
+*/
+
+#include <platform_paths.hrh>				
+PRJ_EXPORTS
+:zip ../data/xhtml.zip   /epoc32/data/z/resource/ overwrite
+:zip ../data/xhtml.zip   /epoc32/winscw/c/resource/ overwrite
+
+../inc/calc.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/calc.hlp.hrh)
+../rom/calcsofthelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(calcsofthelps_variant.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/help/inc/calc.hlp.hrh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 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:
+*
+*/
+	
+//
+// calc.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __CALC_HLP_HRH__
+#define __CALC_HLP_HRH__
+
+_LIT(KCALC_HLP_MAIN, "CALC_HLP_MAIN"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/help/rom/calcsofthelps_variant.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 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: 
+*
+*/
+
+#ifndef __CALCSOFTHELPS_VARIANT_IBY__
+#define __CALCSOFTHELPS_VARIANT_IBY__
+
+#if defined(FF_S60_HELPS_IN_USE)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005902\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10005902\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005902\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005902\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005902\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005902\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10005902\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10005902\meta.xml)
+#endif
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcApp.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2002 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:  An application class, CCalcApplication, 
+*                derived from CEikApplication
+*
+*/
+
+
+#ifndef     CALCAPP_H
+#define     CALCAPP_H
+
+
+//  INCLUDES
+#include <aknapp.h>
+
+// UID of app
+const   TUid    KUidCalc = { 0x10005902 };
+
+//  FORWARD DECLARATIONS
+class CApaDocument;
+
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcApplication : Application class
+*/
+
+class   CCalcApplication
+        :public CAknApplication
+    {
+    private: // Functions from base classes 
+        /**
+        * From CApaApplication, Create CApaDocument object   
+        * @return Pointer of document class.
+        */
+        CApaDocument* CreateDocumentL(); 
+        
+        /**
+        * From CApaApplication, return Uid of Calculator application 
+        * @return Uid of Calculator application 
+        */
+        TUid AppDllUid() const; 
+    };
+
+#endif      //  CALCAPP_H   
+            
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcAppUi.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2002 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:  An App UI class, CCalcAppUi, derived from CAknViewAppUi
+*
+*/
+
+
+#ifndef     CALCAPPUI_H
+#define     CALCAPPUI_H
+
+
+//  INCLUDES
+#include <aknViewAppUi.h>
+
+
+//  FORWARD DECLARATIONS
+class   CCalcAppEnv;
+class   CEnvironmentChangeNotifier;
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcAppUi : 'AppUi' class
+*/
+
+class   CCalcAppUi
+      :public CAknViewAppUi
+
+    {
+    public:     // Constructors and destructor
+        /**
+        * C++ default constructor.
+        */
+        CCalcAppUi();
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcAppUi();
+
+    public: // New functions
+        /**
+        * Exit Calculator application.
+        */
+        void ExitCalculator();
+
+		/**
+		* Returns ETrue value when the skin change event has occured.
+		*/
+		inline TBool IsSkinChanged()const;
+
+		/**
+		* Sets the value to ETrue when the skin changes
+		* @param aETrue : Boolean value to set the iIsSkinChanged variable to ETtrue.
+        */
+		inline void SetSkinChanged(TBool aETrue); 
+
+    private: // New functions
+        /**
+        * This function is called when locale is changed.
+        * @param aThisPtr : Specified in TCallback constructor.
+        * @return EFalse
+        */
+        static TInt LocaleCallback(TAny* aThisPtr);
+
+        /**
+        * Handle locale change event.
+        */
+        void HandleLocaleChangeEvent();
+        
+    private: // Functions from base classes
+        /**
+        * From CEikAppUi, default constructor
+        */
+        void ConstructL(); 
+
+        /**
+        * From CEikAppUi, Handle Exit command.
+        * Other command is handled in CCalcView::HandleCommandL().
+        * @param : aCommand : command ID
+        */
+        void HandleCommandL(TInt aCommand);
+
+		/**
+		*To handle the event when the skin changes.
+		*@param aType :This is used to check whether the skin changes or not.
+        */
+		void HandleResourceChangeL(TInt aType);
+
+		/**
+		*Handles events sent to the application by the window server.
+		*@param aEvent : window server event.
+		*@param aDestination : The control associated with the event. 
+		**/
+        void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
+              
+    private:    // Data
+        CCalcAppEnv* iCalcAppEnv; // Calculator environment
+        CEnvironmentChangeNotifier* iLocaleChangeNotifier;
+                                        // For locale change notifier
+		TBool			iIsSkinChanged; // For Skin change notification
+    };
+
+#include"CalcAppUi.inl"
+#endif      //  CALCAPPUI_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcAppUi.inl	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2002 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:  Implemented all inline functions for CCalcAppUi.  
+*
+*/
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+//----------------------------------------------------------
+//CCalcAppUi::IsSkinChanged
+// Get the boolean value of iIsSkinChanged
+//----------------------------------------------------------
+inline TBool CCalcAppUi::IsSkinChanged()const
+{
+	return iIsSkinChanged;
+}
+
+//----------------------------------------------------------
+//CCalcAppUi::SetSkinChanged
+// Set the boolean value to iIsSkinChanged
+//----------------------------------------------------------
+inline void CCalcAppUi::SetSkinChanged(TBool aETrue)
+{
+	iIsSkinChanged = aETrue;
+}
+
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcCmdBtn.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,146 @@
+/*
+* Copyright (c) 2002 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:  The Function-Map's button class, CCalcCommandButton
+*                Derived from CEikCommandButtonBase
+*                The CCalcCommandButton is flat button.
+*                In making disable, it calls SetDimmed() function.
+*
+*/
+
+
+#ifndef     CALCCMDBTN_H
+#define     CALCCMDBTN_H
+
+
+#include <coecntrl.h>
+#include <aknutils.h>
+
+//  CLASS DEFINITIONS 
+class CCalcFuncmapSubPane;
+
+/**
+CCalcCommandButton : The button class for FunctionMap of a calculator
+*/
+
+class CCalcCommandButton 
+      : public CCoeControl
+    {
+    public:
+        enum TState  // Button state for bitmap.
+            {
+            ENormal,    // Button is normal.
+            EPressed,   // Button is pushed.
+            EDimmed     // Button is dimmed.
+            };
+
+    public: // Constructors and destructor 
+        /**
+        * Two-phased constructor.
+        * @param aFuncmapSubPane : CCalcFuncmapSubPane pointer 
+        * @param aUnpressedBmp : Bitmap for unpressed button
+        * @param aPressedBmp : Bitmap for pressed button
+        * @param aInactiveBmp : Bitmap for inactive button
+        */
+        static CCalcCommandButton* NewL(
+            CCalcFuncmapSubPane* aFuncmapSubPane,
+            const CGulIcon* aUnpressedBmp,
+            const CGulIcon* aPressedBmp,
+            const CGulIcon* aInactiveBmp); 
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcCommandButton();
+        
+        
+    public: // New functions
+        /**
+        * Button state is set and re-draw.
+        * @param aState : State of a button (ENormal || EPressed || ESelected)
+        */
+        void SetStateAndRedraw(const TState& aState);
+
+        /**
+        * Set flag which button is selected or not, and redraw.
+        * @param aIsSelected : Button is selected or not.
+        */
+        void SetIsSelectedAndRedraw(TBool aIsSelected);
+
+        /**
+        * Return Current state of a button.
+        * @return Current state of a button (ENormal || EPressed || ESelected)
+        */
+        TState State() const;
+
+		/**
+		 *Sets iUnpressedButton, iPressedButton, iInactiveButton bitmap arrays to the current bitmaps.
+		 * @param aUnpressedButtonIcon: Icon for Unpressed button 
+         * @param aPressedButtonIcon :  Icon for  pressed button
+         * @param aInactiveButtonIcon : Icon for Inactive button        
+		*/
+		void SetBitmapIcons(CGulIcon* aUnpressedButtonIcon,
+                    CGulIcon* aPressedButtonIcon,
+                    CGulIcon* aInactiveButtonIcon);
+        /**
+        * Gets the button layout
+        * Used for touch support.
+        */
+        TRect ButtonLayout();
+    
+    private: // New functions
+        /**
+        * C++ default constructor.
+        */
+        CCalcCommandButton();
+       
+        /**
+        * Second-phase constructor.
+        * @param aFuncmapSubPane : CCalcFuncmapSubPane pointer 
+        * @param aUnpressedBmp : Bitmap for unpressed button
+        * @param aPressedBmp : Bitmap for pressed button
+        * @param aInactiveBmp : Bitmap for inactive button
+        */
+        void ConstructL(
+                CCalcFuncmapSubPane* aFuncmapSubPane,
+                const CGulIcon* aUnpressedBmp,
+                const CGulIcon* aPressedBmp,
+                const CGulIcon* aInactiveBmp); 
+        
+        
+    private:  // Functions from base classes
+        /**
+        * From CCoeControl : Data of control is set.
+        */
+        void SizeChanged();
+
+        /**
+        * From CCoeControl : Draw a button
+        * @param aRect : Size of a button
+        */
+        void Draw(const TRect& aRect) const;
+
+        
+    private:  // Data
+        TState  iState;      // Current state of a button
+        TBool   iIsSelected; // If Button selected TRUE
+        const CGulIcon*   iUnpressedButton;   // Unpressed button bitmap
+        const CGulIcon*   iPressedButton;     // Pressed button bitmap
+        const CGulIcon*   iInactiveButton;    // Inactive button bitmap
+        TAknLayoutRect    iLayoutRect;        // rectangle of button 
+    };
+
+
+#endif      //  CALCCMDBTN_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcCont.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,362 @@
+/*
+* Copyright (c) 2002 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:  Header file of "CCalcContainer",  CCalcContainer class 
+*                which derived from CCoeControl class. Role of this class 
+*                is to update the calculator data and display on user's input.
+*
+*/
+
+
+#ifndef     CALCCONT_H
+#define     CALCCONT_H
+
+
+//  INCLUDES
+#include <coecntrl.h>
+
+#include "CalcEditline.h"
+#include "CalcView.h"
+
+
+//  FORWARD DECLARATIONS
+class   CCalcEditorSubPane;
+class   CCalcFuncmapSubPane;
+class   CCalcOutputSheet; 
+class   CCalcView;
+class   CCalcDocument;
+class   CPeriodic;
+class   CAknsBasicBackgroundControlContext;
+//Enum declarations for touch values
+enum enlayout_values
+{
+    enTouch_disabled = 0,
+    enTouch_enabled,
+    enTouch_with_prt,
+    enTouch_with_lsc
+};
+//  CLASS DEFINITIONS 
+
+/**
+CCalcContainer : 'Main-Pane' class
+*/
+class   CCalcContainer
+        :public CCoeControl
+    {
+    public:  // Constructors and destructor   
+        /**
+        * Two-phased constructor.
+        */
+        static CCalcContainer* NewL(CCalcView* aView); 
+    
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcContainer();  
+
+
+    public:  // New functions
+        /**
+        * Return pointer of FunctionMap subpane class
+        * @return Pointer of FunctionMap subpane class 
+        */
+        inline CCalcFuncmapSubPane* FuncmapSubPane() const; 
+
+        /**
+        * Return pointer of editor subpane.
+        * @return Pointer of Editor subpane class 
+        */
+        inline CCalcEditorSubPane* EditorPane() const;
+        
+        /**
+        * Return pointer of OutputSheet.
+        * @return Pointer of OutputSheet class 
+        */
+        inline CCalcOutputSheet* OutputSheet() const;
+        
+        /**
+        * Return pointer of CCalcView.
+        * @return Pointer of CCalcView class 
+        */
+        inline CCalcView* View() const;
+
+        /**
+        * The pretreatment of a numerical input is performed.
+        */
+        void ProcessPreinputL();
+        
+        /**
+        * Clear editor,
+        * and if need, empty line is added to calculation history. 
+        */
+        void InputClearL();
+        
+        /**
+        * Redraw scroll-up and down button on scrolling enable.
+        */
+        void ScrollArrowUpdate();
+
+        /**
+        * Redraw ChangeSign button on ChangeSign enable.
+        */
+        void SetChangeSignEnableL();
+        
+        /**
+        * Redraw ChangeSign button on ChangeSign disable.
+        */
+        void SetChangeSignDisable();
+  
+        /**
+        * Redraw Clear button on ClearKey enable.
+        */
+        void SetClearKeyEnable();
+
+		/**
+        * Show square root button only if no 0 in editor.
+        */
+		void SetSqrtEnableL();
+
+		/**
+        * Show percent button only if no 0 in editor.
+        */
+		void SetPercentEnableL();
+
+		/**
+        * Redraw square root button.
+        */
+		void ShowSqrtButton(TBool aEnable);
+
+		/**
+        * Redraw percent button.
+        */
+		void ShowPercentButton(TBool aEnable);
+
+		/**
+		* Returns the state of the calculator.
+		*/
+		CCalcView::TStateNo GetState();
+
+        /**
+        * Time out CallBack function for *-key press
+        * @param aObject this class.
+        * @return always 0
+        */
+        static TInt TimeoutCallbackL(TAny* aObject);
+     
+        /**
+        * Time out CallBack function for * /key press
+        * @param aObject this class.
+        * @return always 0
+        */
+        static TInt TimeoutCallbackChrL( TAny* aObject );
+        /**
+        * Time out CallBack function for +#key press
+        * @param aObject this class.
+        * @return always 0
+        */
+        static TInt TimeoutCallbackShiftL( TAny* aObject );
+        
+        /**
+        * Notify changing decimal separator.
+        * @param aOld : Old decimal separator
+        * @param aNew : New decimal separator  
+        */
+        void NotifyChangeDecimal(TChar aOld, TChar aNew);
+        
+    public: // Functions from base classes
+        /**
+        * From CCoeControl : Get help context
+        * @param aContext : help context. 
+        */
+        void GetHelpContext(TCoeHelpContext& aContext) const;
+
+		/**
+		*Returns functionMap subpane
+		*/
+		inline CCalcFuncmapSubPane* FunctionSubPane() const; 
+		
+		/**
+        * HandleMiddleSoftKey
+        * Handled when MSK is selected 
+        */	
+		void HandleMiddleSoftKey();
+
+		/**
+        * SetOperatorFromTouch
+        * To handle the addition of Touch Input values for digits
+        */	
+		void SetOperatorFromTouchL(TInt akey);
+		
+		/**
+        * ClearInputKey
+        * To handle the clear input key through the touch UI 
+        */	
+		void ClearInputKeyL(TInt aRepeat = 0);
+		
+		/**
+        * ClearInputKey
+        * To handle the '.' key press
+        */	
+		
+		void SetSeparatorFromTouchL();
+
+		// From CCoeControl		
+		void ActivateL();
+    private:  // New functions 
+        /**
+        * C++ default constructor.
+        * @param aView : Pointer of CCalcView
+        */
+        CCalcContainer();  
+
+        /**
+        * Second-phase constructor.
+        */
+        void ConstructL(CCalcView* aView);   
+
+        /**
+        * If no key is pressed until timeout of *-key,
+        * this function is called.
+        */
+        void DoTimeoutL();
+
+        /**
+        * If no key is pressed until timeout of * /key,
+        * this function is called.
+        */
+        void DoTimeoutChrL();
+        /**
+        * If no key is pressed until timeout of +#key,
+        * this function is called.
+        */
+        void DoTimeoutShiftL();        
+
+        /**
+        * Called when any key is pressed.
+        * If timeout notifier for *-key is active, make calculation or
+        * stop notifier according to user's input.
+        * @param aKeyEvent : The key event
+        * @param aType     : The type of the event
+        * @return : If ETrue, the key event is used only for *-key timeout.
+        *           If EFalse, the key event is used not only for *-key 
+        *           timeout but also for other effect of each key. 
+        */
+        TBool HandleAsterKeyTimeoutForKeyPressL(
+             const TKeyEvent& aKeyEvent, TEventCode aType);
+        
+        /**
+        * Called when any key is pressed.
+        * If timeout notifier for * /key is active, make calculation or
+        * stop notifier according to user's input.
+        * @param aKeyEvent : The key event
+        * @param aType     : The type of the event
+        * @return : If ETrue, the key event is used only for * /key timeout.
+        *           If EFalse, the key event is used not only for *+key 
+        *           timeout but also for other effect of each key. 
+        */
+        TBool HandleChrKeyTimeoutForKeyPressL(
+             const TKeyEvent& aKeyEvent, TEventCode aType );
+        /**
+        * Called when any key is pressed.
+        * If timeout notifier for +#key is active, make calculation or
+        * stop notifier according to user's input.
+        * @param aKeyEvent : The key event
+        * @param aType     : The type of the event
+        * @return : If ETrue, the key event is used only for +#key timeout.
+        *           If EFalse, the key event is used not only for +#key 
+        *           timeout but also for other effect of each key. 
+        */
+        TBool HandleShiftKeyTimeoutForKeyPressL(
+             const TKeyEvent& aKeyEvent, TEventCode aType );    
+
+    private:  // Functions from base classes 
+        /**
+        * From CCoeControl : Return count of controls contained in a compound control.
+        * @return Count of controls contained in a compound control 
+        */
+        TInt CountComponentControls() const;
+        
+        /**
+        * From CCoeControl : Get the components of a compound control
+        * @param aIndex : index of control
+        * @return Control of argument aIndex  
+        */
+        CCoeControl* ComponentControl(TInt aIndex) const;
+        
+        /**
+        * From CCoeControl : Handling key event
+        * @param aKeyEvent : The key event
+        * @param aType     : The type of the event
+        * @return EKeyWasConsumed    : Key event is used. 
+        *         EKeyWasNotConsumed : Key event is not used.
+        */
+        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, 
+                                    TEventCode aType);
+
+        /**
+        * From CCoeControl : Notifier for changing language
+        * @param aType : Type of resource change
+        */
+        void HandleResourceChange(TInt aType);
+        
+        /**
+        * @param aType : Type of resource change
+        */
+        void HandleResourceChangeCalSoftL(TInt aType);
+ 
+        /**
+        * From CCoeControl : Control size is set.
+        */
+        void SizeChanged();
+
+        /**
+        * From CCoeControl : Clear whole rectangle. 
+        * @param aRect : rectangle of control
+        */
+        void Draw(const TRect& aRect) const;
+
+        /**
+        * From CCoeControl.
+        * Pass skin information if need.
+        * @param aId : Type of supplied object.
+        */
+        TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+         /**
+        * From CCoeControl : Handling pointer event
+        * @param aKeyEvent : The key event
+        * 
+        */
+        void HandlePointerEventL
+                ( const TPointerEvent& aKeyEvent );
+
+    private:    // Data
+        CCalcEditorSubPane*  iEditorPane;  // Editor subpane 
+        CCalcFuncmapSubPane* iFuncmapPane; // FunctionMap subpane
+        CCalcOutputSheet*    iSheetPane;   // OutputSheet
+        CCalcView*           iView;        // Calculator view 
+        CCalcDocument*       iCalcDocument;
+        CPeriodic*           iTimeout;     // For handling *-key
+       
+        CPeriodic*           iTimeoutChr;     // For handling */key
+        CPeriodic*           iTimeoutShift;     // For handling +#key   
+
+        TUint                iPrevInput;   // Key code of previous input
+        CAknsBasicBackgroundControlContext* iSkinContext; // skin data
+        TInt iValue ; 
+    };
+
+#include "CalcCont.inl"
+
+#endif      //  CALCCONT_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcCont.inl	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2002 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:  Implemented all inline functions for CCalcContainer.  
+*
+*/
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CCalcContainer::FuncmapSubPane
+// Return pointer of FunctionMap subpane class
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CCalcFuncmapSubPane* CCalcContainer::FuncmapSubPane() const
+    {
+    return iFuncmapPane;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::EditorPane
+// Return pointer of editor subpane.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CCalcEditorSubPane* CCalcContainer::EditorPane() const
+    {
+    return iEditorPane;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::OutputSheet
+// Return pointer of OutputSheet.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CCalcOutputSheet* CCalcContainer::OutputSheet() const
+    {
+    return iSheetPane;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::View
+// Return pointer of CCalcView.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CCalcView* CCalcContainer::View() const
+    {
+    return iView;
+    }
+
+
+	//EISkin2.6
+// ---------------------------------------------------------
+// CCalcContainer::FunctionSubPane
+// Gets the function subpane when the skin changes.
+// ---------------------------------------------------------
+//
+inline CCalcFuncmapSubPane* CCalcContainer::FunctionSubPane()const
+{
+	return iFuncmapPane;
+}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcDoc.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,233 @@
+/*
+* Copyright (c) 2002 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:  Document class, CCalcDocument
+*                Derived from CEikDocument
+*                The history of inputted data is held.
+*                The memory of four-arithmetical-operations operation 
+*                or a calculation result is held.
+*                The last result and memory are saved at a file and 
+*                it restores.
+*
+*/
+
+
+#ifndef     CALCDOC_H
+#define     CALCDOC_H
+
+
+//  INCLUDES
+#include <eikdoc.h>
+
+#include "CalcEditline.h"
+
+#include "CalcView.h"
+//  CONSTANTS
+const TInt KCalcErrEditorSpaceFull(-10000); 
+
+//  FORWARD DECLARATIONS
+
+class  CEikAppUi;
+class  CCalcHistory;
+class  CCalcAppEnv;
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcDocument : 'Document' class
+*/
+class   CCalcDocument 
+        :public CEikDocument
+    {
+    public:  // Constructors and destructor  
+        /**
+        * Two-phased constructor.
+        * @param aApp : Reference of CEikApplication class 
+        */
+        static CCalcDocument* NewL(CEikApplication& aApp);
+
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcDocument();
+
+        
+    public:  // New functions
+		/**
+        * Set the pointer to CalcAppEnv. 
+        */
+		void SetAppEnv(CCalcAppEnv* aCalcAppEnv);
+
+        /**
+        * Set the pointer to CalcAppEnv. 
+        */		
+        void SetCalcView( CCalcView* aCCalcView );
+        
+		/**
+        * Make calculation, and add result to calcluation history.
+        * Leave may occur, causes KErrOverflow or KErrDivideByZero or KErrNotSupported (negative value with square root).
+        * @param aOperand : operand.
+        * @param aLine : inputted edit line
+        * @return TReal64: Provisional result.
+        */
+        TReal64 CalculateAndAddHistoryL(
+                TReal64 aOperand,
+               const TCalcEditLine& aLine);  
+		
+		/**
+        * Make calculation, nothing is added to the calculation history.
+        * Leave may occur, causes KErrOverflow or KErrDivideByZero or KErrNotSupported (negative value with square root).
+        * @param aOperand : operand.
+        * @param aLine : inputted edit line
+        * @return TReal64: Provisional result.
+        */
+		TReal64 CalculateAndNoHistoryL(
+				TReal64 aOperand,
+               const TCalcEditLine& aLine);  
+
+		/**
+        * Make calculation, and modify the operator
+		* before adding anything to the calculation history.
+        * Leave may occur, causes KErrOverflow or KErrDivideByZero or KErrNotSupported (negative value with square root).
+        * @param aOperand : operand.
+        * @param aLine : inputted edit line
+        * @return TReal64: Provisional result.
+        */
+		TReal64 CalculateAndModifyHistoryL(
+				TReal64 aOperand,
+               TCalcEditLine& aLine,
+			   TCalcEditLine::TCalcOperatorType aOperator); 
+
+        /**
+        * Add a line which is "= (provisional result)" to calculation history.
+        * And Last Result is updated to provisional result
+        */
+        void AddEqualLineAndUpdateLastResultL();
+
+        /**
+        * Empty line is added to calculation history.
+        */
+        void AddEmptyLine();
+        
+        /**
+        * Memory is saved.
+        * @param aNewMemory : New memory, current operand.
+        */
+        void MemorySaveL(TReal64 aNewMemory); 
+
+        /**
+        * Memory is saved.
+        * @param aLine : Current value of editor
+        */
+        TBool HasMemory() const;
+
+        /**
+        * Return current memory.
+        * @return TReal64 : current memory.
+        */
+        TReal64 Memory() const; 
+
+        /**
+        * Clear memory.
+        */
+        void MemoryClearL();
+        
+        /**
+        * Return last result
+        * @param TReal64 : Last result.
+        */
+        TReal64 LastResult() const;  
+
+        /**
+        * Return provisional result
+        * @param aLine : For getting provisional result.
+        */
+        TReal64 ProvisionalResult() const;
+
+        /**
+        * Return pointer of CCalcHistory class. 
+        * @return Pointer of CCalcHistory class
+        */
+        CCalcHistory* History() const;
+        
+        /**
+        * Restore memory and last result
+        */
+        void LoadStateL();
+        
+        /**
+        * Store memory and last result
+        */
+		void SaveStateL();
+        
+    private:   //  New functions
+        /**
+        * By default constructor is private.
+        * @param aApp: Reference of CEikApplication class
+        */
+        CCalcDocument(CEikApplication& aApp); 
+
+        /**
+        * Second-phase constructor
+        */
+        void ConstructL();
+
+        /**
+        * Make calculation by using argument aLine 
+        * Leave may occur, causes KErrOverflow or KErrDivideByZero.
+        * @param aOperand : operand
+        * @param aOperator : Operator type enum.
+        * @return Result of calculation
+        */
+        TReal64 CalculateL(TReal64 aOperand,
+            TCalcEditLine::TCalcOperatorType aOperator);
+        
+        /**
+        * Check overflow and underflow 
+        * Leave may occur, causes KErrOverflow
+        * @param aResult : result of calculation
+        */
+        void CheckResultL(TReal64* aResult);  
+
+        /**
+        * Write last result and memory to document file.
+        * @param aStream : Interface of write steam
+        */
+        void ExternalizeL(RWriteStream& aStream) const;
+        
+        /**
+        * Read last result and memory from document file.
+        * @param aStream : Interface of read steam
+        */
+        void InternalizeL(RReadStream& aStream);
+
+        
+    private:  // Functions from base classes  
+        /**
+        * From CEikDocument : Create CCalcAppUi object
+        */
+        CEikAppUi* CreateAppUiL();  
+
+    private:    // Data
+	    CCalcAppEnv* iCalcAppEnv;  // Not own
+        TReal64 iProvisionalResult; // Provisional result
+        TReal64 iMemory;        // Memory
+        TReal64 iLastResult;    // Last result
+        CCalcHistory* iHistory; // History
+        CCalcView* iCCalcView;  // Not own
+    };
+
+#endif      //  CALCDOC_H
+            
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcDrawingConst.laf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,181 @@
+/*
+* ============================================================================
+*  Name        : CalcDrawingConst.laf
+*  Part of     : Calcsoft / Calcsoft.app
+*  Interface   : ?Interface_category, ?Interface_name
+*  Description : This file contains constants for drawing.
+*  Version     :
+*
+*  Copyright © 2002 Nokia Corporation.
+*  This material, including documentation and any related 
+*  computer programs, is protected by copyright controlled by 
+*  Nokia Corporation. All rights are reserved. Copying, 
+*  including reproducing, storing, adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
+* ============================================================================
+*/
+
+#ifndef     CALCDRAWINGCONST_HRH
+#define     CALCDRAWINGCONST_HRH
+
+//  CONSTANTS
+
+// ==============================
+// Following is constants for drawing.
+// ==============================
+//
+
+//d:Whole rectangle of Editor SubPane.
+//l:main_pane_1
+//
+#define CALC_DRAWCONST_EDITOR_TOPLEFT_X      3
+#define CALC_DRAWCONST_EDITOR_TOPLEFT_Y      146
+#define CALC_DRAWCONST_EDITOR_WIDTH          170
+#define CALC_DRAWCONST_EDITOR_HEIGHT         32
+
+//d:Whole rectangle of Output Sheet.
+//l:main_pane_2
+//
+#define CALC_DRAWCONST_OSHEET_TOPLEFT_X      3 
+#define CALC_DRAWCONST_OSHEET_TOPLEFT_Y      8
+#define CALC_DRAWCONST_OSHEET_WIDTH          108
+#define CALC_DRAWCONST_OSHEET_HEIGHT         130
+
+//d:Whole rectangle of FunctionMap SubPane.
+//l:main_pane_4
+//
+#define CALC_DRAWCONST_FUNCMAP_TOPLEFT_X     113 
+#define CALC_DRAWCONST_FUNCMAP_TOPLEFT_Y     5 
+#define CALC_DRAWCONST_FUNCMAP_WIDTH         60 
+#define CALC_DRAWCONST_FUNCMAP_HEIGHT        134 
+
+//d:LAF data for drawing number shadow of editor.
+//l:main_pane_1
+//
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_FONTID       KScreenFontUidAcalc21
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_CUSTOMFONT   EFontCustom         
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_COLOR        219
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_LMARGIN      47 
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_RMARGIN      8
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_BASELINE     172
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_WIDTH        121
+#define CALC_DRAWCONST_EDITOR_NUMBER_SHADOW_J            ELayoutAlignRight
+
+//d:LAF data for drawing number of editor.
+//l:main_pane_2
+//
+#define CALC_DRAWCONST_EDITOR_NUMBER_FONTID            KScreenFontUidAcalc21 
+#define CALC_DRAWCONST_EDITOR_NUMBER_CUSTOMFONT        EFontCustom         
+#define CALC_DRAWCONST_EDITOR_NUMBER_COLOR             210
+#define CALC_DRAWCONST_EDITOR_NUMBER_LMARGIN           46 
+#define CALC_DRAWCONST_EDITOR_NUMBER_RMARGIN           9
+#define CALC_DRAWCONST_EDITOR_NUMBER_BASELINE          171
+#define CALC_DRAWCONST_EDITOR_NUMBER_WIDTH             121
+#define CALC_DRAWCONST_EDITOR_NUMBER_J                 ELayoutAlignRight
+
+//d:LAF data for drawing operator shadow of editor.
+//l:main_pane_3
+//
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_FONTID        KScreenFontUidAco21
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_CUSTOMFONT    EFontCustom         
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_COLOR         219
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_LMARGIN       21 
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_RMARGIN       142
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_BASELINE      172
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_WIDTH         13  
+#define CALC_DRAWCONST_EDITOR_OPERATOR_SHADOW_J             ELayoutAlignLeft
+
+//d:LAF data for drawing operator of editor.
+//l:main_pane_4
+//
+#define CALC_DRAWCONST_EDITOR_OPERATOR_FONTID            KScreenFontUidAco21
+#define CALC_DRAWCONST_EDITOR_OPERATOR_CUSTOMFONT        EFontCustom         
+#define CALC_DRAWCONST_EDITOR_OPERATOR_COLOR             215
+#define CALC_DRAWCONST_EDITOR_OPERATOR_LMARGIN           20 
+#define CALC_DRAWCONST_EDITOR_OPERATOR_RMARGIN           143
+#define CALC_DRAWCONST_EDITOR_OPERATOR_BASELINE          171
+#define CALC_DRAWCONST_EDITOR_OPERATOR_WIDTH             13  
+#define CALC_DRAWCONST_EDITOR_OPERATOR_J                 ELayoutAlignLeft
+    
+//d:LAF data for drawing memory indicator shadow of editor.
+//l:main_pane_5
+//
+#define CALC_DRAWCONST_EDITOR_M_INDI_SHADOW_FONTID    ELatinBold12
+#define CALC_DRAWCONST_EDITOR_M_INDI_SHADOW_COLOR     219  
+#define CALC_DRAWCONST_EDITOR_M_INDI_SHADOW_LMARGIN   8
+#define CALC_DRAWCONST_EDITOR_M_INDI_SHADOW_RMARGIN   156 
+#define CALC_DRAWCONST_EDITOR_M_INDI_SHADOW_BASELINE  160
+#define CALC_DRAWCONST_EDITOR_M_INDI_SHADOW_WIDTH     12 
+#define CALC_DRAWCONST_EDITOR_M_INDI_SHADOW_J         ELayoutAlignLeft
+
+//d:LAF data for drawing memory indicator of editor.
+//l:main_pane_6
+//
+#define CALC_DRAWCONST_EDITOR_M_INDI_FONTID         ELatinBold12
+#define CALC_DRAWCONST_EDITOR_M_INDI_COLOR          35  
+#define CALC_DRAWCONST_EDITOR_M_INDI_LMARGIN        7
+#define CALC_DRAWCONST_EDITOR_M_INDI_RMARGIN        157 
+#define CALC_DRAWCONST_EDITOR_M_INDI_BASELINE       159
+#define CALC_DRAWCONST_EDITOR_M_INDI_WIDTH          12
+#define CALC_DRAWCONST_EDITOR_M_INDI_J              ELayoutAlignLeft
+
+//d:LAF data for drawing operand of OutputSheet.
+//l:main_pane_7
+//
+#define CALC_DRAWCONST_OSHEET_OPERAND_FONTID           ELatinBold13
+#define CALC_DRAWCONST_OSHEET_OPERAND_COLOR            215
+#define CALC_DRAWCONST_OSHEET_OPERAND_LMARGIN          19
+#define CALC_DRAWCONST_OSHEET_OPERAND_RMARGIN          71
+#define CALC_DRAWCONST_OSHEET_OPERAND_BTMLINE_BASELINE 126
+#define CALC_DRAWCONST_OSHEET_OPERAND_LINE_HEIGHT      17
+#define CALC_DRAWCONST_OSHEET_OPERAND_WIDTH            86 
+#define CALC_DRAWCONST_OSHEET_OPERAND_J                ELayoutAlignRight
+
+//d:LAF data for drawing operator of OutputSheet.
+//l:main_pane_8
+//
+#define CALC_DRAWCONST_OSHEET_OPERATOR_FONTID           KScreenFontUidAco13
+#define CALC_DRAWCONST_OSHEET_OPERATOR_CUSTOMFONT       EFontCustom         
+#define CALC_DRAWCONST_OSHEET_OPERATOR_COLOR            215  
+#define CALC_DRAWCONST_OSHEET_OPERATOR_LMARGIN          11
+#define CALC_DRAWCONST_OSHEET_OPERATOR_RMARGIN          157 
+#define CALC_DRAWCONST_OSHEET_OPERATOR_BTMLINE_BASELINE 126
+#define CALC_DRAWCONST_OSHEET_OPERATOR_LINE_HEIGHT      17
+#define CALC_DRAWCONST_OSHEET_OPERATOR_WIDTH            8
+#define CALC_DRAWCONST_OSHEET_OPERATOR_J                ELayoutAlignCenter
+
+//d:LAF data for drawing eqaul line of OutputSheet.
+//l:main_pane_3
+//
+#define CALC_DRAWCONST_OSHEET_EQUALLINE_COLOR          107
+#define CALC_DRAWCONST_OSHEET_EQUALLINE_TOPLEFT_X      9
+#define CALC_DRAWCONST_OSHEET_EQUALLINE_BTM_TOPLEFT_Y  112
+#define CALC_DRAWCONST_OSHEET_EQUALLINE_LINE_HEIGHT    17 
+#define CALC_DRAWCONST_OSHEET_EQUALLINE_WIDTH          96
+#define CALC_DRAWCONST_OSHEET_EQUALLINE_HEIGHT         1
+
+//d:Whole rectangle of Functionmap button.
+//l:cell_calc_pane_4
+//
+#define CALC_DRAWCONST_FUNCMAP_LEFT_BUTTON_TOPLEFT_X    0
+#define CALC_DRAWCONST_FUNCMAP_RIGHT_BUTTON_TOPLEFT_X   30
+#define CALC_DRAWCONST_FUNCMAP_TOP_BUTTON_TOPLEFT_Y     0
+#define CALC_DRAWCONST_FUNCMAP_BUTTON_OFFSET            27
+#define CALC_DRAWCONST_FUNCMAP_BUTTON_WIDTH             30
+#define CALC_DRAWCONST_FUNCMAP_BUTTON_HEIGHT            26 
+
+//d:LAF data for drawing cursor of FunctionMap.
+//l:cell_calc_pane_4
+//
+#define CALC_DRAWCONST_FUNCMAP_CURSOR_COLOR      215
+#define CALC_DRAWCONST_FUNCMAP_CURSOR_TOPLEFT_X  0
+#define CALC_DRAWCONST_FUNCMAP_CURSOR_TOPLEFT_Y  0
+#define CALC_DRAWCONST_FUNCMAP_CURSOR_WIDTH      30
+#define CALC_DRAWCONST_FUNCMAP_CURSOR_HEIGHT     26
+
+#endif      //  CALCDRAWINGCONST_HRH
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcEdit.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,267 @@
+/*
+* Copyright (c) 2002 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:  Header file of "editor sub-pane", CCalcEditorSubPane class 
+*                which derived from CCoeControl class. Role of this class 
+*                is to draw editor.
+*
+*/
+
+
+#ifndef     CALCEDIT_H
+#define     CALCEDIT_H
+
+
+//  INCLUDES
+#include <coecntrl.h>
+#include <AknUtils.h>  // for TAknLayoutRect
+
+#include "CalcView.h"
+#include "CalcEnv.h"
+#include <PtiDefs.h>
+#include <centralrepository.h>
+#include <cenrepnotifyhandler.h>
+#include <e32property.h> 
+#endif
+
+//  CONSTANTS
+const TInt KCalcCountOfEditorComponent(6);
+_LIT(KAllowedDecimal, ".,");
+
+//  FORWARD DECLARATIONS
+class CCalcContainer;
+class   CPtiEngine;
+class   CPtiQwertyKeyMappings;
+class 	CPtiCoreLanguage;
+//class CCalcAppEnv;
+#ifdef RD_INTELLIGENT_TEXT_INPUT 
+class   CPtiHalfQwertyKeyMappings;
+#endif
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcEditorSubPane : 'Editor Sub-Pane' class
+*/
+
+class   CCalcEditorSubPane
+        :public CCoeControl
+    {
+    // Enlarge size for rect.
+    public:
+         enum  RectEnlargeSizeID
+            {
+               EEnlargeFive = 5,   
+               EEnlargeTwenty = 20
+            };
+            
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aContainer : Pointer of CCalcContainer class 
+        */
+        static CCalcEditorSubPane* NewL(CCalcContainer* aContainer); 
+       
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcEditorSubPane();
+        
+        
+    public:     // New functions
+        /**
+        * Return curent value of editor
+        * @return Reference of TCalcEditLine : curent value of editor
+        */
+        const TCalcEditLine& EditLine() const; 
+
+        /**
+        * Set operator to editor.
+        * @param aType : new operator type.  
+        */
+        void SetOperator(TCalcEditLine::TCalcOperatorType aType);
+
+        /**
+        * Set TReal64 type editor number.
+        * @param aNewNumber : new editor number.  
+        */
+        void SetEditorNumber(TReal64 aNewNumber);
+        
+        /**
+        * Return curent editor number.
+        * @return TReal64 type editor number.
+        */
+        TReal64 EditorNumber() const;
+        
+        /**
+        * Number of editor is set "0" and operator is set none.  
+        */
+        void ResetL();
+        
+        /**
+        * Operand of editor is erased.
+        */
+        void ClearOperand();
+        
+        /**
+        * Clear latest input from editor. 
+        */
+        void ClearLastInputL();
+        
+        /**
+        * Handle short-press-clear-key and CBA-clear-key event.
+        */
+        void OfferShortPressClearKeyEventL();
+
+        /**
+        * Changing sign.
+        * @param aState : Current state of Calculator
+        */
+        void DoChangeSignL(CCalcView::TStateNo aState);
+
+        /**
+        * Update editor number to memory or last result.
+        * @param aMemory : memory or last result
+        * @param aState : Current state of Calculator
+        */
+        void DoMemoryRecallOrLastResult(
+             TReal64 aMemoryOrLastResult, 
+             CCalcView::TStateNo aState);
+
+        /**
+        * Notify changing decimal separator.
+        * @param aOld : Old decimal separator
+        * @param aNew : New decimal separator  
+        */
+        void NotifyChangeDecimal(TChar aOld, TChar aNew);
+        
+        /**
+        * Gets the layout of the EditPane.
+        * Used for touch support.
+        */
+        TRect EditPaneRect();
+        
+        /**
+        * HandlePointerEventL
+        * Handles pen inputs of Editor pane.
+        */
+        void HandlePointerEventL(const TPointerEvent& aPointerEvent );
+        
+    public: // Functions from base classes
+        /**
+        
+        /**
+        * Called to find key pad is Active.
+        * 
+        */
+        TInt IsQwertyKeypadActive();
+        
+        /* From CCoeControl : Handling key event
+        * @param aKeyEvent : The key event
+        * @param aType : The type of the event
+        * @return EKeyWasConsumed : Key event is used.
+        *         EKeyWasNotConsumed : Key event is not used.
+        */
+        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);       
+
+		/**
+		 * Refresh the display bitmap when the skin change event has occured.
+		 */
+				inline void RefreshDisplaySideLBitmap();
+     			inline void RefreshDisplayCenterBitmap();
+     			inline void RefreshDisplaySideRBitmap();
+          
+    private:    // NewFunctions
+        /**
+        * C++ default constructor.
+        */
+        CCalcEditorSubPane();
+       
+        /**
+        * Second-phase constructor.
+        * @param aContainer : Pointer of CCalcContainer class 
+        */
+        void ConstructL(CCalcContainer* aContainer);
+
+        /**
+        * Delete the latest input
+        */
+        void ClearL();    // Delete the latest input
+
+    private: // Functions from base classes
+        /**
+        * From CCoeControl : Size of control is set. 
+        */
+        void SizeChanged();
+
+        /**
+        * From CCoeControl : Draw editor
+        * @param aRect : rectangle of editor space.
+        */
+        void Draw(const TRect& aRect) const;  
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        TBool MapDecimal( TKeyEvent aKeyEvent ); 
+#else
+        TBool MapDecimal(TPtiKey aKey, TPtiTextCase aCase); 
+#endif
+
+    private:    // Data
+       
+      	const CGulIcon* iCalcSideLDisplay;
+      	const CGulIcon* iCalcCenterDisplay;
+      	const CGulIcon* iCalcSideRDisplay;
+		TAknLayoutRect iSideLDisplayLayout;
+	    TAknLayoutRect iCenterDisplayLayout;
+	    TAknLayoutRect iSideRDisplayLayout;
+      	  
+        CCalcContainer* iCalcContainer;  // Not own
+        CCalcAppEnv*    iCalcAppEnv;     // Not own 
+        TCalcEditLine   iEditLine;  // editor data
+        TReal64         iEditorNumber;
+        TInt 			iIsQwertyActive;
+        CPtiEngine*     iEngine;
+        CRepository* 	iCRKey;
+        CPtiCoreLanguage* iCoreLanguage;
+        CPtiQwertyKeyMappings* iQwertyKeyMappings;
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        CPtiHalfQwertyKeyMappings* iHalfQwertyKeyMappings;
+#endif
+        TInt 			iLanguage;
+
+        TInt            iUiLanguage;
+        TBuf<256> 		iAllowedDecimal;
+        RProperty       iQwertyModeStatusProperty; // To check the Qwerty keypad active 
+        TInt			iDecimalCounter;
+        
+        TInt            iKeyboardType;
+     public:
+     	void IsQwertyActive();
+     	void IsQwertyNotActive(); 
+     private:   
+        enum TCalcEditorComponentIndex
+            {
+            ECalcEditorOperandShadow,
+            ECalcEditorOperand,
+            ECalcEditorMemoryShadow,
+            ECalcEditorMemory,
+            ECalcEditorOperatorShadow,
+            ECalcEditorOperator
+            };
+        TAknLayoutText iLayoutText[KCalcCountOfEditorComponent]; 
+                     // Layout of each drawing component.
+    };
+
+#include "CalcEdit.inl"
+            
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcEdit.inl	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2002 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:  Implemented all inline functions for CCalcEditorSubPane.  
+*
+*/
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+inline void CCalcEditorSubPane::RefreshDisplaySideLBitmap()
+{
+	 iCalcSideLDisplay = iCalcAppEnv->DisplaySideLBitmap();
+}
+
+
+inline void CCalcEditorSubPane::RefreshDisplayCenterBitmap()
+{
+	 iCalcCenterDisplay = iCalcAppEnv->DisplayCenterBitmap();
+}
+
+
+inline void CCalcEditorSubPane::RefreshDisplaySideRBitmap()
+{
+	 iCalcSideRDisplay = iCalcAppEnv->DisplaySideRBitmap();
+}
+
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcEditLine.inl	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2002 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:  Define inline functions of CCalcEditLine.
+*
+*/
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// TCalcEditLine::NumberString
+// Return string of operand
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const TPtrC TCalcEditLine::NumberString() const 
+    {
+    return  iNumber;
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::Operator
+// Return type of operator
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline TCalcEditLine::TCalcOperatorType TCalcEditLine::Operator() const
+    {
+    return  iOperator;
+    }
+
+
+// ---------------------------------------------------------
+// TCalcEditLine::SetOperator
+// This function exists to handle Add, Subtract, Multiply, Divide command.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline void TCalcEditLine::SetOperator
+                (const TCalcOperatorType& aType)    
+    {
+    iOperator = aType;
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcEditline.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2002 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:  Helper class used by CalcDocument,CCalcContainer etc., 
+*                TCalcEditLine.
+*                The numerical value and the character sequence of the real 
+*                number are held. Addition of a numerical character sequence 
+*                and which clear operation are performed.
+*
+*/
+
+
+#ifndef     CALCEDITLINE_H
+#define     CALCEDITLINE_H
+
+
+//  INCLUDES
+#include <e32std.h>
+
+
+//  Define maximum charactor number per line
+const TInt KCalcMaxDigits(8);
+const TInt KCalcMaxNumberWidth(11);
+const TInt KCalcMaxEditNumberWidth( 10 );
+
+//  CLASS DEFINITIONS 
+
+/**
+TCalcEditLine is Calculation data class.
+A line data for 'Editor Sub-Pane'
+*/
+class   TCalcEditLine
+    {
+    public:
+        enum TCalcOperatorType
+            {
+            ECalcAdd,
+            ECalcSubtract,
+            ECalcMultiply,
+            ECalcDivide,
+            ECalcEqual,
+			ECalcSqrt,
+			ECalcPercent,
+            ECalcOperatorNone
+            };    
+
+    public:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        */
+        TCalcEditLine(); 
+        
+        /**
+        * Destructor.
+        */
+        virtual ~TCalcEditLine(); 
+        
+        /**
+        * Copy constructor.
+        */
+        TCalcEditLine(const TCalcEditLine& aEditLine); 
+        
+        /**
+        * Assignment operator
+        */
+        const TCalcEditLine&  operator=(const TCalcEditLine& aEditLine);  
+
+    public:     // New functions
+        /**
+        * Return string of number 
+        * @return String of number.
+        */
+        inline const TPtrC NumberString() const;
+        
+        /**
+        * Clear a line
+        */
+        void AllClear();
+        
+        /**
+        * Delete last 1 digit from a line
+        */
+        void ClearL();
+        
+        /**
+        * Clear number from a line
+        */
+        void ClearOperand();
+        
+        /**
+        * Return number of a line  
+        * @return TReal64 : Operand of a line
+        */
+        TReal64 NumberL() const;
+        
+        /**
+        * Parameter aNumber is set to a line 
+        * @param aNumber 
+        */
+        void SetNumber(TReal64 aNumber);
+        
+        /**
+        * Append a charactor to number.
+        * Leave may occur, KCalcErrEditorSpaceFull.
+        * @param aInput : A input which is Appended 
+        */
+        void AppendL(TChar aInput);
+        
+		/**
+		* Append any character to number before it is 
+		* displayed inthe output sheet.
+		* Leave may occur, KCalcErrEditorSpaceFull.
+        * @param aInput : A char which is Appended 
+        */
+	    void AppendNumberStringL(TChar aChar);
+
+        /**
+        * Change sign of number
+        */
+        void ChangeSignL();
+        
+        /**
+        * If number of editor is "iii.ddd000...", set number "iii.ddd".
+        * Example: 
+        *  Number of editor is "12",  number editor is set "12".
+        *  Number of editor is "12." or "12.000...", number editor is set "12".
+        *  Number of editor is "12.27", number editor is set "12.27".
+        *  Number of editor is "12.27000...", number editor is set "12.27".
+        * @param aLine : current editor
+        */
+        void TrimZeroL();  
+        
+        /**
+        * Return operator type of a line.
+        * @return TCalcOperatorType : ECalcAdd || ECalcSubtract || 
+                                      ECalcMultiply || ECalcDivide ||
+                                      ECalcEqual || ECalcOperatorNone
+        */
+        inline TCalcOperatorType Operator() const;
+        
+        
+        /**
+        * Set operator to a line
+        * @param aType : operator enum
+        */
+        inline void SetOperator(const TCalcOperatorType& aType);
+
+        /**
+        * Check whether buffer of editline is "0" or not. 
+        * @return ETrue :buffer of editline is "0".
+        *         EFalse:buffer of editline is not "0".
+        *         (Ex) If buffer is "0", return ETrue.
+        *              If buffer is "0.0" or "2", return EFalse. 
+        */
+        TBool CheckZeroL() const;
+
+        /**
+        * Changing decimal separator.
+        * @param aOld : Old decimal separator
+        * @param aNew : New decimal separator  
+        */
+        void ChangeDecimal(TChar aOld, TChar aNew);
+         
+
+    private:    // New functions
+        /**
+        * Return count of digits.
+        * @param aNumber : String of number
+        * @return Count of digits. 
+        *         E.g argument aNumber is "-226.89", return value is 5.
+        */
+        TInt NumberDigits() const;
+
+    private:    // Data
+        TBuf<KCalcMaxNumberWidth> iNumber; // Operand of a line
+        TCalcOperatorType   iOperator; // Operator of a line 
+    };
+
+#include "CalcEditLine.inl"
+
+#endif  // __CALCEDITLINE_H__
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcEnv.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,322 @@
+/*
+* Copyright (c) 2002 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:  Calculator environment class, CCalcAppEnv
+*                Derived from CBase
+*                This class maintain global data. e.g font, bitmap.
+*
+*/
+
+
+#ifndef     CALCENV_H
+#define     CALCENV_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <badesca.h>
+#include <gulicon.h>  
+#include <eikenv.h>
+
+//Extended Icon Skin Implementation
+#include <AknsConstants.h>
+#include "CalcFunc.h"
+#include "CalcEditline.h"
+#include <AknUtils.h>
+
+// CONSTANTS
+const  TInt  KMaxMemoryIndicatorLength(4);
+const  TInt  KCalcCountOfOperatorType( 10 ); // +,-,*,/,=, sqrt, % , none ,* and /. 
+//Extended Icon Skin implementation.
+const  TInt KCalcAknsConstCount(26);
+const  TInt  KCalcCountOfButtonPressed(10);
+const  TInt  KCalcCountOfButtonInactive(16);
+const  TInt  KCountOfBitmaps(9);
+
+
+//  FORWARD DECLARATIONS
+class CCalcAppUi;
+class CFont;
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcAppEnv : Maintains global data.
+*/
+class   CCalcAppEnv 
+        : public CBase
+    {
+    public:  // Constructors and destructor
+		//Button Type
+		//Extended Icon Skin Implementation
+		enum ButtonType {EPRESSED, ENORMAL, EACTIVE_INACTIVE};
+
+
+        /**
+        * Two-phased constructor.
+        * @param aApp : Pointer of CCalcAppUi class 
+        */
+        static CCalcAppEnv* NewL(CCalcAppUi* aAppUi);
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcAppEnv();
+        
+    public:     // New functions
+        /**
+        * Return pointer of CCalcAppEnv class  
+        * @return Pointer of CCalcAppEnv class
+        */
+        static CCalcAppEnv* Static();
+
+        
+        /**
+        * Return pointer of CCalcAppUi class
+        * @return Pointer of CCalcAppUi class
+        */
+        inline CCalcAppUi* AppUi() const;
+        
+        /**
+        * Return charactor for editor operator  
+        * @param Operator type enum
+        */
+        inline const TPtrC EditorOperator(
+            const TCalcEditLine::TCalcOperatorType aType) const;
+
+        /**
+        * Return charactor for OutputSheet operator  
+        * @param Operator type enum
+        */
+        inline const TPtrC OutSheetOperator(
+            const TCalcEditLine::TCalcOperatorType aType) const;
+        
+        /**
+        * Return decimal separator. 
+        * @return Decimal separator, e.g "."
+        */
+        inline const TChar DecimalSeparator() const;
+        
+        /**
+        * Set new decimal separator. 
+        * @param aChar: New decimal separator, e.g "."
+        */
+        inline void SetDecimalSeparator(TChar aChar);
+        
+        /**
+        * Return minus indicator. 
+        * @return minus indicator, e.g "-"
+        */
+        inline const TChar MinusIndicator() const;
+
+        /**
+        * Return memory indicator. 
+        * @return memory indicator, e.g "M".
+        */
+        inline TPtrC MemoryIndicator() const;
+        
+        /**
+        * Return shadow of memory indicator. 
+        * @return memory indicator, e.g "M".
+        */
+        inline TPtrC MemoryIndicatorShadow() const;
+        
+        /**
+        * Return font for number shadow in editor.
+        * @return Font for number shadow in editor
+        */
+        inline const CFont* NumberShadowFont() const;
+
+        /**
+        * Return font for number in editor.
+        * @return Font for number in editor
+        */
+        inline const CFont* NumberFont() const;
+
+        /**
+        * Return font for operator shadow in editor.
+        * @return Font for operator shadow in editor
+        */
+        inline const CFont* OperatorShadowFont() const;
+
+        /**
+        * Return font for operator in editor.
+        * @return Font for operator in editor
+        */
+        inline const CFont* OperatorFont() const;
+
+        /**
+        * Return font for operator in OutputSheet.
+        * @return Font for operator in OutputSheet
+        */
+        inline const CFont* OutSheetOperatorFont() const;
+
+        /**
+        * Return 'qsn_fr_calc_display_side_l' 'qsn_fr_calc_display_center.svg' 
+		  and 'qsn_fr_calc_display_side_r 'Bitmap pointers.
+        */
+		    inline const CGulIcon* DisplaySideLBitmap() const;
+    	    inline const CGulIcon* DisplayCenterBitmap() const;
+    	    inline const CGulIcon* DisplaySideRBitmap() const;		
+    
+        
+        /**
+        * Return 'qgn_indi_calc_paper' Bitmap pointer.
+        * @return 'qgn_indi_calc_paper' Bitmap pointer.
+        */
+        inline const CGulIcon* PaperBitmap() const;
+
+		/**
+        * Return 'qgn_fr_calc_paper' Bitmap pointers.
+        * @return 'qgn_fr_calc_paper' Bitmap pointers.
+        */
+		inline void ScalablePaperBitmaps(const CGulIcon* [])const;
+
+        /**
+        * Return 'qgn_graf_calc_results_line' Bitmap pointer.
+        * @return 'qgn_graf_calc_results_line' Bitmap pointer.
+        */
+		inline const CGulIcon* ResultsLineBitmap()const;
+
+        /**
+        * Return unpressed bitmap of correspondent index
+        * @param aIndex : index of bitmap array
+        * @return : Bitmap pointer.
+        */
+        inline CGulIcon* UnpressedButtonBmp(
+            const TInt aIndex) const;
+
+        /**
+        * Return pressed bitmap of correspondent index
+        * @param aIndex : index of bitmap array
+        * @return : Bitmap pointer.
+        */
+        inline CGulIcon* PressedButtonBmp(
+            const TInt aIndex) const;
+
+        /**
+        * Return inactive bitmap of correspondent index
+        * @param aIndex : index of bitmap array
+        * @return : Bitmap pointer. If return value is NULL,
+        *          no bitmap exists on correspondent index.
+        */
+        inline CGulIcon* InactiveButtonBmp(
+            const TInt aIndex) const;
+
+		/**
+		* To load the functionmap bitmaps when the skin change event  has occured.
+		*/
+		void LoadFuncMapBitmapSkinChangeL();
+		
+		        /**
+        * Load bitmaps for FunctionMap SubPane.
+        */
+        void LoadFuncMapBitmapL();
+
+        /*update the array when function map changed*/
+        void UpdateAknConstArrayForFuncMap();
+        
+        //Function sets value as to whether skin is changed or not		
+        void SetSkinChangedValue(TBool aValue);
+		
+    private:    // New functions
+        /**
+        * By default constructor is private.
+        * @param aApp : CCalcAppUi class pointer 
+        */
+		
+		CCalcAppEnv();
+
+		
+        CCalcAppEnv(CCalcAppUi* aAppUi);
+    	
+		
+        /**
+        * Second-phase constructor
+        */
+        void ConstructAppEnvL();
+
+
+		/**
+        * Load bitmaps for Paper Pane.
+        */
+		void LoadPaperBitmapsL();
+
+        void InitializeAppUI(CCalcAppUi* aAppUi);
+
+        /**
+        * Load bitmaps for function map button.
+        * @param aStartBitmapId : Bitmap ID of loading start  
+        * @param aStartMaskId : Mask ID of loading start  
+        * @param aStartIndex : Start index of array which is set to 
+        *                      bitmap.
+        * @param aCount : Count of loading bitmaps
+        * @param aBitmapArray : Load bitmap to this array. 
+        */
+             
+        void LoadBitmapForFuncMapL(TInt aStartBitmapId, TInt aStartMaskId, TInt aStartIndex,
+	    TInt aCount, CGulIcon* aBitmapArray[], ButtonType aType);
+	
+
+		//Extended Icon Skin Implementation
+		void UpdateAknConstArray();
+		
+		//Extended Icon Skin Implementation for Paper
+		void UpdateAknConstArrayforPaper();
+        
+        
+    private:    // Data 
+        CCalcAppUi*     iAppUi;  // Pointer of CCalcAppUi class  
+		
+	     static CCalcAppEnv iself;
+	     CEikonEnv* iEnv;
+			
+        // Text
+        CDesCArrayFlat* iEditorOperArray;  // Operator for editor
+        CDesCArrayFlat* iOutSheetOperArray;// Operator for OutputSheet
+        TChar iDecimalSeparator;  // Decimal separator
+        TChar iMinusIndicator;    // Minus indicator
+        TBuf<KMaxMemoryIndicatorLength> iMemoryIndicator;  
+        TBuf<KMaxMemoryIndicatorLength> iMemoryIndicatorShadow;  
+                                                           
+        // Font
+        CFont* iNumberShadowFont;
+        CFont* iNumberFont;
+        CFont* iOperatorShadowFont;
+        CFont* iOperatorFont;
+        CFont* iOutSheetOperatorFont;
+        // Bitmap
+         // Bitmap for background for editor
+        CGulIcon* iDisplaySideLBitmap;
+        CGulIcon* iDisplayCenterBitmap;
+        CGulIcon* iDisplaySideRBitmap;
+        CGulIcon* iPaperBitmap;     // Bitmap for background for OutputSheet
+		CGulIcon* iScalablePaperBitmap[KCountOfBitmaps];//Bitmpaps for background for outputSheet
+		CGulIcon* iResultsLineBitmap;    //  Bitmap for drawing line in OutputSheet
+        CGulIcon* iUnpressedButtonBmp[KCountOfButtonsTouch];  // Bitmap for button of FunctionMap
+        CGulIcon* iPressedButtonBmp[KCountOfButtons];
+        CGulIcon* iDimmedButtonBmp[KCountOfButtons];
+
+		//Extended Icon Skin Implementation
+		RArray<TAknsItemID> iAknsConstArray;
+		RArray<TAknsItemID> iAknsConstArrayForPaper;
+		TBool	iIsSkinChanged;
+
+    };
+
+#include    "CalcEnv.inl"
+
+#endif      //  CALCENV_H
+            
+// End of File
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcEnv.inl	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,293 @@
+/*
+* Copyright (c) 2000 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: 
+*     Implemented all inline functions.
+*
+*/
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CCalcAppEnv::AppUi
+// Return pointer of CCalcAppUi class
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CCalcAppUi* CCalcAppEnv::AppUi() const
+    { 
+    return iAppUi; 
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::EditorOperator
+// Return charactor for editor operator
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const TPtrC CCalcAppEnv::EditorOperator(
+            const TCalcEditLine::TCalcOperatorType aType ) const
+    {
+    if ( ( aType == TCalcEditLine::ECalcMultiply ||
+        aType == TCalcEditLine::ECalcDivide ) &&
+        AknLayoutUtils::PenEnabled() )
+        {
+        return ( *iEditorOperArray )[( TInt ) aType + 6];
+        }
+    return ( *iEditorOperArray )[(TInt) aType];
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::OutSheetOperator
+// Return charactor for OutputSheet operator
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const TPtrC CCalcAppEnv::OutSheetOperator(
+            const TCalcEditLine::TCalcOperatorType aType ) const
+    {
+    if ( ( aType == TCalcEditLine::ECalcMultiply ||
+        aType == TCalcEditLine::ECalcDivide ) &&
+        AknLayoutUtils::PenEnabled() )
+        {
+        return (*iOutSheetOperArray)[( TInt ) aType + 6];
+        }
+    return (*iOutSheetOperArray)[( TInt ) aType];
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::DecimalSeparator
+// Return decimal separator.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const TChar CCalcAppEnv::DecimalSeparator() const
+    {
+    return iDecimalSeparator;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::SetDecimalSeparator
+// Set new decimal separator.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline void CCalcAppEnv::SetDecimalSeparator(TChar aChar)
+    {
+    iDecimalSeparator = aChar;    
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::MinusIndicator
+// Return minus indicator.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const TChar CCalcAppEnv::MinusIndicator() const
+    {
+    return iMinusIndicator;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::MemoryIndicator
+// Return memory indicator.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline TPtrC CCalcAppEnv::MemoryIndicator() const
+    {
+    return iMemoryIndicator;
+    }
+        
+// ---------------------------------------------------------
+// CCalcAppEnv::MemoryIndicatorShadow
+// Return shadow of memory indicator.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline TPtrC CCalcAppEnv::MemoryIndicatorShadow() const
+    {
+    return iMemoryIndicatorShadow;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::NumberShadowFont
+// Return font for number shadow in editor.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CFont* CCalcAppEnv::NumberShadowFont() const
+    {
+    return iNumberShadowFont;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::NumberShadowFont
+// Return font for number in editor.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CFont* CCalcAppEnv::NumberFont() const
+    {
+    return iNumberFont;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::OperatorShadowFont
+// Return font for operator shadow in editor.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CFont* CCalcAppEnv::OperatorShadowFont() const
+    {
+    return iOperatorShadowFont;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::OperatorFont
+// Return font for operator in editor.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CFont* CCalcAppEnv::OperatorFont() const
+    {
+    return iOperatorFont;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::OutSheetOperatorFont
+// Return font for operator in OutputSheet.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CFont* CCalcAppEnv::OutSheetOperatorFont() const
+    {
+    return iOutSheetOperatorFont; 
+    }
+
+
+// ---------------------------------------------------------
+// CCalcAppEnv::DisplaySideLBitmap
+// Return 'qsn_fr_calc_display_side_l' Bitmap pointer.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CGulIcon* CCalcAppEnv::DisplaySideLBitmap() const 
+    { 
+    return iDisplaySideLBitmap;
+    }
+
+
+// ---------------------------------------------------------
+// CCalcAppEnv::DisplayCenterBitmap
+// Return 'qsn_fr_calc_display_center' Bitmap pointer.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CGulIcon* CCalcAppEnv::DisplayCenterBitmap() const 
+    { 
+    return iDisplayCenterBitmap;
+    }
+
+
+
+// ---------------------------------------------------------
+// CCalcAppEnv::DisplaySideRBitmap
+// Return 'qsn_fr_calc_display_side_r' Bitmap pointer.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CGulIcon* CCalcAppEnv::DisplaySideRBitmap() const 
+    { 
+    return iDisplaySideRBitmap;
+    }
+
+
+// ---------------------------------------------------------
+// CCalcAppEnv::PaperBitmap
+// Return 'qgn_indi_calc_paper' Bitmap pointer.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CGulIcon* CCalcAppEnv::PaperBitmap() const 
+    { 
+    return iPaperBitmap;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::PaperBitmap
+// Return 'qsn_fr_calc_paper_center' Bitmap pointers.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+ inline  void CCalcAppEnv::ScalablePaperBitmaps(const CGulIcon* aPaperBitmap[]) const
+    { 
+	
+	for(TInt Cnt=0;Cnt < 9; Cnt++)
+		{
+		aPaperBitmap[Cnt]=iScalablePaperBitmap[Cnt];
+		}
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::ResultsLine
+// Return 'qgn_graf_calc_resultsLine' Bitmap pointer.
+// This returns a valid icon only when __SCALABLE_ICONS flag 
+// is enabled. When there is no SVG icon support the result 
+// line is drawn using DrawRect.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline const CGulIcon* CCalcAppEnv::ResultsLineBitmap() const 
+    { 
+    return iResultsLineBitmap;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::UnpressedButtonBmp
+// Return unpressed bitmap of correspondent index
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CGulIcon* CCalcAppEnv::UnpressedButtonBmp(
+             const TInt aIndex) const
+    {
+    return iUnpressedButtonBmp[aIndex];    
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::PressedButtonBmp
+// Return pressed bitmap of correspondent index
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CGulIcon* CCalcAppEnv::PressedButtonBmp(
+             const TInt aIndex) const
+    {
+    return iPressedButtonBmp[aIndex];
+    }
+
+// ---------------------------------------------------------
+// CCalcAppEnv::InactiveButtonBmp
+// Return inactive bitmap of correspondent index
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline CGulIcon* CCalcAppEnv::InactiveButtonBmp(
+             const TInt aIndex) const
+    {
+    return iDimmedButtonBmp[aIndex];
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcFunc.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,414 @@
+/*
+* Copyright (c) 2002 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:  The Function-Map subpane class, CCalcFuncmapSubPane
+*                Derived from CCoeControl.
+*                CCalcFuncmapSubPane is container class of CCalcCommandButton.
+*
+*/
+
+
+#ifndef     CALCFUNC_H
+#define     CALCFUNC_H
+
+
+//  INCLUDES
+#include <coecntrl.h>
+#include <e32property.h> 
+#include <PtiDefs.h> 
+
+#include <centralrepository.h>
+#include <cenrepnotifyhandler.h>
+//  CONSTANTS  
+const   TInt   KCountOfButtons(10);     // Number of buttons
+const   TInt   KCountOfButtonsTouch(20);     // Number of buttons for touch UI layout
+_LIT(KAllowedNumericChars, "0123456789.,");
+_LIT(KAllowedOperatorPlus, "+");
+_LIT(KAllowedOperatorMinus, "-");
+_LIT(KAllowedOperatorStar, "*");
+_LIT(KAllowedOperatorDivide, "/");
+_LIT(KAllowedOperatorEquals, "=");
+_LIT(KAllowedOperatorPercent, "%");
+_LIT(KAllowedOperatorDecimal, ".");
+const TInt KMaxNumCharsPerCase = 50;
+
+//  FORWARD DECLARATIONS
+//class   CCalcCommandButton;
+//Use of new AknButtons
+class 	CAknButton;
+class   CCalcContainer;
+class   CCalcAppEnv;
+class   CPtiEngine;
+class   CPtiQwertyKeyMappings;
+class 	CPtiCoreLanguage;
+#ifdef RD_INTELLIGENT_TEXT_INPUT 
+class   CPtiHalfQwertyKeyMappings;
+#endif
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcFuncmapSubPane : 'FunctionMap Sub-Pane' class
+										: Class also derived from MCoeControlObserver to get events
+										  from Avkon buttons
+*/
+class   CCalcFuncmapSubPane
+        :public CCoeControl , public MCoeControlObserver
+    {
+   public:
+   
+   enum  TButtonTID// ButtonIDs for Touch Layout
+            {
+               ECmdTCancel = 0,   
+               ECmdTSeven,        
+               ECmdTFour,         
+               ECmdTOne,          
+			   ECmdTZero,         
+			   ECmdTSqrt, 		 
+               ECmdTEight,        
+               ECmdTFive,         
+               ECmdTTwo,          
+			   ECmdTSeparator,    
+			   ECmdTPercent,		 
+			   ECmdTNine,         
+               ECmdTSix,          
+               ECmdTThree,        
+               ECmdTChangeSign,   
+               ECmdTDivide,       
+               ECmdTMultiply,     
+               ECmdTSubtract,     
+               ECmdTAdd,          
+               ECmdTResult,       
+               ECmdTScrollUp,
+               ECmdTScrollDown
+            };
+
+  
+
+    enum TButtonID // ButtonID for non touch Layout
+            {
+            EPlusButton,            // +
+            EMinusButton,           // -
+            EMultiplyButton,        // *
+            EDivideButton,          // /
+			EChangeSignButton,      // +/-
+            EEqualButton,           // =
+			ESqrtButton,			// sqrt
+			EPercentButton,			// %
+			EScrollUp,              // << 
+            EScrollDown             // >> 
+            };
+   public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aContainer : Pointer of CCalcContainer class 
+        */
+        static CCalcFuncmapSubPane* NewL(CCalcContainer* aContainer); 
+       
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcFuncmapSubPane();
+       
+
+    public:  // New functions
+        /**
+        * Redraw scroll up and down button on scrolling enable.
+        */
+        void RedrawScrollButtons();
+
+        /**
+        * Redraw ChangeSign button on ChangeSign enable.
+        * @param aEnable : Flag of ChangeSign enable
+        */
+        void SetChangeSignEnable(TBool aEnable);
+		
+		/**
+        * Redraw Sqrt button on Sqrt enable.
+        * @param aEnable : Flag of SqrtEnable enable
+        */
+		void SetSqrtEnable (TBool aEnable);
+
+        /**
+        * Redraw Clear button on Clear enable.
+        * @param aEnable : Flag of ClearEnable enable
+        */
+        void SetClearKeyEnable( TBool aEnable );
+		
+		/**
+        * Redraw Sqrt button on Percent enable.
+        * @param aEnable : Flag of PercentEnable enable
+        */
+		void SetPercentEnable(TBool aEnable);
+
+		/**
+        * If no key is pressed until timeout of *-key,
+        * this function is called.
+        */
+        void NotifyTimeoutL();
+
+        /**
+        * Notify any key is released. If pressed button exists.
+        * command which is releated is executed.
+        */
+        void NotifyReleaseKeyL();
+
+        /**
+        * If key other than OK-key is pressed this function is called.
+        */
+        void NotifyOtherThanOkKeyPressed();
+
+        /**
+        * Called if language is changed.
+        * Change layout according to the language.
+        */
+        void NotifyLangChange();
+        
+        
+        /**
+        * Called to find key pad is Active.
+        * 
+        */
+        TInt IsQwertyKeypadActive();
+        
+        /**
+        * Called to find Key is long Pressed.
+        * 
+        */
+        TBool IsKeyLongPressed();
+
+        
+    public:   // Functions from base classes
+    
+        /**
+        * From MCoeControlObserver.
+        * Handles events from Avkon Buttons
+        */
+        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+        /**
+        * From CCoeControl ?member_description.
+        * @param aKeyEvent : Key event details
+        * @param aType     : EEventKeyDown || EEventKey || EEventKeyUp
+        * @return EKeyWasConsumed    : Key event was used
+        *         EKeyWasNotConsumed : Key event was not used
+        */
+        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+		/**
+		*Refresh with latest button Icons when the skin change event has occured.
+	    */
+		void RefreshButtonIcons();
+		
+		 /**
+        * CCalcFuncmapSubPane::GetButtonBitmapControl
+		* This function is called when the size changes.
+        * 
+        */
+		    CAknButton* GetButtonBitmapControl(TInt aIndex); //Return iButtons
+		
+		 /**
+        * From CCoeControl : Handling pointer event
+        * Handles all pen input events on function pane.
+        * 
+        */
+        void HandlePointerEventL
+                ( const TPointerEvent& aKeyEvent );
+        /**
+        * FunctionPaneRect
+        * Gets the layout of function pane.
+        */
+        TRect FunctionPaneRect();
+
+        /**
+        * HandleMiddleSoftKeyOREKeyOK
+        * Called to handle MSK or EKeyOk
+        */
+        void HandleMiddleSoftKeyOREKeyOKL();             
+
+				/**
+        * GetChangeSignButtonState
+        * Gets the state of the Sign Button
+        */
+        TBool GetChangeSignButtonState();
+        
+        
+				/**
+        * GetSqrtButtonState
+        * Gets the state of the Squareroot Button
+        */
+        TBool GetSqrtButtonState();
+        
+        
+        /**
+        * GetSqrtButtonState
+        * Gets the state of the Percent Button
+        */
+        TBool GetPercentButtonState();
+        
+        /**
+        * GetClearButtonState
+        * Gets the state of the Clear Button
+        */        
+        TBool GetClearButtonState();
+        
+        /**
+        * GetSelectedButtonId
+        * returns the id of current button
+        */
+        TInt GetSelectedButtonId();
+ 
+        /**
+        * SetHighlightButton
+        * set highlight button
+        */
+        void SetHighlightButton( TUint aOldId, TUint aNewId );  
+        
+        /**
+        * GetKeyboardType
+        * returns the type of keyboard
+        */
+        TInt GetKeyboardType();
+
+    private:    // New functions
+        /**
+        * C++ default constructor.
+        */
+        CCalcFuncmapSubPane();
+
+        /**
+        * Second-phase constructor
+        * @param aContainer : Pointer of CCalcContainer class
+        */
+        void ConstructL(CCalcContainer* aContainer);
+
+        /**
+        * Redraw scroll-up button on scrolling enable.
+        * @param aEnable : Flag of scroll-up  enable 
+        */
+        void SetScrollupEnable(TBool aEnable);
+        
+        /**
+        * Redraw scroll-down button on scrolling enable.
+        * @param aEnable : Flag of scroll-down  enable
+        */
+        void SetScrolldownEnable(TBool aEnable);
+
+        /**
+        * Set next cursor position whwn pressing uparrow key.
+        */
+        void SetNextCursorPosForUpArrow(TInt aOldPos);
+
+        /**
+        * Set next cursor position whwn pressing downarrow key.
+        */
+        void SetNextCursorPosForDownArrow(TInt aOldPos);
+                
+        /**
+        * An old highlight rectangle and 
+        * a new highlight rectangle are redrawn.
+        * @param aOldId : The button chosen before
+        * @param aNewId : The button chosen newly
+        */
+        void RedrawHighlight(TUint aOldId, TUint aNewId) const;
+        
+        /**
+        * Set functionmap button layout. 
+        */
+        void SetLayout();
+        /**
+        * MapNumericChar. 
+        */
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        TBool MapNumericCharL( TKeyEvent aKeyEvent );
+        TBool MapNumerics( TKeyEvent aKeyEvent );
+#else 
+        TBool MapNumericCharL(TPtiKey aKey, TPtiTextCase aCase);
+        TBool MapNumerics(TPtiKey aKey, TPtiTextCase aCase);
+#endif
+
+        /**
+        * MapDataForChrShiftKey. 
+        */  
+        void MapDataForChrShiftKey( TDes& aOperators, TInt& aFirstOperator, TInt& aSecondOperator);
+        
+        /**
+        * MapOperators. 
+        */         
+        TBool MapOperators( TUint16 aOperator, TInt& aResult);
+
+      
+    private:    // Functions from base classes
+        /**
+        * From CCoeControl : Return count of controls contained 
+        * in a compound control.
+        * @return Count of buttons in FunctionMap Subpane 
+        */
+        TInt CountComponentControls() const;
+        
+        /**
+        * From CCoeControl : Get the components of a compound control
+        * @param aIndex
+        * @return Control of argument aIndex  
+        */
+        CCoeControl* ComponentControl(TInt aIndex) const;
+        
+        /**
+        * From CCoeControl : This is called when control size is changed.
+        */
+        void SizeChanged();
+
+        /**
+        * From CCoeControl : This is called when control size is changed.
+        */
+        TInt CalculatingCorrectButton(const TPointerEvent& aPointerEvent);
+        
+    private:     // Data
+        CAknButton* iButtons[KCountOfButtonsTouch];  // Array of buttons
+        TInt iSelected;                 // Index of the selected button
+
+        TBool    iDecimalPoint;
+
+        TUint iLastKeyCode;             // The key code inputted at the last.
+        CCalcContainer* iContainer;    // Pointer of CCalcContainer class 
+        CCalcAppEnv*    iCalcAppEnv;   // Not own
+        RProperty       iQwertyModeStatusProperty; // To check the Qwerty keypad active 
+        
+        TPtiTextCase	  iShiftKeyPressed;
+        CPtiEngine*     iEngine;
+        CRepository* 	  iCRKey;
+        CPtiCoreLanguage* iCoreLanguage;
+        CPtiQwertyKeyMappings* iQwertyKeyMappings;
+#ifdef RD_INTELLIGENT_TEXT_INPUT       
+        CPtiHalfQwertyKeyMappings* iHalfQwertyKeyMappings;
+#endif
+
+        TInt 			      iLanguage;
+        TInt                  iUiLanguage;
+        TInt 			      iShiftKey;
+        TBool 			    iValue;
+        TInt            iCountOfButtons;	//keeps track of the count of buttons
+        TInt            iButtonsInRow;   //Number of buttons in the row
+        TInt            iButtonsInColumn; //Number of buttons in the Column
+        TBool           iIsSqrtDimmed;  //Holds the state of the squareroot button
+        TBool           iIsPercentDimmed;  //Holds the state of the percent button 
+        TBool           iIsChangeSignDimmed; //Checks if the change sign button is dimmed or not
+        TBool           iIsOfferKeyEvent; //checks if the event on select is from Offer key or pointer
+        TBool           iIsClearKeyEnabled;  //Checks if the Clear button is Enabled or not      
+        TBool           iIsKeyLongPress;     //Checks if the button is Long Pressed or not
+        TInt            iKeyboardType;
+        TBool           iIsShiftKeyPressed;
+    };
+
+#endif      //  CALCFUNC_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcHistory.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2002 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:  Define CCalcHistory class. This class is handled historical 
+*                line of Calculator. 
+*
+*/
+
+
+#ifndef     CALCHISTORY_H
+#define     CALCHISTORY_H
+
+//  INCLUDES
+#include   <e32base.h>
+
+//  CONSTANTS  
+const TInt KCalcMaxHistoryLines(100);
+
+//  FORWARD DECLARATIONS
+class TCalcEditLine;
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcHistory handles historical line of the calculator. 
+*/
+class   CCalcHistory :
+        public CBase
+    {
+    public:  // Constructors and destructor
+        /**
+        * C++ default constructor.
+        */
+        CCalcHistory();
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcHistory();
+        
+        
+    public:     // New functions
+        /**
+        * Return (aIndex + 1)th latest history line.
+        * @param aIndex  
+        * @return (aIndex + 1)th latest history line.
+        */
+        const TCalcEditLine& operator[](TInt aIndex);  
+        
+        /**
+        * Return count of historical lines. 
+        * @return Count of historical lines
+        */
+        TInt Count() const;
+        
+        /**
+        * Add newest history line
+        * @param aLine : added line  
+        */
+        void Add(const TCalcEditLine aLine); 
+
+        /**
+        * Clear calculation history.
+        */
+        void ClearHistory();
+
+        /**
+        * Notify changing decimal separator.
+        * @param aOld : Old decimal separator
+        * @param aNew : New decimal separator  
+        */
+        void NotifyChangeDecimal(TChar aOld, TChar aNew);
+        
+    private:    // New functions
+            
+    private:    // Data
+        //
+        //  historical data
+        //  Newest data index is iNewestIndex.
+        //  
+        //  <Case that iCount is smaller than KCalcMaxHistoryLines>
+        //    As data is older, index is smaller. The oldest dara index is zero.
+        //
+        //  <Case that iCount is KCalcMaxHistoryLines>
+        //    As data is older, index is smaller. But previous data index
+        //   to index zero is KCalcMaxHistoryLines-1. previous index to
+        //   KCalcMaxHistoryLines-1 is KCalcMaxHistoryLines-2. ..... 
+        //   Therefore the oldest data index is iNewestIndex+1.
+        //
+        TCalcEditLine iHistory[KCalcMaxHistoryLines]; // Calculation history
+        TInt      iCount;  // Valid historical lines
+        TInt      iNewestIndex;  // Index of newest history
+    };
+
+#endif      //  CALCHISTORY_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcOutSheet.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2002 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:  The OutputSheet sub-pane class, CCalcOutputSheet
+*                Derived from CCoeControl
+*                The CCalcOutputSheet displays histroy data.
+*                History data is scroll up and down.
+*
+*/
+
+
+#ifndef     CALCOUTSHEET_H
+#define     CALCOUTSHEET_H
+
+
+//  INCLUDES
+#include <coecntrl.h>
+#include <AknUtils.h>
+#include <e32std.h>
+
+#include <eikscrlb.h>
+#include <eiksbobs.h>
+
+#include <eiksbfrm.h>
+ 
+
+// CONSTANTS
+const TInt KCountOfPaperBitmaps(9);
+//  FORWARD DECLARATIONS
+class   CCalcHistory;
+class   CCalcContainer;
+class   CCalcAppEnv;
+
+//  CLASS DEFINITIONS 
+
+/**
+CCalcOutputSheet : 'OutputSheet Sub-Pane' class
+*/
+//New scrollbar used for Touch UI layout
+class CEikScrollBarFrame;
+class CCalcOutputSheet
+      : public CCoeControl , public MEikScrollBarObserver
+    {/*Class also derived from scrollbarobserver to capture scrollbar events*/
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aContainer : Pointer of CCalcContainer class 
+        */
+        static CCalcOutputSheet* NewL(CCalcContainer* aContainer); 
+       
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcOutputSheet();
+
+    
+    public:     // New functions
+        
+        
+        /**
+        * Scroll to bottom line.
+        */
+        void ScrollToBottomL(); 
+
+        /**
+        * Called after clearing calculation history.
+        */
+        void NotifyClearHistoryL();
+        
+        /**
+        * It returns whether it can scroll up or not.
+        * @return ETrue : Scroll up can be done. 
+        *         EFalse: Scroll up cannot be done.
+        */
+        TBool CanUp() const;  
+        
+        /**
+        * It returns whether it can scroll down or not.
+        * @return ETrue : Scroll up can be done. 
+        *         EFalse: Scroll up cannot be done.
+        */
+        TBool CanDown() const; 
+        
+        /**
+        * Output Sheet is scrolled up.
+        */
+        void ScrollUp();   
+        
+        /**
+        * Output Sheet is scrolled down.
+        */
+        void ScrollDown();
+
+		/**
+		* Refresh PaperBitmap Icon when the skin change event has occured.
+		*/
+		inline void RefreshPaperBitmap() ;
+		/**
+		* Refresh ScalablePaperBitmap Icon when the skin change event has occured.
+		*/
+		inline void RefreshScalablePaperBitmap() ;
+
+
+		inline void RefreshResultsLineBitmap() ;
+		
+		/**
+		* From MEikScrollBarObserver: to Handle scrollbar events
+		* @param CEikScrollBar* : Pointer to the scrollbar
+		* @param TEikScrollEvent : Event on the Scrollbar
+		*/
+		void HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType);
+		
+		
+        /**
+        * From CCoeControl : Notifier for changing language
+        * @param aType : Type of resource change
+        */
+        void HandleResourceChange(TInt aType);
+        void HandleResourceChangeOutSheetL(TInt aType);
+ 
+		
+    private:    // New functions
+        /**
+        * C++ default constructor.
+        */
+        CCalcOutputSheet();
+
+        /**
+        * Second-phase constructor.
+        */
+        void ConstructL(CCalcContainer* aContainer);
+
+
+    private:
+    
+            
+        /**
+        * From CCoeControl : Set control size 
+        */
+        void SizeChanged();
+        
+        void SizeChangedOutSheetL();
+
+        /**
+        * From CCoeControl : Draw Output Sheet
+        * @param aRect : rectangle of Output Sheet
+        */
+        void Draw(const TRect& aRect) const;
+        
+  		/**
+        * Function used to dynamically update scrollbar indicators.
+        */
+        void UpdateScrollIndicatorL();
+        
+
+    private:    // Data
+        TInt iScrollOffset;     // Scroll position
+        const CGulIcon* iCalcPaper; // Not own
+		const CGulIcon* iCalcScalablePaper[KCountOfPaperBitmaps];
+		const CGulIcon* iCalcResultsLine;
+        CCalcHistory*   iCalcHistory;    // Not own
+        CCalcContainer* iCalcContainer;  // Not own
+        CCalcAppEnv*    iCalcAppEnv;     // Not own
+		TAknLayoutRect iCalcPaperLayout[KCountOfPaperBitmaps];
+		TInt iCalcOutputSheetLines;
+		CAknsBasicBackgroundControlContext* iOpSheetContext;
+		CArrayFixFlat<TAknLayoutText>* iOperatorLayout;
+		CArrayFixFlat<TAknLayoutText>* iOperandLayout;
+		CArrayFixFlat<TAknLayoutRect>* iResultsLineLayout;
+		CArrayFixFlat<TAknLayoutRect>* iEqualLineLayout;
+		CRepository* 	iCRKey;
+		TInt 			iLanguage;
+        TInt            iUiLanguage;
+		CEikScrollBarFrame *iSBFrame;		//own -> pointer used for scrollbar frame
+		TAknLayoutRect  iPaperPaneRect;
+		TInt            iPrevThumbPosition;
+		            
+       
+    };
+
+#include "CalcOutSheet.inl"
+
+#endif      //  CALCOUTSHEET_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcOutSheet.inl	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2002 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:  Implemented all inline functions for CCalcOutputSheet.  
+*
+*/
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::RefreshPaperBitmap
+// Updates iCalcPaper
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline void CCalcOutputSheet::RefreshPaperBitmap()
+{
+	iCalcPaper = iCalcAppEnv->PaperBitmap();
+}
+// ---------------------------------------------------------
+// CCalcEditorSubPane::RefreshScalablePaperBitmap
+// Updates iCalcScalablePaper
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline void CCalcOutputSheet::RefreshScalablePaperBitmap()
+{
+ 
+iCalcAppEnv->ScalablePaperBitmaps(iCalcScalablePaper);
+}
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::RefreshResultsLineBitmap
+// Updates iCalcResultsLine
+// This is used only when __SCALABLE_ICONS flag 
+// is enabled. When there is no SVG icon support the result 
+// line is drawn using DrawRect.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+inline void CCalcOutputSheet::RefreshResultsLineBitmap()
+{
+	iCalcResultsLine = iCalcAppEnv->ResultsLineBitmap();
+}
+	
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/CalcView.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,258 @@
+/*
+* Copyright (c) 2002 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:  Header file of CCalcView class 
+*                which derived from CAknView class. 
+*
+*/
+
+
+#ifndef     CALCVIEW_H
+#define     CALCVIEW_H
+
+//  INCLUDES
+
+#include <aknview.h>
+
+#include "CalcEditline.h"
+
+
+//  CONSTANTS  
+const TInt KCalcViewId(1); // view ID of CCalcView
+
+//  FORWARD DECLARATIONS
+class CCalcContainer;
+class CEikMenuPane;
+class CCalcDocument;
+class CCalcEditorSubPane;
+class CCalcOutputSheet;
+class CAiwServiceHandler;
+
+//  CLASS DEFINITIONS 
+
+/**
+View class for Calculator application
+*/
+class   CCalcView
+        : public CAknView
+    {
+    public:
+        enum TStateNo       // State number
+            {
+            EInitialMode,  // State 1 : initial mode
+            EOperandOnly,   // State 2 : operand only
+            EOperandAndOperator,  // State 3 : operand and operator
+            EOperandAndOperatorAndOperand,  // State 4 : operand,operator and operand
+            ESelectResult,   // State 5 : User has selected result
+			EOperatorOnlyResult // State 6 : sqrt and percent display result right away
+            };
+
+        enum TKindOfInput   // kind of operand or operator
+            {
+            EOperand,
+            EOperator,
+            EEqual,
+            EMemorySave,
+            EMemoryRecall, // Latest input is MR, LR, or +/- on State3.
+            EAllClear,
+			EOperatorResult // For sqrt and percent, because they displayes the result right away
+            };
+
+
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        */
+        static CCalcView* NewLC(); 
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CCalcView();  
+        
+    public:  // New functions
+        /**
+        * Return current state
+        * @return Current state
+        */
+        TStateNo State() const;
+        
+        /**
+        * Return type of latest input
+        */
+        TKindOfInput LatestInput() const;
+        
+        /**
+        * Update state by using kind of input
+        * @param aKind : Kind of input
+        */
+        void UpdateState(const TKindOfInput& aKind);
+        
+        /**
+        * Display error message
+        * @param aErrorCode : error code, e.g KErrOverflow.
+        */
+        void ErrorMsgL(TInt aErrorCode);
+        
+        /**
+        * Delete meaningless items from main menu.
+        * @param aMenuPane : Pointer of menu pane
+        */
+        void DynInitMainMenuPane(CEikMenuPane* aMenuPane);
+        
+        /**
+        * Delete meaningless items from menu of memory
+        * @param aMenuPane : Pointer of menu pane
+        */
+        void DynInitMemoryMenuPane(CEikMenuPane* aMenuPane);
+        
+        /**
+        * Notify changing decimal separator.
+        * @param aOld : Old decimal separator
+        * @param aNew : New decimal separator  
+        */
+        void NotifyChangeDecimal(TChar aOld, TChar aNew);
+        
+        /**
+        * Handle Memory-Recall command
+        */
+        void HandleMemoryRecallL();
+          
+    public: // Functions from base classes
+        /**
+        * From MEikMenuObserver : Handle a command
+        * @param aCommand : command ID
+        */
+        void HandleCommandL(TInt aCommand);
+
+    
+    private:    // New functions
+        /**
+        * By default constructor is private.
+        */
+        CCalcView();
+        
+        /**
+        * Second-phase constructor
+        */
+        void ConstructL();
+        
+        /**
+        * Create CCalcContainer class
+        */
+        void CreateContainerL();
+        
+        /** 
+        * Handle Result command
+        */
+        void HandleResultL();
+        
+        /**
+        * Handle Change-Sign command
+        */
+        void HandleChangeSignL();
+        
+        /**
+        * Handle Last-Result command
+        */
+        void HandleLastResultL();
+        
+        /**
+        * Handle Memory-Save command
+        */
+        void HandleMemorySaveL();
+   
+        /**
+        * Handle Memory-Clear command
+        */
+        void HandleMemoryClearL();
+        
+        /**
+        * Handle Scroll-up command
+        */
+        void HandleScrollUp();
+        
+        /**
+        * Handle Scroll-Down command
+        */
+        void HandleScrollDown();
+
+        /**
+        * Handle Clear OutputSheet command
+        */
+        void DoClearCalcAndHistoryL();
+        
+        /**
+        * Handle Add, Subtract, Multiply, Divide command
+        * @param TCalcEditLine::TCalcOperatorType : Type of operator 
+        */
+        void HandleOperatorL(TCalcEditLine::TCalcOperatorType aOperator);
+        
+        /**
+        * Common routine for handling result and handling memory save
+        * on State4 and two operands and operator.
+        * Role of this function is calculating result.  
+        * But State is not updated.
+        * @return KErrNone : Calculation error does not occur
+        *         KErrOverflow, KErrDivideByZero : Calculation error occurs
+        */
+        TInt HandleEqualSubRoutineL();
+
+    private: // From CAknView
+        /**
+        * When CCalcView becomes active, this is called.
+        * @param aPrevViewId : 
+        * @param aCustomMessageId : 
+        * @param aCustomMessage : 
+        */
+        void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
+                         const TDesC8& aCustomMessage);
+        
+        /**
+        * When CCalcView becomes deactive, this is called.
+        */
+        void DoDeactivate();
+        
+        /**
+        * Return UID of CCalcView
+        * @return UID of CCalcView, KCalcViewId
+        */
+        TUid Id() const;
+
+        /** 
+        * From MEikMenuObserver, Delete meaningless menu item.  
+        * @param aResourceId : resource ID of menu pane
+        * @param aMenuPane : Pointer of menu pane object
+        */
+        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+
+		/**
+		*To handle when this application comes to foreground.
+		*/
+		void HandleForegroundEventL(TBool aForeground);
+            
+    private:    // Data
+        CCalcDocument*  iCalcDocument; // Not own  
+        CCalcContainer* iContainer;    // own 
+        CCalcEditorSubPane* iEditorSubPane; // Not own
+        CCalcOutputSheet*   iOutputSheet; // Not own
+        TStateNo        iState;        // Current State 
+        TKindOfInput    iLatestInput;  // Kind of latest input
+	public:
+      	CAiwServiceHandler* iServiceHandler;
+      	TBool           iLastResultSetected;
+    };
+
+#endif      //  CALCVIEW_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/inc/calc.hrh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2002 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:  This file contains declarations for resources of Calculator.
+*                The file can be included in C++ or resource file.
+*                Constants for drawing is defined in CalcDrawingConst.laf.
+*
+*/
+
+
+#ifndef     CALC_HRH
+#define     CALC_HRH
+
+//  CONSTANTS
+
+//
+// Define command ID for menu
+//
+enum TCalcPopupMenuOption
+    {
+    ECalcCmdResult = 6200,
+    ECalcCmdAdd,
+    ECalcCmdSubtract,
+    ECalcCmdMultiply,
+    ECalcCmdDivide,
+    ECalcCmdChangeSign,
+    ECalcCmdLastResult,  
+    ECalcCmdMemory,
+    ECalcCmdMemorySave,
+    ECalcCmdMemoryRecall,
+    ECalcCmdMemoryClear,
+    ECalcCmdScrollUp,
+    ECalcCmdScrollDown,
+    ECalcCmdClearCalcAndHistory,
+	ECalcCmdPercent,
+	ECalcCmdSqrt,
+	ECalcCmdCancel,          // +
+    ECalcCmdSeven,          // +
+    ECalcCmdFour,          // +
+    ECalcCmdOne,          // +
+    ECalcCmdZero,          // +
+    ECalcCmdEight,          // +
+    ECalcCmdFive,          // +
+    ECalcCmdTwo,          // +
+    ECalcCmdSeparator,          // +
+    ECalcCmdNine,          // +
+    ECalcCmdSix,          // +
+    ECalcCmdThree,          // +
+    ECmdAiwPlaceHolder,
+	ECmdLast,
+	ECalcCmdHelp,
+	EAiwCmdHelp = 11,
+	ECmdAiwPlaceHolderShowHelp
+    };
+
+#endif      //  CALC_HRH
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/loc/calc.loc	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2002 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:  Define localization string.
+*
+*/
+
+
+//  LOCALISATION STRINGS  
+
+
+//d:Menu text for "Last result"
+//l:list_single_pane_t1_cp2
+//
+#define qtn_calc_om_last_result         "Last result"
+
+//d:Menu text for handling memory
+//l:list_single_pane_t1_cp2/opt3
+//
+#define qtn_calc_om_sub_mem             "Memory"
+
+//d:Menu text for "Memory save"
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_calc_om_mem_save            "Memory save"
+
+//d:Menu text for "Memory recall"
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_calc_om_mem_recall          "Memory recall"
+
+//d:Menu text for "Memory clear"
+//d:If memory is zero, this item is not shown.
+//l:list_single_popup_submenu_pane_t1
+//
+#define qtn_calc_om_mem_clear           "Memory clear"
+
+//d:Menu text for "Clear sheet"
+//l:list_single_pane_t1_cp2
+//
+#define qtn_calc_clear_sheet            "Clear sheet" 
+
+//d:Indicator of memory in editor space.
+//d:If memory is not zero, this indicator is shown.
+//d:Otherwise, this is not shown.  
+//l:calc_display_pane_t3
+//
+#define qtn_calc_sttus_saved_to_mem     "M"
+
+//d:Indicator of memory shadow in editor space.
+//d:If memory is not zero, this indicator is shown.
+//d:Otherwise, this is not shown.  
+//l:calc_display_pane_t3
+//
+#define qtn_calc_sttus_saved_to_mem_sha "M"
+
+//d:Text for application list.
+//l:list_single_large_graphic_pane_t1
+//
+#define qtn_apps_calculator_list        "Calculator" 
+
+//d:Text for application grid.
+//l:cell_app_pane_t1
+//
+#define qtn_apps_calculator_grid        "Calculator"
+
+//d:Error message for overflow
+//l:popup_note_window
+//
+#define text_out_of_range               "Result is out of range"
+
+//d:Error message for division by zero
+//l:popup_note_window
+//
+#define text_calc_division_by_zero      "Division by zero"
+
+//d:Error message for negative value for square root
+//l:popup_note_window
+//
+#define text_calc_negative_value_for_sqrt      "Invalid input for function"
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/rom/Calcsoft.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2002 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:  IBY file for non-localizable elements of Calculator.app
+*
+*/
+
+
+#ifndef __Calcsoft_IBY__
+#define __Calcsoft_IBY__
+
+S60_APP_EXE(Calcsoft)
+
+
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,Calcsoft)
+
+
+S60_APP_AIF_ICONS(CalcSoft)
+S60_APP_AIF_RSC(CalcSoft)
+data=DATAZ_\private\10005902\backup_registration.xml private\10005902\backup_registration.xml
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/rom/CalculatorResources.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2002 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: Resource file(s) for CALCSOFT application (Calcsoft.iby)
+*
+*/
+
+
+#ifndef CALCULATORRESOURCES_IBY
+#define CALCULATORRESOURCES_IBY
+
+//Resource file(s) for CALCSOFT application (Calcsoft.iby)
+#ifndef NO_PIMS_IN_ROM
+S60_APP_CAPTION(calcsoft)
+S60_APP_RESOURCE(Calcsoft)
+#endif
+
+#endif // CALCULATORRESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcApp.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2002 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:  An application class, CCalcApplication, 
+*                derived from CEikApplication
+*
+*/
+
+
+
+// INCLUDE FILES 
+
+#include    "CalcDoc.h"
+#include    "CalcApp.h"
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+// ---------------------------------------------------------
+// CCalcApplication::CreateDocumentL
+// This function is called by framework when this calculator is opened. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CApaDocument* CCalcApplication::CreateDocumentL()
+    {
+    return CCalcDocument::NewL(*this);
+    }
+
+
+// ---------------------------------------------------------
+// CCalcApplication::AppDllUid
+// This function is called by framework
+// when this calculator is opened or closed. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TUid  CCalcApplication::AppDllUid() const
+    {
+    return KUidCalc;
+    }
+
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
+#include <eikstart.h>
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CCalcApplication;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication(NewApplication);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcAppUi.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,205 @@
+/*
+* Copyright (c) 2002 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:  An App UI class, CCalcAppUi, derived from CAknAppUi
+*                Mainly menu command is handled.
+*
+*/
+
+
+
+// INCLUDE FILES  
+#include    <avkon.hrh>
+#include    <bacntf.h>   // For CEnvironmentChangeNotifier
+#include    <Calcsoft.rsg>
+#include    <featmgr.h>
+
+#include    "CalcApp.h"
+#include    "CalcAppUi.h"
+#include    "CalcDoc.h"
+#include    "CalcHistory.h"
+#include	 "CalcEnv.h"
+#include    "CalcView.h"
+#include    "calc.hrh"
+
+//  LOCAL CONSTANTS AND MACROS  
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcAppUi::CCalcAppUi()
+    {
+    }
+
+// Destructor
+CCalcAppUi::~CCalcAppUi()
+    {
+		delete iCalcAppEnv;
+		iCalcAppEnv = NULL;
+    
+    if (iLocaleChangeNotifier)
+        {
+        iLocaleChangeNotifier->Cancel();
+        }
+    
+    if	(iLocaleChangeNotifier)
+    	{
+   		delete iLocaleChangeNotifier;
+    	iLocaleChangeNotifier = NULL;
+    	}
+    FeatureManager::UnInitializeLib();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcAppUi::ExitCalculator
+// Exit Calculator application.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcAppUi::ExitCalculator()
+    {
+    TRAP_IGNORE(CEikAppUi::SaveL()); // Save memory and last result
+    Exit();
+    }
+
+// ---------------------------------------------------------
+// CCalcAppUi::LocaleCallback
+// Called when locale is changed or application is launched.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcAppUi::LocaleCallback
+                    (TAny* aThisPtr)
+    {
+    STATIC_CAST(CCalcAppUi*, aThisPtr)->HandleLocaleChangeEvent();
+    return 0;
+    }
+
+// ---------------------------------------------------------
+// CCalcAppUi::HandleLocaleChangeEvent
+// Handle locale change event.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcAppUi::HandleLocaleChangeEvent()
+    {
+    TLocale locale;
+    TChar newDecimal(locale.DecimalSeparator());
+    TChar oldDecimal(iCalcAppEnv->DecimalSeparator());
+
+    if (newDecimal != oldDecimal)
+        {
+        iCalcAppEnv->SetDecimalSeparator(newDecimal);
+        CCalcView* view = STATIC_CAST(CCalcView*, iView);
+        view->NotifyChangeDecimal(oldDecimal, newDecimal);
+        CCalcDocument* doc = STATIC_CAST(CCalcDocument*, Document());
+        doc->History()->NotifyChangeDecimal(oldDecimal, newDecimal);
+        }
+    }
+
+// Second-phase constructor.
+void CCalcAppUi::ConstructL()
+    {
+    // Allow base class (CEikAppUi) to perform necessary construction
+    BaseConstructL(CAknAppUi::EAknEnableSkin | EAknEnableMSK);
+
+    FeatureManager::InitializeLibL();
+    
+    iCalcAppEnv = CCalcAppEnv::NewL(this);
+    
+    CCalcView* calcView = CCalcView::NewLC();
+    AddViewL(calcView);
+    CleanupStack::Pop(calcView); 
+    
+	// Get pointer to CCalcDocument
+	CCalcDocument* doc = STATIC_CAST(CCalcDocument*, Document());
+	// CCalcDocument needs the pointer to the iCalcAppEnv
+	doc->SetAppEnv(iCalcAppEnv);	
+
+    // Set locale change notifier 
+    TCallBack callBack(LocaleCallback, this);
+    iLocaleChangeNotifier = CEnvironmentChangeNotifier::NewL
+                            (EActivePriorityLogonA, callBack);
+                            
+     if(iLocaleChangeNotifier->IsActive())
+     	iLocaleChangeNotifier->Cancel();
+    iLocaleChangeNotifier->Start();
+
+	//EISkin2.6
+	//Set IsSkinchanged value to EFalse when the application launches.
+	SetSkinChanged(EFalse);
+
+	TFileName path;
+    iEikonEnv->FsSession().PrivatePath(path);
+    iEikonEnv->FsSession().MkDirAll(path);
+    }
+
+// ---------------------------------------------------------
+// CCalcAppUi::HandleCommandL
+// Handle Exit command. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcAppUi::HandleCommandL(TInt aCommand)
+    {
+    if (aCommand == EEikCmdExit)
+        {
+        ExitCalculator();
+        }
+    }
+//EISkin2.6
+//----------------------------------------------------------
+//CCalcAppUi::HandleResourceChangeL
+// To Handle Skin Change event
+// Update Bitmaps
+//----------------------------------------------------------
+void CCalcAppUi::HandleResourceChangeL(TInt aType)
+{
+	if (aType == KAknsMessageSkinChange)
+		{
+			iCalcAppEnv->LoadFuncMapBitmapSkinChangeL();
+			SetSkinChanged(ETrue);
+		}
+	else
+	{
+		CAknViewAppUi::HandleResourceChangeL(aType);
+	}
+}
+
+//----------------------------------------------------------
+//CCalcAppUi::HandleWsEventL
+// Handles events sent to the application by the window server.
+// When EKeyOK is long pressed, to avoid being filtered by the AppUi, 
+// send this event directly to the container. 
+// Thus the container can get the EKeyOK key event.
+//----------------------------------------------------------
+void CCalcAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination )     
+    {                                                                                     
+    CAknViewAppUi::HandleWsEventL(aEvent, aDestination);   //pass the event to appui
+    if ( aEvent.Type() == EEventKey)
+        {
+        //judge the key is EKeyOK or not and the key is long pressed or not
+        TKeyEvent* key = aEvent.Key();
+        if ( key->iCode == EKeyOK && key->iRepeats )       
+            {
+            //send EEventKey to the Container                                              
+            TopFocusedControl()->OfferKeyEventL( *key, EEventKey ); 
+            }                                                      
+        }
+    }
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcCmdBtn.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,270 @@
+/*
+* Copyright (c) 2002 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:The Function-Map's button class, CCalcCommandButton
+*                Derived from CEikCommandButtonBase
+*                The CCalcCommandButton is flat button.
+*                In making disable, it calls SetDimmed() function.
+*
+*/
+
+
+// INCLUDE FILES
+#include    <gulicon.h>
+#include    <calcsoft.rsg>
+#include    <aknutils.h>
+
+#include    "CalcFunc.h"
+#include    "CalcCmdBtn.h"
+#include    "CalcDrawingConst.laf"
+#include <AppLayout.cdl.h>
+#include <AknIconUtils.h>
+#include "fbs.h"
+
+// skin support
+#include    <AknsDrawUtils.h>
+#include  <AknLayoutScalable_Avkon.cdl.h>  
+#include <aknlayoutscalable_avkon.cdl.common.h>
+#include <AknLayout2ScalableDef.h>
+
+#include <aknsconstants.h>
+#include <AknLayoutScalable_Apps.cdl.h>
+
+// skin support
+#include    <AknsDrawUtils.h>
+
+
+//  LOCAL CONSTANTS AND MACROS  
+
+// ================= MEMBER FUNCTIONS =======================
+
+// Two-phased constructor.
+CCalcCommandButton* CCalcCommandButton::NewL(
+                    CCalcFuncmapSubPane* aFuncmapSubPane,
+                    const CGulIcon* aUnpressedBmp,
+                    const CGulIcon* aPressedBmp,
+                    const CGulIcon* aInactiveBmp) 
+    {
+    CCalcCommandButton* self = new (ELeave) CCalcCommandButton();
+    CleanupStack::PushL(self);
+    self->ConstructL(aFuncmapSubPane, aUnpressedBmp,
+                     aPressedBmp, aInactiveBmp);
+    CleanupStack::Pop(self); 
+    return self;
+    }
+
+// Destructor
+CCalcCommandButton::~CCalcCommandButton()
+    {
+    }
+
+
+
+// ---------------------------------------------------------
+// CCalcCommandButton::SetStateAndRedraw
+// Button state is set and re-draw.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcCommandButton::SetStateAndRedraw
+      (const TState& aState)      
+    {
+    iState = aState;
+    DrawNow();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcCommandButton::SetIsSelectedAndRedraw
+// Set flag which button is selected or not, and redraw.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcCommandButton::SetIsSelectedAndRedraw(TBool aIsSelected)
+    {
+    iIsSelected = aIsSelected;
+    DrawNow();    
+    }
+
+
+// ---------------------------------------------------------
+// CCalcCommandButton::State
+// Button state is returned.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CCalcCommandButton::TState CCalcCommandButton::State() const
+    {
+    return iState;
+    }
+
+
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcCommandButton::CCalcCommandButton()
+        : iState(ENormal),
+          iIsSelected(EFalse)
+    {
+    }
+
+// Second-phase constructor
+void CCalcCommandButton::ConstructL
+            (CCalcFuncmapSubPane* aFuncmapSubPane,
+             const CGulIcon* aUnpressedButtonIcon,
+             const CGulIcon* aPressedButtonIcon,
+             const CGulIcon* aInactiveButtonIcon)  
+    {
+    iUnpressedButton = aUnpressedButtonIcon;
+    iPressedButton = aPressedButtonIcon;
+    iInactiveButton = aInactiveButtonIcon;
+    SetContainerWindowL(*aFuncmapSubPane);
+    }
+
+
+// ---------------------------------------------------------
+// CCalcCommandButton::SizeChanged
+// Data of control is set.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcCommandButton::SizeChanged()
+    {
+    TRect buttonRect(Rect());
+    TRect aParentRect;
+    TAknWindowLineLayout area;
+    TAknWindowLineLayout cursor_color;
+    
+    if (AknLayoutUtils::ScalableLayoutInterfaceAvailable())
+		{
+	
+	area = AknLayoutScalable_Apps::cell_calc_pane_g1().LayoutLine();
+	
+	// For drawing cursor color.     
+    cursor_color = AknLayoutScalable_Apps::grid_highlight_pane_cp02().LayoutLine();
+    
+    	
+		}
+	
+	else
+	{
+			
+    area = AppLayout::Cell_pane_elements__calc__Line_1();
+// For drawing cursor color.     
+    cursor_color = AppLayout::Cell_pane_highlight_elements__various__Line_1(aParentRect);
+    
+	}
+	
+	area.iC = cursor_color.iC;
+    iLayoutRect.LayoutRect(buttonRect,area); 
+              
+    }
+
+// ---------------------------------------------------------
+// CCalcCommandButton::Draw
+// Draw a button
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcCommandButton::Draw
+      (const TRect& /* aRect */) const  
+    {
+    const CGulIcon* drawButton = iUnpressedButton;
+    
+    switch (iState)
+        {
+        case EPressed:
+            {
+            drawButton = iPressedButton;
+            break;
+            }
+        case EDimmed:
+            {
+            drawButton = iInactiveButton;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    CWindowGc& gc = SystemGc();
+
+    // Clear with skin background
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    AknsDrawUtils::Background( skin, AknsDrawUtils::ControlContext(this), this, gc, Rect());
+
+	if (AknLayoutUtils::ScalableLayoutInterfaceAvailable())
+		{
+		TAknWindowLineLayout layout = AknLayoutScalable_Apps::grid_highlight_pane_cp02().LayoutLine();
+		TAknWindowLineLayout area = AknLayoutScalable_Apps::cell_calc_pane_g1().LayoutLine();
+
+		TAknLayoutRect topLeft;
+		topLeft.LayoutRect(Rect(), area);
+
+		TAknLayoutRect bottomRight;
+		bottomRight.LayoutRect(Rect(),area);
+
+		TRect outerRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr);
+		TRect innerRect = outerRect;
+		innerRect.Shrink(TSize(5,5));
+		gc.SetPenStyle(CGraphicsContext::ENullPen);
+		 if (iIsSelected)
+			TBool highlightDrawn = AknsDrawUtils::DrawFrame(skin, gc, outerRect, innerRect,
+			KAknsIIDQsnFrGrid, KAknsIIDNone); 
+		}
+	else
+		{
+		if (iIsSelected)
+			{
+			iLayoutRect.DrawOutLineRect(gc);
+			}
+
+		}
+
+
+
+	//Set the size of the bitmap. SVG-T upgrade.
+	TRect rect(Rect()); 
+	 AknIconUtils::SetSize(drawButton->Bitmap(),rect.Size()); 
+	 AknIconUtils::SetSize(drawButton->Mask(), rect.Size());
+    iLayoutRect.DrawImage(gc, drawButton->Bitmap(), drawButton->Mask());
+
+    }
+ 
+// ---------------------------------------------------------
+// CCalcCommandButton::SetBitmapIcons
+// Sets the button bitmap Icons when the skin changes.
+// ---------------------------------------------------------
+//
+void CCalcCommandButton::SetBitmapIcons(CGulIcon* aUnpressedBmp,
+                    CGulIcon* aPressedBmp,
+                    CGulIcon* aInactiveBmp)
+{
+	iUnpressedButton = aUnpressedBmp;
+    iPressedButton = aPressedBmp;
+    iInactiveButton = aInactiveBmp;
+}
+
+// ---------------------------------------------------------
+// CCalcCommandButton::ButtonLayout
+// Gets the button layout. Used for pen input.
+// ---------------------------------------------------------
+//
+TRect CCalcCommandButton::ButtonLayout()
+	{
+	TRect buttonRect(Rect());
+	return buttonRect;
+	}
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcCont.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,1165 @@
+/*
+* Copyright (c) 2002 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:  Source file of "CCalcContainer",  CCalcContainer class 
+*                which derived from CCoeControl class. Role of this class 
+*                is to update the calculator data and display on user's input.
+*
+*/
+
+
+// INCLUDE FILES
+#include    <aknkeys.h>
+#include    <AknUtils.h>   // AknLayoutUtils::LayoutControl 
+#include    <Calcsoft.rsg>
+
+#include	<layoutmetadata.cdl.h>
+
+// For skin support. 
+#include    <AknsDrawUtils.h>
+#include    <AknsConstants.h>
+#include    <AknsUtils.h>
+#include    <AknsBasicBackgroundControlContext.h>
+#include    <applayout.cdl.h>
+#include    <aknlayoutscalable_apps.cdl.h>
+#include    <csxhelp/calc.hlp.hrh> // for help context of Calculator
+#include    "CalcApp.h" 
+
+#include    "CalcAppUi.h"
+#include    "CalcCont.h"
+#include    "CalcDoc.h"
+#include    "CalcEdit.h"
+#include    "CalcFunc.h"
+#include    "CalcOutSheet.h"
+#include    "calc.hrh"
+#include    "CalcView.h"
+#include	"CalcEnv.h"
+#include    "CalcHistory.h"
+#include    "CalcDrawingConst.laf" // for layout information
+
+
+#include <AknDef.h>
+#include <eiksbfrm.h> 
+#include <eikscrlb.h>
+
+
+#define KEY_CODE_VAL 57 //for all number inputs
+#define ASCII_ZERO 48
+
+//  LOCAL CONSTANTS AND MACROS  
+const TInt KCallBackDelay(1000000); // In microseconds
+const TInt KCallBackInterval(1000000); // In microseconds
+const TInt KCallBackPriority(CActive::EPriorityUserInput);
+
+// Count of controls in Calculator.
+// Controls are editor pane, output sheet, and function map.
+// Therefore, this count is 3.  
+const TInt KCalcCountOfControls(3);
+
+// Define index of control
+enum TCalcControlIndex
+    {
+    ECalcControlFunctionMap,
+    ECalcControlOutputSheet,
+	ECalcControlEditorPane
+    };
+
+// If const TChar is used, complie error occurs in THUMB build.
+// To avoid this, #define is used.
+#define KCalcAsteriskBtn '*'
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// Two-phased constructor.
+CCalcContainer* CCalcContainer::NewL(
+                    CCalcView* aView)
+    {
+    CCalcContainer* self = new (ELeave) CCalcContainer();
+    CleanupStack::PushL(self);
+    self->ConstructL(aView);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+
+// Destructor
+CCalcContainer::~CCalcContainer()
+    {
+    delete iEditorPane;
+    delete iFuncmapPane;
+    delete iSheetPane;
+
+    delete iTimeout;
+
+    if ( iTimeoutChr )
+    	{
+        delete iTimeoutChr;
+        iTimeoutChr = NULL;
+    	}
+    if ( iTimeoutShift )
+    	{
+        delete iTimeoutShift;
+        iTimeoutShift = NULL;
+    	}
+
+    delete iSkinContext;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::ProcessPreinputL
+// This function is called when decimal point or a digit is inputted.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::ProcessPreinputL()
+    {
+    TInt currentState = iView->State();
+    CCalcView::TKindOfInput latestInput(iView->LatestInput());
+
+    if (currentState == CCalcView::ESelectResult)  
+                              // State 5 : User has selected result
+        {
+        iEditorPane->ResetL();  // Set editline "0"
+        iView->UpdateState(CCalcView::EAllClear);
+        iCalcDocument->AddEmptyLine();
+        iSheetPane->ScrollToBottomL();
+        ScrollArrowUpdate();
+        }
+    else if (currentState == CCalcView::EOperandAndOperator ||  
+                                           // State 3 : operand and operator
+             latestInput == CCalcView::EMemoryRecall  ||
+             latestInput == CCalcView::EMemorySave)
+        {   
+        iEditorPane->ClearOperand();
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::InputClearL
+// This function should be called when editor is cleared.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::InputClearL()
+    {
+    iEditorPane->ResetL();
+    iView->UpdateState(CCalcView::EAllClear);
+    
+    const TCalcEditLine lastLine((*(iCalcDocument->History()))[0]);  
+                                              // Get latest historical line.
+    const TPtrC number(lastLine.NumberString());
+    
+    //  If latest historical line is not empty,
+    // empty line is added in the history and the history is shown.
+    if ( number.Length() )
+        {
+        iCalcDocument->AddEmptyLine();
+        iSheetPane->ScrollToBottomL();
+        ScrollArrowUpdate();
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::ScrollArrowUpdate
+// This function should be called when OutputSheet is scrolled
+// or history is added.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::ScrollArrowUpdate()
+    {
+    iFuncmapPane->RedrawScrollButtons();
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::SetChangeSignEnableL
+// This function is called when number of editor is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::SetChangeSignEnableL()
+    {
+    TCalcEditLine editLine(iEditorPane->EditLine());
+    TBool changeSignEnable(ETrue);
+    
+    if (editLine.NumberL() == 0.0)
+        {
+        changeSignEnable = EFalse;    
+        }
+    
+    iFuncmapPane->SetChangeSignEnable(changeSignEnable);
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::SetClearKeyEnable
+// This function is called when number of editor is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::SetClearKeyEnable() 
+    {
+    TCalcEditLine editLine( iEditorPane->EditLine() );
+    TBool clearKeyEnable( ETrue );
+    
+    // eitline's number is 0.0 and length is 1  and the no operator
+    TRAP_IGNORE(
+        {
+        if ( editLine.CheckZeroL() && ( editLine.Operator() ==
+            TCalcEditLine::ECalcOperatorNone ) )
+            {
+            clearKeyEnable = EFalse; 
+            }
+        }
+    )
+    iFuncmapPane->SetClearKeyEnable( clearKeyEnable );
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::SetChangeSignDisable
+// This function is called when Operator +, - , *, / key is pressed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::SetChangeSignDisable()
+    {
+    
+    TBool changeSignEnable(EFalse);
+    iFuncmapPane->SetChangeSignEnable(changeSignEnable);
+    
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::SetSqrtEnableL
+// This function is called when number of editor is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::SetSqrtEnableL()
+    {
+	TCalcEditLine editLine(iEditorPane->EditLine());
+	TBool sqrtEnable(ETrue);
+    
+    if (editLine.NumberL() == 0.0)
+        {
+        sqrtEnable = EFalse;    
+		}
+	iFuncmapPane->SetSqrtEnable(sqrtEnable);
+	}
+
+// ---------------------------------------------------------
+// CCalcContainer::SetPercentEnableL
+// This function is called when number of editor is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::SetPercentEnableL()
+    {
+	TCalcEditLine editLine(iEditorPane->EditLine());
+	TBool percentEnable(ETrue);
+    
+    if (editLine.NumberL() == 0.0)
+        {
+        percentEnable = EFalse;    
+		}
+	iFuncmapPane->SetPercentEnable(percentEnable);
+	}
+
+
+// ---------------------------------------------------------
+// CCalcContainer::TimeoutCallbackL
+// If no key is pressed after pressing *-button and a few time
+// passes, this function is called    
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcContainer::TimeoutCallbackL(
+                         TAny* aObject)
+    {
+    STATIC_CAST(CCalcContainer*, aObject)->DoTimeoutL();
+    return 0;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::TimeoutCallbackL
+// If no key is pressed after pressing */button and a few time
+// passes, this function is called    
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcContainer::TimeoutCallbackChrL(
+                         TAny* aObject)
+    {
+    STATIC_CAST( CCalcContainer*, aObject )->DoTimeoutChrL();
+    return 0;
+    }
+// ---------------------------------------------------------
+// CCalcContainer::TimeoutCallbackL
+// If no key is pressed after pressing +#button and a few time
+// passes, this function is called    
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcContainer::TimeoutCallbackShiftL(
+                         TAny* aObject)
+    {
+    STATIC_CAST(CCalcContainer*, aObject)->DoTimeoutShiftL();
+    return 0;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::NotifyChangeDecimal
+// Call when decimal separator is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::NotifyChangeDecimal(TChar aOld, TChar aNew)
+    {
+    iEditorPane->NotifyChangeDecimal(aOld, aNew);
+    iSheetPane->DrawNow();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcContainer::GetHelpContext
+// This function is called when Help application is launched.  
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::GetHelpContext(
+                TCoeHelpContext& aContext) const
+    {
+    aContext.iMajor = KUidCalc;
+    aContext.iContext = KCALC_HLP_MAIN;
+    }
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcContainer::CCalcContainer():
+    iPrevInput(EKeyNull) 
+    {
+    }
+
+// Second-phase constructor
+void CCalcContainer::ConstructL(
+                     CCalcView* aView)
+    {
+    iView = aView;
+    CCalcAppUi* appui = CCalcAppEnv::Static()->AppUi();
+    iCalcDocument = STATIC_CAST(CCalcDocument*, appui->Document());
+    
+    // Make a window-owning control.
+    CreateWindowL();
+    
+    
+    
+    iFuncmapPane = CCalcFuncmapSubPane::NewL(this);
+    iSheetPane = CCalcOutputSheet::NewL(this);
+	iEditorPane = CCalcEditorSubPane::NewL(this);
+
+    iTimeout = CPeriodic::NewL(KCallBackPriority);
+ 
+    iTimeoutChr = CPeriodic::NewL( KCallBackPriority );
+    iTimeoutShift = CPeriodic::NewL( KCallBackPriority );
+
+    TRect rect(0, 0, 0, 0); 
+    // Temporary rect is passed. Correct rect is set in SizeChanged.
+    iSkinContext = CAknsBasicBackgroundControlContext::NewL(
+        KAknsIIDQsnBgAreaMainCalc, rect, EFalse);
+        iValue = 0;
+
+    // Set status pane layout usual.
+    CEikonEnv::Static()->AppUiFactory()->StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL ); 
+    }
+    
+void CCalcContainer::ActivateL()
+    {
+    
+    CCoeControl::ActivateL();   
+    SetChangeSignEnableL();
+    SetSqrtEnableL();
+    SetPercentEnableL();
+    ScrollArrowUpdate();
+    SetClearKeyEnable(); 
+    }
+    
+
+// ---------------------------------------------------------
+// CCalcContainer::DoTimeoutL
+// If no key is pressed until timeout of *-key,
+// this function is called.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::DoTimeoutL()
+    {
+    iTimeout->Cancel();
+    iFuncmapPane->NotifyTimeoutL(); 
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::DoTimeoutL
+// If no key is pressed until timeout of */key,
+// this function is called.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::DoTimeoutChrL()
+    {
+    iTimeoutChr->Cancel();
+    iFuncmapPane->NotifyTimeoutL(); 
+    }
+// ---------------------------------------------------------
+// CCalcContainer::DoTimeoutL
+// If no key is pressed until timeout of +#key,
+// this function is called.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::DoTimeoutShiftL()
+    {
+    iTimeoutShift->Cancel();
+    iFuncmapPane->NotifyTimeoutL(); 
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::HandleAsterKeyTimeoutForKeyPressL
+// Called when any key is pressed.
+// If timeout notifier for *-key is active, make calculation or
+// stop notifier according to user's input.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CCalcContainer::HandleAsterKeyTimeoutForKeyPressL(
+     const TKeyEvent& aKeyEvent, TEventCode aType)
+    {
+    if (!(iTimeout->IsActive()))
+        {
+        return EFalse;
+        }
+
+    TBool ret(EFalse);
+    
+    if (aKeyEvent.iModifiers & EModifierShift)
+        {
+        // Stop timer for *-key and make calculaiton.
+        DoTimeoutL();
+        }
+
+    if (aType == EEventKey)
+        {
+        switch (aKeyEvent.iCode)
+            {
+            // Stop timer and no calculation is made 
+            // if pressed arrow or OK key.
+            // This depends on spec of Editing.
+            case EKeyLeftArrow:
+            case EKeyRightArrow:
+            case EKeyUpArrow:
+            case EKeyDownArrow:
+            case EKeyOK:
+                {
+                DoTimeoutL();
+                ret = ETrue;
+                break;
+                }
+            // Stop timer if *-key is pressed. 
+            // If release *-key, reset timer for the key.       
+            case KCalcAsteriskBtn:
+                {
+                iTimeout->Cancel();
+                break;
+                }
+            default:
+                {
+                // Stop timer for *-key and make calculaiton.
+                DoTimeoutL();
+                break;
+                }
+            }
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::HandleAsterKeyTimeoutForKeyPressL
+// Called when any key is pressed.
+// If timeout notifier for */key is active, make calculation or
+// stop notifier according to user's input.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CCalcContainer::HandleChrKeyTimeoutForKeyPressL(
+     const TKeyEvent& aKeyEvent, TEventCode aType )
+    {
+    if ( !( iTimeoutChr->IsActive() ) )
+        {
+        return EFalse;
+        }
+
+    TBool ret( EFalse );
+    
+    if ( aKeyEvent.iModifiers & EModifierShift )
+        {
+        DoTimeoutChrL();
+        }
+    if ( aKeyEvent.iModifiers & EModifierFunc )
+        {
+        // Stop timer for */key and make calculaiton.
+        iTimeoutChr->Cancel();
+        } 
+
+    if ( aType == EEventKey )
+        {
+        switch ( aKeyEvent.iCode )
+            {
+            // Stop timer and no calculation is made 
+            // if pressed arrow or OK key.
+            // This depends on spec of Editing.
+            case EKeyLeftArrow:
+            case EKeyRightArrow:
+            case EKeyUpArrow:
+            case EKeyDownArrow:
+            case EKeyOK:
+                {
+                DoTimeoutChrL();
+                ret = ETrue;
+                break;
+                }
+            default:
+                {
+                // Stop timer for */key and make calculaiton.
+                DoTimeoutChrL();
+                break;
+                }
+            }
+        }
+    return ret;
+    }
+// ---------------------------------------------------------
+// CCalcContainer::HandleAsterKeyTimeoutForKeyPressL
+// Called when any key is pressed.
+// If timeout notifier for +#key is active, make calculation or
+// stop notifier according to user's input.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CCalcContainer::HandleShiftKeyTimeoutForKeyPressL(
+     const TKeyEvent& aKeyEvent, TEventCode aType )
+    {
+    if ( !( iTimeoutShift->IsActive() ) )
+        {
+        return EFalse;
+        }
+
+    TBool ret( EFalse );
+    
+    if ( aKeyEvent.iModifiers & EModifierShift )
+        {
+        // Stop timer for +#key and make calculaiton.
+        iTimeoutShift->Cancel();
+        }
+    if ( aKeyEvent.iModifiers & EModifierFunc )
+        {
+        DoTimeoutShiftL();
+        }    
+
+    if ( aType == EEventKey )
+        {
+        switch ( aKeyEvent.iCode )
+            {
+            // Stop timer and no calculation is made 
+            // if pressed arrow or OK key.
+            // This depends on spec of Editing.
+            case EKeyLeftArrow:
+            case EKeyRightArrow:
+            case EKeyUpArrow:
+            case EKeyDownArrow:
+            case EKeyOK:
+                {
+                DoTimeoutShiftL();
+                ret = ETrue;
+                break;
+                }
+            default:
+                {
+                // Stop timer for +#key and make calculaiton.
+                DoTimeoutShiftL();
+                break;
+                }
+            }
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::CountComponentControls
+// Return count of control components.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcContainer::CountComponentControls() const
+    {
+    return KCalcCountOfControls ;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::ComponentControl
+// Return control pointer which correspond to argument aIndex 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CCoeControl* CCalcContainer::ComponentControl
+                ( TInt aIndex ) const   
+    {
+    CCoeControl* control = NULL; 
+        
+    switch (aIndex)
+        {
+        case ECalcControlEditorPane:
+            {
+            control = iEditorPane;
+            break;
+            }
+        case ECalcControlFunctionMap:
+            {
+            control = iFuncmapPane;
+            break;
+            }
+        case ECalcControlOutputSheet:
+            {
+            control = iSheetPane;
+            break;
+            }
+        default:
+            {         
+            break;
+            }
+        }
+
+    return control;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::OfferKeyEventL
+// This function is called when a key is pressed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TKeyResponse CCalcContainer::OfferKeyEventL
+                ( const TKeyEvent& aKeyEvent,  
+                  TEventCode aType )           
+    {
+    switch (aType)
+        {
+        case EEventKeyDown:
+        case EEventKey:
+            {
+            if (aKeyEvent.iScanCode != EStdKeyLeftArrow &&
+            aKeyEvent.iScanCode != EStdKeyRightArrow &&
+            aKeyEvent.iScanCode != EStdKeyUpArrow &&
+            aKeyEvent.iScanCode != EStdKeyDownArrow &&
+            aKeyEvent.iCode != EKeyOK)
+                {
+                iFuncmapPane->NotifyOtherThanOkKeyPressed();
+                }
+            iPrevInput = aKeyEvent.iCode;
+
+            if(!(iFuncmapPane->IsQwertyKeypadActive()))
+             {
+            if (HandleAsterKeyTimeoutForKeyPressL(aKeyEvent, aType))
+                {
+                return EKeyWasConsumed;
+                }
+            }
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+            else
+                {
+                if ( iFuncmapPane->GetKeyboardType() == EPtiKeyboardHalfQwerty )
+                	{
+                    if ( HandleChrKeyTimeoutForKeyPressL( aKeyEvent, aType ) )
+                        {
+                        return EKeyWasConsumed;
+                        }  
+                    if ( HandleShiftKeyTimeoutForKeyPressL( aKeyEvent, aType ) )
+                        {
+                        return EKeyWasConsumed;
+                        } 
+                    }
+                }
+#endif
+
+            iValue =1 ;
+            break;
+            }
+        case EEventKeyUp:
+            {
+            if(!(iFuncmapPane->IsQwertyKeypadActive()))
+             {
+            	
+            if (iPrevInput == KCalcAsteriskBtn && !iTimeout->IsActive() && iValue ==1 )
+                {
+                TCallBack callback(TimeoutCallbackL, this);
+                iTimeout->Start((TTimeIntervalMicroSeconds32) KCallBackDelay,
+                                (TTimeIntervalMicroSeconds32) KCallBackInterval, 
+                                callback);
+                }
+            }
+#ifdef RD_INTELLIGENT_TEXT_INPUT  
+            else
+                {
+                if ( iFuncmapPane->GetKeyboardType() == EPtiKeyboardHalfQwerty )
+                	{
+                    if ( aKeyEvent.iScanCode == EStdKeyLeftFunc && !iTimeoutChr->IsActive() && iValue == 1 )
+                        {
+                        TCallBack callback( TimeoutCallbackChrL, this );
+                        iTimeoutChr->Start( ( TTimeIntervalMicroSeconds32 ) KCallBackDelay,
+                                     ( TTimeIntervalMicroSeconds32 ) KCallBackInterval, 
+                                     callback );
+                        }
+                    if ( aKeyEvent.iScanCode == EStdKeyLeftShift && !iTimeoutShift->IsActive() && iValue == 1 )
+                        {
+                        TCallBack callback( TimeoutCallbackShiftL, this );
+                        iTimeoutShift->Start( ( TTimeIntervalMicroSeconds32 ) KCallBackDelay,
+                                     ( TTimeIntervalMicroSeconds32 ) KCallBackInterval, 
+                                     callback );
+                        }
+            	    }
+                }
+#endif
+
+            iFuncmapPane->NotifyReleaseKeyL();
+            iValue =0;
+            
+            DrawNow(); //redraw screen when a button up
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+
+    TKeyResponse keyResponse(iFuncmapPane->OfferKeyEventL(aKeyEvent, aType));
+    if (keyResponse == EKeyWasNotConsumed)
+        {
+        if(iFuncmapPane->IsQwertyKeypadActive())
+             {
+             iEditorPane->IsQwertyActive();
+             }
+        else
+        	{
+        	iEditorPane->IsQwertyNotActive();	
+        	}
+        // Edit buffer of line
+        keyResponse = iEditorPane->OfferKeyEventL(aKeyEvent, aType);
+        }
+    return keyResponse;
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::HandleResourceChange
+// Notifier for changing language
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::HandleResourceChange(TInt aType)
+    {
+    TRAP_IGNORE( HandleResourceChangeCalSoftL( aType ) );
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::HandleResourceChange
+// Notifier for changing language
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::HandleResourceChangeCalSoftL(TInt aType)
+    {
+    if ((aType == KEikDynamicLayoutVariantSwitch) || (aType == KAknsMessageSkinChange) )
+        {
+         	    
+	     TRect mainPaneRect ;
+	     TRect statusPaneRect;
+	     TBool signstate = EFalse;
+	     TBool sqrtstate = EFalse;
+	     TBool percentstate = EFalse;
+        TBool clearstate = EFalse;
+        	     
+        if ( Layout_Meta_Data::IsLandscapeOrientation() )
+            {
+            // when calculator is in Landscape layout, the statuspane displays     
+            iEikonEnv->AppUiFactory()->StatusPane()
+                ->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL );
+            AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
+            }
+        else
+            {
+            AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
+            AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, statusPaneRect );
+            mainPaneRect.iTl = statusPaneRect.iTl;
+            }
+	    
+	    
+	    //check if funcpane already exists
+
+      TInt selected = 0;
+	    if(iFuncmapPane)
+	    {
+	    	//store the  states of the buttons
+	        signstate = iFuncmapPane->GetChangeSignButtonState();
+	        sqrtstate = iFuncmapPane->GetSqrtButtonState();
+	        percentstate = iFuncmapPane->GetPercentButtonState();
+
+            selected = iFuncmapPane->GetSelectedButtonId();
+            
+            clearstate = iFuncmapPane->GetClearButtonState(); 
+         	
+         	//delete the function pane
+	        delete(iFuncmapPane);
+	        iFuncmapPane =  NULL;
+	        
+	    }
+        //Reload the bitmaps
+        (CCalcAppEnv::Static())->SetSkinChangedValue(EFalse);
+        (CCalcAppEnv::Static())->UpdateAknConstArrayForFuncMap();
+        (CCalcAppEnv::Static())->LoadFuncMapBitmapL();
+	    
+        //Create the new pane
+        iFuncmapPane = CCalcFuncmapSubPane::NewL(this); 
+
+        if ( AknLayoutUtils::PenEnabled() )
+        {		    
+        iFuncmapPane->SetHighlightButton( 0, selected );   
+        }
+        
+        iFuncmapPane->ActivateL();
+        
+        SetRect(mainPaneRect);
+        iFuncmapPane->NotifyLangChange();
+        DrawNow();
+
+        //Restore the states of the buttons
+        iFuncmapPane->SetChangeSignEnable(signstate);
+        iFuncmapPane->SetSqrtEnable(sqrtstate);
+        iFuncmapPane->SetPercentEnable(percentstate);
+        iFuncmapPane->SetClearKeyEnable( clearstate );
+        
+        //Update scroll bar here
+        ScrollArrowUpdate();
+				iSheetPane->HandleResourceChange(aType);
+        }
+    else
+        {
+        
+        CCoeControl::HandleResourceChange(aType);
+        }
+      
+    }
+ 
+
+// ---------------------------------------------------------
+// CCalcContainer::SizeChanged
+// Control size is set.
+// This function is called when the size changes.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::SizeChanged()
+    {
+    TRect parentRect(Rect());
+    
+    if (iSkinContext)
+        {
+        iSkinContext->SetRect(parentRect);
+        }
+
+    
+	if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
+		{
+    		 
+    		// Set layout of function map subpane, output sheet  and editor sub pane.		
+    	    if( AknLayoutUtils::PenEnabled() )
+    	    {
+    	        if (Layout_Meta_Data::IsLandscapeOrientation())
+    	        {
+    	        
+    	        	AknLayoutUtils::LayoutControl(
+    			    iFuncmapPane, parentRect, AknLayoutScalable_Apps::grid_calc_pane(enTouch_with_lsc).LayoutLine());
+    			    
+    	            AknLayoutUtils::LayoutControl(
+    		    	iSheetPane, parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_lsc).LayoutLine());
+    		    		
+    		        AknLayoutUtils::LayoutControl(
+    			    iEditorPane, parentRect,AknLayoutScalable_Apps::calc_display_pane(enTouch_with_lsc).LayoutLine());
+    	        }
+    	        else
+    	        {
+    	            AknLayoutUtils::LayoutControl(
+    			    iFuncmapPane, parentRect, AknLayoutScalable_Apps::grid_calc_pane(enTouch_with_prt).LayoutLine());
+    			    
+    	            AknLayoutUtils::LayoutControl(
+    		    	iSheetPane, parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_prt).LayoutLine());
+    		    	
+    		    	AknLayoutUtils::LayoutControl(
+    			    iEditorPane, parentRect,AknLayoutScalable_Apps::calc_display_pane(enTouch_with_prt).LayoutLine());
+    	        }
+    	    }
+    	    else
+    	    {
+    	        AknLayoutUtils::LayoutControl(
+    			    iFuncmapPane, parentRect, AknLayoutScalable_Apps::grid_calc_pane(enTouch_disabled).LayoutLine());
+    			    
+    		    AknLayoutUtils::LayoutControl(
+    			iSheetPane, parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_disabled).LayoutLine());
+    			
+    			AknLayoutUtils::LayoutControl(
+    			iEditorPane, parentRect,AknLayoutScalable_Apps::calc_display_pane(enTouch_disabled).LayoutLine());
+    		    
+    	    }	
+
+		}
+	else
+		{
+    // Set layout of function map subpane.
+    AknLayoutUtils::LayoutControl(
+	iFuncmapPane, parentRect, AppLayout::grid_calc_pane());	
+	
+	
+    // Set layout of output sheet.
+    AknLayoutUtils::LayoutControl(
+		 iSheetPane, parentRect,AppLayout::gqn_graf_calc_paper());
+	
+	// Set layout of editor subpane.
+    AknLayoutUtils::LayoutControl(
+        iEditorPane, parentRect,AppLayout::Calculator_elements_Line_1());
+		}	
+	}
+
+// ---------------------------------------------------------
+// CCalcContainer::Draw
+// Clear whole screen. After this, draw editor, output sheet,
+// and function map.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::Draw(const TRect& aRect) const
+    {
+    CWindowGc& gc = SystemGc();
+    gc.Clear(aRect);
+
+    // Drawing skin
+    if (iSkinContext)
+        {
+        MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+        
+        AknsDrawUtils::Background(
+            skin, iSkinContext, this, gc, aRect);
+        }
+     
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::MopSupplyObject()
+// Pass skin information if need.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TTypeUid::Ptr CCalcContainer::MopSupplyObject(TTypeUid aId)
+    {
+    if (aId.iUid == MAknsControlContext::ETypeId && iSkinContext)
+        {
+        return MAknsControlContext::SupplyMopObject(aId, iSkinContext);
+        }
+
+    return CCoeControl::MopSupplyObject(aId);
+    }
+
+// ---------------------------------------------------------
+// CCalcContainer::ShowSqrtButton()
+// Enable (or disable) the square root button.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::ShowSqrtButton(TBool aEnable)
+	{
+		iFuncmapPane->SetSqrtEnable(aEnable);
+	}	
+
+// ---------------------------------------------------------
+// CCalcContainer::ShowPercentButton()
+// Enable (or disable) the percent button.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::ShowPercentButton(TBool aEnable)
+	{
+		iFuncmapPane->SetPercentEnable(aEnable);
+	}
+
+// ---------------------------------------------------------
+// CCalcContainer::GetState()
+// Returns the state of the calculator.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CCalcView::TStateNo CCalcContainer::GetState()
+{
+	return (iView->State());
+}
+
+// ---------------------------------------------------------
+// CCalcContainer::HandlePointerEventL
+// Handled when pen input occured.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcContainer::HandlePointerEventL
+                ( const TPointerEvent& aPointerEvent )           
+    {
+    CCoeControl::HandlePointerEventL( aPointerEvent );
+    }
+    
+
+// ---------------------------------------------------------
+// ---------------------------------------------------------
+// CCalcContainer::HandleMiddleSoftKey()
+// Handled when MSK is selected.
+// ---------------------------------------------------------
+//
+void CCalcContainer::HandleMiddleSoftKey()
+                
+	{
+	TRAP_IGNORE( iFuncmapPane->HandleMiddleSoftKeyOREKeyOKL() );
+	}
+
+// ---------------------------------------------------------
+// ---------------------------------------------------------
+// SetOperatorFromTouchL
+// Handle digit inputs
+// ---------------------------------------------------------
+//
+void CCalcContainer::SetOperatorFromTouchL(TInt akey )
+{
+	  //Simulate events as events are occurring from the KB Events
+	  TKeyEvent eventkey;
+	  TEventCode keycode;
+    keycode = EEventKeyDown;
+    eventkey.iCode = 0;
+    eventkey.iScanCode = ASCII_ZERO + akey;
+    
+    //First send Keydown event
+   	OfferKeyEventL(eventkey,keycode);
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+    eventkey.iCode = ASCII_ZERO + akey;
+#else
+    eventkey.iCode = KEY_CODE_VAL;
+#endif
+    keycode = EEventKey;
+    
+    //Next send EventKey
+    OfferKeyEventL(eventkey,keycode);
+    
+    
+    //Finally send Keyup
+    eventkey.iScanCode = ASCII_ZERO + akey;
+    keycode = EEventKeyUp;
+    OfferKeyEventL(eventkey,keycode);
+}
+
+// ---------------------------------------------------------
+// ---------------------------------------------------------
+// ClearInputKeyL
+// Handle 'c' input key from Touch
+// ---------------------------------------------------------
+//
+void CCalcContainer::ClearInputKeyL(TInt aRepeat)
+{
+	  //Simulate events as events are occurring from the KB Events
+	TKeyEvent eventkey;
+	TEventCode keycode;
+    keycode = EEventKeyDown;
+    eventkey.iCode = 0; 
+    eventkey.iScanCode = 1; //for clear input key
+    eventkey.iRepeats = aRepeat;
+    
+    //First send Keydown event
+    OfferKeyEventL(eventkey,keycode);
+    eventkey.iCode = 8;  //clear input key icode
+    keycode = EEventKey;
+    
+    //Next send EventKey
+    OfferKeyEventL(eventkey,keycode);
+    keycode = EEventKeyUp;
+    
+     //Finally send Keyup
+    OfferKeyEventL(eventkey,keycode);    
+    
+}
+
+
+// ---------------------------------------------------------
+// ---------------------------------------------------------
+// SetSeparatorFromTouch
+// Handle '.' input key from Touch
+// ---------------------------------------------------------
+//
+void CCalcContainer::SetSeparatorFromTouchL()
+{
+    // set the right iCode and iScanCode for
+    // decimal point
+    if ( iFuncmapPane->IsQwertyKeypadActive() )
+        {
+        // Simulate events as events are occurring from the KB Events
+        TKeyEvent eventkey;
+        TEventCode keycode = EEventKeyDown;
+        eventkey.iCode = 0;
+#ifdef RD_INTELLIGENT_TEXT_INPUT  
+        if ( iFuncmapPane->GetKeyboardType() == EPtiKeyboardHalfQwerty )
+        	{
+            eventkey.iScanCode = 126;  //scan code for separator
+        	}
+        else
+#endif
+        	{
+            eventkey.iScanCode = 122;  //scan code for separator
+        	}
+
+        // First send Keydown event
+        OfferKeyEventL( eventkey, keycode );
+        eventkey.iCode = 46;  // icode for separator
+        keycode = EEventKey;
+
+        // Next send EventKey
+        OfferKeyEventL( eventkey, keycode );
+        }
+    else
+        {
+        // Simulate events as events are occurring from the KB Events	
+        TKeyEvent eventkey;
+        TEventCode keycode = EEventKeyDown;
+        eventkey.iCode = 0;
+        eventkey.iScanCode = 127;  // scan code for separator
+
+        // First send Keydown event
+        OfferKeyEventL( eventkey, keycode );
+        eventkey.iCode = 35;  // icode for separator
+        keycode = EEventKey;
+
+        // Next send EventKey
+        OfferKeyEventL( eventkey, keycode );
+        }     
+}
+   
+//  End of File  CALCCONT_CPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcDoc.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,558 @@
+/*
+* Copyright (c) 2002 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:  Document class, CCalcDocument
+*                Derived from CEikDocument
+*                The history of inputted data is held.
+*                The memory of four-arithmetical-operations operation 
+*                or a calculation result is held.
+*                The last result and memory are saved at a file and 
+*                it restores.
+*
+*/
+
+
+
+// INCLUDE FILES  
+#include    "CalcDoc.h"
+#include    "CalcEditline.h"
+#include    "CalcAppUi.h"
+#include    "CalcApp.h"
+#include	"CalcEnv.h"
+#include    "CalcHistory.h"
+#include	"e32math.h"
+#include <e32cmn.h>
+#include <s32file.h>
+// CONSTANTS
+const TReal64 KCalcDefaultMemory(0.0);
+const TReal64 KCalcDefaultLastResult(0.0);
+const TReal64 KCalcDefaultZero(1E-12);
+
+_LIT( KCalculatorFilename,"Calcsoft.ini");
+_LIT(KDelimiter, ":");
+
+// ================= MEMBER FUNCTIONS =======================
+
+// Two-phased constructor.
+CCalcDocument* CCalcDocument::NewL
+                (CEikApplication& aApp) 
+    {
+    CCalcDocument* self = new (ELeave) CCalcDocument(aApp);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// Destructor
+CCalcDocument::~CCalcDocument()
+    {
+    delete iHistory;
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::CalculateAndAddHistoryL
+// This function is called when State is changed to State3 or State5. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TReal64 CCalcDocument::CalculateAndAddHistoryL
+                   (TReal64 aOperand,
+                    const TCalcEditLine& aLine)
+    {
+	iProvisionalResult = CalculateL(aOperand, aLine.Operator()); 
+	iHistory->Add(aLine);       // Add a line to history.	
+	return iProvisionalResult;	
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::CalculateAndNoHistoryL
+// This function is called when the calculations is not
+// written to the Outputsheet (sqrt and percent in some cases).
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TReal64 CCalcDocument::CalculateAndNoHistoryL
+                   (TReal64 aOperand,
+                    const TCalcEditLine& aLine)
+	{
+	TReal64 result = CalculateL(aOperand, aLine.Operator()); 
+	return result;
+	}
+
+// ---------------------------------------------------------
+// CCalcDocument::CalculateAndModifyHistoryL
+// This function is called when the output needs to be edited
+// before it is displayed in the Outputsheet. This function 
+// may call the CalculateL twice, because it may need to
+// calculate the percent first.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TReal64 CCalcDocument::CalculateAndModifyHistoryL
+                   (TReal64 aOperand,
+                    TCalcEditLine& aLine,
+					TCalcEditLine::TCalcOperatorType aOperator)
+	{
+	if (aOperator == TCalcEditLine::ECalcMultiply)
+		iProvisionalResult = CalculateL(aOperand, aLine.Operator()); 
+	else
+		{
+		TReal64 iTempResult = CalculateL(aOperand, aLine.Operator()); 
+		iProvisionalResult = CalculateL(iTempResult, aOperator);
+		}
+
+	aLine.SetOperator(aOperator);
+	// Get the percent character from iCalcAppEnv (it uses the resource
+	// file to get the character).
+	TChar character((iCalcAppEnv->OutSheetOperator(TCalcEditLine::ECalcPercent))[0]);
+	aLine.AppendNumberStringL(character); // Add percent to the line
+	iHistory->Add(aLine);       // Add a line to history.	
+	return iProvisionalResult;
+	}
+
+// ---------------------------------------------------------
+// CCalcDocument::AddEqualLineAndUpdateLastResult
+// This is called when "Equal" command is selected. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::AddEqualLineAndUpdateLastResultL()
+    {
+    TCalcEditLine line;
+    line.SetOperator(TCalcEditLine::ECalcEqual);
+    line.SetNumber(iProvisionalResult);
+    iHistory->Add(line);         // Add a line to history.
+    iLastResult = iProvisionalResult;
+    SaveStateL();
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::AddEmptyLine
+// Add a empty line
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::AddEmptyLine()
+    {
+    TCalcEditLine line;
+    iHistory->Add(line);       
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::MemorySave
+// Save a memory from value of current editor.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::MemorySaveL
+                   (TReal64 aNewMemory)
+    {
+    iMemory = aNewMemory;
+    SaveStateL();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcDocument::HasMemory
+// Check memory non-zero.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CCalcDocument::HasMemory() const
+    {
+    return (iMemory != 0.0);
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::Memory
+// Return memory.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TReal64 CCalcDocument::Memory() const
+    {
+    return (iMemory);
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::MemoryClear
+// Clear memory.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::MemoryClearL()
+    {
+    iMemory = 0.0;
+    SaveStateL(); 	
+    }
+
+// ----------------------------------------------------
+// CCalcDocument::LastResult
+// Return Last result.
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+TReal64 CCalcDocument::LastResult() const
+    {
+    return (iLastResult);
+    }
+
+// ----------------------------------------------------
+// CCalcDocument::ProvisionalResult
+// Return provisional result
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+TReal64 CCalcDocument::ProvisionalResult() const
+    {
+    return iProvisionalResult;
+    }
+
+
+// ----------------------------------------------------
+// CCalcDocument::History
+// Return CCalcHistory class.
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+CCalcHistory* CCalcDocument::History() const
+    {
+    return iHistory;
+    }
+
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcDocument::CCalcDocument
+               (CEikApplication& aApp) 
+              : CEikDocument(aApp)
+    {
+    }
+
+// Second phase constructor.
+void CCalcDocument::ConstructL()
+    {
+    iHistory = new (ELeave) CCalcHistory();
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::CalculateL
+// Calculate result
+// Leave may occur, causes KErrOverflow or KErrDivideByZero.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TReal64 CCalcDocument::CalculateL
+        (TReal64 aOperand,
+         TCalcEditLine::TCalcOperatorType aOperator) 
+    {
+    TReal64  result(iProvisionalResult);
+
+    switch (aOperator)
+        {
+        case  TCalcEditLine::ECalcAdd:
+            {
+            result += aOperand;
+            break;
+            }
+        case  TCalcEditLine::ECalcSubtract:
+            {
+            result -= aOperand;
+            if( Abs(result)<= KCalcDefaultZero )
+            	{
+            	result = 0;
+            	}
+            break;
+            }
+        case  TCalcEditLine::ECalcMultiply:
+            {
+            result *= aOperand;
+            break;
+            }
+        case  TCalcEditLine::ECalcDivide:
+            {
+            if ( aOperand == 0 )
+                {
+                iCCalcView->UpdateState( CCalcView::EOperator );
+                User::Leave(KErrDivideByZero); //  Error causes
+                }
+            else
+                {
+                result /= aOperand;
+                }
+            break;
+            }
+		case TCalcEditLine::ECalcSqrt:
+			{
+			if ( aOperand < 0 )
+				{
+                User::Leave(KErrNotSupported); //  Error causes
+                }
+			else
+				Math::Sqrt(result, aOperand);
+			break;
+			}
+		case TCalcEditLine::ECalcPercent:
+			{
+			result = (result * aOperand) / 100;
+			break;
+			}
+        case  TCalcEditLine::ECalcOperatorNone:
+            {
+            result = aOperand;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    //  Check Result. If overflow, Leave occurs.
+    CheckResultL(&result);
+
+    // Overflow do not occur
+    return  result;
+    }
+
+
+// ---------------------------------------------------------
+// CCalcDocument::CheckResultL
+// Check overflow and underflow  
+// Leave may occur, causes KErrOverflow.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::CheckResultL
+                   (TReal64* aResult)    
+    {
+    // Set data format 
+    TRealFormat realFormat(KCalcMaxNumberWidth, KCalcMaxDigits);  
+    if ( *aResult >= 0 )
+        {
+        realFormat.iWidth--;
+        }
+    realFormat.iType = KRealFormatNoExponent;
+    realFormat.iTriLen = 0;  //  Delimit character is nothing
+    TLocale locale;
+    TChar separator(locale.DecimalSeparator());
+    
+    realFormat.iPoint = separator;
+
+    TBuf<KCalcMaxNumberWidth> buffer;  
+    TInt code = buffer.Num(*aResult, realFormat);
+    
+    if(KErrOverflow == code || KErrUnderflow == code)
+	    {
+	    TRealFormat realFormat(KCalcMaxNumberWidth);  
+	    if ( *aResult >= 0 )
+	        {
+	        realFormat.iWidth--;
+	        }
+	    realFormat.iType = KRealFormatExponent;
+	    realFormat.iPlaces = 3;
+	    realFormat.iTriLen = 0;  //  Delimit character is nothing
+	    TLocale locale;
+	    TChar separator(locale.DecimalSeparator());
+	    
+	    realFormat.iPoint = separator;
+
+	    TBuf<KCalcMaxNumberWidth> buffer;  
+	    code = buffer.Num(*aResult, realFormat);
+	    }
+	
+	switch (code)
+        {
+        case KErrOverflow:
+            {
+            User::Leave(KErrOverflow);  
+            break;
+            }
+        case KErrUnderflow:
+            {
+            *aResult = 0.0;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+   
+    }
+
+
+// ---------------------------------------------------------
+// CCalcDocument::ExternalizeL
+// Externalising of the last result and memory.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::ExternalizeL
+        (RWriteStream& aStream) const 
+    {
+    aStream.WriteReal64L(iLastResult);  // Write last result
+    aStream.WriteReal64L(iMemory);      // Write memory
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::InternalizeL
+// Internalising of the last result and memory.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::InternalizeL
+        (RReadStream& aStream) 
+    {
+    iLastResult = aStream.ReadReal64L();    // Read last result
+    iMemory = aStream.ReadReal64L();        // Read memory
+
+    // If read value is out of range, 
+    // memory is replaced to default one.
+    TRAPD(error, CheckResultL(&iMemory));
+    if (error == KErrOverflow)
+        {
+        iMemory = KCalcDefaultMemory;
+        }
+
+    // If read value is out of range, 
+    // last result is replaced to default one.
+    TRAP(error, CheckResultL(&iLastResult));
+    if (error == KErrOverflow)
+        {
+        iLastResult = KCalcDefaultLastResult;
+        }
+
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::CreateAppUiL
+// This function is called when Calculator application is opened. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CEikAppUi* CCalcDocument::CreateAppUiL()
+    {
+    return new (ELeave) CCalcAppUi;
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::SaveStateL
+// Store memory and last result
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::SaveStateL()
+{
+		RFileWriteStream out;
+		RFs fileSession;
+			
+		User::LeaveIfError(fileSession.Connect());
+    	CleanupClosePushL(fileSession);
+    
+    	TFileName filePath;
+		TBuf<1> tempDes;
+		TChar driveChar;
+	   	
+    	User::LeaveIfError(fileSession.PrivatePath(filePath));
+    	fileSession.DriveToChar(KDefaultDrive, driveChar);
+    	tempDes.Append(driveChar);
+    	filePath.Insert(0,KDelimiter);
+    	filePath.Insert(0,tempDes);
+    	filePath.Append(KCalculatorFilename);
+    	
+    	TInt err( out.Replace( fileSession, filePath,EFileWrite ) );
+	
+	if( !err )
+		{
+		TRAP( err, ExternalizeL( out ) );
+	
+		out.Close();
+		}
+		  
+  	CleanupStack::PopAndDestroy();
+  		
+}
+
+ // ---------------------------------------------------------
+// CCalcDocument::LoadStateL
+// Restore memory and last result
+// This function is called when document file exists. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//   
+    void CCalcDocument::LoadStateL()
+    {
+    	RFileReadStream in;
+    	RFs fileSession;
+    		
+    	User::LeaveIfError(fileSession.Connect());
+    	CleanupClosePushL(fileSession);
+
+		TFileName filePath;
+		TBuf<1> tempDes;
+		TChar driveChar;
+    	User::LeaveIfError(fileSession.PrivatePath(filePath));
+    	fileSession.DriveToChar(KDefaultDrive, driveChar);
+    	tempDes.Append(driveChar);
+    	filePath.Insert(0,KDelimiter);
+    	filePath.Insert(0,tempDes);
+    	filePath.Append(KCalculatorFilename);
+  		
+		TInt err( in.Open( fileSession, filePath,
+			EFileRead ) );
+
+	if( !err )
+		{
+		TRAPD(readErr,InternalizeL( in ) );
+		
+		if ( readErr )
+        {
+        // Internalizing fails.
+        iMemory = KCalcDefaultMemory;         // Reset memoey
+        iLastResult = KCalcDefaultLastResult; // Reset last result
+        }
+        
+		in.Close();
+		}
+			CleanupStack::PopAndDestroy();
+		
+        SetChanged(EFalse);
+	
+    }
+
+// ---------------------------------------------------------
+// CCalcDocument::SetAppEnv
+// This function is used to receive a pointer to the
+// CCalcAppEnv.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::SetAppEnv(CCalcAppEnv* aCalcAppEnv)
+	{
+		iCalcAppEnv = aCalcAppEnv;
+	}
+
+// ---------------------------------------------------------
+// CCalcDocument::SetCalcView
+// This function is used to receive a pointer to the
+// SetCalcView.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcDocument::SetCalcView( CCalcView* aCCalcView )
+    {
+    iCCalcView = aCCalcView;
+    }
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcEdit.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,969 @@
+/*
+* Copyright (c) 2002 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:  Source file of "editor sub-pane", CCalcEditorSubPane class 
+*                which derived from CCoeControl class. 
+*                Role of this class is to draw editor.
+*
+*/
+
+
+// INCLUDE FILES
+#include <AknUtils.h>
+#include <Calcsoft.rsg>
+#include <avkon.hrh>
+#include <aknsoundsystem.h>
+#include    <applayout.cdl.h>
+#include <AknIconUtils.h>
+#include    <AknsDrawUtils.h>
+#include  <aknlayoutscalable_avkon.cdl.h>  
+#include <AknLayoutScalable_Avkon.cdl.common.h>
+#include <AknLayout2ScalableDef.h>
+#include <AvkonInternalCRKeys.h>
+#include    <aknlayoutscalable_apps.cdl.h>
+
+#include "CalcAppUi.h"
+#include "CalcCont.h"
+#include "CalcDoc.h"
+#include "CalcEdit.h"
+#include "CalcEnv.h"
+#include "CalcDrawingConst.laf" // for drawing information.
+#include "fbs.h"
+#include <PtiKeyMappings.h>
+
+#include <PtiDefs.h>
+#include <PtiEngine.h>
+#include <AknFepInternalCRKeys.h>
+#include <layoutmetadata.cdl.h>
+
+//  LOCAL CONSTANTS AND MACROS  
+
+// If const TChar is used, complie error occurs in THUMB build.
+// To avoid this, #define is used.
+#define KCalcHashBtn '#' 
+#define KZero 0.0 
+
+// ================= MEMBER FUNCTIONS =======================
+
+// Two-phased constructor.
+CCalcEditorSubPane* CCalcEditorSubPane::NewL(
+                    CCalcContainer* aContainer)
+    {
+    CCalcEditorSubPane* self = new (ELeave) CCalcEditorSubPane();
+    CleanupStack::PushL(self);
+    self->ConstructL(aContainer);
+    CleanupStack::Pop(self); 
+    return self;
+    }
+
+
+
+
+// Destructor
+CCalcEditorSubPane::~CCalcEditorSubPane()
+    {
+    iQwertyModeStatusProperty.Close();
+    delete iEngine;
+    delete iCRKey;
+    }
+
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::EditLine
+// Return reference of editor line which has been edited by user.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+const TCalcEditLine& CCalcEditorSubPane::EditLine() const
+    {
+    return iEditLine;
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::SetEditorNumber
+// Set TReal64 type editor number.
+// (other items were commented in a header). 
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::SetOperator(
+     TCalcEditLine::TCalcOperatorType aType)
+    {
+    iEditLine.SetOperator(aType);
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::SetEditorNumber
+// Set TReal64 type editor number.
+// (other items were commented in a header). 
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::SetEditorNumber(TReal64 aNewNumber)
+    {
+    iEditorNumber = aNewNumber;
+    iEditLine.SetNumber(aNewNumber);
+    }
+        
+// ---------------------------------------------------------
+// CCalcEditorSubPane::EditorNumber
+// Return TReal64 type editor number
+// (other items were commented in a header). 
+// ---------------------------------------------------------
+//
+TReal64 CCalcEditorSubPane::EditorNumber() const
+    {
+    return iEditorNumber;
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::ResetL
+// Clear editor.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::ResetL()
+    {
+    iEditLine.AllClear();  
+    iEditLine.ClearL();
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::ClearOperand
+// Clear operand
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::ClearOperand()
+    {
+    iEditLine.ClearOperand();  
+    }
+
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::ClearLastInput
+// Clear last input.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::ClearLastInputL()
+    {
+    const TPtrC number(iEditLine.NumberString());
+    
+    if (number.Length() == 1 && 
+        iCalcContainer->View()->State() == CCalcView::EOperandOnly)
+        {
+        iCalcContainer->InputClearL();
+        }
+    else
+        {
+        if (iEditLine.CheckZeroL())
+            {
+            iCalcContainer->InputClearL();
+            }
+        else
+            {
+            ClearL();
+            if (iEditLine.CheckZeroL() && 
+                iCalcContainer->View()->State() == CCalcView::EOperandOnly)
+                {
+                iCalcContainer->InputClearL();
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::OfferShortPressClearKeyEventL
+// Handle short-press-clear-key and CBA-clear-key event.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::OfferShortPressClearKeyEventL()
+    {
+    CCalcView* view = iCalcContainer->View();
+    CCalcView::TStateNo state(view->State());
+    CCalcView::TKindOfInput latestInput(view->LatestInput());
+
+    switch (latestInput)
+        {
+        case (CCalcView::EMemoryRecall):
+        case (CCalcView::EOperator):
+            {
+            if (state == CCalcView::EOperandOnly ||
+                iEditLine.CheckZeroL())
+                {
+                iCalcContainer->InputClearL();
+                }
+            else 
+                {
+                ClearOperand();
+                }
+            break;
+            }
+        case (CCalcView::EMemorySave):
+            {
+            if (state != CCalcView::EOperandAndOperator ||
+                iEditLine.CheckZeroL())
+                {
+                iCalcContainer->InputClearL();
+                }
+            else
+                {
+                ClearOperand();
+                }
+            break;
+            }
+        case (CCalcView::EEqual):
+            {
+            iCalcContainer->InputClearL();
+            break;
+            }
+        default:
+            {
+            ClearLastInputL();
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::DoChangeSign
+// Changing sign.
+// This is not called when editor number is 0. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::DoChangeSignL(
+     CCalcView::TStateNo aState)
+    {
+    // If current state is other than State1, "+/-" command is ignored.
+    if (aState != CCalcView::EInitialMode)
+        {
+        if (aState == CCalcView::ESelectResult)
+            {
+            // "=" is disappeared from editor.
+            iEditLine.SetOperator(TCalcEditLine::ECalcOperatorNone);  
+            }
+        
+        iEditLine.ChangeSignL();
+        iEditorNumber = iEditorNumber * (-1);
+        DrawNow();
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::DoMemoryRecallOrLastResult
+// Update editor number to memory or last result.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::DoMemoryRecallOrLastResult(
+                    TReal64 aMemoryOrLastResult, 
+                    CCalcView::TStateNo aState)
+    {
+    if (aState == CCalcView::ESelectResult)
+        {
+        // "=" is disappeared from editor.
+        iEditLine.SetOperator(TCalcEditLine::ECalcOperatorNone);
+        }
+    
+    iEditLine.SetNumber(aMemoryOrLastResult);
+    iEditorNumber = aMemoryOrLastResult;
+    DrawNow();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::NotifyChangeDecimal
+// Call when decimal separator is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::NotifyChangeDecimal(TChar aOld, TChar aNew)
+    {
+    iEditLine.ChangeDecimal(aOld, aNew);
+    DrawNow();
+    }
+    
+// ---------------------------------------------------------
+// CCalcEditorSubPane::IsQwertyKeypadActive
+// Called to check qwerty keypad is active or not
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+
+TInt CCalcEditorSubPane::IsQwertyKeypadActive()
+	{
+ 	TInt value = 0;
+    iQwertyModeStatusProperty.Get(value);
+    return value;
+	}
+
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::OfferKeyEventL
+// This function is called by CCalcContainer::OfferKeyEventL()
+// when inputted key is number or "#". 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TKeyResponse CCalcEditorSubPane::OfferKeyEventL
+                ( const TKeyEvent& aKeyEvent,  
+                  TEventCode aType )           
+    {
+	
+    if (aType != EEventKey)
+        {
+        return EKeyWasNotConsumed;
+        }
+	TPtiKey keyQwertyValue = (TPtiKey)aKeyEvent.iScanCode;
+    TChar decimal(iCalcAppEnv->DecimalSeparator());
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+    TChar keyCode( aKeyEvent.iCode );
+#else 
+    TChar keyCode(aKeyEvent.iScanCode);
+#endif
+    TChar decimalkey(aKeyEvent.iCode);
+    
+    if( iDecimalCounter < KCalcMaxNumberWidth  )
+    {
+    	iAllowedDecimal.Append(decimal);
+    	iDecimalCounter++;	
+    }
+    
+		if(IsQwertyKeypadActive())
+		{
+ 
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+            if( MapDecimal(aKeyEvent) || MapDecimal(aKeyEvent) ||aKeyEvent.iCode == KCalcHashBtn )
+                {
+                keyCode = decimal;
+                }		    	
+#else
+		    if(MapDecimal(keyQwertyValue,EPtiCaseUpper) || MapDecimal(keyQwertyValue,EPtiCaseLower) ||aKeyEvent.iCode == KCalcHashBtn )
+		      {
+		      keyCode = decimal;
+		      }
+#endif
+                  //}
+		}
+	else
+		{
+		if (aKeyEvent.iCode == KCalcHashBtn)
+	        {
+	        keyCode = decimal;
+	        }	
+		}
+    
+    TKeyResponse response(EKeyWasNotConsumed);
+    CCalcView* view = iCalcContainer->View();
+    
+    if (keyCode.IsDigit() || keyCode == decimal)
+        {
+        DrawDeferred();
+        iCalcContainer->ProcessPreinputL();
+        view->iLastResultSetected = EFalse;
+        // Append input to editor space if editor space is not full.
+        TRAPD(errorCode, iEditLine.AppendL(keyCode));
+
+        //  If editor space is full, error message is shown.
+        if (errorCode)  
+            {
+            CAknKeySoundSystem* soundSystem = 
+                iCalcAppEnv->AppUi()->KeySounds();
+            if (soundSystem)
+                {
+                soundSystem->PlaySound(EAvkonSIDInformationTone);
+                }
+            }
+        else
+            {
+            if (iEditLine.CheckZeroL() && 
+                iEditLine.Operator() == TCalcEditLine::ECalcOperatorNone)
+                {
+                view->UpdateState(CCalcView::EAllClear);
+                }
+            else
+                {
+                view->UpdateState(CCalcView::EOperand);
+                }
+            iEditorNumber = iEditLine.NumberL();
+            }
+		
+		// Enable ChangeSign and Square root buttons
+		// if there is no 0 in the editor.
+		iCalcContainer->SetChangeSignEnableL();
+		iCalcContainer->SetSqrtEnableL();
+        iCalcContainer->SetClearKeyEnable();
+        
+		// Enable the Percent button if the calculator
+		// is in correct state and there is no 0 in the editor.
+		if ( iCalcContainer->GetState() == CCalcView::EOperandAndOperator || 
+			 iCalcContainer->GetState() == CCalcView::EOperandAndOperatorAndOperand )
+			if (keyCode.IsDigit())
+				iCalcContainer->SetPercentEnableL();
+		
+			response = EKeyWasConsumed;
+        }
+    else if (decimalkey == EKeyBackspace)   
+        {view->iLastResultSetected = EFalse;
+        DrawDeferred();
+        //  If Clear-Key is pressed long, number editor and operand
+        // is clear and the state is set initial one.
+        if (aKeyEvent.iRepeats)  
+            {
+            iCalcContainer->InputClearL();
+            }
+        // If Clear-key is pressed short, the latest input is deleted.
+        else   
+            {
+            OfferShortPressClearKeyEventL();
+            }
+        iEditorNumber = iEditLine.NumberL();
+        iCalcContainer->SetChangeSignEnableL();
+		iCalcContainer->SetSqrtEnableL();
+        iCalcContainer->SetClearKeyEnable();
+        		
+        if ( iCalcContainer->GetState() == CCalcView::EOperandAndOperator || 
+        	 iCalcContainer->GetState() == CCalcView::EOperandAndOperatorAndOperand ||
+        	 iEditorNumber == KZero )
+            iCalcContainer->SetPercentEnableL();
+        response = EKeyWasConsumed;
+        }
+        	
+    return response;
+    }
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcEditorSubPane::CCalcEditorSubPane()
+    {
+  
+    }
+
+// Second-phase constructor
+void CCalcEditorSubPane::ConstructL
+        (CCalcContainer* aContainer) 
+    {
+    // The state is set initial one.
+    // Number editor is set "0".
+    iEditLine.ClearL();
+    iEditorNumber = 0.0;
+
+    SetContainerWindowL(*aContainer);
+    
+    iCalcContainer = aContainer;  
+    // Load calc_display bitmap 
+    iCalcAppEnv = CCalcAppEnv::Static();
+    iCalcSideLDisplay = iCalcAppEnv->DisplaySideLBitmap();
+    iCalcCenterDisplay = iCalcAppEnv->DisplayCenterBitmap();
+    iCalcSideRDisplay = iCalcAppEnv->DisplaySideRBitmap();
+    iIsQwertyActive = 0;
+    User::LeaveIfError(iQwertyModeStatusProperty.Attach(KCRUidAvkon, KAknQwertyInputModeActive));
+  
+    // Try to get the English key mappings. If those are not available, use the 
+    // mappings of the current input language. The order is this because all mappings
+    // do not necessarily contain all characters neeeded by the Calculator.
+    iLanguage = ELangEnglish;
+    iEngine = CPtiEngine::NewL(ETrue);
+    iCoreLanguage = static_cast<CPtiCoreLanguage*>(iEngine->GetLanguage( iLanguage ));
+
+    if( !iCoreLanguage )
+        {
+        iCRKey = CRepository::NewL(KCRUidAknFep);
+        TInt ret = iCRKey->Get(KAknFepInputTxtLang,iLanguage);
+        if( ret!= KErrNone )
+            {
+            //Exit application if server is busy( Error Raised )
+            iAvkonViewAppUi->Exit();
+            }
+            iCoreLanguage = static_cast<CPtiCoreLanguage*>(iEngine->GetLanguage(iLanguage));
+        }
+    
+    RProperty::Get( KCRUidAvkon, KAknKeyBoardLayout, iKeyboardType );
+
+    if( iCoreLanguage )
+        {
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        if ( iKeyboardType == EPtiKeyboardHalfQwerty)
+           {
+           iHalfQwertyKeyMappings = static_cast<CPtiHalfQwertyKeyMappings*>(iCoreLanguage->GetHalfQwertyKeymappings());
+           }
+       else
+#endif
+          {
+          iQwertyKeyMappings = static_cast<CPtiQwertyKeyMappings*>(iCoreLanguage->GetQwertyKeymappings());
+          }
+        }
+    
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        
+    if ( iKeyboardType == EPtiKeyboardHalfQwerty )
+        { 
+        iEngine->ActivateLanguageL( iLanguage, EPtiEngineHalfQwerty );
+        }
+    else if ( IsQwertyKeypadActive())
+        { 
+        iEngine->ActivateLanguageL( iLanguage, EPtiEngineQwerty );
+        } 
+       
+  //      RProperty::Get( KCRUidAvkon, KAknKeyBoardLayout, iKeyboardType );
+        iEngine->SetKeyboardType( TPtiKeyboardType (iKeyboardType ));
+        
+#endif
+        
+    // UI language is used to determine the used number format.
+    iUiLanguage = User::Language();
+    iDecimalCounter = 0;
+    }
+    
+// ---------------------------------------------------------
+// CCalcEditorSubPane::IsQwertyActive
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::IsQwertyActive()
+    {
+    iIsQwertyActive = 1;
+    }
+    
+// ---------------------------------------------------------
+// CCalcEditorSubPane::IsQwertyNotActive
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::IsQwertyNotActive()
+    {
+    iIsQwertyActive = 0;
+    } 
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::ClearL
+// Clear 1 charactor from editor.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::ClearL()
+    {
+    iEditLine.ClearL();
+    }
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::SizeChanged
+// Size of control is set. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::SizeChanged()
+    {
+    TRect parentRect(iCalcContainer->Rect());
+    TRect EditorPaneRect(iCalcContainer->EditorPane()->Rect());
+    
+
+	if (!(AknLayoutUtils::ScalableLayoutInterfaceAvailable()))
+		{
+		iLayoutText[ECalcEditorOperandShadow].LayoutText(
+			parentRect,AppLayout::Calculator_texts_Line_1(),iCalcAppEnv->NumberShadowFont());
+		}
+
+
+                    
+     	if (AknLayoutUtils::ScalableLayoutInterfaceAvailable())
+			{
+                        if( iUiLanguage == ELangFarsi || iUiLanguage == ELangUrdu || iUiLanguage == ELangArabic
+                            || iUiLanguage == ELangHindi )
+				{
+				TAknTextLineLayout layout1; 
+			    if( AknLayoutUtils::PenEnabled() )
+    	        {
+    	            layout1	= AknLayoutScalable_Apps:: calc_display_pane_t1(enTouch_enabled).LayoutLine();
+    	        }
+    	        else
+    	        {
+    	            layout1	= AknLayoutScalable_Apps:: calc_display_pane_t1(enTouch_disabled).LayoutLine();    
+    	        }     
+				// Do this only in A&H etc. variants...
+				layout1.iFont &= 0xFFFFFFF0; // clear first 4 bits (font category)
+				layout1.iFont |= 0x00000001; // set first 4 bits to primary font category value (=1)					
+
+                // When the pen enable and the current screen is transverse,
+                // Enlarge the size of parent rect.
+                if ( AknLayoutUtils::PenEnabled() && Layout_Meta_Data::IsLandscapeOrientation() )
+                    {
+                    TRect enlargeEditorPaneRect;
+                    enlargeEditorPaneRect = EditorPaneRect;
+                    // Enlarging the parent rect, so that the editor could display a long number absolutely.
+                    enlargeEditorPaneRect.iBr.iX += EEnlargeFive;
+                    enlargeEditorPaneRect.iTl.iX -= EEnlargeTwenty;
+                    iLayoutText[ECalcEditorOperand].LayoutText( enlargeEditorPaneRect,
+					                                 layout1, iCalcAppEnv->NumberFont() );
+                    }
+                else
+                    {
+				iLayoutText[ECalcEditorOperand].LayoutText(EditorPaneRect,
+						layout1,iCalcAppEnv->NumberFont());
+                    }
+				}
+			else
+				{
+				 if( AknLayoutUtils::PenEnabled() )
+				 {
+                    // If the current screen is transverse,enlarge the size of parent rect.
+                    if ( Layout_Meta_Data::IsLandscapeOrientation() )
+                        {
+                        TRect enlargeEditorPaneRect;
+                        enlargeEditorPaneRect = EditorPaneRect;
+                        // Enlarging the parent rect, so that the editor could display a long number absolutely.
+                        enlargeEditorPaneRect.iBr.iX += EEnlargeFive;
+                        enlargeEditorPaneRect.iTl.iX -= EEnlargeTwenty;
+                        iLayoutText[ECalcEditorOperand].LayoutText( enlargeEditorPaneRect,
+                             AknLayoutScalable_Apps::calc_display_pane_t1( enTouch_enabled ).LayoutLine(), iCalcAppEnv->NumberFont() );
+                        }
+                    else
+                        {
+				    iLayoutText[ECalcEditorOperand].LayoutText(EditorPaneRect,
+					AknLayoutScalable_Apps::calc_display_pane_t1(enTouch_enabled).LayoutLine(),iCalcAppEnv->NumberFont());    
+                        }   
+				 }
+				 else
+				 {
+				    iLayoutText[ECalcEditorOperand].LayoutText(EditorPaneRect,
+					AknLayoutScalable_Apps::calc_display_pane_t1(enTouch_disabled).LayoutLine(),iCalcAppEnv->NumberFont());    
+				 }
+				}
+			}
+		else
+			{
+       		// Set layout for number
+    		iLayoutText[ECalcEditorOperand].LayoutText(
+            	parentRect,AppLayout::Calculator_texts_Line_2(),iCalcAppEnv->NumberFont());  
+       		}
+
+
+	if (!(AknLayoutUtils::ScalableLayoutInterfaceAvailable()))
+		{
+		iLayoutText[ECalcEditorOperatorShadow].LayoutText(
+			parentRect,AppLayout::Calculator_texts_Line_3(),iCalcAppEnv->OperatorShadowFont());   
+		}
+
+
+     if (AknLayoutUtils::ScalableLayoutInterfaceAvailable())
+		{
+    	    if( AknLayoutUtils::PenEnabled() )
+    	    {
+    	        iLayoutText[ECalcEditorOperator].LayoutText(EditorPaneRect,
+    			AknLayoutScalable_Apps::calc_display_pane_t2(enTouch_enabled).LayoutLine(),iCalcAppEnv->OperatorFont());
+    	    }
+    	    else
+    	    {
+    	        iLayoutText[ECalcEditorOperator].LayoutText(EditorPaneRect,
+    			AknLayoutScalable_Apps::calc_display_pane_t2(enTouch_disabled).LayoutLine(),iCalcAppEnv->OperatorFont());
+    	    }
+		}
+	
+	else
+       	{
+       		// Set layout for operator
+    	iLayoutText[ECalcEditorOperator].LayoutText(
+                parentRect,AppLayout::Calculator_texts_Line_4(),iCalcAppEnv->OperatorFont());   
+       	} 
+                        
+    if (AknLayoutUtils::ScalableLayoutInterfaceAvailable())
+		{
+		    if( AknLayoutUtils::PenEnabled() )
+		    {
+		        iLayoutText[ECalcEditorMemory].LayoutText(EditorPaneRect,
+				AknLayoutScalable_Apps::calc_display_pane_t3(enTouch_enabled).LayoutLine(),NULL);    
+		    }
+		    else
+		    {
+		        iLayoutText[ECalcEditorMemory].LayoutText(EditorPaneRect,
+				AknLayoutScalable_Apps::calc_display_pane_t3(enTouch_disabled).LayoutLine(),NULL);
+		    }
+		}
+	else
+		{
+		//	Set layout for memory indicator shadow
+		iLayoutText[ECalcEditorMemoryShadow].LayoutText(
+			parentRect,AppLayout::Calculator_texts_Line_5(),NULL);
+		// Set layout for memory indicator
+		iLayoutText[ECalcEditorMemory].LayoutText(
+			parentRect,AppLayout::Calculator_texts_Line_6(),NULL); 
+		}
+	
+	if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
+		{               
+		TAknWindowLineLayout layoutOfDisplay;
+		if( AknLayoutUtils::PenEnabled() )
+		{
+		    layoutOfDisplay =  AknLayoutScalable_Apps:: bg_calc_display_pane(enTouch_enabled).LayoutLine();    
+		}
+		else
+		{
+		    layoutOfDisplay =  AknLayoutScalable_Apps:: bg_calc_display_pane(enTouch_enabled).LayoutLine();    
+		}
+		
+		TAknWindowLineLayout layoutOfSideLDisplay = AknLayoutScalable_Apps:: bg_calc_display_pane_g1().LayoutLine();              
+		TAknWindowLineLayout layoutOfCenterDisplay = AknLayoutScalable_Apps:: bg_calc_display_pane_g2().LayoutLine();             
+		TAknWindowLineLayout layoutOfSideRDisplay  = AknLayoutScalable_Apps:: bg_calc_display_pane_g3().LayoutLine();
+		TAknLayoutRect rectParent;
+		rectParent.LayoutRect(iCalcContainer->EditorPane()->Rect(),layoutOfDisplay) ;
+		iSideLDisplayLayout.LayoutRect(rectParent.Rect(),layoutOfSideLDisplay);
+		iCenterDisplayLayout.LayoutRect(rectParent.Rect(),layoutOfCenterDisplay);          
+		iSideRDisplayLayout.LayoutRect(rectParent.Rect(),layoutOfSideRDisplay);  
+		}
+    }
+
+
+// ---------------------------------------------------------
+// CCalcEditorSubPane::Draw
+// Drawing editor
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcEditorSubPane::Draw
+              (const TRect& aRect) const   
+    {
+    // Get a graphics context
+     CWindowGc& gc = SystemGc();
+    gc.Clear(aRect);
+    gc.SetClippingRect(aRect);
+    // Draw calc_display outline
+    TRect rect(Rect()); 
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	AknsDrawUtils::Background( skin, AknsDrawUtils::ControlContext(this), this, gc, rect );
+                                   
+    AknIconUtils::SetSize(iCalcSideLDisplay->Bitmap(),iSideLDisplayLayout.Rect().Size(),EAspectRatioNotPreserved);
+	AknIconUtils::SetSize(iCalcSideLDisplay->Mask(), iSideLDisplayLayout.Rect().Size(),EAspectRatioNotPreserved);  
+	
+	AknIconUtils::SetSize(iCalcCenterDisplay->Bitmap(),iCenterDisplayLayout.Rect().Size(),EAspectRatioNotPreserved);
+	AknIconUtils::SetSize(iCalcCenterDisplay->Mask(), iCenterDisplayLayout.Rect().Size(),EAspectRatioNotPreserved);        
+                    
+    AknIconUtils::SetSize(iCalcSideRDisplay->Bitmap(),iSideRDisplayLayout.Rect().Size(),EAspectRatioNotPreserved);
+	AknIconUtils::SetSize(iCalcSideRDisplay->Mask(), iSideRDisplayLayout.Rect().Size(),EAspectRatioNotPreserved);     
+
+	iSideLDisplayLayout.DrawImage(gc, iCalcSideLDisplay->Bitmap(),iCalcSideLDisplay->Mask());
+	iCenterDisplayLayout.DrawImage(gc,iCalcCenterDisplay->Bitmap(),iCalcCenterDisplay->Mask());
+	iSideRDisplayLayout.DrawImage(gc, iCalcSideRDisplay->Bitmap(),iCalcSideRDisplay->Mask());
+	
+	TRgb shadowcolor ;
+	AknsUtils::GetCachedColor( skin,shadowcolor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG31);
+	
+	TRgb color;
+    AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG30);
+    TBuf<256> keyvalue ;
+
+    if (iUiLanguage == ELangFarsi || iUiLanguage == ELangArabic 
+            || iUiLanguage == ELangHindi || iUiLanguage == ELangUrdu)
+	    {
+	    TPtrC number(iEditLine.NumberString());
+	    keyvalue.Append(number);
+	    AknTextUtils::LanguageSpecificNumberConversion  (keyvalue);
+	    }
+
+	if (!(AknLayoutUtils::ScalableLayoutInterfaceAvailable()))
+		{
+                    if ( iUiLanguage == ELangArabic || iUiLanguage == ELangUrdu )
+		    {
+		        TInt len = keyvalue.Length();
+			    TInt pos = KErrNotFound;
+			    TBuf<1> ch;
+			    ch.Append(iCalcAppEnv->MinusIndicator());
+			    if( (pos = keyvalue.Locate(iCalcAppEnv->MinusIndicator())) != KErrNotFound &&
+			         pos == keyvalue.LocateReverse(iCalcAppEnv->MinusIndicator()))
+			    {
+			     keyvalue.Delete( pos, 1 );
+			     keyvalue.Insert( 0, ch );	 
+			    }
+			iLayoutText[ECalcEditorOperandShadow].DrawText(gc, keyvalue,EFalse,shadowcolor);
+			}
+                    else if( iUiLanguage == ELangHindi || iUiLanguage == ELangFarsi )
+			{
+			 iLayoutText[ECalcEditorOperandShadow].DrawText(gc, keyvalue,EFalse,shadowcolor);	
+			}
+		else 
+			{
+			iLayoutText[ECalcEditorOperandShadow].DrawText(gc, iEditLine.NumberString(),EFalse,shadowcolor);	
+			}
+		}
+
+    if ( iUiLanguage == ELangArabic || iUiLanguage == ELangUrdu )
+	    {
+	        TInt len = keyvalue.Length();
+		    TInt pos = KErrNotFound;
+		    TBuf<1> ch;
+		    ch.Append(iCalcAppEnv->MinusIndicator());
+		    if( (pos = keyvalue.Locate(iCalcAppEnv->MinusIndicator())) != KErrNotFound &&
+		         pos == keyvalue.LocateReverse(iCalcAppEnv->MinusIndicator()))
+		    {
+		     keyvalue.Delete( pos, 1 );
+		     keyvalue.Insert( 0, ch );	 
+		    }
+	    iLayoutText[ECalcEditorOperand].DrawText(gc, keyvalue,EFalse,color);
+		}
+    else if( iUiLanguage == ELangHindi || iUiLanguage == ELangFarsi )
+		{
+	    iLayoutText[ECalcEditorOperand].DrawText(gc, keyvalue,EFalse,color);
+		}
+    else
+	    {
+		iLayoutText[ECalcEditorOperand].DrawText(gc, iEditLine.NumberString(),EFalse,color);
+		}
+
+	TCalcEditLine::TCalcOperatorType operatorType(
+		iEditLine.Operator());
+	TPtrC operatorString(
+		iCalcAppEnv->EditorOperator(operatorType));
+
+	if (!(AknLayoutUtils::ScalableLayoutInterfaceAvailable()))
+		{
+		iLayoutText[ECalcEditorOperatorShadow].DrawText(gc,operatorString,EFalse,shadowcolor);
+		}
+
+   	iLayoutText[ECalcEditorOperator].DrawText(gc, operatorString,EFalse,color);
+    CCalcDocument* calcDocument = 
+        STATIC_CAST(CCalcDocument*, iCalcAppEnv->AppUi()->Document());
+    if (calcDocument->HasMemory())
+        {
+        TPtrC mIndicatorShadow(
+            iCalcAppEnv->MemoryIndicatorShadow());
+        TPtrC mIndicator(iCalcAppEnv->MemoryIndicator());
+
+
+	if (!(AknLayoutUtils::ScalableLayoutInterfaceAvailable()))
+		{
+		iLayoutText[ECalcEditorMemoryShadow].DrawText(gc, mIndicatorShadow);
+		}
+
+
+        iLayoutText[ECalcEditorMemory].DrawText(gc, mIndicator);
+        }
+    }
+    
+// ---------------------------------------------------------
+// CCalcEditorSubPane::MapNumericChar
+// Redraw percent button, either normal or dimmed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//		
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+TBool CCalcEditorSubPane::MapDecimal( TKeyEvent aKeyEvent )
+    {
+    const TInt KMaxNumCharsPerCase = 50;
+    TBuf<KMaxNumCharsPerCase> keys;
+
+    TPtiKey aKey = ( TPtiKey )aKeyEvent.iScanCode;
+    if( !keys.Length() )
+            {
+            keys.Append( aKeyEvent.iCode );
+            }
+
+    if ( keys.Length() > 0 )
+        {
+        TUint16 firstChar = keys[0];
+        switch ( firstChar )		
+            {
+            case KPtiPinyinMarker:
+            case KPtiStrokeMarker:
+            case KPtiZhuyinMarker:
+            case KPtiCangjieMarker:
+            case KPtiGetAllMarker:
+            if ( keys.Length() > 1 )
+                {
+                firstChar = keys[1];
+                }
+            default:
+                break;
+            }
+        TInt loc = iAllowedDecimal.Locate( firstChar );
+
+                if ( ( loc != KErrNotFound ) )/*|| (HandleSpeciallyForChineseNubers(aKey, aCase)))*/
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
+
+#else
+TBool CCalcEditorSubPane::MapDecimal( TPtiKey aKey, TPtiTextCase aCase )	
+    {
+    const TInt KMaxNumCharsPerCase = 50;
+    TBuf<KMaxNumCharsPerCase> keys;
+
+    iQwertyKeyMappings->GetDataForKey( aKey, keys, aCase );
+
+    if ( keys.Length() > 0 )
+        {
+        TUint16 firstChar = keys[0];
+        switch ( firstChar )
+            {
+            case KPtiPinyinMarker:
+            case KPtiStrokeMarker:
+            case KPtiZhuyinMarker:
+            case KPtiCangjieMarker:
+            case KPtiGetAllMarker:
+                if ( keys.Length() > 1 )
+                    {
+                    firstChar = keys[1];
+                    }
+            default:
+                break;
+            }
+        TInt loc = iAllowedDecimal.Locate( firstChar );
+
+                if ( ( loc != KErrNotFound ) )/*|| (HandleSpeciallyForChineseNubers(aKey, aCase)))*/
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
+#endif
+	
+// ---------------------------------------------------------
+// CCalcEditorSubPane::EditPaneRect
+// This function gives the editor pane layout.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+
+TRect CCalcEditorSubPane::EditPaneRect()
+   {
+   TRect parentRect(Rect()); 
+   return 	parentRect;
+   }
+   
+// ---------------------------------------------------------
+// CCalcEditorSubPane::HandlePointerEventL
+// Handled when there is a pen input in EditorPane.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//   
+void CCalcEditorSubPane::HandlePointerEventL
+            ( const TPointerEvent& aPointerEvent )           
+    {
+    TRect memoryLayoutRect = iLayoutText[ECalcEditorMemory].TextRect();
+    CCalcDocument* calcDocument = 
+        STATIC_CAST( CCalcDocument*, iCalcAppEnv->AppUi()->Document() );
+    if( ( memoryLayoutRect.Contains( aPointerEvent.iPosition ) ) && ( calcDocument->HasMemory() ) )
+        {
+        // When we set the memory value to the editor, 
+        // We should change the menu item "Lase Result"'s flag to "EFalse".
+        iCalcContainer->View()->iLastResultSetected = EFalse;
+        iCalcContainer->View()->HandleMemoryRecallL();
+        }
+
+    }
+
+// End of file  CALCEDIT_CPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcEditline.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,376 @@
+/*
+* Copyright (c) 2002 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:  Helper class used by CalcDocument,CCalcContainer etc., 
+*                TCalcEditLine. 
+*                The numerical value and the character sequence of 
+*                the real number are held. Addition of a numerical character 
+*                sequence and which clear operation are performed.
+*
+*/
+
+
+
+// INCLUDE FILES  
+#include    "CalcDoc.h"
+#include    "CalcEditline.h"
+#include	"CalcEnv.h"
+
+
+//  LOCAL CONSTANTS AND MACROS  
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+TCalcEditLine::TCalcEditLine():
+                     iNumber(0), 
+                     iOperator(ECalcOperatorNone)
+    {
+    }
+
+TCalcEditLine::~TCalcEditLine()
+    {
+    }
+
+// Copy constructor
+TCalcEditLine::TCalcEditLine
+           (const TCalcEditLine& aEditLine) 
+    {
+    *this = aEditLine;
+    }
+
+// Assignment operator
+const TCalcEditLine& TCalcEditLine::operator=
+                       (const TCalcEditLine& aEditLine) 
+    {
+    iNumber = aEditLine.iNumber;
+    iOperator = aEditLine.iOperator;
+    return  *this;
+    }
+
+
+// ---------------------------------------------------------
+// TCalcEditLine::AllClear
+// This function exists because long-press clear-key event is executed. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::AllClear()
+    {
+    iNumber.Zero();
+    iOperator = ECalcOperatorNone;
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::ClearL
+// This function exists because short-press clear-key event is executed. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::ClearL()
+    {
+    TInt length(iNumber.Length());
+    if (length > 1)
+        {
+        CCalcAppEnv* env = CCalcAppEnv::Static();
+        TChar minusIndicator(env->MinusIndicator());
+        if (iNumber[0] == (TUint) minusIndicator && // Casted for THUMB build
+            length == 2)
+            {
+            SetNumber(0);
+            }
+        else
+            {
+            iNumber.Delete(length - 1, 1);
+            length--;
+            if (length == 2 && iNumber[0] == (TUint) minusIndicator &&
+                                             // Casted for THUMB build
+                NumberL() == 0.0)
+                {
+                SetNumber(0);
+                }
+            }
+        }
+    else
+        {
+        SetNumber(0);
+        }
+    }
+
+
+// ---------------------------------------------------------
+// TCalcEditLine::ClearOperand
+// Set number of editor "0".  
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::ClearOperand()
+    {
+    SetNumber(0);
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::NumberL
+// Convert from TBuf<> to number.    
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TReal64 TCalcEditLine::NumberL() const
+    {
+    TLex  lex(iNumber);
+    TReal64  data;
+    TInt errorCode(lex.Val(data));
+    // Converting is failed. 
+    if (errorCode)
+        {
+        User::Leave(errorCode);
+        }
+    return  data;
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::SetNumber
+// Convert from number to TBuf<>.    
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::SetNumber
+                (TReal64 aNumber)
+    {
+    // Set data format. 
+    TRealFormat realFormat( KCalcMaxEditNumberWidth, KCalcMaxDigits );
+    if ( aNumber >= 0 )
+        {
+        realFormat.iWidth--;
+        }
+    realFormat.iType = KRealFormatNoExponent;
+    realFormat.iTriLen = 0;  //  Delimit character is nothing
+    CCalcAppEnv* env = CCalcAppEnv::Static();
+    TChar separator(env->DecimalSeparator());
+    realFormat.iPoint = separator;
+
+    TInt code = iNumber.Num(aNumber, realFormat);
+    
+    if(KErrOverflow == code || KErrUnderflow == code)
+	    {
+	    // Set data format 
+	    TRealFormat realFormat(KCalcMaxNumberWidth);  
+	    if ( aNumber >= 0 )
+	        {
+	        realFormat.iWidth--;
+	        }
+	    realFormat.iType = KRealFormatExponent;
+	    realFormat.iPlaces = 3;
+	    realFormat.iTriLen = 0;  //  Delimit character is nothing
+	    CCalcAppEnv* env = CCalcAppEnv::Static();
+	    TChar separator(env->DecimalSeparator());
+	    realFormat.iPoint = separator;
+        code = iNumber.Num(aNumber, realFormat);
+	    }
+	   
+	  switch (code)
+        {
+        case KErrOverflow:
+            {
+            TRAP_IGNORE( User::Leave( KErrOverflow ) );  
+            break;
+            }
+        case KErrUnderflow:
+            {
+            iNumber.Num(0,0);
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::AppendL
+// This function exists to handle numeric or "#" key event.    
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::AppendL
+               (TChar aInput) // Input type is digit or decimal point only  
+    {
+    //  Check whether editline is not full
+    if ( iNumber.Length() < KCalcMaxNumberWidth )
+        {
+        if ( aInput.IsDigit() )
+            {
+            if ( NumberDigits() < KCalcMaxDigits )
+                {
+                if (CheckZeroL())  
+                    {
+                    iNumber.Zero();
+                    }
+                iNumber.Append(aInput);
+                }
+            else
+                {
+                // If editor space is full, error code returned.
+                User::Leave(KCalcErrEditorSpaceFull); 
+                }
+            }
+        // If decimal point do not exist, decimal point is added 
+        // But editor has 8 dights, decimal point is not added.
+        else 
+            {
+            CCalcAppEnv* env = CCalcAppEnv::Static();
+            TChar separator(env->DecimalSeparator());
+            if ( iNumber.Length() )
+                {
+                if ( iNumber.Locate(separator) == KErrNotFound )
+                    {
+                    if (NumberDigits() < KCalcMaxDigits)
+                        {
+                        iNumber.Append(separator);
+                        }
+                    }
+                }
+            else
+                {
+                SetNumber(0);  
+                iNumber.Append(separator);
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::AppendNumberString
+// This function appends a character after the number.
+// Used for example in percent calculations.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::AppendNumberStringL
+				(TChar aChar)
+	{
+	//  This kind of a paranoid check as when this function
+	//  is called the amount of digits can never be more
+	//  than 8. Because the iNumber is going
+	//  to the output sheet we can display 10 characters
+	//  8 digits + operator + aChar
+    if ( NumberDigits() < KCalcMaxDigits + 1 )
+        { 
+			iNumber.Append(aChar);
+        }
+    else
+        {
+			// If editor space is full, error code returned.
+            User::Leave(KCalcErrEditorSpaceFull); 
+         }
+	}
+
+// ---------------------------------------------------------
+// TCalcEditLine::ChangeSignL
+// This function exists to handle "Change Sign" command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::ChangeSignL()
+    {
+    TInt length(iNumber.Length()); 
+
+    // If the number is zero or empty, this command is ignored
+    if ((length > 0) && (NumberL() != 0.0))
+        {
+        CCalcAppEnv* env = CCalcAppEnv::Static();
+        TChar minusIndicator(env->MinusIndicator());
+        // If the number is less than zero, '-' is deleted.
+        if ( iNumber[0] == (TUint) minusIndicator ) // Casted for THUMB build
+            {
+            iNumber.Delete(0, 1);
+            }
+        // Case number is more than zero.
+        else
+            {
+            TBuf<1> buf;
+            buf.Append(minusIndicator);
+            iNumber.Insert(0, buf);
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::TrimZeroL
+// If number of editor is "iii.ddd000...", set number "iii.ddd".
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::TrimZeroL() 
+    {
+    TReal64 realValue(NumberL());
+    SetNumber(realValue);
+    }
+
+
+// ---------------------------------------------------------
+// TCalcEditLine::CheckZero
+// For checking that editline is cleared. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool TCalcEditLine::CheckZeroL() const
+    {
+    return ((iNumber.Length() == 1) && (NumberL() == 0.0));
+    }
+
+// ---------------------------------------------------------
+// TCalcEditLine::ChangeDecimal
+// Changing decimal separator.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void TCalcEditLine::ChangeDecimal(TChar aOld, TChar aNew)
+    {
+    TInt pos(iNumber.Locate(aOld));
+
+    if (pos != KErrNotFound)
+        {
+        iNumber[pos] = (TUint16) aNew;
+        }
+    }
+        
+
+// ---------------------------------------------------------
+// TCalcEditLine::NumberDigits
+// To count of digits in a line
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt TCalcEditLine::NumberDigits() const
+    {
+    TInt len(iNumber.Length());
+    TInt num(0);
+    for (TInt i(0); i < len; ++i)
+        {
+        TChar onechar(iNumber[i]);
+        if (onechar.IsDigit())
+            {
+            ++num;
+            }
+        }
+    return num;
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcEnv.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,572 @@
+/*
+* Copyright (c) 2002 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:  Global data class, CCalcAppEnv, derived from CBase
+*                This class maintain global data. e.g font, bitmap.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <barsread.h> // resource reader
+#include <eikapp.h>
+#include <eikenv.h>
+#include <eikrutil.h> 
+#include <fbs.h>    // Fonts
+#include <AknUtils.h>
+
+//Extended Icon Skin Implementation
+#include  <AknsConstants.h>
+#include <AknsUtils.h>
+#include <AknsItemID.h>
+
+#include <Calcsoft.rsg>
+#include <calcsoft.mbg>
+#include "CalcEnv.h"
+#include "CalcAppUi.h"
+
+//  LOCAL CONSTANTS AND MACROS  
+
+// ================= MEMBER FUNCTIONS =======================
+// Two-phased constructor.
+CCalcAppEnv* CCalcAppEnv::NewL
+(CCalcAppUi* aAppUi)    
+	{
+	CCalcAppEnv* self = new (ELeave) CCalcAppEnv(aAppUi);
+	CleanupStack::PushL(self);
+	self->ConstructAppEnvL();
+	CleanupStack::Pop(self);
+	// Set to TLS(Thread Local Storage).
+	UserSvr::DllSetTls(67338721, self); 
+
+	return self;     	
+	}
+
+void CCalcAppEnv::InitializeAppUI(CCalcAppUi* aAppUi)
+	{
+	iAppUi = aAppUi;
+	}
+
+
+// Destructor
+CCalcAppEnv::~CCalcAppEnv()
+	{
+	// Text
+	delete iEditorOperArray;
+	delete iOutSheetOperArray;
+#ifdef __SCALABLE_ICONS
+	delete  iResultsLineBitmap;
+#endif
+
+
+	// Bitmap
+    	delete iDisplaySideLBitmap;
+		delete iDisplayCenterBitmap;
+		delete iDisplaySideRBitmap;
+		
+	delete iPaperBitmap;
+	for(TInt Cnt=0;Cnt<9;Cnt++)
+		{
+	delete iScalablePaperBitmap[Cnt];
+		} 
+    
+	// font 
+	// free font for number and operator
+	CBitmapDevice* device = iEnv->ScreenDevice();
+	device->ReleaseFont(iNumberShadowFont);
+	device->ReleaseFont(iNumberFont);
+	device->ReleaseFont(iOperatorShadowFont);
+	device->ReleaseFont(iOperatorFont);
+	device->ReleaseFont(iOutSheetOperatorFont);
+
+   
+	//Extended Icon Skin Implementation
+		iAknsConstArray.Close();
+		iAknsConstArrayForPaper.Close();
+	}
+
+
+// ---------------------------------------------------------
+// CCalcAppEnv::Static
+// Return value of thread-local storage.
+// This value is set pointer of CCalcAppEnc class in CCalcAppEnv::NewL().  
+// (other items were commented in a header).  
+// ---------------------------------------------------------
+//
+CCalcAppEnv* CCalcAppEnv::Static()
+	{
+	return REINTERPRET_CAST(CCalcAppEnv*, UserSvr::DllTls(67338721)); 
+	}
+
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+
+CCalcAppEnv::CCalcAppEnv()
+	{
+	}
+	
+
+CCalcAppEnv::CCalcAppEnv
+(CCalcAppUi* aAppUi)  
+: iAppUi(aAppUi)
+	{
+	}
+
+// Second-phase constructor
+void CCalcAppEnv::ConstructAppEnvL()
+	{
+	iEnv = CEikonEnv::Static();
+
+	// Read char code for operator.
+	TResourceReader editOperRr;
+	iEnv ->CreateResourceReaderLC(
+		editOperRr, R_CALC_EDITOR_OPERATOR_ARRAY);
+	TResourceReader osheetOperRr;
+	iEnv->CreateResourceReaderLC(
+		osheetOperRr, R_CALC_OUTSHEET_OPERATOR_ARRAY);
+
+	editOperRr.ReadInt16(); // Read count of items
+	osheetOperRr.ReadInt16(); // Read count of items
+
+	iEditorOperArray = 
+		new (ELeave) CDesCArrayFlat(KCalcCountOfOperatorType);
+	iOutSheetOperArray = 
+		new (ELeave) CDesCArrayFlat(KCalcCountOfOperatorType);
+
+	TChar editorOper;
+	TChar outSheetOper;
+
+	for (TInt cnt(0); cnt < KCalcCountOfOperatorType; cnt++)
+		{
+		editorOper = editOperRr.ReadUint16();
+		outSheetOper = osheetOperRr.ReadUint16();
+		TBuf<1> editorOperBuf;
+		TBuf<1> outSheetOperBuf; 
+		editorOperBuf.Append(editorOper);
+		outSheetOperBuf.Append(outSheetOper);
+		iEditorOperArray->AppendL(editorOperBuf); 
+		iOutSheetOperArray->AppendL(outSheetOperBuf);
+		}
+
+	CleanupStack::PopAndDestroy(2); // editOperRr, osheetOperRr
+
+
+	// TLocale::DecimalSeparator() must be used when decimal separator is get.  
+	TLocale locale;
+	iDecimalSeparator = locale.DecimalSeparator();
+
+	TBuf<1> buf;
+	iEnv->ReadResourceL(buf, R_CALC_MINUS_INDICATOR);
+	iMinusIndicator = buf[0];
+	iEnv->ReadResourceL(iMemoryIndicator, R_CALC_STTUS_SAVED_TO_MEM);
+	iEnv->ReadResourceL(iMemoryIndicatorShadow, R_CALC_STTUS_SAVED_TO_MEM_SHA);
+
+	CEikApplication* app = iEnv->EikAppUi()->Application();
+	TFileName bmpPath(app->BitmapStoreName());
+
+	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	CFbsBitmap* bitmap = NULL;
+	CFbsBitmap* mask	= NULL;
+
+	//Ext Icon Skinning implementation for Display
+	
+	AknsUtils::CreateIconL(skin,KAknsIIDQsnFrCalcDisplaySideL,bitmap,mask,bmpPath,
+		EMbmCalcsoftQsn_fr_calc_display_side_l, EMbmCalcsoftQsn_fr_calc_display_side_l_mask);
+		
+		iDisplaySideLBitmap = CGulIcon::NewL(bitmap, mask);
+			bitmap = NULL;
+			mask	= NULL;
+		
+		
+	AknsUtils::CreateIconL(skin,KAknsIIDQsnFrCalcDisplayCenter,bitmap,mask,bmpPath,
+		EMbmCalcsoftQsn_fr_calc_display_center, EMbmCalcsoftQsn_fr_calc_display_center_mask);
+			
+		iDisplayCenterBitmap = CGulIcon::NewL(bitmap, mask);
+			bitmap = NULL;
+			mask	= NULL;
+		
+	AknsUtils::CreateIconL(skin,KAknsIIDQsnFrCalcDisplaySideR,bitmap,mask,bmpPath,
+		EMbmCalcsoftQsn_fr_calc_display_side_r, EMbmCalcsoftQsn_fr_calc_display_side_r_mask);
+			
+		iDisplaySideRBitmap = CGulIcon::NewL(bitmap, mask);
+
+	//Ext Icon Skinning implementation for Paper
+	bitmap = NULL;
+	mask	= NULL;
+	AknsUtils::CreateIconL(skin,KAknsIIDQgnGrafCalcPaper,bitmap,mask,bmpPath,
+		EMbmCalcsoftQgn_graf_calc_paper,EMbmCalcsoftQgn_graf_calc_paper_mask);
+	iPaperBitmap = CGulIcon::NewL(bitmap, mask);
+
+	bitmap = NULL;
+	mask	= NULL;
+
+#ifdef __SCALABLE_ICONS
+	AknsUtils::CreateIconL(skin,KAknsIIDQgnGrafCalcResultsLine, bitmap,mask,bmpPath,
+		EMbmCalcsoftQgn_graf_calc_results_line,EMbmCalcsoftQgn_graf_calc_results_line_mask);
+	iResultsLineBitmap = CGulIcon::NewL(bitmap, mask);
+#endif
+	bitmap = NULL;
+	mask	= NULL; 
+	iIsSkinChanged = EFalse;
+	UpdateAknConstArrayforPaper();
+	LoadPaperBitmapsL();
+
+	UpdateAknConstArray();
+
+	LoadFuncMapBitmapL();
+
+
+	}
+
+
+// ---------------------------------------------------------
+// CCalcAppEnv::LoadPaperBitmapsL
+// Load bitmaps for Paper Pane.  
+// (other items were commented in a header).  
+// ---------------------------------------------------------
+//
+ void CCalcAppEnv::LoadPaperBitmapsL()
+	{
+	CEikApplication* app = iEnv->EikAppUi()->Application();
+	TFileName bmpPath(app->BitmapStoreName());
+	TInt startBitmapId = EMbmCalcsoftQsn_fr_calc_paper_center;
+	TInt startMaskId = EMbmCalcsoftQsn_fr_calc_paper_center_mask;
+	TInt startIndex=0;
+	TInt count = 9;
+	TInt bmpId(startBitmapId);
+	TInt maskId(startMaskId);
+
+	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	CFbsBitmap* bitmap = NULL;
+	CFbsBitmap* mask	= NULL; 
+
+	for (TInt cnt(startIndex); cnt < (count + startIndex); cnt++)
+		{
+
+		AknsUtils::CreateIconL(skin, (iAknsConstArrayForPaper)[cnt],bitmap,mask,
+					bmpPath, bmpId, maskId);
+
+		if(!iIsSkinChanged)
+			{
+			iScalablePaperBitmap[cnt] = CGulIcon::NewL(bitmap, mask);
+			}
+		else
+			{
+			iScalablePaperBitmap[cnt]->SetBitmap(bitmap);
+			iScalablePaperBitmap[cnt]->SetMask(mask);
+			}
+		bmpId = bmpId + 2;
+		maskId = maskId + 2;
+		}
+	}
+
+// ---------------------------------------------------------
+// CCalcAppEnv::LoadFuncMapBitmapL
+// Load bitmaps for FunctionMap SubPane.  
+// (other items were commented in a header).  
+// ---------------------------------------------------------
+//
+void CCalcAppEnv::LoadFuncMapBitmapL()
+	{
+
+	CEikApplication* app = iEnv->EikAppUi()->Application();
+	TFileName bmpPath(app->BitmapStoreName());
+
+	if(iIsSkinChanged) //EISkin2.6
+		{
+		MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+		CFbsBitmap* bitmap = NULL;
+		CFbsBitmap* mask	= NULL;
+
+		//Ext Icon Skinning implementation for Display
+		
+	AknsUtils::CreateIconL(skin,KAknsIIDQsnFrCalcDisplaySideL,bitmap,mask,bmpPath,
+		EMbmCalcsoftQsn_fr_calc_display_side_l, EMbmCalcsoftQsn_fr_calc_display_side_l_mask);
+		
+		iDisplaySideLBitmap->SetBitmap(bitmap);
+		iDisplaySideLBitmap->SetMask(mask);
+		
+			bitmap = NULL;
+			mask	= NULL;
+		
+		
+	AknsUtils::CreateIconL(skin,KAknsIIDQsnFrCalcDisplayCenter,bitmap,mask,bmpPath,
+		EMbmCalcsoftQsn_fr_calc_display_center, EMbmCalcsoftQsn_fr_calc_display_center_mask);
+			
+		iDisplayCenterBitmap->SetBitmap(bitmap);
+		iDisplayCenterBitmap->SetMask(mask);
+		
+			bitmap = NULL;
+			mask	= NULL;
+		
+	AknsUtils::CreateIconL(skin,KAknsIIDQsnFrCalcDisplaySideR,bitmap,mask,bmpPath,
+		EMbmCalcsoftQsn_fr_calc_display_side_r, EMbmCalcsoftQsn_fr_calc_display_side_r_mask);
+			
+	iDisplaySideRBitmap->SetBitmap(bitmap);
+	iDisplaySideRBitmap->SetMask(mask);
+			
+		//Ext Icon Skinning implementation for Paper
+		bitmap = NULL;
+		mask	= NULL;
+		AknsUtils::CreateIconL(skin,KAknsIIDQgnGrafCalcPaper,bitmap,mask,bmpPath,
+			EMbmCalcsoftQgn_graf_calc_paper,EMbmCalcsoftQgn_graf_calc_paper_mask);
+	
+		iPaperBitmap->SetBitmap(bitmap);
+		iPaperBitmap->SetMask(mask);
+		bitmap = NULL;
+		mask	= NULL;
+#ifdef __SCALABLE_ICONS
+		AknsUtils::CreateIconL(skin,KAknsIIDQgnGrafCalcResultsLine, bitmap,mask,bmpPath,
+		EMbmCalcsoftQgn_graf_calc_results_line,EMbmCalcsoftQgn_graf_calc_results_line_mask);
+		
+		iResultsLineBitmap->SetBitmap(bitmap);
+		iResultsLineBitmap->SetMask(mask);
+#endif
+		bitmap = NULL;
+		mask	= NULL;
+		LoadPaperBitmapsL();
+		}
+
+	if(!iIsSkinChanged)
+	{
+		
+	
+		if( AknLayoutUtils::PenEnabled() )
+	    {
+	            
+	        
+	        LoadBitmapForFuncMapL(
+			EMbmCalcsoftQgn_indi_calc_cancel,
+	    	EMbmCalcsoftQgn_indi_calc_cancel_mask,
+		    0, 
+		    KCountOfButtonsTouch, iUnpressedButtonBmp, ENORMAL);
+	    }
+
+		else
+	    {
+	        LoadBitmapForFuncMapL(
+			EMbmCalcsoftQgn_indi_calc_button_plus,
+	    	EMbmCalcsoftQgn_indi_calc_button_plus_mask,
+		    0, 
+		    KCountOfButtons, iUnpressedButtonBmp, ENORMAL);
+		    
+		    LoadBitmapForFuncMapL(
+			EMbmCalcsoftQgn_indi_calc_button_plus_pressed,
+	    	EMbmCalcsoftQgn_indi_calc_button_plus_pressed_mask,
+		    0, 
+		    KCountOfButtons, iPressedButtonBmp, EPRESSED);
+		    
+	    }	
+	}
+
+	}
+
+// ---------------------------------------------------------
+// CCalcAppEnv::UpdateAknConstArrayForFuncmap
+// Update array for function map.  
+// (other items were commented in a header).  
+// ---------------------------------------------------------
+//
+void CCalcAppEnv::UpdateAknConstArrayForFuncMap()
+    {
+    UpdateAknConstArray();
+    }
+	    
+// ---------------------------------------------------------
+// CCalcAppEnv::LoadBitmapForFuncMapButtonL
+// Load bitmaps for FunctionMap button.  
+// (other items were commented in a header).  
+// ---------------------------------------------------------
+//
+
+void CCalcAppEnv::LoadBitmapForFuncMapL(TInt aStartBitmapId, TInt aStartMaskId, TInt aStartIndex,
+	TInt aCount, CGulIcon* aBitmapArray[], ButtonType aType)
+	{
+	CEikApplication* app = iEnv->EikAppUi()->Application();
+	TFileName bmpPath(app->BitmapStoreName());
+	TInt bmpId(aStartBitmapId);
+	TInt maskId(aStartMaskId);
+
+	MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+	CFbsBitmap* bitmap = NULL;
+	CFbsBitmap* mask	= NULL;
+
+    // Get the text color of theme
+    TRgb iconColor;
+    AknsUtils::GetCachedColor( skin, iconColor, 
+        KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG29 );
+    
+	for (TInt cnt(aStartIndex); cnt < (aCount + aStartIndex); cnt++)
+		{
+		switch(aType)
+			{
+			case EPRESSED:
+				{
+    				if(!AknLayoutUtils::PenEnabled() )
+    				{
+    				    AknsUtils::CreateIconL(skin,(iAknsConstArray)[cnt + KCalcCountOfButtonPressed],bitmap,mask,
+    					bmpPath, bmpId, maskId);    
+    					
+    				}
+				}
+			break;
+			case ENORMAL:
+				{
+				    if(!AknLayoutUtils::PenEnabled() )
+				    {
+				        AknsUtils::CreateIconL(skin,(iAknsConstArray)[cnt],bitmap,mask,
+					    bmpPath, bmpId, maskId);        
+				    }
+                    else
+                    {
+                        AknsUtils::CreateIconL(skin,(iAknsConstArray)[cnt]/*KAknsIIDQgnIndiCalcAdd*/,bitmap,mask,
+                        bmpPath, bmpId, maskId);
+                        // Set the color of icons
+                        AknIconUtils::SetIconColor( bitmap, iconColor );
+                    }
+				
+				}
+			break;
+			case EACTIVE_INACTIVE:
+				{
+				AknsUtils::CreateIconL(skin,(iAknsConstArray)[cnt + KCalcCountOfButtonInactive],bitmap,mask,
+					bmpPath, bmpId, maskId);
+				}
+			break;
+			default:
+				break;
+
+			}
+
+		CGulIcon* icon = CGulIcon::NewL(bitmap, mask);
+		aBitmapArray[cnt] = icon;
+			
+		bmpId = bmpId + 2;
+		maskId = maskId + 2;
+		}
+
+	}
+
+//---------------------------------------------------------
+// CCalcAppEnv::UpdateAknConstArrayforPaper
+//Updates the array with avkon skin constant Ids for paper bitmaps.   
+// ---------------------------------------------------------
+//
+   void CCalcAppEnv::UpdateAknConstArrayforPaper()
+	{
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperCenter);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperCornerTl);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperCornerTr);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperCornerBl);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperCornerBr);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperSideT);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperSideB);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperSideL);
+	iAknsConstArrayForPaper.Append(KAknsIIDQsnFrCalcPaperSideR); 
+	
+	}
+
+//---------------------------------------------------------
+// CCalcAppEnv::UpdateAknConstArray
+//Updates the array with avkon skin constant Ids for bitmaps.   
+// ---------------------------------------------------------
+//
+void CCalcAppEnv::UpdateAknConstArray()
+    {
+    iAknsConstArray.Reset();
+    if( AknLayoutUtils::PenEnabled() )
+    {
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcCancel );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcSeven );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcFour );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcOne );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcZero );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcSquareroot );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcEight );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcFive );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcTwo );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcSeparator );  
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcPercent );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcNine );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcSix );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcThree );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcSign );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcDivide );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcMultiply );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcSubtract );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcAdd );
+    iAknsConstArray.Append( KAknsIIDQgnIndiCalcEquals );
+    }
+    else
+    {
+    //Akn Const for +, -, *, /....etc 0-9
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonPlus);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonMinus);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonMultiply);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonDivide);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonSign);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonEquals);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonSquareroot);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonPercent);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonUp);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonDown);
+
+
+    //Akn Const for pressed +, -, *, /....etc  10-19
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonPlusPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonMinusPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonMultiplyPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonDividePressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonSignPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonEqualsPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonSquarerootPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonPercentPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonUpPressed);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonDownPressed);
+
+    //Akn Const for Active/ Inactive icons 20-24
+    /*iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonSignInactive);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonSignInactive);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonSquarerootInactive);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonPercentInactive);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonUpInactive);
+    iAknsConstArray.Append(KAknsIIDQgnIndiCalcButtonDownInactive);*/
+    //}
+    }
+    }   
+//EISkin2.6
+//-----------------------------------------------------------
+//CCalcAppEnv::LoadFuncMapBitmapSkinChangeL
+//Loads the function map Icons when the skin changes
+//-----------------------------------------------------------
+//
+void CCalcAppEnv::LoadFuncMapBitmapSkinChangeL()
+	{
+	iIsSkinChanged = ETrue;
+	LoadFuncMapBitmapL();
+	}
+
+
+//-----------------------------------------------------------
+//CCalcAppEnv::SetSkinChangedValue
+//Sets if the skin is changed or not
+//-----------------------------------------------------------
+	
+void CCalcAppEnv::SetSkinChangedValue(TBool aValue)
+{
+	iIsSkinChanged = aValue;
+}
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcFunc.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,1899 @@
+/*
+* Copyright (c) 2002 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:  The Function-Map subpane class, CCalcFuncmapSubPane
+*                Derived from CCoeControl.
+*                CCalcFuncmapSubPane is container class of CCalcCommandButton.
+*
+*/
+
+
+
+// INCLUDE FILES
+
+#include <AknUtils.h>
+#include <aknViewAppUi.h>
+
+#include <AknsSkinInstance.h> 
+#include <aknpopuplayout.h> 
+#include <Calcsoft.rsg>
+#include <layoutmetadata.cdl.h>
+#include "CalcFunc.h"
+//#include "CalcCmdBtn.h"
+#include "CalcEnv.h"
+#include "CalcCont.h"
+#include "CalcView.h"
+#include "CalcOutSheet.h"
+#include "calc.hrh"
+#include "CalcDrawingConst.laf"
+#include "CalcView.h"
+#include <applayout.cdl.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <AvkonInternalCRKeys.h>
+#include <PtiDefs.h>
+#include <PtiEngine.h>
+#include <PtiKeyMappings.h>
+#include <AknFepInternalCRKeys.h>
+#include <aknbutton.h>
+#include <AknsDrawUtils.h>
+
+#include <featmgr.h>      // Feature Manager
+
+//enum to hold the values of button states
+enum
+{
+    EnNormal = 0,
+    EnPressed,
+    EnDimmed
+};
+//  LOCAL CONSTANTS AND MACROS  
+const TInt KButtonsInColumn(2);      // The number of column of a button
+const TInt KButtonsInRow(KCountOfButtons / KButtonsInColumn);
+const TInt KButtonsInColumnTouch(4);      // The number of column of a button in Touch layout
+const TInt KButtonsInRowTouch(KCountOfButtonsTouch / KButtonsInColumnTouch);
+                                     // The number of row of a button
+const TInt KButtonsIdTblTouch[] =         // The command ID of a button in Touch Layout
+               { 
+               ECalcCmdCancel,          // C
+               ECalcCmdSeven,          // 7
+               ECalcCmdFour,          // 4
+               ECalcCmdOne,          // 1
+			   ECalcCmdZero,          // 0
+			   ECalcCmdSqrt, 		 // Sqrt
+               ECalcCmdEight,          // 8
+               ECalcCmdFive,          // 5
+               ECalcCmdTwo,          // 2
+			   ECalcCmdSeparator,          // .
+			   ECalcCmdPercent,		 // %	
+			   ECalcCmdNine,          // 9
+               ECalcCmdSix,          // 6
+               ECalcCmdThree,          // 3
+               ECalcCmdChangeSign,   // +/- 
+               ECalcCmdDivide,       // /
+               ECalcCmdMultiply,     // *
+               ECalcCmdSubtract,     // -
+               ECalcCmdAdd,          // +
+               ECalcCmdResult       // =
+				};
+				
+const TInt KButtonsIdTbl[] =         // The command ID of a button in non Touch Layout
+               { 
+               ECalcCmdAdd,          // +
+               ECalcCmdSubtract,     // -
+               ECalcCmdMultiply,     // *
+               ECalcCmdDivide,       // /
+               ECalcCmdChangeSign,   // +/- 
+               ECalcCmdResult,       // =
+			   ECalcCmdSqrt, 		 // Sqrt
+			   ECalcCmdPercent,		 // %
+               ECalcCmdScrollUp,     // Scroll-up
+               ECalcCmdScrollDown    // Scroll-down
+				};
+
+
+// If const TChar is used, complie error occurs in THUMB build.
+// To avoid this, #define is used.
+#define KCalcAsteriskBtn '*'
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// Two-phased constructor.
+CCalcFuncmapSubPane* CCalcFuncmapSubPane::NewL(
+                     CCalcContainer* aContainer)
+    {
+    CCalcFuncmapSubPane* self = new (ELeave) CCalcFuncmapSubPane();
+    CleanupStack::PushL(self);
+    self->ConstructL(aContainer);
+    CleanupStack::Pop(self); 
+    return self;
+    }
+
+
+// Destructor
+CCalcFuncmapSubPane::~CCalcFuncmapSubPane()
+    {
+        for (TInt count(0); count < KCountOfButtonsTouch; count++)
+            {
+                if(iButtons[count])
+                {
+                     delete iButtons[count];    
+                }
+                
+            }
+   
+    // delete of button controls
+       iQwertyModeStatusProperty.Close();
+       delete iEngine;
+       delete iCRKey;
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetScrollupEnable
+// \ scroll up and down button on scrolling enable.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::RedrawScrollButtons()
+    {
+    CCalcOutputSheet* outputSheet = iContainer->OutputSheet();
+    SetScrollupEnable(outputSheet->CanUp());
+    SetScrolldownEnable(outputSheet->CanDown());
+    }
+
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetChangeSignEnable
+// Redraw ChangeSign button on ChangeSign enable.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetChangeSignEnable
+                            (TBool aEnable)
+    {
+
+				/*Get the selected pointer 
+				button -> different layouts, different values*/
+        CAknButton* button = NULL;
+        if( AknLayoutUtils::PenEnabled() )
+        {
+            button = iButtons[ECmdTChangeSign];
+        }
+        else
+        {
+            button = iButtons[EChangeSignButton];
+        }
+        
+        //Set to dimmed state
+        button->SetDimmed( !aEnable );
+        button->DrawNow();
+        iIsChangeSignDimmed = aEnable;
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetClearKeyEnable
+// Redraw ClearKey button on ClearKey enable.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetClearKeyEnable( TBool aEnable )
+    {
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        CAknButton* button = NULL;
+        button = iButtons[ECmdTCancel];
+
+        if ( button )
+            {
+            button->SetDimmed( !aEnable );   
+            button->DrawNow();
+            }      
+        }
+    iIsClearKeyEnabled = aEnable;
+   }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::NotifyTimeoutL
+// If no key is pressed until timeout of *-key,
+// this function is called.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::NotifyTimeoutL()
+    {
+
+	  /*Get the selected pointer 
+		button -> different layouts, different values*/
+    CAknButton* button = iButtons[iSelected];    
+    if( !AknLayoutUtils::PenEnabled() )
+        {
+#ifdef RD_INTELLIGENT_TEXT_INPUT  
+        if ( iKeyboardType == EPtiKeyboardHalfQwerty )
+        	{
+            if( ( iLastKeyCode == EStdKeyLeftShift && iDecimalPoint ) || ( iLastKeyCode == EStdKeyLeftFunc && iDecimalPoint ))
+    	        {
+                iContainer->SetSeparatorFromTouchL();
+        	    }
+            else
+                {
+                iContainer->View()->HandleCommandL( KButtonsIdTbl[iSelected] );
+                }
+        	}
+        else
+#endif
+        	{
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[iSelected] );
+        	}
+        }
+    else
+        {
+        iContainer->View()->HandleCommandL( KButtonsIdTblTouch[iSelected] );
+        }   
+   
+#ifdef RD_INTELLIGENT_TEXT_INPUT  
+    if ( iKeyboardType == EPtiKeyboardHalfQwerty )
+    	{
+        iLastKeyCode = 0;
+    	}
+#endif
+    
+    //Set to dimmed state
+    button->SetDimmed( EFalse );
+    DrawDeferred();    
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::NotifyReleaseKeyL
+// Notify any key is released. If pressed button exists.
+// command which is releated is executed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::NotifyReleaseKeyL()
+    {
+				/*Get the selected pointer 
+				button -> different layouts, different values*/
+        CAknButton* button = iButtons[iSelected];
+        CAknButtonState* state = button->State(EnNormal);      	
+        
+        if(state->Flags() == EnPressed)
+        {
+          TKeyEvent aKeyEvent;
+          aKeyEvent.iScanCode = EStdKeyEnter;
+          TEventCode aType = EEventKeyUp;
+          //trigger offerkeyeventl to this button
+          button->OfferKeyEventL(aKeyEvent,aType);
+	      state->SetFlags(EnNormal);    
+	      button->DrawNow();
+        }
+      if( !AknLayoutUtils::PenEnabled() )
+       	{
+       	  if(iSelected == EScrollUp)
+            {
+                CCalcOutputSheet* outputSheet = iContainer->OutputSheet();
+                if(!outputSheet->CanUp())
+                {
+                    RedrawHighlight(EScrollUp,EScrollDown);
+                    iSelected = EScrollDown;
+                }
+            }
+            
+          if(iSelected == EScrollDown)
+            {
+                CCalcOutputSheet* outputSheet = iContainer->OutputSheet();
+                if(!outputSheet->CanDown())
+                {
+                    RedrawHighlight(EScrollDown,EScrollUp);
+                    iSelected = EScrollUp;
+                }
+            }
+            
+       	}
+
+	   }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::NotifyOtherThanOkKeyPressed
+// If key other than OK-key is pressed this function is called.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::NotifyOtherThanOkKeyPressed()
+    {
+    //for (TInt cnt(0); cnt < iCountOfButtons; cnt++)
+        {
+          //Get the pointer for the button
+         CAknButton* button = iButtons[iSelected];
+         CAknButtonState* state = button->State(EnNormal);
+         if(state->Flags() == EnPressed)
+            {
+          state->SetFlags(EnNormal);
+          button->DrawNow();
+            }
+        }
+
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::NotifyLangChange
+// Called if language is changed.
+// Change layout according to the language.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::NotifyLangChange()
+    {
+    // Write code here.
+    SetLayout();
+    DrawNow();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::IsQwertyKeypadActive
+// Called to check qwerty keypad is active or not
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+ TInt CCalcFuncmapSubPane::IsQwertyKeypadActive()
+  {
+ 	TInt value = 0;
+    
+    iQwertyModeStatusProperty.Get(value);
+    
+    return value;
+ }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::HandleControlEventL
+// Observer event from avkon button change
+// (other items were commented in a header).
+// ---------------------------------------------------------
+void CCalcFuncmapSubPane::HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)
+    {    
+    iIsKeyLongPress = EFalse;   
+    if ( aEventType != EEventStateChanged && aEventType != CAknButton::ELongPressEvent )
+        {
+        return;
+        }
+    else if ( aEventType == CAknButton::ELongPressEvent )
+        {
+        iIsKeyLongPress = ETrue;
+        }
+        
+    //Get the selected button
+    CAknButton* button = (CAknButton*)aControl;
+    
+    for ( TInt i = 0; i < KCountOfButtons; ++i )
+        {
+        if ( button == iButtons[i] )
+            {
+            if(iSelected != i)
+            return;
+            
+            //break;
+            }
+        }    
+    
+    if ( !button->IsDimmed() )
+        {
+        		//handles all the commands for the buttons
+            if( !AknLayoutUtils::PenEnabled() )
+            {
+            iContainer->View()->HandleCommandL(KButtonsIdTbl[iSelected]);
+            if(iSelected == EScrollUp)
+            {
+                CCalcOutputSheet* outputSheet = iContainer->OutputSheet();
+                if(!outputSheet->CanUp())
+                {
+                    RedrawHighlight(EScrollUp,EScrollDown);
+                    iSelected = EScrollDown;
+                }
+            }
+            else if(iSelected == EScrollDown)
+            {
+                CCalcOutputSheet* outputSheet = iContainer->OutputSheet();
+                if(!outputSheet->CanDown())
+                {
+                    RedrawHighlight(EScrollDown,EScrollUp);
+                    iSelected = EScrollUp;
+                }
+            }
+            }
+            else
+            {
+            iContainer->View()->HandleCommandL(KButtonsIdTblTouch[iSelected]);
+            }   
+
+        }    
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::OfferKeyEventL
+// This function is called by CCalcContainer::OfferKeyEventL
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TKeyResponse CCalcFuncmapSubPane::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
+{
+    TKeyResponse exitCode(EKeyWasNotConsumed);
+       
+    TPtiKey keyQwertyValue = (TPtiKey)aKeyEvent.iScanCode;
+    
+    if(IsQwertyKeypadActive())  
+        {
+#ifdef RD_INTELLIGENT_TEXT_INPUT  
+        if ( iKeyboardType == EPtiKeyboardHalfQwerty )
+        	{
+            TBuf<KMaxNumCharsPerCase> keys;
+            TInt firstoperator(-1);
+            TInt secondoperator(-1);
+                   
+            TInt oldSelect( iSelected );
+            
+            if ( ( aKeyEvent.iScanCode == EStdKeyLeftFunc && aType == EEventKeyDown ) || 
+                 ( aKeyEvent.iScanCode == EStdKeyLeftShift && aType == EEventKeyDown ) )
+                 {            
+                 iEngine->MappingDataForKey( keyQwertyValue, keys, EPtiCaseFnLower  );
+                 MapDataForChrShiftKey( keys, firstoperator, secondoperator);
+                 if ( (secondoperator == -1) && (firstoperator != -1))
+                	 {
+                     if ( AknLayoutUtils::PenEnabled() )
+                         {
+                         iSelected = firstoperator;    
+                         }
+                     else
+                         {
+                         if ( firstoperator == ECmdTSeparator )
+                        	 {
+                        	 iDecimalPoint = ETrue;
+                        	 }
+                         else
+                        	 {
+                        	 iSelected = firstoperator;
+                        	 iDecimalPoint = EFalse;
+                        	 }
+                         }                	 
+                	 }
+                 else if ( (firstoperator == -1) && (secondoperator != -1) )
+                	 {
+                     if ( AknLayoutUtils::PenEnabled() )
+                         {
+                         iSelected = secondoperator;    
+                         }
+                     else
+                         {
+                         if ( secondoperator == ECmdTSeparator )
+                        	 {
+                        	 iDecimalPoint = ETrue;
+                        	 }
+                         else
+                        	 {
+                        	 iSelected = secondoperator;
+                        	 iDecimalPoint = EFalse;
+                        	 }
+                         }                	 
+                	 }
+                 else if ( (firstoperator != -1) && (secondoperator != -1) )
+                	 {
+                     if ( iLastKeyCode == aKeyEvent.iScanCode )
+                         {
+                         if ( AknLayoutUtils::PenEnabled() )
+                             {
+                             if ( iSelected == firstoperator )
+                                 {
+                                 iSelected = secondoperator;
+                                 }
+                             else
+                                 {
+                                 iSelected = firstoperator;
+                                 }
+                             }
+                         else
+                        	 {
+                              if ( firstoperator == ECmdTSeparator || secondoperator == ECmdTSeparator )
+                            	  {
+                            	  if ( iDecimalPoint )
+                            		  {
+                            		  iDecimalPoint = EFalse;
+                            		  if ( firstoperator == ECmdTSeparator )
+                            			  {
+                            			  iSelected = secondoperator;
+                            			  }
+                            		  else
+                            			  {
+                            			  iSelected = firstoperator;
+                            			  }                 		  
+                            		  }
+                            	  else
+                            		  {
+                            		  iDecimalPoint = ETrue;
+                            		  }
+                            	  }
+                              else
+                            	  {
+                                  if ( iSelected == firstoperator )
+                                      {
+                                      iSelected = secondoperator;
+                                      }
+                                  else
+                                      {
+                                      iSelected = firstoperator;
+                                      }                	  
+                            	  }
+                        	 }
+                         }
+                     else
+                         {
+                         if ( AknLayoutUtils::PenEnabled() )
+                             {
+                             iSelected = firstoperator;    
+                             }
+                         else
+                             {
+                             if ( firstoperator == ECmdTSeparator )
+                            	 {
+                            	 iDecimalPoint = ETrue;
+                            	 }
+                             else
+                            	 {
+                            	 iSelected = firstoperator;
+                            	 iDecimalPoint = EFalse;
+                            	 }
+                             }
+
+                         }
+                     }
+                     RedrawHighlight( oldSelect, iSelected );
+                     iLastKeyCode = aKeyEvent.iScanCode;
+                     exitCode = EKeyWasConsumed;
+                     
+                     iIsShiftKeyPressed = ETrue;
+                 }
+            }
+         else
+#endif
+        	{
+        	//For Multiplication operator in Qwerty keypad
+        	if(((aKeyEvent.iScanCode == EStdKeyLeftShift) || (aKeyEvent.iScanCode == EStdKeyRightShift)) && aType == EEventKeyDown)
+        	    {
+        	     if(iShiftKeyPressed == EPtiCaseLower )
+        		     {
+        		   	 iShiftKeyPressed = EPtiCaseUpper;
+        		   	 iShiftKey = 0;
+        		   	 iValue = ETrue;
+        		     }
+        	      
+        	     else
+        	     	{
+        			iShiftKeyPressed = EPtiCaseLower;
+        	     	}
+        	    exitCode = EKeyWasConsumed; 	
+        	    
+        	    iIsShiftKeyPressed = ETrue;
+        	    }
+        	else if((aKeyEvent.iScanCode == EStdKeyLeftShift || aKeyEvent.iScanCode == EStdKeyRightShift)&& aType == EEventKeyUp)
+        		{
+                        /*if(((iLanguage == ELangFrench) || (iLanguage == ELangTaiwanChinese) || 
+                            (iLanguage == ELangCzech) || (iLanguage == ELangSlovak))&& iShiftKey >= 1)*/
+                                if( iShiftKey >= 1 )
+        			{
+        			iShiftKeyPressed = EPtiCaseLower;
+        			}
+        		iValue = EFalse;
+        	    exitCode = EKeyWasConsumed; 
+        	    
+        	    iIsShiftKeyPressed = ETrue;
+        	    }
+        	}
+	      //else
+     if ( !iIsShiftKeyPressed )
+		{
+		if (aType != EEventKey)
+        {
+	        if (aType == EEventKeyDown)
+			    {
+			        iIsOfferKeyEvent = ETrue;        
+			    }
+			    else if (aType == EEventKeyUp)
+			    {
+			        iIsOfferKeyEvent = EFalse;        
+			    }
+            // when users press send key, EKeyWasNotConsumed is returned to system
+            // to open dialer 
+            if ( aKeyEvent.iScanCode == EStdKeyYes )
+                {
+                return EKeyWasNotConsumed;
+                }
+        return EKeyWasConsumed;
+        }
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        if( MapNumericCharL( aKeyEvent ) )
+            {
+            exitCode = EKeyWasConsumed;
+            iShiftKeyPressed = EPtiCaseLower;
+            }
+#else
+		if(MapNumericCharL(keyQwertyValue,iShiftKeyPressed))
+			{
+			exitCode = EKeyWasConsumed;
+			iShiftKeyPressed = EPtiCaseLower;		
+			}
+#endif
+		else 
+			{
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+            if( MapNumerics( aKeyEvent ) || aKeyEvent.iCode == EKeyBackspace )
+                {
+                exitCode = EKeyWasNotConsumed;
+                iShiftKeyPressed = EPtiCaseLower;
+                
+                                /*if((iLanguage == ELangFrench) || (iLanguage == ELangTaiwanChinese) || 
+                                         (iLanguage == ELangCzech) || (iLanguage == ELangSlovak))*/
+                    {
+                    if( !iValue )
+                    iShiftKeyPressed = EPtiCaseLower;
+
+                    else
+                    iShiftKeyPressed = EPtiCaseUpper;
+                    iShiftKey++;
+                    }
+                }
+#else
+			if(MapNumerics(keyQwertyValue,iShiftKeyPressed) || aKeyEvent.iCode == EKeyBackspace)
+				{
+				exitCode = EKeyWasNotConsumed;
+				iShiftKeyPressed = EPtiCaseLower;
+
+                                /*if((iLanguage == ELangFrench) || (iLanguage == ELangTaiwanChinese) || 
+                                         (iLanguage == ELangCzech) || (iLanguage == ELangSlovak))*/
+					{
+					if(!iValue)
+					iShiftKeyPressed = EPtiCaseLower;
+					
+					else
+					iShiftKeyPressed = EPtiCaseUpper;
+					iShiftKey++;	
+					}
+				}
+#endif
+			else
+				{
+				exitCode = EKeyWasConsumed;	
+				iShiftKeyPressed = EPtiCaseLower;
+				}
+			
+			}
+
+		}	    
+
+    // handle Enter key event	
+    if ( aKeyEvent.iCode == EKeyEnter )
+        {
+        exitCode = EKeyWasConsumed;
+        HandleMiddleSoftKeyOREKeyOKL();
+        iShiftKeyPressed = EPtiCaseLower;
+        return exitCode;
+        }
+    
+	iIsShiftKeyPressed = EFalse;
+		
+	}
+ 
+/*	if(aKeyEvent.iCode == EKeyOK)
+    {
+       
+        HandleMiddleSoftKeyOREKeyOKL();
+        exitCode = EKeyWasConsumed;
+    }   
+    else if (aType == EEventKey)*/
+    if (aType == EEventKey)
+    {
+        TInt oldSelect(iSelected);
+        TInt row(iSelected % iButtonsInRow);
+        TInt column(iSelected / iButtonsInRow);
+        iIsOfferKeyEvent = EFalse; 
+        switch(aKeyEvent.iCode)
+        {
+            case EKeyLeftArrow:
+            {
+                
+                do
+                {   
+                   
+                        column--;
+                        
+                        if(column < 0)
+                        {
+                            column = iButtonsInColumn -1;
+                            row--;
+
+                            if( row < 0 )
+                            {
+                                row = iButtonsInRow -1;
+                            }
+                        }
+                    
+                    iSelected = row + column * iButtonsInRow;
+
+                }while( iButtons[iSelected]->IsDimmed() );
+                
+                RedrawHighlight(oldSelect, iSelected);
+
+                exitCode = EKeyWasConsumed;
+                break;
+            }
+            
+            case EKeyRightArrow:
+            {
+                               
+                do
+                {   
+                        column++;
+                        
+                        if(column == iButtonsInColumn)
+                        {
+                            column = 0;
+                            row++;
+                            
+                            if( row >= iButtonsInRow )
+                            {
+                                row = 0;
+                            }
+                        }
+                    
+                    iSelected = row + column * iButtonsInRow;
+
+                }while( iButtons[iSelected]->IsDimmed() );
+                
+                RedrawHighlight(oldSelect, iSelected);
+                exitCode = EKeyWasConsumed;
+                break;
+            }
+            
+            case EKeyUpArrow:
+            {
+                
+                SetNextCursorPosForUpArrow(oldSelect);
+
+                RedrawHighlight(oldSelect, iSelected);
+                exitCode = EKeyWasConsumed;
+                break;
+            }
+            
+            case EKeyDownArrow:
+            {
+                
+                SetNextCursorPosForDownArrow(oldSelect);
+ 
+                RedrawHighlight(oldSelect, iSelected);
+                exitCode = EKeyWasConsumed;
+                break;
+            }
+
+            case EKeyOK:
+            {
+            if ( !AknLayoutUtils::PenEnabled() )
+                {
+                // get and judge the state of button
+                CAknButton* button = iButtons[iSelected];
+                CAknButtonState* state = button->State( EnNormal ); 
+                if ( ( iSelected == EScrollUp || iSelected == EScrollDown ) 
+                    && ( state->Flags() == EnPressed ) )
+                    {
+                    iContainer->View()->HandleCommandL( KButtonsIdTbl[iSelected] );
+                    // when the history arrives the top or bottom,the button should be set dimmed
+                    CCalcOutputSheet* outputSheet = iContainer->OutputSheet();
+                    if ( !( outputSheet->CanDown() ) && iSelected == EScrollDown )
+                        {
+                        button->SetDimmed( ETrue );
+                        DrawDeferred();  
+                        }
+                    if ( !( outputSheet->CanUp() ) && iSelected == EScrollUp )
+                        {
+                        button->SetDimmed( ETrue );
+                        DrawDeferred();  
+                        }   
+                    }
+                }
+                break;
+            }
+            default:
+            {
+               if(!IsQwertyKeypadActive())
+             {
+                if(aKeyEvent.iCode == KCalcAsteriskBtn)
+                {
+                    if(iLastKeyCode == aKeyEvent.iCode)
+                    {
+                        row++;
+                        
+                        if(row == iButtonsInRow - 1)  // Equal is not contained in a loop.
+                        {
+                            row = 0;
+                        }
+                        iSelected = row + column * iButtonsInRow;
+                    }
+                    else
+                    {
+                        if(AknLayoutUtils::PenEnabled())
+                            {
+                              iSelected = ECmdTAdd;    
+                            }
+                        else
+                            {
+                              iSelected = EPlusButton;    
+                            }    
+                        
+                    }
+                    RedrawHighlight(oldSelect, iSelected);
+                    exitCode = EKeyWasConsumed;
+                }
+             }
+            break;
+            }
+        }
+        iLastKeyCode = aKeyEvent.iCode;
+        
+    }
+    else if (aType == EEventKeyDown)
+    {
+        iIsOfferKeyEvent = ETrue;        
+    }
+    else if (aType == EEventKeyUp)
+    {
+        iIsOfferKeyEvent = EFalse;        
+    }
+    
+   
+    return exitCode;
+}
+
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcFuncmapSubPane::CCalcFuncmapSubPane()
+    {
+    }
+
+
+// default constructor can leave.
+void CCalcFuncmapSubPane::ConstructL
+      (CCalcContainer* aContainer) 
+    {
+    iSelected = 0;    
+    iContainer = aContainer;
+    iIsOfferKeyEvent = EFalse;
+
+    SetContainerWindowL(*iContainer);
+    // Read character sequence tables, such as -, +.
+    iCalcAppEnv = CCalcAppEnv::Static();
+    iIsChangeSignDimmed = ETrue;
+    
+       if( AknLayoutUtils::PenEnabled() )
+    {
+        iCountOfButtons = KCountOfButtonsTouch;
+        iButtonsInRow = KButtonsInRowTouch;
+        iButtonsInColumn = KButtonsInColumnTouch;
+      
+    }
+    else
+    {
+        iCountOfButtons = KCountOfButtons;
+        iButtonsInRow = KButtonsInRow;
+        iButtonsInColumn = KButtonsInColumn;  
+        
+    }
+    
+
+    for (TInt count = 0; count < iCountOfButtons; count++)
+        {        
+        //Create the AknButtons
+        if(AknLayoutUtils::PenEnabled())
+            {
+                iButtons[count] = CAknButton::NewL(
+            iCalcAppEnv->UnpressedButtonBmp(count),
+            NULL,
+            NULL,
+            NULL,
+            _L(""),
+            _L(""),
+            0,
+            0
+            );     
+            
+            }
+        else
+            {
+            
+                iButtons[count] = CAknButton::NewL(
+            iCalcAppEnv->UnpressedButtonBmp(count),
+            NULL,
+            iCalcAppEnv->PressedButtonBmp(count),
+            NULL,
+            _L(""),
+            _L(""),
+            0,
+            0
+            );     
+            /*if((count == ESqrtButton) && !iIsChangeSignDimmed)
+            {
+                iButtons[count]->SetDimmed(ETrue);
+            }*/
+            
+            }
+        
+        iButtons[count]->SetContainerWindowL( *this );
+        iButtons[count]->SetObserver( this );     
+        }
+
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        iButtons[ECmdTCancel]->SetButtonFlags( KAknButtonReportOnLongPress );
+        }
+    iSelected = 0;
+    RedrawHighlight( iSelected, iSelected );
+
+    User::LeaveIfError(iQwertyModeStatusProperty.Attach(KCRUidAvkon, KAknQwertyInputModeActive));
+   
+    iShiftKeyPressed = EPtiCaseLower;
+    iShiftKey		 = 0;
+
+     // Try to get the English key mappings. If those are not available, use the 
+    // mappings of the current input language. The order is this because all mappings
+    // do not necessarily contain all characters neeeded by the Calculator.
+    iLanguage = ELangEnglish;
+    iEngine = CPtiEngine::NewL(ETrue);
+    iCoreLanguage = static_cast<CPtiCoreLanguage*>(iEngine->GetLanguage( iLanguage ));
+
+    if( !iCoreLanguage )
+    	{
+        iCRKey = CRepository::NewL(KCRUidAknFep);
+        TInt ret = iCRKey->Get(KAknFepInputTxtLang,iLanguage);
+        if( ret!= KErrNone )
+            {
+            //Exit application if server is busy( Error Raised )
+            iAvkonViewAppUi->Exit();
+            }
+            iCoreLanguage = static_cast<CPtiCoreLanguage*>(iEngine->GetLanguage(iLanguage));
+         }
+
+    RProperty::Get( KCRUidAvkon, KAknKeyBoardLayout, iKeyboardType );
+    
+    if( iCoreLanguage )
+        {
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        if ( iKeyboardType == EPtiKeyboardHalfQwerty)
+           {
+           iHalfQwertyKeyMappings = static_cast<CPtiHalfQwertyKeyMappings*>(iCoreLanguage->GetHalfQwertyKeymappings());
+           }
+       else
+#endif
+          {
+          iQwertyKeyMappings = static_cast<CPtiQwertyKeyMappings*>(iCoreLanguage->GetQwertyKeymappings());
+          }
+        }
+
+        // UI language is used to determine the used number format.
+        iUiLanguage = User::Language();
+  
+        
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+        
+        if ( iKeyboardType == EPtiKeyboardHalfQwerty )
+            { 
+            iEngine->ActivateLanguageL( iLanguage, EPtiEngineHalfQwerty );
+            }
+        else if ( IsQwertyKeypadActive())
+            { 
+            iEngine->ActivateLanguageL( iLanguage, EPtiEngineQwerty );
+            }  
+       
+  //      RProperty::Get( KCRUidAvkon, KAknKeyBoardLayout, iKeyboardType );
+        iEngine->SetKeyboardType( TPtiKeyboardType (iKeyboardType ));
+        
+#endif
+    
+    iIsShiftKeyPressed = EFalse;
+
+    }
+
+//	---------------------------------------------------------
+// CCalcFuncmapSubPane::RefreshButtonIcons
+// This function is called by CCalcContainer::OfferKeyEventL
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::RefreshButtonIcons()
+{
+	/*for (TInt count(0); count < iCountOfButtons; count++)
+        {
+        iButtons[count]->SetBitmapIcons(iCalcAppEnv->UnpressedButtonBmp(count),
+			iCalcAppEnv->PressedButtonBmp(count),
+			iCalcAppEnv->InactiveButtonBmp(count));
+        }*/
+}
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetScrollupEnable
+// Redraw scroll-up button on scrolling enable.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetScrollupEnable
+                     (TBool aEnable)  
+    {
+		//Enabling/Disabling of scroll up buttons only for Non-Touch   
+    if(!AknLayoutUtils::PenEnabled())
+    {
+        CAknButton* scrollUp = iButtons[EScrollUp];
+        scrollUp->SetDimmed( !aEnable );
+        scrollUp->DrawNow();         
+    }
+    
+    }
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetScrolldownEnable
+// Redraw scroll-down button on scrolling enable.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetScrolldownEnable
+                     (TBool aEnable) 
+    {
+	//Enabling/Disabling of scroll down buttons only for Non-Touch
+    if(!AknLayoutUtils::PenEnabled())
+    {       
+    CAknButton* scrollDown = iButtons[EScrollDown];
+    scrollDown->SetDimmed( !aEnable );
+    scrollDown->DrawNow();
+    }
+    }
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetNextCursorPosForUpArrow
+// Set next cursor position whwn pressing uparrow key.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetNextCursorPosForUpArrow(TInt aOldPos)
+{
+    
+    TInt row(aOldPos % iButtonsInRow);
+    TInt column(aOldPos / iButtonsInRow);
+
+    do
+    {   row--;
+
+        if(row < 0)
+        {
+            column--;
+        
+            if(column < 0)
+            {
+                column = iButtonsInColumn -1;
+            }
+            row = iButtonsInRow - 1;
+        }
+        iSelected = row + column * iButtonsInRow;
+    
+    }while( iButtons[iSelected]->IsDimmed() );
+}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetNextCursorPosForDownArrow
+// Set next cursor position whwn pressing downarrow key.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetNextCursorPosForDownArrow(TInt aOldPos)
+{
+    TInt row(aOldPos % iButtonsInRow);
+    TInt column(aOldPos / iButtonsInRow);
+
+    do
+    {   row++;
+
+        if(row == iButtonsInRow)  // KButtonsInRow is equal to "number of rows in column"
+        {
+            row = 0;
+
+            //move focus from last item to first item, column should be added one
+            column++;     
+        
+            if( column == iButtonsInColumn )  
+            {
+                column = 0;
+            }
+        }
+        iSelected = row + column * iButtonsInRow;
+    
+    }while( iButtons[iSelected]->IsDimmed() );
+}
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::RedrawHighlight
+// An old highlight rectangle is erased and 
+// a new highlight rectangle is drawn.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::RedrawHighlight
+      (TUint aOldId,            // The button chosen before
+       TUint aNewId) const      // The button chosen newly
+    {
+    // The State of each button is set.
+    CAknButton* button = iButtons[aOldId];
+    CAknButtonState* state = button->State(EnNormal);      	
+        
+    if(state->Flags() == EnPressed)
+        {
+        TKeyEvent aKeyEvent;
+        aKeyEvent.iScanCode = EStdKeyEnter;
+        TEventCode aType = EEventKeyUp;
+        //trigger offerkeyeventl to this button
+        TRAP_IGNORE(button->OfferKeyEventL(aKeyEvent,aType));
+	    state->SetFlags(EnNormal);
+     	}
+    button->SetFocus( EFalse, EDrawNow );      
+    button = iButtons[aNewId];        
+    button->SetFocus( ETrue, EDrawNow );
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetLayout
+// Set functionmap button layout.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+
+
+void CCalcFuncmapSubPane::SetLayout()
+    {
+    TRect parentRect(Rect());    
+    
+	 TInt t = 0;
+	 if( AknLayoutUtils::PenEnabled()  )
+	    {
+	        for (TInt count(0); count < KButtonsInColumnTouch; count++)
+            {
+            for (TInt row(0); row < 5; row++)   
+      	        { 
+      	        
+      	         TAknWindowLineLayout area;
+                 TAknWindowLineLayout area1;
+
+                 TAknWindowLineLayout areaG2;
+                 TAknWindowLineLayout areaGraphics;
+     	        
+     	            area= AknLayoutScalable_Apps::toolbar_button_pane_cp01(1).LayoutLine();
+                   areaG2= AknLayoutScalable_Apps::cell_calc_pane_g2(1).LayoutLine();
+    		         if (Layout_Meta_Data::IsLandscapeOrientation())
+    		            {
+    		                area1 = AknLayoutScalable_Apps::cell_calc_pane(count,row,enTouch_with_prt).LayoutLine();
+    		            }
+    		         else
+    		            {
+    		               area1 = AknLayoutScalable_Apps::cell_calc_pane(count,row,enTouch_enabled).LayoutLine();
+    		            }   
+
+                    areaGraphics = area1;
+                    areaGraphics.iW = areaGraphics.iW - areaG2.il - areaG2.ir;
+                    areaGraphics.iH = areaG2.iH;
+    		    
+    		        area1.il = area1.il + area.il;
+    		        area1.ir = area1.ir - area.ir;
+    		        area1.it = area1.it + area.it;
+    		        area1.ib = area1.ib - area.ib;
+    		        area1.iW = area1.iW - area.il - area.ir;
+    		        area1.iH = area1.iH - area.it - area.ib;
+    		    
+                 
+                //A change in values here
+                if ( Layout_Meta_Data::IsLandscapeOrientation() )
+                {
+                AknLayoutUtils::LayoutControl(
+                iButtons[t], parentRect,/*AknLayoutScalable_Apps::cell_calc_pane(count,Row,enTouch_with_prt).LayoutLine()*/area1 );
+                }
+                else
+                {
+                AknLayoutUtils::LayoutControl(
+                iButtons[t], parentRect,/*AknLayoutScalable_Apps::cell_calc_pane(count,Row,enTouch_enabled).LayoutLine()*/area1 );
+                }
+
+                TSize iconSize( areaGraphics.iW, areaGraphics.iH );
+                iButtons[t]->SetIconSize( iconSize );
+                TRect rect = iButtons[t]->Rect();
+                rect.iBr.iX += 5;
+                rect.iBr.iY += 5; 
+                rect.iTl.iX -= 5;
+                rect.iTl.iY -= 5;
+
+                if ( FeatureManager::FeatureSupported( KFeatureIdRockerKey ) )
+                {
+                iButtons[t]->SetHighlightRect( rect );
+                }
+                t++;
+      	        }
+            }
+            
+       }
+            
+	    
+	    else
+	        {
+             for (TInt count(0); count < KButtonsInColumn; count++)
+                {
+                for (TInt row(0); row < 5; row++)   
+           	        {   	        
+               	        AknLayoutUtils::LayoutControl(
+                        iButtons[t], parentRect, AknLayoutScalable_Apps::cell_calc_pane( count, row ).LayoutLine());
+                        iButtons[t]->SetHighlightRect( iButtons[t]->Rect() );
+                        t++;
+           	        }
+           	        
+                }
+	        }
+                
+        
+    }
+
+
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::CountComponentControls
+// The count of child control is returned.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcFuncmapSubPane::CountComponentControls() const
+    {
+    return iCountOfButtons;
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::ComponentControl
+// Child control's pointer corresponding to the specified index is returned.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CCoeControl* CCalcFuncmapSubPane::ComponentControl
+              (TInt aIndex) const 
+    {
+    return iButtons[aIndex];
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::GetButtonBitmapControl
+// This function is called when the size changes.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+/*CCalcCommandButton*/CAknButton* CCalcFuncmapSubPane::GetButtonBitmapControl
+                                    (TInt aIndex)
+	{
+		return iButtons[aIndex];
+	}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SizeChanged
+// This function is called when the size changes.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SizeChanged()
+    {
+    SetLayout();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetSqrtEnable
+// Redraw square root button, either normal or dimmed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetSqrtEnable(TBool aEnable)
+{
+	//Get the sqrt button
+	CAknButton* button = NULL;
+	 if( !AknLayoutUtils::PenEnabled()  )
+	    {
+	     button = iButtons[ESqrtButton];     
+	    }
+	  else
+	    {
+	     button = iButtons[ECmdTSqrt];    
+	    }  
+	if( button )
+	    {
+         button->SetDimmed(!aEnable);   
+         button->DrawNow();
+        }
+    iIsSqrtDimmed = aEnable;
+	}
+
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetPercentEnable
+// Redraw percent button, either normal or dimmed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetPercentEnable(TBool aEnable)
+{
+	//Get the percent button
+	CAknButton* button = NULL;
+	 if( !AknLayoutUtils::PenEnabled()  )
+	    {
+	     button = iButtons[EPercentButton];     
+	    }
+	  else
+	    {
+	     button = iButtons[ECmdTPercent];    
+	    }  
+    if( button )
+	    {
+         button->SetDimmed(!aEnable);   
+         button->DrawNow();
+	   }
+	iIsPercentDimmed = aEnable;
+}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::MapNumericChar
+// Redraw percent button, either normal or dimmed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//		
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+TBool CCalcFuncmapSubPane::MapNumericCharL( TKeyEvent aKeyEvent )
+    {
+    TBuf<KMaxNumCharsPerCase> keys;
+
+    TPtiKey aKey = ( TPtiKey )aKeyEvent.iScanCode;
+
+
+    if( !keys.Length() )
+            {
+            keys.Append( aKeyEvent.iCode );
+            }
+
+    if ( keys.Length() > 0 )
+        {
+        TUint16 firstChar = keys[0];
+        switch ( firstChar )
+            {
+            case KPtiPinyinMarker:
+            case KPtiStrokeMarker:
+            case KPtiZhuyinMarker:
+            case KPtiCangjieMarker:
+            case KPtiGetAllMarker:
+                 if ( keys.Length() > 1 )
+                     {
+                     firstChar = keys[1];
+                     }
+            default:
+                break;
+            }
+
+        TInt loc1 = KAllowedOperatorPlus().Locate( firstChar );
+        if ( loc1 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[0] );
+            return ETrue;
+            }
+        TInt loc2 = KAllowedOperatorMinus().Locate( firstChar );
+        if ( loc2 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[1] );
+            return ETrue;
+            }
+        TInt loc3 = KAllowedOperatorStar().Locate( firstChar );
+        if ( loc3 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[2] );
+            return ETrue;
+            }
+        TInt loc4 = KAllowedOperatorDivide().Locate( firstChar );
+        if ( loc4 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[3] );
+            return ETrue;
+            }
+        TInt loc5 = KAllowedOperatorEquals().Locate( firstChar );
+        if ( loc5 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[5] );
+            return ETrue;
+            }
+        TInt loc6 = KAllowedOperatorPercent().Locate( firstChar );
+        if ( loc6 != KErrNotFound &&  GetPercentButtonState() )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[7] );
+            return ETrue;
+            }
+
+              }
+        
+    return EFalse;
+    }
+
+#else
+TBool CCalcFuncmapSubPane::MapNumericCharL( TPtiKey aKey, TPtiTextCase aCase )	
+    {
+    TBuf<KMaxNumCharsPerCase> keys;
+
+    iQwertyKeyMappings->GetDataForKey( aKey, keys, aCase );				
+
+    if ( keys.Length() > 0 )
+        {
+        TUint16 firstChar = keys[0];
+        switch ( firstChar )
+            {
+            case KPtiPinyinMarker:
+            case KPtiStrokeMarker:
+            case KPtiZhuyinMarker:
+            case KPtiCangjieMarker:
+            case KPtiGetAllMarker:
+                if ( keys.Length() > 1 )
+                    {
+                    firstChar = keys[1];
+                    }
+            default:
+                break;
+            }
+
+        TInt loc1 = KAllowedOperatorPlus().Locate( firstChar );
+        if ( loc1 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[0] );
+            return ETrue;
+            }
+        TInt loc2 = KAllowedOperatorMinus().Locate( firstChar );
+        if ( loc2 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[1] );
+            return ETrue;
+            }
+        TInt loc3 = KAllowedOperatorStar().Locate( firstChar );
+        if ( loc3 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[2] );
+            return ETrue;
+            }
+        TInt loc4 = KAllowedOperatorDivide().Locate( firstChar );
+        if ( loc4 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[3] );
+            return ETrue;
+            }
+        TInt loc5 = KAllowedOperatorEquals().Locate( firstChar );
+        if ( loc5 != KErrNotFound )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[5] );
+            return ETrue;
+            }
+        TInt loc6 = KAllowedOperatorPercent().Locate( firstChar );
+        if ( loc6 != KErrNotFound &&  GetPercentButtonState() )
+            {
+            iContainer->View()->HandleCommandL( KButtonsIdTbl[7] );
+            return ETrue;
+            }
+
+              }
+        
+    return EFalse;
+    }
+#endif       
+	
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::MapNumericChar
+// Redraw percent button, either normal or dimmed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//		
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+TBool CCalcFuncmapSubPane::MapNumerics( TKeyEvent aKeyEvent )
+    {
+    
+    TBuf<KMaxNumCharsPerCase> keys;
+
+    TPtiKey aKey = ( TPtiKey )aKeyEvent.iScanCode;
+
+    if ( !keys.Length() )
+            {
+            keys.Append( aKeyEvent.iCode );
+            }
+
+    if ( keys.Length() > 0 )
+        {
+        TUint16 firstChar = keys[0];
+        switch ( firstChar )
+            {
+            case KPtiPinyinMarker:
+            case KPtiStrokeMarker:
+            case KPtiZhuyinMarker:
+            case KPtiCangjieMarker:
+            case KPtiGetAllMarker:
+                 if ( keys.Length() > 1 )
+                     {
+                     firstChar = keys[1];
+                     }
+            default:
+                break;
+            }
+        TInt loc = KAllowedNumericChars().Locate( firstChar );
+        if ( loc != KErrNotFound )
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
+
+#else
+TBool CCalcFuncmapSubPane::MapNumerics( TPtiKey aKey, TPtiTextCase aCase )	
+    {
+
+    TBuf<KMaxNumCharsPerCase> keys;
+
+    iQwertyKeyMappings->GetDataForKey( aKey, keys, aCase );				
+
+    if ( keys.Length() > 0 )
+        {
+        TUint16 firstChar = keys[0];
+        switch ( firstChar )
+            {
+            case KPtiPinyinMarker:
+            case KPtiStrokeMarker:
+            case KPtiZhuyinMarker:
+            case KPtiCangjieMarker:
+            case KPtiGetAllMarker:
+                 if ( keys.Length() > 1 )
+                     {
+                     firstChar = keys[1];
+                     }
+            default:
+                break;
+            }
+        TInt loc = KAllowedNumericChars().Locate( firstChar );
+        if ( loc != KErrNotFound )
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
+#endif
+		
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::HandlePointerEventL
+// Handles apen input in Function Pane. .
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::HandlePointerEventL
+                ( const TPointerEvent& aPointerEvent )           
+    {
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        return;
+        }
+    TInt oldSelect( iSelected );
+    TInt buttonValue = CalculatingCorrectButton( aPointerEvent );
+    if ( !iButtons[buttonValue]->IsDimmed() )
+        {
+        iSelected = buttonValue;
+        if ( iButtons[buttonValue]->Rect().Contains( aPointerEvent.iPosition ) )
+            {
+            RedrawHighlight( oldSelect, iSelected );
+            }
+        }
+    CCoeControl::HandlePointerEventL( aPointerEvent );
+    }
+    
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::FunctionPaneRect
+// This function gives the layout of Function Pnae.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+
+TRect CCalcFuncmapSubPane::FunctionPaneRect()
+   {
+   TRect parentRect(Rect()); 
+   return 	parentRect;
+   }
+   
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::CalculatingCorrectButton
+// Handled when there is Pen Input.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+
+TInt CCalcFuncmapSubPane::CalculatingCorrectButton
+					(const TPointerEvent& aPointerEvent)
+   {
+    TInt selected = iSelected;
+    
+    //Function that calculates the correct button where the pointer event had occurred
+    for(TInt i = 0; i<iCountOfButtons; i++)
+    {
+   		if(iButtons[i]->Rect().Contains(aPointerEvent.iPosition))
+   		{
+   			selected = i;
+   		}
+    }
+    return selected;
+   }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::HandleMiddleSoftKeyOREKeyOK
+// Handled when MSK or EKeyOk is selected.
+// ---------------------------------------------------------
+//
+
+void CCalcFuncmapSubPane::HandleMiddleSoftKeyOREKeyOKL()
+   {
+     	//get the selected button id
+	    CAknButton* button = iButtons[iSelected];
+	    //put the button in the pressed state
+        CAknButtonState* state = button->State(EnNormal);
+    	//Put the button in pressed state
+        
+        TKeyEvent aKeyEvent;
+        aKeyEvent.iScanCode = EStdKeyEnter;
+        TEventCode aType = EEventKeyDown;
+        button->OfferKeyEventL(aKeyEvent,aType);
+	    //put to pressed state
+	    state->SetFlags(EnPressed);
+        button->DrawNow();
+        
+	    if(!iIsOfferKeyEvent)
+        {
+            
+            NotifyReleaseKeyL();
+        }
+   }
+   
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::GetChangeSignButtonState
+// Returns the state of change sign button
+// ---------------------------------------------------------
+//
+TBool CCalcFuncmapSubPane::GetChangeSignButtonState()
+{
+    return(iIsChangeSignDimmed);
+}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::GetClearButtonState
+// Returns the state of Clear button
+// ---------------------------------------------------------
+//
+TBool CCalcFuncmapSubPane::GetClearButtonState()
+    {
+    return( iIsClearKeyEnabled );
+    } 
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::GetSqrtButtonState
+// Returns the state of square root button
+// ---------------------------------------------------------
+//
+TBool CCalcFuncmapSubPane::GetSqrtButtonState()
+{
+    return(iIsSqrtDimmed);
+}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::GetPercentButtonState
+// returns the state of percent button
+// ---------------------------------------------------------
+//
+TBool CCalcFuncmapSubPane::GetPercentButtonState()
+{
+    return(iIsPercentDimmed);
+}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::GetSelectedButtonId
+// returns the id of current button
+// ---------------------------------------------------------
+//
+TInt CCalcFuncmapSubPane::GetSelectedButtonId()
+    {
+    return iSelected;
+    }
+   
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::SetHighlightButton
+// set highlight button
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::SetHighlightButton( TUint aOldId, TUint aNewId )
+    {
+    iSelected = aNewId;
+    RedrawHighlight( aOldId, aNewId );
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::IsClearKeyLongPressed
+// Find Clear is long Pressed.
+// ---------------------------------------------------------
+//
+TBool CCalcFuncmapSubPane::IsKeyLongPressed()
+    {
+    return iIsKeyLongPress;
+    }
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::MapDataForChrShiftKey
+// Redraw percent button, either normal or dimmed.
+// ---------------------------------------------------------
+//
+void CCalcFuncmapSubPane::MapDataForChrShiftKey( TDes& aOperators, TInt& aFirstOperator, TInt& aSecondOperator)
+	{ 
+	if( aOperators.Length() > 0 )
+		{
+		TUint16 firstChar = aOperators[0];
+		TUint16 secondChar = firstChar;
+		
+		if ( aOperators.Length() > 1 )
+			{
+			secondChar = aOperators[1];
+			}
+		
+        switch ( firstChar )
+            {
+            case KPtiPinyinMarker:
+            case KPtiStrokeMarker:
+            case KPtiZhuyinMarker:
+            case KPtiCangjieMarker:
+            case KPtiGetAllMarker:
+                if ( aOperators.Length() > 2 )
+                    {
+                    firstChar = aOperators[1];
+                    secondChar = aOperators[2];
+                    }
+                else
+                	{
+                	firstChar = aOperators[1];
+                	secondChar = firstChar;
+                	}
+                break;
+            default:
+                break;
+		
+		}
+        
+       MapOperators( firstChar, aFirstOperator );
+
+       MapOperators( secondChar, aSecondOperator );
+       
+       }
+	}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::MapOperators
+// Redraw percent button, either normal or dimmed.
+// ---------------------------------------------------------
+//
+TBool CCalcFuncmapSubPane::MapOperators( TUint16 aOperator, TInt& aResult)
+	{
+    TInt loc1 = KAllowedOperatorPlus().Locate( aOperator );
+    if ( loc1 != KErrNotFound )
+        {
+        if ( AknLayoutUtils::PenEnabled() )
+        	{
+            aResult = ECmdTAdd;
+        	}
+        else
+        	{
+        	aResult = EPlusButton;
+        	}
+        return ETrue;
+        }
+    TInt loc2 = KAllowedOperatorMinus().Locate( aOperator );
+    if ( loc2 != KErrNotFound )
+        {
+        if ( AknLayoutUtils::PenEnabled() )
+        	{
+            aResult = ECmdTSubtract;
+        	}
+        else
+        	{
+        	aResult = EMinusButton;
+        	}
+        return ETrue;
+        }
+    TInt loc3 = KAllowedOperatorStar().Locate( aOperator );
+    if ( loc3 != KErrNotFound )
+        {
+        if ( AknLayoutUtils::PenEnabled() )
+        	{
+            aResult = ECmdTMultiply;
+        	}
+        else
+        	{
+        	aResult = EMultiplyButton;
+        	}
+        return ETrue;
+        }
+    TInt loc4 = KAllowedOperatorDivide().Locate( aOperator );
+    if ( loc4 != KErrNotFound )
+        {
+        if ( AknLayoutUtils::PenEnabled() )
+        	{
+            aResult = ECmdTDivide;
+        	}
+        else
+        	{
+        	aResult = EDivideButton;
+        	}
+        return ETrue;
+        }
+    TInt loc5 = KAllowedOperatorEquals().Locate( aOperator );
+    if ( loc5 != KErrNotFound )
+        {
+        if ( AknLayoutUtils::PenEnabled() )
+        	{
+            aResult = ECmdTResult;
+        	}
+        else
+        	{
+        	aResult = EEqualButton;
+        	}
+        return ETrue;
+        }
+    TInt loc6 = KAllowedOperatorPercent().Locate( aOperator );
+    if ( loc6 != KErrNotFound )
+        {
+        if ( AknLayoutUtils::PenEnabled() )
+        	{
+            aResult = ECmdTPercent;
+        	}
+        else
+        	{ 
+        	aResult = EPercentButton;
+        	}
+        return ETrue;
+        }
+    TInt loc7 = KAllowedOperatorDecimal().Locate( aOperator );
+    if ( loc7 != KErrNotFound )
+        {
+        aResult = ECmdTSeparator;
+        return ETrue;
+        }
+    return EFalse;
+	}
+
+// ---------------------------------------------------------
+// CCalcFuncmapSubPane::GetKeyboardType
+// Returns the type of keyboard
+// ---------------------------------------------------------
+//
+TBool CCalcFuncmapSubPane::GetKeyboardType()
+    {
+    return iKeyboardType;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcHistory.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2002 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:  Define CCalcHistory class. This class is handled historical 
+*                line of the calculator. 
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "CalcEditline.h" 
+#include "CalcHistory.h" 
+
+//  LOCAL CONSTANTS AND MACROS  
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcHistory::CCalcHistory():
+              iNewestIndex(KCalcMaxHistoryLines - 1)
+    {
+    iHistory[iNewestIndex].AllClear();
+    }
+
+// Destructor
+CCalcHistory::~CCalcHistory()
+    {
+    }
+
+
+
+// Assignment operator
+// This inplementation depends on how to have history data. 
+// Refer to description of member data, CCalcHistory.h 
+// 
+const TCalcEditLine& CCalcHistory::operator[]
+                       (TInt aIndex) // Get (aIndex + 1)th latest history line 
+    {
+    TInt lineIndex(iNewestIndex - aIndex);
+    
+    if ( lineIndex < 0 )
+        {
+        lineIndex += KCalcMaxHistoryLines;
+        }
+        
+    return iHistory[lineIndex];      
+    }
+
+// ---------------------------------------------------------
+// CCalcHistory::Count
+// Return count of histoical lines.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcHistory::Count() const     
+    {
+    return iCount;
+    }
+
+// ---------------------------------------------------------
+// CCalcHistory::Add
+// This inplementation depends on how to have history data. 
+// Refer to description of member data, CCalcHistory.h 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcHistory::Add
+                (const TCalcEditLine aLine) 
+    {
+    if ( iNewestIndex == (KCalcMaxHistoryLines - 1) )
+        {
+        iNewestIndex = 0;
+        }
+    else
+        {
+        iNewestIndex++;
+        }
+    
+    if ( iCount < KCalcMaxHistoryLines )
+        {
+        iCount++;
+        }
+    
+    iHistory[iNewestIndex] = aLine;
+    }
+
+// ---------------------------------------------------------
+// CCalcHistory::ClearHistory
+// Clear calculation history.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcHistory::ClearHistory()
+    {
+    iCount = 0;
+    iNewestIndex = KCalcMaxHistoryLines - 1;
+    for (TInt cnt(0); cnt < KCalcMaxHistoryLines; cnt++)
+        {
+        iHistory[cnt].AllClear();
+        }
+    }
+
+
+// ---------------------------------------------------------
+// CCalcHistory::NotifyChangeDecimal
+// Call when decimal separator is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcHistory::NotifyChangeDecimal(TChar aOld, TChar aNew)
+    {
+    for (TInt cnt(0); cnt < iCount; cnt++)
+        {
+        iHistory[cnt].ChangeDecimal(aOld, aNew);
+        }
+    }
+        
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcOutSheet.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,799 @@
+/*
+* Copyright (c) 2002 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:  The OutputSheet sub-pane class, CCalcOutputSheet.
+*                Derived from CCoeControl.
+*                The CCalcOutputSheet displays histroy data.
+*                History data is scroll up and down.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    <AknUtils.h>
+#include    <Calcsoft.rsg>
+#include    <applayout.cdl.h>
+#include 	<AknsDrawUtils.h>
+#include	<layoutmetadata.cdl.h>
+#include	"CalcEnv.h"
+#include    "CalcCont.h"    
+#include    "CalcOutSheet.h"
+#include    "CalcDoc.h"
+#include    "CalcEditline.h"
+#include    "CalcAppUi.h"
+#include    "CalcHistory.h"
+#include    "CalcDrawingConst.laf"
+#include "fbs.h"
+#include <AknIconUtils.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <AknFepInternalCRKeys.h>
+
+
+#include <eiksbfrm.h> 
+#include <eikscrlb.h>
+
+//  LOCAL CONSTANTS AND MACROS  
+
+// ================= MEMBER FUNCTIONS =======================
+
+// Two-phased constructor.
+CCalcOutputSheet* CCalcOutputSheet::NewL(
+                    CCalcContainer* aContainer)
+    {
+    CCalcOutputSheet* self = new (ELeave) CCalcOutputSheet();
+    CleanupStack::PushL(self);
+    self->ConstructL(aContainer);
+    CleanupStack::Pop(self); 
+    return self;
+    }
+
+// Destructor
+CCalcOutputSheet::~CCalcOutputSheet()
+    {
+    delete iOpSheetContext;
+    if(iOperatorLayout)
+	    {
+	    iOperatorLayout->Reset();
+	    delete iOperatorLayout;	
+	    }
+	if(iOperandLayout)
+	    {
+	    iOperandLayout->Reset();
+	    delete iOperandLayout;	
+	    }
+	if(iEqualLineLayout)
+	    {
+	    iEqualLineLayout->Reset();
+	    delete iEqualLineLayout;	
+	    }
+	if(iResultsLineLayout)
+	    {
+	    iResultsLineLayout->Reset();
+	    delete iResultsLineLayout;	
+	    }
+	if (iCRKey)
+		{
+		delete iCRKey;
+		iCRKey = NULL;
+		}
+		
+	//Delete the scrollbar frame
+	if(iSBFrame)
+	    {
+	    delete iSBFrame;
+	    iSBFrame = NULL;
+	    }
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::ScrollToBottomL
+// Scroll to bottom line.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::ScrollToBottomL()
+    {
+    iScrollOffset = 0;
+    
+    //If scrollbar is present, update the scrollbar as well
+     if( AknLayoutUtils::PenEnabled()  )
+        {
+          UpdateScrollIndicatorL();
+        }
+    DrawNow();
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::NotifyClearHistory
+// Called after clearing calculation history.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::NotifyClearHistoryL()
+    {
+    iScrollOffset = 0;
+    if( AknLayoutUtils::PenEnabled()  )
+    {
+    	UpdateScrollIndicatorL();	
+    }
+    DrawNow();
+    }
+        
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::CanUp
+// Check whether scroll-up can be done or not.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CCalcOutputSheet::CanUp() const
+    {
+    // The number of lines of the history which a document has is got.
+    TInt historyLine(iCalcHistory->Count());
+    if ( (iCalcOutputSheetLines + iScrollOffset) < historyLine )
+        {
+        return ETrue;
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::CanDown
+// Check whether scroll-down can be done or not.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CCalcOutputSheet::CanDown() const
+    {
+    // The number of lines of the history which a document has is got.
+    return (iScrollOffset != 0);
+    }
+
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::ScrollUp
+// history is scrolled up.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::ScrollUp()
+    {
+   
+    if (CanUp())
+        {
+        iScrollOffset++;
+        DrawNow();
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::ScrollDown
+// history is scrolled down.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::ScrollDown()
+    {
+
+    if (CanDown())
+        {
+        iScrollOffset--;
+        DrawNow();
+        }
+    }
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcOutputSheet::CCalcOutputSheet() 
+    {
+    }
+
+// default constructor can leave.
+void CCalcOutputSheet::ConstructL
+        (CCalcContainer* aContainer) 
+                     
+    {
+    SetContainerWindowL(*aContainer);
+
+    iCalcContainer = aContainer;
+    
+    iCalcAppEnv = CCalcAppEnv::Static();
+    iCalcPaper = iCalcAppEnv->PaperBitmap();
+	iCalcAppEnv->ScalablePaperBitmaps(iCalcScalablePaper);
+#ifdef __SCALABLE_ICONS
+	iCalcResultsLine = iCalcAppEnv->ResultsLineBitmap();
+#endif
+
+    CCalcAppUi* appui = iCalcAppEnv->AppUi();
+    CCalcDocument* calcDocument = 
+                   STATIC_CAST(CCalcDocument*, appui->Document());
+    iCalcHistory = calcDocument->History(); 
+    TAknLayoutScalableParameterLimits listLimits;
+    listLimits = AknLayoutScalable_Apps::list_calc_item_pane_ParamLimits();
+    iCalcOutputSheetLines   = (listLimits.LastRow()-listLimits.FirstRow()) + 1;
+    iOpSheetContext = CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnFrCalcPaper , TRect(0,0,0,0), EFalse);
+    iOperatorLayout = new(ELeave)CArrayFixFlat<TAknLayoutText>(iCalcOutputSheetLines);
+    iOperandLayout = new(ELeave)CArrayFixFlat<TAknLayoutText>(iCalcOutputSheetLines);
+    iResultsLineLayout = new(ELeave)CArrayFixFlat<TAknLayoutRect>(iCalcOutputSheetLines-1);
+    iEqualLineLayout = new(ELeave)CArrayFixFlat<TAknLayoutRect>(iCalcOutputSheetLines-1);
+    iUiLanguage = User::Language();
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::SizeChanged
+// Set size of control.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::SizeChanged()
+    {
+    TRAP_IGNORE( SizeChangedOutSheetL() );
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::SizeChanged
+// Set size of control.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::SizeChangedOutSheetL()
+    {
+    TRect parentRect(iCalcContainer->Rect());
+    
+    TAknLayoutScalableParameterLimits listLimits;
+    if(AknLayoutUtils::PenEnabled())
+    {
+        listLimits = AknLayoutScalable_Apps::list_calc_item_pane_ParamLimits(enTouch_enabled);    
+    }
+    else
+    {
+        listLimits = AknLayoutScalable_Apps::list_calc_item_pane_ParamLimits(enTouch_disabled);    
+    }
+    iCalcOutputSheetLines   = (listLimits.LastRow()-listLimits.FirstRow()) + 1;
+    iOperatorLayout->ResizeL(iCalcOutputSheetLines);
+	iOperandLayout->ResizeL(iCalcOutputSheetLines);
+	iResultsLineLayout->ResizeL(iCalcOutputSheetLines-1);
+	iEqualLineLayout->ResizeL(iCalcOutputSheetLines-1);
+	
+    iOperatorLayout->Reset();
+	iOperandLayout->Reset();
+	iResultsLineLayout->Reset();
+	iEqualLineLayout->Reset();
+    
+    TAknLayoutRect rectParent;
+	TAknWindowLineLayout layoutOfParentResultsLine;
+	TAknLayoutRect rectListCalcPane;
+	
+ 
+    
+    if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
+		{
+			TAknWindowLineLayout  calcPaperPane;
+			
+			//For Touch UI Layouts, different configuration
+			if( AknLayoutUtils::PenEnabled() )
+	        {
+	            if (Layout_Meta_Data::IsLandscapeOrientation())
+	            {
+	                calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_lsc).LayoutLine();
+	            }
+	            else
+	            {
+	                calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_prt).LayoutLine();
+	            }
+	        }
+	        else
+	        {
+		        calcPaperPane = AknLayoutScalable_Apps::calc_paper_pane(enTouch_disabled).LayoutLine();
+	        }
+			TAknLayoutRect rectcalcPaperPane;	
+			rectcalcPaperPane.LayoutRect(parentRect,calcPaperPane);
+			TAknWindowLineLayout layoutListCalcPane;
+			if( AknLayoutUtils::PenEnabled() )
+	        {
+	            layoutListCalcPane = AknLayoutScalable_Apps::list_calc_pane(enTouch_enabled).LayoutLine();
+	        }
+	        else
+	        {
+	            layoutListCalcPane = AknLayoutScalable_Apps::list_calc_pane(enTouch_disabled).LayoutLine();
+	        }
+			
+			rectListCalcPane.LayoutRect(rectcalcPaperPane.Rect(),layoutListCalcPane);
+		}
+    
+	TInt nTimes=(iCalcOutputSheetLines-1);
+    for (TInt cnt(0); cnt < iCalcOutputSheetLines; cnt++)
+        {
+        if (AknLayoutUtils::ScalableLayoutInterfaceAvailable())
+		{
+		if(AknLayoutUtils::PenEnabled())
+		{
+			if (Layout_Meta_Data::IsLandscapeOrientation())
+			{
+				layoutOfParentResultsLine =  AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_enabled).LayoutLine();	
+			}
+			else
+			{
+				layoutOfParentResultsLine =  AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_enabled).LayoutLine();
+			}
+	
+		}
+		else
+		{
+		    layoutOfParentResultsLine =  AknLayoutScalable_Apps::list_calc_item_pane(nTimes,enTouch_disabled).LayoutLine();    
+		}
+		
+		
+		rectParent.LayoutRect(rectListCalcPane.Rect(),layoutOfParentResultsLine) ;
+			
+		TAknLayoutText operatorLayout;
+		TAknLayoutText operendLayout;
+		if(AknLayoutUtils::PenEnabled())
+		{
+		    operatorLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t2(enTouch_with_prt).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); 
+		    iOperatorLayout->AppendL(operatorLayout);
+		
+		    operendLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t1(enTouch_with_lsc).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); 
+		    iOperandLayout->AppendL(operendLayout);
+		}
+		else
+		{
+		    operatorLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t2(enTouch_disabled).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); 
+		    iOperatorLayout->AppendL(operatorLayout);
+		
+		    operendLayout.LayoutText(rectParent.Rect(),AknLayoutScalable_Apps::list_calc_item_pane_t1(enTouch_disabled).LayoutLine(),iCalcAppEnv->OutSheetOperatorFont()); 
+		    iOperandLayout->AppendL(operendLayout);    
+		}
+		
+	  // aCustomFont
+     --nTimes;
+		
+		}
+	  
+	  else
+	  {
+	  	  
+	    
+	  //Scalable UI.
+
+	  	TAknLayoutText operatorLayout;
+		TAknLayoutText operendLayout;
+	  	operatorLayout.LayoutText(parentRect,AppLayout::Calculator_texts_Line_8(nTimes),iCalcAppEnv->OutSheetOperatorFont()); // aCustomFont
+	    iOperatorLayout->AppendL(operatorLayout);        
+
+		operendLayout.LayoutText(parentRect,AppLayout::Calculator_texts_Line_7(nTimes), NULL);
+		iOperandLayout->AppendL(operendLayout);            
+     --nTimes;
+	  }
+    }
+    
+    //Scalable UI.
+	nTimes = iCalcOutputSheetLines - 2;	  
+    for (TInt ii(0); ii < (iCalcOutputSheetLines - 1); ii++)
+        {
+
+
+		if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
+			{
+#ifdef __SCALABLE_ICONS		
+			layoutOfParentResultsLine =  AknLayoutScalable_Apps::list_calc_item_pane(nTimes).LayoutLine();
+
+			rectParent.LayoutRect(rectListCalcPane.Rect(),layoutOfParentResultsLine) ;
+			TAknWindowLineLayout   layoutOfResultsLine = AknLayoutScalable_Apps::list_calc_item_pane_g1().LayoutLine(); 
+			TAknLayoutRect lineLayout;
+			lineLayout.LayoutRect(rectParent.Rect(),layoutOfResultsLine);
+			iResultsLineLayout->AppendL(lineLayout);
+#else
+			TAknLayoutRect lineLayout;
+			lineLayout.LayoutRect(parentRect,AppLayout::Calculator_elements_Line_3(nTimes)); 
+			iEqualLineLayout->AppendL(lineLayout);
+#endif
+			}
+			else
+			{
+			TAknLayoutRect lineLayout;
+			lineLayout.LayoutRect(parentRect,AppLayout::Calculator_elements_Line_3(nTimes)); 
+			iEqualLineLayout->AppendL(lineLayout);
+			}
+			
+		--nTimes;
+        }
+
+    TAknLayoutRect  paperRect;
+	if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
+			{
+			TAknLayoutRect rectCalcPaperPane;	
+			TAknLayoutRect rectbgCalcPaperPane;
+			//Different configuration for Touch Layouts
+			if( AknLayoutUtils::PenEnabled() )
+			{
+					//In landscape mode different configuration is needed
+			     if (Layout_Meta_Data::IsLandscapeOrientation())
+			     {
+			        rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_lsc).LayoutLine());  
+			     }
+			     else
+			     {
+			        rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_with_prt).LayoutLine());      
+			     }
+			     rectbgCalcPaperPane.LayoutRect(rectCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane(enTouch_enabled).LayoutLine());
+			}
+			else
+			{
+			    rectCalcPaperPane.LayoutRect(parentRect,AknLayoutScalable_Apps::calc_paper_pane(enTouch_disabled).LayoutLine());    
+			    rectbgCalcPaperPane.LayoutRect(rectCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane().LayoutLine());
+			}
+			
+			iPaperPaneRect  = rectCalcPaperPane;
+			
+			
+			iCalcPaperLayout[0].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g1().LayoutLine());
+			iCalcPaperLayout[1].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g2().LayoutLine());
+			iCalcPaperLayout[2].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g3().LayoutLine());
+			iCalcPaperLayout[3].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g4().LayoutLine());
+		    iCalcPaperLayout[4].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g5().LayoutLine());
+			iCalcPaperLayout[5].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g6().LayoutLine());
+			iCalcPaperLayout[6].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g7().LayoutLine());
+    		iCalcPaperLayout[7].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::bg_calc_paper_pane_g8().LayoutLine());
+			iCalcPaperLayout[8].LayoutRect(rectbgCalcPaperPane.Rect(),AknLayoutScalable_Apps::calc_bg_paper_pane_g9().LayoutLine());
+			}
+			
+	   iOpSheetContext->SetRect(Rect());
+		
+		//Only for touch UI, scrollbars are present
+	   if( AknLayoutUtils::PenEnabled()  )
+        {
+          UpdateScrollIndicatorL();
+        }
+        else
+        {
+        if(iSBFrame)
+        {
+            delete(iSBFrame);
+            iSBFrame = NULL;
+        }
+        
+        }
+		
+		}
+
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::UpdateScrollIndicatorL
+// Creates and updates the scrollbar
+// (other items were commented in a header).
+// ---------------------------------------------------------
+void CCalcOutputSheet::UpdateScrollIndicatorL()
+    {
+    	
+    	if( !AknLayoutUtils::PenEnabled()  )
+    	{
+    		return;
+    	}
+    	
+        TAknLayoutRect rectCalcScrollPane;	
+
+        //Get the layout information for the scrollbar
+        if( AknLayoutUtils::PenEnabled() )
+        {
+         if (Layout_Meta_Data::IsLandscapeOrientation())
+         {
+            rectCalcScrollPane.LayoutRect(iPaperPaneRect.Rect(),AknLayoutScalable_Apps::scroll_pane_cp024().LayoutLine());  
+         }
+         else
+         {
+            rectCalcScrollPane.LayoutRect(iPaperPaneRect.Rect(),AknLayoutScalable_Apps::scroll_pane_cp024().LayoutLine());      
+         }
+
+        }
+				//Create scrollbar if not created already
+        if ( !iSBFrame )
+        {
+        //Make this class as the observer class as well
+        iSBFrame = new( ELeave ) CEikScrollBarFrame( this,this, ETrue );
+
+        // Decide which type of scrollbar is to be shown
+        CAknAppUi* appUi = iAvkonAppUi;
+        if (AknLayoutUtils::DefaultScrollBarType(appUi) == CEikScrollBarFrame::EDoubleSpan)
+        {
+        	// For EDoubleSpan type scrollbar
+        	iSBFrame->CreateDoubleSpanScrollBarsL(ETrue, EFalse); // non-window owning scrollbar            
+        	iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EDoubleSpan);
+        }
+        else
+        {
+        	// For EArrowHead type scrollbar
+        	iSBFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EArrowHead);
+        }  
+        iSBFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+        }
+
+        TEikScrollBarModel hSbarModel;
+        TEikScrollBarModel vSbarModel;
+        
+        //By default span is one if only one page is present
+        if(iCalcHistory->Count() < iCalcOutputSheetLines)
+        {
+            vSbarModel.iScrollSpan = 1;    
+            vSbarModel.iThumbPosition = 0;    
+            
+        }
+        else
+        {
+        		//span calculator if no of lines exceeds one page
+            vSbarModel.iScrollSpan = 1 + iCalcHistory->Count() - iCalcOutputSheetLines;  
+        }
+
+        iPrevThumbPosition = vSbarModel.iThumbPosition = vSbarModel.iScrollSpan - 1;
+        vSbarModel.iThumbSpan = 1;
+
+        TRect clientRect( iAvkonAppUi->ClientRect() );
+        TRect rec(rectCalcScrollPane.Rect()); 
+
+        TEikScrollBarFrameLayout layout;
+        layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
+
+        if (iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan)
+        {    
+        // For EDoubleSpan type scrollbar
+        if (vSbarModel.iThumbPosition + vSbarModel.iThumbSpan > vSbarModel.iScrollSpan)
+        {
+            // Not let scrollbar values overflow
+            vSbarModel.iThumbPosition = vSbarModel.iScrollSpan - vSbarModel.iThumbSpan;
+        }
+
+        TAknDoubleSpanScrollBarModel hDsSbarModel(hSbarModel);
+        TAknDoubleSpanScrollBarModel vDsSbarModel(vSbarModel);
+
+        iSBFrame->TileL(&hDsSbarModel, &vDsSbarModel, clientRect, rec, layout);               
+        iSBFrame->SetVFocusPosToThumbPos(vDsSbarModel.FocusPosition());
+        }  
+        else
+        {
+        iSBFrame->TileL( &hSbarModel, &vSbarModel, clientRect, rec, layout );
+        iSBFrame->SetVFocusPosToThumbPos( vSbarModel.iThumbPosition );
+        }
+        }
+        
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::Draw
+// Drawing frame and history.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::Draw
+        (const TRect& aRect) const
+    {
+    
+    CWindowGc& gc = SystemGc();
+	gc.Clear(aRect);
+    gc.SetClippingRect(aRect);
+    TRect rect(Rect());
+    
+
+    
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    
+    AknsDrawUtils::Background( AknsUtils:: SkinInstance(), AknsDrawUtils::ControlContext(this), this, gc, rect );
+        
+           
+    gc.SetBrushStyle(CGraphicsContext::ENullBrush);
+    gc.SetPenStyle(CGraphicsContext::ENullPen);
+	//set the size of the bitmap. SVG-T upgrade.
+	CAknsItemData* idata = NULL;    				
+    if (skin)
+    	{
+        idata = skin->GetCachedItemData( KAknsIIDQsnFrCalcPaper);
+    	}
+    	
+    if ( idata && idata->Type() == EAknsITImageTable )
+    	{
+            if ( AknLayoutUtils::PenEnabled() ) 
+            {//when touch input,the paper become bigger,so it needs only one paper 
+                AknIconUtils::SetSize(iCalcScalablePaper[0]->Bitmap(),iCalcPaperLayout[0].Rect().Size(),EAspectRatioNotPreserved); 
+                AknIconUtils::SetSize(iCalcScalablePaper[0]->Mask(),iCalcPaperLayout[0].Rect().Size(),EAspectRatioNotPreserved);
+                iCalcPaperLayout[0].DrawImage(gc, iCalcScalablePaper[0]->Bitmap(),iCalcScalablePaper[0]->Mask());	
+            }
+            else
+            {
+                for(TInt Cnt=0;Cnt < 9; Cnt++)
+            	{
+                AknIconUtils::SetSize(iCalcScalablePaper[Cnt]->Bitmap(),iCalcPaperLayout[Cnt].Rect().Size(),EAspectRatioNotPreserved); 
+            	AknIconUtils::SetSize(iCalcScalablePaper[Cnt]->Mask(),iCalcPaperLayout[Cnt].Rect().Size(),EAspectRatioNotPreserved);
+            	iCalcPaperLayout[Cnt].DrawImage(gc, iCalcScalablePaper[Cnt]->Bitmap(),iCalcScalablePaper[Cnt]->Mask());
+                }
+            }
+  		}
+    else
+        {
+            // Make outsheet displayed in Jingmask is the same size as in other themes
+            // when there is a scrollbar on outsheet.
+            if ( AknLayoutUtils::PenEnabled() )
+                {
+                AknsDrawUtils::Background( AknsUtils:: SkinInstance(), iOpSheetContext, this, gc, iCalcPaperLayout[0].Rect() );
+                }
+            else
+                {
+                AknsDrawUtils::Background( AknsUtils:: SkinInstance(), iOpSheetContext, this, gc, rect );
+                }	
+        }
+  		
+	
+    for (TInt loop(iCalcOutputSheetLines - 1); loop >= 0; loop--)
+        {
+        const TCalcEditLine& history = (*iCalcHistory)[loop + iScrollOffset];
+        TCalcEditLine::TCalcOperatorType operatorType(
+            history.Operator());
+        
+        if (loop < iCalcOutputSheetLines - 1)
+            {
+			// When an operator is Equal, a line is drawn at an upper end.
+			if (TCalcEditLine::ECalcEqual == operatorType)
+				{
+					TRgb ResultsLineolor;
+                    TInt error1 = AknsUtils::GetCachedColor( skin, ResultsLineolor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG29);
+                    if(error1 == KErrNone)
+                    {
+                        AknIconUtils::SetIconColor(iCalcResultsLine->Bitmap(),ResultsLineolor);
+                    }
+				if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
+					{
+#ifdef __SCALABLE_ICONS
+					TAknLayoutRect& lineLayout = iResultsLineLayout->At(loop);
+					AknIconUtils::SetSize(iCalcResultsLine->Bitmap(),lineLayout.Rect().Size(),EAspectRatioNotPreserved);
+					AknIconUtils::SetSize(iCalcResultsLine->Mask(),lineLayout.Rect().Size(),EAspectRatioNotPreserved);
+					lineLayout.DrawImage(gc, iCalcResultsLine->Bitmap(),iCalcResultsLine->Mask()); 
+#else
+					TAknLayoutRect& equalLineLayout= iEqualLineLayout->At(loop);
+					TRect rectLine = equalLineLayout.Rect();
+					equalLineLayout.DrawRect(gc);
+#endif
+					}
+				else 
+					{ 
+					TAknLayoutRect& equalLineLayout= iEqualLineLayout->At(loop);
+					TRect rectLine = equalLineLayout.Rect();
+					equalLineLayout.DrawRect(gc);
+					}
+				}
+            }
+            TRgb color;
+            TInt error = AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG29);
+			if(error == KErrNone)
+			{
+				gc.SetPenColor(color);
+			}
+			
+		//change TBuf<10> to TBuf<KCalcMaxNumberWidth>
+       TBuf<KCalcMaxNumberWidth> keyvalue;
+       
+       keyvalue.Append(history.NumberString());
+       AknTextUtils::LanguageSpecificNumberConversion  (keyvalue);
+        // An operand's drawing
+		TAknLayoutText& operendLayout = iOperandLayout->At(loop);
+
+                    if ( iUiLanguage == ELangFarsi || iUiLanguage == ELangHindi || 
+                        iUiLanguage == ELangUrdu || iUiLanguage == ELangArabic )
+                        {
+                         if( iUiLanguage == ELangUrdu || iUiLanguage == ELangArabic )
+		         {
+			    	TInt len = keyvalue.Length();
+				    TInt pos = KErrNotFound;
+				    TBuf<1> ch;
+				    ch.Append(iCalcAppEnv->MinusIndicator());
+				    if( (pos = keyvalue.Locate(iCalcAppEnv->MinusIndicator())) != KErrNotFound &&
+				         pos == keyvalue.LocateReverse(iCalcAppEnv->MinusIndicator()))
+				    {
+				     keyvalue.Delete( pos, 1 );
+				     keyvalue.Insert( 0, ch );	 
+				    }
+		         }
+			operendLayout.DrawText(gc,keyvalue,EFalse,color);
+		    }
+		else
+			{
+			operendLayout.DrawText(gc,history.NumberString(),EFalse,color);	
+			}
+        // An operator's drawing
+        TPtrC operatorString(
+            iCalcAppEnv->OutSheetOperator(operatorType));
+		TAknLayoutText& operatorLayout = iOperatorLayout->At(loop);
+		operatorLayout.DrawText(gc, operatorString , EFalse, color);
+        }
+        
+        
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::HandleScrollEventL
+// Handles the events from the scrollbar
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType)
+    {
+          //Only on page up/down,scroll up/down and drag events
+    if((aEventType == EEikScrollPageDown) || (aEventType == EEikScrollPageUp) || 
+       (aEventType == EEikScrollThumbDragVert) || (aEventType == EEikScrollUp) ||
+       (aEventType == EEikScrollDown))
+       
+        {
+           //Get the current position from the scroll bar
+           
+           if(iPrevThumbPosition >aScrollBar->ThumbPosition() )
+           {
+           		  //Move the scroll bar n times up
+                while(iPrevThumbPosition != aScrollBar->ThumbPosition())
+                {
+                    ScrollUp();
+                    iPrevThumbPosition--;
+                }
+           }
+           else
+           {
+                //Move the scroll bar n times down
+                while( iPrevThumbPosition != aScrollBar->ThumbPosition() )
+                {
+                    ScrollDown();
+                    iPrevThumbPosition++;
+                }
+           }
+
+           DrawNow();
+        }
+    }
+    
+// ---------------------------------------------------------
+// CCalcOutputSheet::HandleResourceChange
+// Handles the events that needs to be taken care after resource change
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::HandleResourceChange(TInt aType)
+{
+    TRAP_IGNORE(HandleResourceChangeOutSheetL(aType) );
+    }
+
+// ---------------------------------------------------------
+// CCalcOutputSheet::HandleResourceChangeOutSheetL
+// Handles the events that needs to be taken care after resource change
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcOutputSheet::HandleResourceChangeOutSheetL(TInt aType)
+
+{
+  
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        if ( AknLayoutUtils::PenEnabled() )
+            {
+            ScrollToBottomL();
+            }
+        }
+	if(aType == KAknsMessageSkinChange)
+	{
+		if( AknLayoutUtils::PenEnabled()  )
+        {
+        	delete(iSBFrame);
+    		iSBFrame = NULL;
+	
+		    UpdateScrollIndicatorL();
+        }
+	}
+}
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/calcsoft/src/CalcView.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,1165 @@
+/*
+* Copyright (c) 2002 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:  CCalcView is a view class of Calculator application.
+*                Base class of CCalcView is CAknView. 
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <avkon.hrh>
+#include <eikon.hrh>
+#include <eikmenup.h>
+#include <aknnotewrappers.h> 
+#include <AiwServiceHandler.h>
+
+#include <aknbutton.h>
+
+#include <hlplch.h>   // For HlpLauncher 
+#include <featmgr.h>      // Feature Manager
+
+#include <Calcsoft.rsg>
+
+#include "CalcView.h"
+#include "CalcCont.h" 
+#include "CalcEdit.h"
+#include "CalcAppUi.h"
+#include "CalcDoc.h"
+#include "CalcHistory.h"
+#include "CalcOutSheet.h"
+#include "CalcFunc.h"
+#include "CalcEnv.h"
+#include "calc.hrh" 
+#include "CalcEditline.h"
+
+//#include    "CalcCmdBtn.h"
+
+#include <layoutmetadata.cdl.h>
+#include <AiwMenu.h>
+#include <AiwCommon.h>
+
+
+//  LOCAL CONSTANTS AND MACROS  
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+// Two-phased constructor.
+CCalcView* CCalcView::NewLC()
+    {
+    CCalcView* self = new (ELeave) CCalcView();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+  
+  // default constructor can leave.
+void CCalcView::ConstructL()
+    {
+    
+    BaseConstructL(R_CALC_VIEW_INFO);
+    
+    iCalcDocument = STATIC_CAST(CCalcDocument*, AppUi()->Document());
+
+    iCalcDocument->SetCalcView( this );
+    CreateContainerL();
+    iCalcDocument->LoadStateL();
+   
+    /******** Initialize the ServiceHandler in the ConstructL *****/
+    
+    iServiceHandler = CAiwServiceHandler::NewL();
+    
+    /***** Attach the Menu Items of the Calculator and also the Interest *****/
+    
+    iServiceHandler->AttachMenuL(R_CALC_POPUPMENU, R_AIWHELPAPP_INTEREST);
+    
+    this->iLastResultSetected = EFalse;
+    }
+
+// Destructor
+CCalcView::~CCalcView()
+    {
+    delete iContainer;
+      if(iServiceHandler)
+      {
+   		 delete iServiceHandler;
+   		 iServiceHandler = NULL;
+      }
+     
+ 	}
+
+// ---------------------------------------------------------
+// CCalcView::State
+// Return current state
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CCalcView::TStateNo CCalcView::State() const
+    {
+    return iState;
+    }
+
+// ----------------------------------------------------
+// CCalcView::LatestInput
+// Return type of latest input
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+CCalcView::TKindOfInput CCalcView::LatestInput() const
+    {
+    return iLatestInput;
+    }
+
+// ----------------------------------------------------
+// CCalcView::UpdateState
+// Update state by using kind of input
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+void CCalcView::UpdateState
+        (const TKindOfInput& aKind)   
+    {
+    iLatestInput = aKind;
+    
+    switch (aKind)
+       {
+        case EOperand:
+        case EMemoryRecall:
+            {
+            switch (iState)
+                {
+                case EInitialMode: 
+                case ESelectResult:
+                    iState = EOperandOnly;
+                    break;
+                case EOperandAndOperator:
+                    iState = EOperandAndOperatorAndOperand;
+                    break;
+                default:
+                    break;
+                }
+            break;
+            }
+		case EOperatorResult:
+			{
+			iState = EOperatorOnlyResult;
+			break;
+			}
+        case EOperator:
+            {
+            iState = EOperandAndOperator;
+            break;
+            }
+        case EEqual:
+            {
+            iState = ESelectResult;
+            break;
+            }
+        case EMemorySave:
+            {
+            switch (iState)
+                {
+                case EOperandAndOperatorAndOperand:
+                    iState = ESelectResult;
+                    break;
+                case ESelectResult:
+                    iState = EOperandOnly;
+                    break;
+                default:
+                    break;
+                }
+            break;
+            }
+        case EAllClear:
+            {
+            iState = EOperandOnly;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+
+// ----------------------------------------------------
+// CCalcView::ErrorMsgL
+// Display error message
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+void CCalcView::ErrorMsgL
+        (TInt aErrorCode) 
+    {
+    TInt resourceId(0);
+
+    switch (aErrorCode)
+        {
+        case KErrOverflow:
+            {
+            resourceId = R_CALC_ERROR_OUTOFRANGE;
+            break;
+            }
+        case KErrDivideByZero:
+            {
+            resourceId = R_CALC_ERROR_DIVISIONBYZERO;
+
+             // UpdateState( EOperator );
+            break;
+            }
+		case KErrNotSupported:
+			{
+			resourceId = R_CALC_ERROR_NEGATIVEVALUESQRT;
+			break;
+			}
+        default:
+            {
+            return;
+            }
+        }
+    
+	//Localisation of scalable UI.
+	HBufC* message = iCoeEnv->AllocReadResourceLC(resourceId) ;
+    CAknErrorNote* note = new (ELeave) CAknErrorNote();
+    note->ExecuteLD(*message);
+	CleanupStack::PopAndDestroy(message);
+    
+    }
+
+
+// ----------------------------------------------------
+// CCalcView::DynInitMainMenuPane
+// Delete meaningless items from main menu.
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+void CCalcView::DynInitMainMenuPane    
+              (CEikMenuPane* aMenuPane) 
+    {
+    
+            
+
+    switch (iState)
+        {
+        case ESelectResult:
+            {
+            aMenuPane->DeleteMenuItem(ECalcCmdLastResult);
+            break;
+            }
+        case EInitialMode:
+            {
+            aMenuPane->DeleteMenuItem(ECalcCmdClearCalcAndHistory);
+            break;
+            }
+        case EOperandOnly:
+            {
+            if (iCalcDocument->History()->Count() == 0)
+                {
+                aMenuPane->DeleteMenuItem(ECalcCmdClearCalcAndHistory);
+                }
+             if(iLastResultSetected)
+             	{
+                aMenuPane->DeleteMenuItem(ECalcCmdLastResult); 	
+             	}
+            break;
+            }
+        case EOperandAndOperator:
+        case EOperandAndOperatorAndOperand:
+             if(iLastResultSetected)
+             	{
+                aMenuPane->DeleteMenuItem(ECalcCmdLastResult); 	
+             	}
+            break; 	 
+        default:
+            {
+            break;
+            }
+        }
+    }                        
+
+
+// ----------------------------------------------------
+// CCalcView::DynInitMemoryMenuPane
+// Delete meaningless items from menu of memory 
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+void CCalcView::DynInitMemoryMenuPane
+        (CEikMenuPane* aMenuPane)
+    {
+    if (!iCalcDocument->HasMemory())
+        {
+        aMenuPane->DeleteMenuItem(ECalcCmdMemoryClear);
+        }    
+    }
+    
+// ---------------------------------------------------------
+// CCalcView::NotifyChangeDecimal
+// Call when decimal separator is changed.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::NotifyChangeDecimal(TChar aOld, TChar aNew)
+    {
+    iContainer->NotifyChangeDecimal(aOld, aNew);
+    }
+    
+
+
+// ---------------------------------------------------------
+// CCalcView::HandleCommandL
+// Handling command.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleCommandL
+        ( TInt aCommand ) 
+    {
+    // Handle the command generated by:
+    //   1. menu item selection
+    //   2. short-cut key press
+   
+    switch ( aCommand )
+        {
+        case ECalcCmdResult:
+            {
+            HandleResultL();
+            break;
+            }
+        case ECalcCmdAdd:
+            {
+            HandleOperatorL(TCalcEditLine::ECalcAdd);
+            break;
+            }
+        case ECalcCmdSubtract:
+            {
+            HandleOperatorL(TCalcEditLine::ECalcSubtract);
+            break;
+            }
+        case ECalcCmdMultiply:
+            {
+            HandleOperatorL(TCalcEditLine::ECalcMultiply);
+            break;
+            }
+        case ECalcCmdDivide:
+            {
+            HandleOperatorL(TCalcEditLine::ECalcDivide);
+            break;
+            }
+        case ECalcCmdChangeSign:
+            {
+            this->iLastResultSetected = EFalse;
+            HandleChangeSignL();
+            break;
+            }
+        case ECalcCmdLastResult:
+            {
+            HandleLastResultL();
+            break;
+            }
+        case ECalcCmdPercent:
+            {
+			HandleOperatorL(TCalcEditLine::ECalcPercent);
+			// The result is always is displayed
+			// after the percent button is pressed.
+            // But if there was a error in the calculation
+            // this if will enable us to not call the
+            // HandleResultL and thus making sure that
+            // the state of the buttons is identical to the
+            // situation before the calculation.
+			if (iState == EOperatorOnlyResult)
+                HandleResultL();
+            break;
+            }
+        case ECalcCmdSqrt:
+            {
+			HandleOperatorL(TCalcEditLine::ECalcSqrt);
+			// HandleResultL only if sqrt was pressed after single operand.
+			if (iState == EOperatorOnlyResult)
+				HandleResultL();
+            break;
+            }
+        case ECalcCmdMemorySave:
+            {
+            HandleMemorySaveL();
+            break;
+            }
+        case ECalcCmdMemoryRecall:
+            {
+            this->iLastResultSetected = EFalse;
+            HandleMemoryRecallL();
+            break;
+            }
+        case ECalcCmdMemoryClear:
+            {
+            HandleMemoryClearL();
+            break;
+            }
+        case ECalcCmdScrollUp:
+            {
+            HandleScrollUp();
+            break;
+            }
+        case ECalcCmdScrollDown:
+            {
+            HandleScrollDown();
+            break;
+            }
+        case ECalcCmdClearCalcAndHistory:
+            {
+            DoClearCalcAndHistoryL();
+            break;
+            }
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+            {
+            STATIC_CAST(CCalcAppUi*, AppUi())->ExitCalculator();
+            break;
+            }
+        case ECalcCmdHelp: 
+            {
+            if (FeatureManager::FeatureSupported( KFeatureIdHelp ))
+                {
+                HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL());
+                }
+            break;
+            }
+        case EAknSoftkeySelect:
+        	{
+        	iContainer->HandleMiddleSoftKey();
+        	break;
+        	}
+        	
+        //Below cases are possible only for Touch UI Layouts
+        case ECalcCmdOne:
+            {
+            iContainer->SetOperatorFromTouchL(1);
+            }
+            break;
+        case ECalcCmdTwo:
+            {
+            iContainer->SetOperatorFromTouchL(2);
+            }
+            break;
+        case ECalcCmdThree:
+            {
+            iContainer->SetOperatorFromTouchL(3);
+            }
+            break;
+        case ECalcCmdFour:
+            {
+            iContainer->SetOperatorFromTouchL(4);
+            }
+            break;
+        case ECalcCmdFive:
+            {
+            iContainer->SetOperatorFromTouchL(5);
+            }
+            break;
+        case ECalcCmdSix:
+            {
+            iContainer->SetOperatorFromTouchL(6);
+            }
+            break;
+        case ECalcCmdSeven:
+            {
+            iContainer->SetOperatorFromTouchL(7);
+            }
+            break;
+        
+        case ECalcCmdEight:
+            {
+            iContainer->SetOperatorFromTouchL(8);
+            }
+            break;
+        
+        case ECalcCmdNine:
+            {
+            iContainer->SetOperatorFromTouchL(9);
+            }
+            break;
+        
+        case ECalcCmdZero:
+            {
+            iContainer->SetOperatorFromTouchL(0);
+            }
+            break;
+            
+        case ECalcCmdSeparator:
+            {
+            iContainer->SetSeparatorFromTouchL();
+            }
+            break;
+        case ECalcCmdCancel:
+            {
+            TInt repeat( iContainer->FuncmapSubPane()->IsKeyLongPressed() );           
+            iContainer->ClearInputKeyL( repeat );
+            }
+            break; 
+            
+    /****** If none of the cases handle the Aiw Help then it will come to the default case ****/
+        default:
+            {
+		 		CArrayFix<TCoeHelpContext>* buf = AppUi()->AppHelpContextL();
+		 		TCoeHelpContext& helpContext = buf->At(0); 		
+ 		  		TAiwVariant uidVariant;
+		 		TAiwVariant contextVariant; 		
+		 		uidVariant.Set(helpContext.iMajor); 		
+		 		TAiwGenericParam uidParam(EGenericParamHelpItem, uidVariant); 				 		contextVariant.Set(helpContext.iContext); 		
+		 		contextVariant.Set(helpContext.iContext); 		
+		 		TAiwGenericParam contextParam(EGenericParamHelpItem, contextVariant); 	
+		 		CAiwGenericParamList* list = CAiwGenericParamList::NewLC(); 		
+		 		list->AppendL(uidParam);
+		 		list->AppendL(contextParam); 
+		 	    iServiceHandler->ExecuteMenuCmdL(aCommand,*list,iServiceHandler->OutParamListL()); 	
+		 		CleanupStack::PopAndDestroy(list);
+		 		delete buf;
+		 		buf= NULL;
+            break;
+            }
+        }
+    }
+
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CCalcView::CCalcView():
+           iState(EInitialMode),
+           iLatestInput(EOperand)
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CCalcView::CreateContainerL
+// Create CCalcContainer class
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::CreateContainerL()
+    {
+    iContainer = CCalcContainer::NewL(this);
+    
+    iContainer->SetMopParent(this);
+	    
+    TRect mainPaneRect ;
+    TRect statusPaneRect;
+    
+    if (Layout_Meta_Data::IsLandscapeOrientation())
+      
+      {
+      
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,mainPaneRect);
+      	
+      }
+      
+      else
+      
+      {
+      
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,mainPaneRect);
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane,statusPaneRect);
+       
+       mainPaneRect.iTl= statusPaneRect.iTl;
+      	      		      		      	
+      } 
+    
+	
+	iContainer->SetRect(mainPaneRect);	
+    iEditorSubPane = iContainer->EditorPane();
+    iOutputSheet = iContainer->OutputSheet();
+    }
+
+
+// ---------------------------------------------------------
+// CCalcView::HandleResultL
+// Handle result command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleResultL()
+    {
+    if (!HandleEqualSubRoutineL())
+        {
+        iEditorSubPane->DrawNow();
+        UpdateState(EEqual);
+        iContainer->SetChangeSignEnableL();
+		iContainer->SetSqrtEnableL();
+        iContainer->ShowPercentButton(EFalse);
+        iContainer->SetClearKeyEnable();             
+        }
+    }
+
+
+// ---------------------------------------------------------
+// CCalcView::HandleChangeSignL
+// Handle ChangeSign command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleChangeSignL()
+    {
+    iEditorSubPane->DoChangeSignL(iState);        
+    
+    if (iState == CCalcView::EOperandAndOperator)
+        {
+        UpdateState(EMemoryRecall);
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcView::HandleLastResultL
+// Handle LastResult command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleLastResultL()
+    {
+    iLastResultSetected = ETrue;
+    //  Recall "LastResult", which is the answer based on latest "=" input.
+    iEditorSubPane->DoMemoryRecallOrLastResult(
+        iCalcDocument->LastResult(), iState);
+
+    UpdateState(EMemoryRecall);
+    if ( iState == EOperandOnly && 
+         iEditorSubPane->EditLine().CheckZeroL() )
+        {
+        UpdateState(EAllClear);
+        }
+    iContainer->SetChangeSignEnableL();
+	iContainer->SetSqrtEnableL();
+    iContainer->SetClearKeyEnable(); 
+
+    //highlighting the sign "%".
+    if ( iState == EOperandAndOperatorAndOperand )
+        {
+        iContainer->SetPercentEnableL();
+        }        
+    }
+
+// ---------------------------------------------------------
+// CCalcView::HandleMemorySaveL
+// Handle MemorySave command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleMemorySaveL()
+    {
+    CCalcView::TKindOfInput kindOfInput(CCalcView::EMemorySave);
+    
+    if (iState == EOperandAndOperatorAndOperand)
+        {
+        if (HandleEqualSubRoutineL()) // Calculate result
+            {
+            return;
+            }
+        }
+    else
+        {
+        if (iState == ESelectResult)
+            {
+            iCalcDocument->AddEmptyLine();
+            iOutputSheet->ScrollToBottomL();
+            iContainer->ScrollArrowUpdate();
+            iEditorSubPane->SetOperator(TCalcEditLine::ECalcOperatorNone);
+            
+            if (iEditorSubPane->EditLine().CheckZeroL())
+                {
+                kindOfInput = CCalcView::EAllClear;
+                }
+            }
+        }
+    iCalcDocument->MemorySaveL(iEditorSubPane->EditorNumber());
+    iEditorSubPane->DrawNow();
+    UpdateState(kindOfInput);
+    iContainer->SetChangeSignEnableL();
+	iContainer->SetSqrtEnableL();
+    }
+
+// ---------------------------------------------------------
+// CCalcView::HandleMemoryRecallL
+// Handle MemoryRecall command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleMemoryRecallL()
+    {
+    iEditorSubPane->DoMemoryRecallOrLastResult(
+        iCalcDocument->Memory(), iState );
+
+    if ( iState == ESelectResult )
+        {
+        iCalcDocument->AddEmptyLine();
+        iOutputSheet->ScrollToBottomL();
+        iContainer->ScrollArrowUpdate();
+        }
+        
+    UpdateState( EMemoryRecall );
+    if ( iState == EOperandOnly && 
+         iEditorSubPane->EditLine().CheckZeroL() )
+        {
+        UpdateState( EAllClear );
+        }
+
+    iContainer->SetChangeSignEnableL();
+    iContainer->SetSqrtEnableL();
+
+    iContainer->SetClearKeyEnable();
+
+    // highlighting the sign "%".
+    if ( iState == EOperandAndOperatorAndOperand )
+        {
+        iContainer->SetPercentEnableL();
+        }        
+    }
+
+// ---------------------------------------------------------
+// CCalcView::HandleMemoryClear
+// Handle MemoryClear command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+// 
+
+void CCalcView::HandleMemoryClearL()
+    {
+    iCalcDocument->MemoryClearL();
+    iEditorSubPane->DrawNow();
+    }
+
+// ---------------------------------------------------------
+// CCalcView::HandleScrollUp
+// Handle Scroll up button command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleScrollUp()
+    {
+    iOutputSheet->ScrollUp();
+    iContainer->ScrollArrowUpdate();
+    }
+
+// ---------------------------------------------------------
+// CCalcView::HandleScrollDown
+// Handle Scroll down button command
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleScrollDown()
+    {
+    iOutputSheet->ScrollDown();
+    iContainer->ScrollArrowUpdate();
+    }
+
+// ---------------------------------------------------------
+// CCalcView::DoClearCalcAndHistoryL
+// Clear calculation history and clear calculation.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::DoClearCalcAndHistoryL()
+    {
+    iCalcDocument->History()->ClearHistory();
+    iOutputSheet->NotifyClearHistoryL();
+    iContainer->ScrollArrowUpdate();
+    // Clear calculation
+    TKeyEvent keyEvent;
+    keyEvent.iCode = EKeyBackspace;
+    keyEvent.iRepeats = 1; 
+    iEditorSubPane->OfferKeyEventL(keyEvent, EEventKey);
+    iContainer->ShowPercentButton(EFalse);
+    }
+        
+
+// ---------------------------------------------------------
+// CCalcView::HandleOperatorL
+// Operator Handler common routin.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::HandleOperatorL
+        (TCalcEditLine::TCalcOperatorType aOperator) 
+    {
+    TCalcEditLine editLine(iEditorSubPane->EditLine());
+    TReal64 editorNumber(iEditorSubPane->EditorNumber());
+    TReal64 result(editorNumber);
+
+    this->iLastResultSetected = EFalse;
+	// User has pressed %
+    if (aOperator == TCalcEditLine::ECalcPercent)
+        {	
+        if (iState == EOperandAndOperatorAndOperand)
+            {
+			editLine.TrimZeroL();
+			// Save the previous operator
+			TCalcEditLine::TCalcOperatorType previousOperator = editLine.Operator();
+			// Set the operator to percent
+			editLine.SetOperator(TCalcEditLine::ECalcPercent);
+			
+            
+            // Calculate
+            TRAPD(errorCode3, 
+			    result = iCalcDocument->CalculateAndModifyHistoryL(
+                editorNumber, editLine, previousOperator));
+			
+            if (errorCode3)
+				{
+				ErrorMsgL(errorCode3);
+				return;
+				}
+
+            iOutputSheet->ScrollToBottomL();
+			// Show the correct operand in the output sheet
+			aOperator = previousOperator;
+			// Set the state to EOperatorResult so that the HandleResult knows what to do
+			UpdateState(EOperatorResult);
+			}	
+		}
+
+	// User has pressed sqrt
+	else if (aOperator == TCalcEditLine::ECalcSqrt)
+		{
+		// We are in a middle of calculation chain
+		if (iState == EOperandAndOperatorAndOperand)
+			{
+			editLine.TrimZeroL();
+			// Save the previous operator
+			TCalcEditLine::TCalcOperatorType previousOperator = editLine.Operator();
+			// Set the operator to sqrt
+			editLine.SetOperator(TCalcEditLine::ECalcSqrt);
+			
+			// First calculate the sqrt
+			TRAPD(errorCode, 
+				result = iCalcDocument->CalculateAndNoHistoryL(
+				editorNumber, editLine));
+                                                 
+			if (errorCode)
+				{
+				ErrorMsgL(errorCode);
+				return;
+				}
+			
+			// Set the operator to previous one
+			editLine.SetOperator(previousOperator);
+			// Result goes to the outputsheet
+			editLine.SetNumber(result);
+
+			// Calculate again
+			TRAPD(errorCode2, 
+				result = iCalcDocument->CalculateAndAddHistoryL(
+				result, editLine));
+                                                 
+			if (errorCode2)
+				{
+				ErrorMsgL(errorCode2);
+				return;
+				}
+			// Set this so that we will display correct operator in the output sheet
+			aOperator = previousOperator;
+			iOutputSheet->ScrollToBottomL();
+			UpdateState(EOperator);
+			// Dimm the square root and percent
+			iContainer->ShowSqrtButton(EFalse);
+			iContainer->ShowPercentButton(EFalse);
+			}
+		// Only operand and sqrt
+		else
+			{
+			editLine.SetOperator(aOperator);
+		
+			// Trap harness, because the CalculateAndHistoryL leaves in case of negative operand
+			TRAPD(errorCode,
+				result = iCalcDocument->CalculateAndAddHistoryL(
+				editorNumber, editLine));
+			
+			if (errorCode)
+				{
+				ErrorMsgL(errorCode);
+				return;
+				}
+
+			iOutputSheet->ScrollToBottomL();
+			//Set the state to EOperatorResult so that we know to call HandleResult later
+			UpdateState(EOperatorResult);
+			}
+		}
+    //  Current state is state4 and previous input is MS,
+    // provisional result is get and show this the editor.
+    // And a line is not added to OutputSheet because a line
+    // is already added.
+    
+	else if (iState == ESelectResult)
+        {
+        iCalcDocument->AddEmptyLine();
+        editLine.SetOperator(TCalcEditLine::ECalcOperatorNone);
+		//  Because the state is "User has selected result",
+        // this function does not occur leave.
+        result = iCalcDocument->CalculateAndAddHistoryL(
+                 editorNumber, editLine);
+        iOutputSheet->ScrollToBottomL();
+		UpdateState(EOperator);	
+		iContainer->SetSqrtEnableL();
+		}
+		
+    //  If a input is a operator and state is updated,
+    // calculate and update history.
+    else if (iState != EOperandAndOperator)  
+        {
+        editLine.TrimZeroL();
+
+		// If the number in the EditLine is not a operand
+		// we need to dim square root and percent buttons
+		if (iState == EOperandAndOperatorAndOperand)
+			{
+			iContainer->ShowSqrtButton(EFalse);
+			iContainer->ShowPercentButton(EFalse);
+			}
+        // Calculate by user's input
+        TRAPD(errorCode, 
+              result = iCalcDocument->CalculateAndAddHistoryL(
+              editorNumber, editLine));
+                                                 
+        if (errorCode)
+            {
+            ErrorMsgL(errorCode);
+            return;
+            }
+        iOutputSheet->ScrollToBottomL();
+		UpdateState(EOperator);
+		}
+    
+    iEditorSubPane->SetEditorNumber(result);
+    iEditorSubPane->SetOperator(aOperator);
+    
+    if ( aOperator != TCalcEditLine::ECalcSqrt )
+        {
+        iEditorSubPane->DrawNow();  
+        }
+    iContainer->ScrollArrowUpdate();
+    iContainer->SetChangeSignEnableL();
+    iContainer->SetClearKeyEnable(); 
+	if (aOperator == TCalcEditLine::ECalcAdd ||aOperator == TCalcEditLine::ECalcSubtract ||
+		 aOperator == TCalcEditLine::ECalcMultiply ||aOperator == TCalcEditLine::ECalcDivide )
+		{
+		iContainer->SetChangeSignDisable();
+		}  
+	
+    }
+
+
+// ---------------------------------------------------------
+// CCalcView::HandleEqualSubRoutineL
+// Common routine for select result and MemorySave on two operands
+// and operator or State4.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCalcView::HandleEqualSubRoutineL()
+    {
+    TCalcEditLine editLine(iEditorSubPane->EditLine());
+    TInt calculationError(KErrNone);
+    TReal64 result(0);
+
+    if (iState == EOperandAndOperator || iState == EOperatorOnlyResult)
+        {
+		// User has selected equal or operand and sqrt, or percent
+        result = iCalcDocument->ProvisionalResult();
+        }
+    else 
+        {
+        editLine.TrimZeroL();
+		// We are calculating the intermediate result. 
+		// So we need to dim the sqrt and percent buttons.
+		iContainer->ShowSqrtButton(EFalse);
+		iContainer->ShowPercentButton(EFalse);
+        
+        if (iState == ESelectResult)
+            {
+            iCalcDocument->AddEmptyLine();
+            editLine.SetOperator(TCalcEditLine::ECalcOperatorNone);
+            }
+        TRAP(calculationError,
+             result = iCalcDocument->CalculateAndAddHistoryL(
+             iEditorSubPane->EditorNumber(), editLine));
+        }
+    
+    //  If overflow or division by zero occurs,
+    // error message is displayed.
+    if (calculationError)
+        {
+        ErrorMsgL(calculationError);
+
+        }
+    else
+        {
+        iCalcDocument->AddEqualLineAndUpdateLastResultL();
+        iEditorSubPane->SetEditorNumber(result);
+        iEditorSubPane->SetOperator(TCalcEditLine::ECalcEqual);
+        // Show result on the sheet
+        CCalcOutputSheet* sheet = iContainer->OutputSheet();
+        sheet->ScrollToBottomL();
+        iContainer->ScrollArrowUpdate();
+        }
+    return calculationError;
+    }
+
+// ----------------------------------------------------
+// CCalcView::DoActivateL
+// This is called when CCalcView becomes active.
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+void CCalcView::DoActivateL
+                (const TVwsViewId& /* aPrevViewId */,
+                 TUid /* aCustomMessageId */,
+                 const TDesC8& /* aCustomMessage */)
+    {
+    AppUi()->AddToStackL(*this, iContainer);
+    iContainer->ActivateL();
+    }
+
+// ----------------------------------------------------
+// CCalcView::DoDeactivate
+// This is called when CCalcView becomes deactive.
+// (other items were commented in a header).
+// ----------------------------------------------------
+//
+void CCalcView::DoDeactivate()
+    {
+    if (iContainer)
+        {
+        AppUi()->RemoveFromStack(iContainer);
+        }
+    }
+
+// ---------------------------------------------------------
+// CCalcView::Id
+// Return UID of CCalcView
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TUid CCalcView::Id() const
+    {
+    return TUid::Uid(KCalcViewId);
+    }
+
+// ---------------------------------------------------------
+// CCalcView::DynInitMenuPaneL
+// This app can have only one menu.
+// But menu of Calculator application is changed on State, memory etc.
+// Therefore to delete meaningless items from menu, this function is defined. 
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCalcView::DynInitMenuPaneL
+        (TInt aResourceId,        
+         CEikMenuPane* aMenuPane) 
+    {
+    if(iServiceHandler->HandleSubmenuL(*aMenuPane))
+        {
+        	return;
+        }
+    switch (aResourceId)
+        {
+        case (R_CALC_POPUPMENU):
+            {
+		        
+    	       		DynInitMainMenuPane(aMenuPane);
+			        
+		        /***** Get the context of the Help topic from here *****/
+		      	CArrayFix<TCoeHelpContext>* buf= AppUi()->AppHelpContextL();
+		       	TInt i= buf->Count();
+		       	if(i!=0)
+		       		{
+		       		/***** Check whether our flag is defined or not *****/
+		       	    #ifdef RD_HELP_AIW_INTEGRATION
+		       	    
+		       	    /***** Call the AiwProvider's AddItemsL  to attach the mnu items********/
+		       	    	
+		       		 	iServiceHandler->InitializeMenuPaneL(*aMenuPane,aResourceId,
+		        						ECmdLast,iServiceHandler->InParamListL()); 
+		        	/**** Set the old embedded help as dimmed one ****/ 
+		        		aMenuPane->SetItemDimmed(ECalcCmdHelp, ETrue);				 	
+		        	#else
+		        	/**** Set the Aiw Help as dimmed one as our feature flag is not defined ****/ 
+		        		aMenuPane->SetItemDimmed(ECmdAiwPlaceHolder,ETrue);	
+		        	#endif
+		       		}
+		        else 
+		            {
+		         /**** If the Feature flag is not defined dont show the Aiw Help ****/
+		        	aMenuPane->SetItemDimmed(ECmdAiwPlaceHolder,ETrue);
+		            }
+		            
+		        /******* Delete the buffer and make it to NULL *****/
+		       	delete buf;
+		        buf = NULL;   
+		        if (!FeatureManager::FeatureSupported( KFeatureIdHelp ))
+			        {
+			        aMenuPane->DeleteMenuItem(ECalcCmdHelp);
+			        aMenuPane->DeleteMenuItem(ECmdAiwPlaceHolder);
+			        }  
+            break;
+            }
+
+        case (R_CALC_MEMORY_MENU):
+            {
+            DynInitMemoryMenuPane(aMenuPane);
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }   
+// ---------------------------------------------------------
+// CCalcView::HandleForegroundEventL
+//Refresh and draw display ,paper and function map Icons.
+// ---------------------------------------------------------
+//
+void CCalcView::HandleForegroundEventL(TBool aForeground)
+	{
+	if( (aForeground) && (STATIC_CAST(CCalcAppUi*, AppUi())->IsSkinChanged()) )
+		{
+		iEditorSubPane->RefreshDisplaySideLBitmap();
+		iEditorSubPane->RefreshDisplayCenterBitmap();
+		iEditorSubPane->RefreshDisplaySideRBitmap();	
+		
+		iEditorSubPane->DrawNow();
+
+		iOutputSheet->RefreshPaperBitmap();
+		iOutputSheet->RefreshScalablePaperBitmap();
+#ifdef __SCALABLE_ICONS
+		iOutputSheet->RefreshResultsLineBitmap();
+#endif
+		iOutputSheet->DrawNow();
+
+		iContainer->FunctionSubPane()->RefreshButtonIcons();		
+		for(TInt i =0; i< 10; i++)
+			{
+			iContainer->FunctionSubPane()->GetButtonBitmapControl(i)->DrawNow();
+			}
+		}
+	else
+		{
+		CAknView::HandleForegroundEventL(aForeground);
+		}
+	}
+
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/BMARM/CONVERTERENGINEu.def	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,25 @@
+EXPORTS
+	__12TCnvCategory @ 1 NONAME R3UNUSED ; TCnvCategory::TCnvCategory(void)
+	BaseUnit__C12TCnvCategory @ 2 NONAME R3UNUSED ; TCnvCategory::BaseUnit(void) const
+	Convert__C12TCnvCategoryUiUiRCdUi @ 3 NONAME ; TCnvCategory::Convert(unsigned int, unsigned int, double const &, unsigned int) const
+	CurrencyCategoryId__C13CCnvConverter @ 4 NONAME R3UNUSED ; CCnvConverter::CurrencyCategoryId(void) const
+	CurrentValueIndex__C12TCnvCategory @ 5 NONAME R3UNUSED ; TCnvCategory::CurrentValueIndex(void) const
+	CurrentValueTextLC__12TCnvCategory @ 6 NONAME R3UNUSED ; TCnvCategory::CurrentValueTextLC(void)
+	DeleteCurrencyL__12TCnvCategoryi @ 7 NONAME R3UNUSED ; TCnvCategory::DeleteCurrencyL(int)
+	ExternalizeL__C13CCnvConverterR12RWriteStream @ 8 NONAME R3UNUSED ; CCnvConverter::ExternalizeL(RWriteStream &) const
+	GetCategoryAccessor__13CCnvConverterR12TCnvCategoryUi @ 9 NONAME R3UNUSED ; CCnvConverter::GetCategoryAccessor(TCnvCategory &, unsigned int)
+	GetCategorylistAccessor__13CCnvConverterR12TCnvCategory @ 10 NONAME R3UNUSED ; CCnvConverter::GetCategorylistAccessor(TCnvCategory &)
+	GetDefaultUnits__C12TCnvCategoryRUiT1 @ 11 NONAME R3UNUSED ; TCnvCategory::GetDefaultUnits(unsigned int &, unsigned int &) const
+	InternalizeL__13CCnvConverterR11RReadStream @ 12 NONAME R3UNUSED ; CCnvConverter::InternalizeL(RReadStream &)
+	MdcArray__C12TCnvCategory @ 13 NONAME R3UNUSED ; TCnvCategory::MdcArray(void) const
+	NewL__13CCnvConverterR15TResourceReader @ 14 NONAME R3UNUSED ; CCnvConverter::NewL(TResourceReader &)
+	SetBaseUnit__12TCnvCategoryUi @ 15 NONAME R3UNUSED ; TCnvCategory::SetBaseUnit(unsigned int)
+	SetCurrentValueIndex__12TCnvCategoryi @ 16 NONAME R3UNUSED ; TCnvCategory::SetCurrentValueIndex(int)
+	SetDefaultUnits__12TCnvCategoryUiUi @ 17 NONAME R3UNUSED ; TCnvCategory::SetDefaultUnits(unsigned int, unsigned int)
+	SetUnitFactor__12TCnvCategoryUiRCd @ 18 NONAME R3UNUSED ; TCnvCategory::SetUnitFactor(unsigned int, double const &)
+	SetUnitName__12TCnvCategoryUiRC7TDesC16 @ 19 NONAME R3UNUSED ; TCnvCategory::SetUnitName(unsigned int, TDesC16 const &)
+	UnitFactor__C12TCnvCategoryUi @ 20 NONAME R3UNUSED ; TCnvCategory::UnitFactor(unsigned int) const
+	UnitMinimum__C12TCnvCategoryUi @ 21 NONAME R3UNUSED ; TCnvCategory::UnitMinimum(unsigned int) const
+	"_._13CCnvConverter" @ 22 NONAME R3UNUSED ; CCnvConverter::~CCnvConverter(void)
+	AddNewCurrencyL__12TCnvCategoryiR7TDesC16Rd @ 23 NONAME ; TCnvCategory::AddNewCurrencyL(int, TDesC16 &, double &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/BWINS/CONVERTERENGINEu.def	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,25 @@
+EXPORTS
+	??0TCnvCategory@@QAE@XZ @ 1 NONAME ; public: __thiscall TCnvCategory::TCnvCategory(void)
+	??1CCnvConverter@@UAE@XZ @ 2 NONAME ; public: virtual __thiscall CCnvConverter::~CCnvConverter(void)
+	?AddNewCurrencyL@TCnvCategory@@QAEXHAAVTDesC16@@AAN@Z @ 3 NONAME ; public: void __thiscall TCnvCategory::AddNewCurrencyL(int,class TDesC16 &,double &)
+	?BaseUnit@TCnvCategory@@QBEIXZ @ 4 NONAME ; public: unsigned int __thiscall TCnvCategory::BaseUnit(void)const 
+	?Convert@TCnvCategory@@QBENIIABNI@Z @ 5 NONAME ; public: double __thiscall TCnvCategory::Convert(unsigned int,unsigned int,double const &,unsigned int)const 
+	?CurrencyCategoryId@CCnvConverter@@QBEIXZ @ 6 NONAME ; public: unsigned int __thiscall CCnvConverter::CurrencyCategoryId(void)const 
+	?CurrentValueIndex@TCnvCategory@@UBEHXZ @ 7 NONAME ; public: virtual int __thiscall TCnvCategory::CurrentValueIndex(void)const 
+	?CurrentValueTextLC@TCnvCategory@@UAEPAVHBufC16@@XZ @ 8 NONAME ; public: virtual class HBufC16 * __thiscall TCnvCategory::CurrentValueTextLC(void)
+	?DeleteCurrencyL@TCnvCategory@@QAEXH@Z @ 9 NONAME ; public: void __thiscall TCnvCategory::DeleteCurrencyL(int)
+	?ExternalizeL@CCnvConverter@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; public: void __thiscall CCnvConverter::ExternalizeL(class RWriteStream &)const 
+	?GetCategoryAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@I@Z @ 11 NONAME ; public: void __thiscall CCnvConverter::GetCategoryAccessor(class TCnvCategory &,unsigned int)
+	?GetCategorylistAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@@Z @ 12 NONAME ; public: void __thiscall CCnvConverter::GetCategorylistAccessor(class TCnvCategory &)
+	?GetDefaultUnits@TCnvCategory@@QBEXAAI0@Z @ 13 NONAME ; public: void __thiscall TCnvCategory::GetDefaultUnits(unsigned int &,unsigned int &)const 
+	?InternalizeL@CCnvConverter@@QAEXAAVRReadStream@@@Z @ 14 NONAME ; public: void __thiscall CCnvConverter::InternalizeL(class RReadStream &)
+	?MdcArray@TCnvCategory@@UBEPBVMDesC16Array@@XZ @ 15 NONAME ; public: virtual class MDesC16Array const * __thiscall TCnvCategory::MdcArray(void)const 
+	?NewL@CCnvConverter@@SAPAV1@AAVTResourceReader@@@Z @ 16 NONAME ; public: static class CCnvConverter * __cdecl CCnvConverter::NewL(class TResourceReader &)
+	?SetBaseUnit@TCnvCategory@@QAEXI@Z @ 17 NONAME ; public: void __thiscall TCnvCategory::SetBaseUnit(unsigned int)
+	?SetCurrentValueIndex@TCnvCategory@@UAEXH@Z @ 18 NONAME ; public: virtual void __thiscall TCnvCategory::SetCurrentValueIndex(int)
+	?SetDefaultUnits@TCnvCategory@@QAEXII@Z @ 19 NONAME ; public: void __thiscall TCnvCategory::SetDefaultUnits(unsigned int,unsigned int)
+	?SetUnitFactor@TCnvCategory@@QAEXIABN@Z @ 20 NONAME ; public: void __thiscall TCnvCategory::SetUnitFactor(unsigned int,double const &)
+	?SetUnitName@TCnvCategory@@QAEXIABVTDesC16@@@Z @ 21 NONAME ; public: void __thiscall TCnvCategory::SetUnitName(unsigned int,class TDesC16 const &)
+	?UnitFactor@TCnvCategory@@QBENI@Z @ 22 NONAME ; public: double __thiscall TCnvCategory::UnitFactor(unsigned int)const 
+	?UnitMinimum@TCnvCategory@@QBENI@Z @ 23 NONAME ; public: double __thiscall TCnvCategory::UnitMinimum(unsigned int)const 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/BWinsCw/CONVERTERENGINEu.def	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,25 @@
+EXPORTS
+	??0TCnvCategory@@QAE@XZ @ 1 NONAME ; TCnvCategory::TCnvCategory(void)
+	??1CCnvConverter@@UAE@XZ @ 2 NONAME ; CCnvConverter::~CCnvConverter(void)
+	?AddNewCurrencyL@TCnvCategory@@QAEXHAAVTDesC16@@AAN@Z @ 3 NONAME ; void TCnvCategory::AddNewCurrencyL(int, class TDesC16 &, double &)
+	?BaseUnit@TCnvCategory@@QBEIXZ @ 4 NONAME ; unsigned int TCnvCategory::BaseUnit(void) const
+	?Convert@TCnvCategory@@QBENIIABNI@Z @ 5 NONAME ; double TCnvCategory::Convert(unsigned int, unsigned int, double const &, unsigned int) const
+	?CurrencyCategoryId@CCnvConverter@@QBEIXZ @ 6 NONAME ; unsigned int CCnvConverter::CurrencyCategoryId(void) const
+	?CurrentValueIndex@TCnvCategory@@UBEHXZ @ 7 NONAME ; int TCnvCategory::CurrentValueIndex(void) const
+	?CurrentValueTextLC@TCnvCategory@@UAEPAVHBufC16@@XZ @ 8 NONAME ; class HBufC16 * TCnvCategory::CurrentValueTextLC(void)
+	?DeleteCurrencyL@TCnvCategory@@QAEXH@Z @ 9 NONAME ; void TCnvCategory::DeleteCurrencyL(int)
+	?ExternalizeL@CCnvConverter@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; void CCnvConverter::ExternalizeL(class RWriteStream &) const
+	?GetCategoryAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@I@Z @ 11 NONAME ; void CCnvConverter::GetCategoryAccessor(class TCnvCategory &, unsigned int)
+	?GetCategorylistAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@@Z @ 12 NONAME ; void CCnvConverter::GetCategorylistAccessor(class TCnvCategory &)
+	?GetDefaultUnits@TCnvCategory@@QBEXAAI0@Z @ 13 NONAME ; void TCnvCategory::GetDefaultUnits(unsigned int &, unsigned int &) const
+	?InternalizeL@CCnvConverter@@QAEXAAVRReadStream@@@Z @ 14 NONAME ; void CCnvConverter::InternalizeL(class RReadStream &)
+	?MdcArray@TCnvCategory@@UBEPBVMDesC16Array@@XZ @ 15 NONAME ; class MDesC16Array const * TCnvCategory::MdcArray(void) const
+	?NewL@CCnvConverter@@SAPAV1@AAVTResourceReader@@@Z @ 16 NONAME ; class CCnvConverter * CCnvConverter::NewL(class TResourceReader &)
+	?SetBaseUnit@TCnvCategory@@QAEXI@Z @ 17 NONAME ; void TCnvCategory::SetBaseUnit(unsigned int)
+	?SetCurrentValueIndex@TCnvCategory@@UAEXH@Z @ 18 NONAME ; void TCnvCategory::SetCurrentValueIndex(int)
+	?SetDefaultUnits@TCnvCategory@@QAEXII@Z @ 19 NONAME ; void TCnvCategory::SetDefaultUnits(unsigned int, unsigned int)
+	?SetUnitFactor@TCnvCategory@@QAEXIABN@Z @ 20 NONAME ; void TCnvCategory::SetUnitFactor(unsigned int, double const &)
+	?SetUnitName@TCnvCategory@@QAEXIABVTDesC16@@@Z @ 21 NONAME ; void TCnvCategory::SetUnitName(unsigned int, class TDesC16 const &)
+	?UnitFactor@TCnvCategory@@QBENI@Z @ 22 NONAME ; double TCnvCategory::UnitFactor(unsigned int) const
+	?UnitMinimum@TCnvCategory@@QBENI@Z @ 23 NONAME ; double TCnvCategory::UnitMinimum(unsigned int) const
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/BWinsCw/ConverterEngine_EKA2u.def	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,27 @@
+EXPORTS
+	??0TCnvCategory@@QAE@XZ @ 1 NONAME ; TCnvCategory::TCnvCategory(void)
+	??1CCnvConverter@@UAE@XZ @ 2 NONAME ; CCnvConverter::~CCnvConverter(void)
+	?AddNewCurrencyL@TCnvCategory@@QAEXHAAVTDesC16@@AANW4TCurrencyType@@@Z @ 3 NONAME ; void TCnvCategory::AddNewCurrencyL(int, class TDesC16 &, double &, enum TCurrencyType)
+	?BaseUnit@TCnvCategory@@QBEIXZ @ 4 NONAME ; unsigned int TCnvCategory::BaseUnit(void) const
+	?Convert@TCnvCategory@@QBENIIABNI@Z @ 5 NONAME ; double TCnvCategory::Convert(unsigned int, unsigned int, double const &, unsigned int) const
+	?CurrencyCategoryId@CCnvConverter@@QBEIXZ @ 6 NONAME ; unsigned int CCnvConverter::CurrencyCategoryId(void) const
+	?CurrentValueIndex@TCnvCategory@@UBEHXZ @ 7 NONAME ; int TCnvCategory::CurrentValueIndex(void) const
+	?CurrentValueTextLC@TCnvCategory@@UAEPAVHBufC16@@XZ @ 8 NONAME ; class HBufC16 * TCnvCategory::CurrentValueTextLC(void)
+	?DeleteCurrencyL@TCnvCategory@@QAEXH@Z @ 9 NONAME ; void TCnvCategory::DeleteCurrencyL(int)
+	?ExternalizeL@CCnvConverter@@QBEXAAVRWriteStream@@@Z @ 10 NONAME ; void CCnvConverter::ExternalizeL(class RWriteStream &) const
+	?GetCategoryAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@I@Z @ 11 NONAME ; void CCnvConverter::GetCategoryAccessor(class TCnvCategory &, unsigned int)
+	?GetCategorylistAccessor@CCnvConverter@@QAEXAAVTCnvCategory@@@Z @ 12 NONAME ; void CCnvConverter::GetCategorylistAccessor(class TCnvCategory &)
+	?GetDefaultUnits@TCnvCategory@@QBEXAAI0@Z @ 13 NONAME ; void TCnvCategory::GetDefaultUnits(unsigned int &, unsigned int &) const
+	?InternalizeL@CCnvConverter@@QAEXAAVRReadStream@@@Z @ 14 NONAME ; void CCnvConverter::InternalizeL(class RReadStream &)
+	?MdcArray@TCnvCategory@@UBEPBVMDesC16Array@@XZ @ 15 NONAME ; class MDesC16Array const * TCnvCategory::MdcArray(void) const
+	?NewL@CCnvConverter@@SAPAV1@AAVTResourceReader@@@Z @ 16 NONAME ; class CCnvConverter * CCnvConverter::NewL(class TResourceReader &)
+	?SetBaseUnit@TCnvCategory@@QAEXI@Z @ 17 NONAME ; void TCnvCategory::SetBaseUnit(unsigned int)
+	?SetCurrentValueIndex@TCnvCategory@@UAEXH@Z @ 18 NONAME ; void TCnvCategory::SetCurrentValueIndex(int)
+	?SetDefaultUnits@TCnvCategory@@QAEXII@Z @ 19 NONAME ; void TCnvCategory::SetDefaultUnits(unsigned int, unsigned int)
+	?SetUnitFactor@TCnvCategory@@QAEXIABN@Z @ 20 NONAME ; void TCnvCategory::SetUnitFactor(unsigned int, double const &)
+	?SetUnitName@TCnvCategory@@QAEXIABVTDesC16@@W4TCurrencyType@@@Z @ 21 NONAME ; void TCnvCategory::SetUnitName(unsigned int, class TDesC16 const &, enum TCurrencyType)
+	?UnitFactor@TCnvCategory@@QBENI@Z @ 22 NONAME ; double TCnvCategory::UnitFactor(unsigned int) const
+	?UnitMinimum@TCnvCategory@@QBENI@Z @ 23 NONAME ; double TCnvCategory::UnitMinimum(unsigned int) const
+	?CreateTempUnitArrayForRestore@TCnvCategory@@QAEXXZ @ 24 NONAME ; void TCnvCategory::CreateTempUnitArrayForRestore(void)
+	?RestoreUnitArray@TCnvCategory@@QAEXXZ @ 25 NONAME ; void TCnvCategory::RestoreUnitArray(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvAppUi.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2002 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:  
+*      This is the implementation of the class defined in CCnvAppUi.h
+*
+*/
+
+
+#include <avkon.hrh>
+#include <hlplch.h>
+#include <featmgr.h>
+
+#include <Converter.rsg>
+
+#include "CCnvApplication.h"
+#include "CCnvAppUi.h"
+#include "CCnvMainForm.h"
+
+CCnvAppUi::CCnvAppUi()
+	: iFormDeleted( EFalse )
+    {
+    }
+
+CCnvAppUi::~CCnvAppUi()
+    {
+	// This can be done safely because the form never "self-destructs"
+	// (exit is done via HandleCommandL( EEikCmdExit) below)
+	if( !iFormDeleted )
+		{
+		delete iMainForm;
+		}
+    FeatureManager::UnInitializeLib();
+    }
+
+void CCnvAppUi::ConstructL()
+	{
+	// Construct softkeys and menubar using the base class
+    BaseConstructL( CAknAppUi::EAknEnableSkin | EAknEnableMSK);
+
+	// Construct and show our main form
+	iMainForm = new( ELeave ) CCnvMainForm( iFormDeleted );
+	iMainForm->ConstructL();
+	iMainForm->ExecuteLD( R_CNV_MAINFORM );
+
+	iMainForm->SetMopParent( this );
+
+	CAknAppUi::SetKeyBlockMode(ENoKeyBlock);
+
+    FeatureManager::InitializeLibL();
+	}
+
+void CCnvAppUi::HandleCommandL( TInt aCommand )
+	{
+	switch( aCommand )
+		{
+		case EAknCmdHelp:
+			{
+			HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
+												 AppHelpContextL() );
+			break;
+			}
+		case EEikCmdExit:
+		case EAknCmdExit: 
+			{
+			Exit();
+			break;
+			}
+		default:
+			{
+			break;
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvAppUi.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2002 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:  
+*     This class is a part of the standard application framework.
+*     It Owns the application main form.
+*     It Acts as a default command handler for the application forms.
+*
+*/
+
+
+
+#ifndef __CCNVAPPUI_H__
+#define __CCNVAPPUI_H__
+
+// INCLUDES
+#include <aknappui.h>
+
+// FORWARD DECLARATIONS
+class CCnvMainForm;
+
+// CLASS DEFINITION
+/**
+* This class is a part of the standard application framework.
+* It Owns the application main form.
+* It Acts as a default command handler for the application forms.
+*/
+class CCnvAppUi : public CAknAppUi
+	{
+
+	public:	// Constructors and destructor
+
+		/**
+        * Default constructor.
+        */
+		CCnvAppUi();
+
+		/**
+        * Destructor.
+        */
+		~CCnvAppUi();
+
+		/**
+        * 2nd phase constructor.
+        */
+		void ConstructL();
+
+	public:	// from CEikAppUi
+
+		/**
+        * Handles menu commands.
+ 		* @param aCommand Command identifier.
+        */
+		void HandleCommandL( TInt aCommand );
+
+	private: // Data
+
+		/**
+		* Pointer to the main form. Owned.
+		*/
+		CCnvMainForm* iMainForm;
+
+		/**
+		* Set to ETrue by CMainForm at destruction.
+		* Used to make sure that we don't double delete
+		* the form after an automatic kill by the framework (appshutter).
+		*/
+		TBool iFormDeleted;
+
+	};
+
+#endif	// __CCNVAPPUI_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvApplication.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2002 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:  
+*      This is the implementation of the class defined in CCnvApplication.h
+*
+*/
+
+
+
+#include "CCnvApplication.h"
+#include "CCnvDocument.h"
+
+TUid CCnvApplication::AppDllUid() const
+	{
+	return KUidCnv;
+	}
+
+CApaDocument* CCnvApplication::CreateDocumentL()
+	{
+	return CCnvDocument::NewL( *this );
+	}
+
+
+#include <eikstart.h>
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CCnvApplication;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication(NewApplication);
+    }
+
+
+
+
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvApplication.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2002 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:  
+*     This class is a part of the standard application framework.
+*     The application gets instantiated starting from this class.
+*     Provides a factory method for instantiating the document object.
+*
+*/
+
+
+
+#ifndef __CCNVAPPLICATION_H__
+#define __CCNVAPPLICATION_H__
+
+// INCLUDES
+//#include <eikapp.h>
+#include <aknapp.h> 
+
+// CONSTANTS
+const TUid KUidCnv = { 0x101f4668 };	// UID of the application
+
+// CLASS DEFINITION
+/**
+* This class is a part of the standard application framework.
+* The application gets instantiated starting from this class.
+* Provides a factory method for instantiating the document object.
+*/
+class CCnvApplication : public CAknApplication 
+	{
+
+	private: // from CApaApplication
+
+		/**
+		* Creates a CCnvDocument instance.
+		* @return A pointer to the created document object.
+		*/
+		CApaDocument* CreateDocumentL();
+
+		/**
+		* Returns application's UID value.
+		* @return KUidCnv.
+		*/
+		TUid AppDllUid() const;
+
+	};
+
+#endif // __CCNVAPPLICATION_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvDocument.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2002 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:  
+*      This is the implementation of the class defined in CCnvDocument.h
+*
+*/
+
+
+
+#include "CCnvAppUi.h"
+#include "CCnvDocument.h"
+
+CCnvDocument::CCnvDocument( CAknApplication& aApp )
+: CAknDocument( aApp )
+	{
+	}
+
+CCnvDocument* CCnvDocument::NewL( CAknApplication& aApp )
+	{
+	return new( ELeave ) CCnvDocument( aApp );
+	}
+
+CCnvDocument::~CCnvDocument()
+	{
+	}
+
+CEikAppUi* CCnvDocument::CreateAppUiL()
+	{
+	return new( ELeave ) CCnvAppUi;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvDocument.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2002 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:  
+*     This class is a part of the standard application framework.
+*     Declares the document class for this application.
+*
+*/
+
+
+
+#ifndef __CCNVDOCUMENT_H__
+#define __CCNVDOCUMENT_H__
+
+// INCLUDES
+//#include <eikdoc.h>
+#include <AknDoc.h> 
+#include <aknapp.h> 
+
+// CLASS DEFINITION
+/**
+* This class is a part of the standard application framework.
+* Declares the document class for this application.
+*/
+class CCnvDocument : public CAknDocument
+	{
+
+	public:	// Constructors and destructor.
+
+		/**
+        * Static two-phase constructor.
+		* @param aApp Reference to the application object.
+        */
+		static CCnvDocument* NewL( CAknApplication& aApp );
+
+		/**
+        * Destructor.
+        */
+		~CCnvDocument();
+
+	public: // from CEikDocument
+
+		/**
+        * Instantiates the application UI class.
+		* @return CCnvAppUi object instance.
+        */
+		CEikAppUi* CreateAppUiL();
+
+	private: // Private constructors
+
+		/**
+        * Constructor.
+		* @param aApp Reference to the application object.
+        */
+		CCnvDocument( CAknApplication& aApp );
+
+	};
+
+#endif // __CCNVDOCUMENT_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvMainForm.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,1259 @@
+/*
+* Copyright (c) 2002 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:  
+*      This is the implementation of the class defined in CCnvMainForm.h
+*
+*/
+
+
+
+#include <barsread.h>
+#include <eikenv.h>
+#include <eikappui.h>
+#include <eikfpne.h>
+#include <avkon.hrh>
+#include <AknPopupField.h>
+#include <aknnotewrappers.h>
+#include <eikmenup.h>
+#include <s32file.h>
+#include <ErrorUI.h>
+#include <featmgr.h>
+
+#include <hlplch.h>
+#include <csxhelp/cnv.hlp.hrh>
+
+#include <CCnvConverter.h>
+#include <TCnvCategory.h>
+#include <Converter.rsg>
+#include "Converter.hrh"
+#include "CCnvApplication.h"
+#include "CCnvMainForm.h"
+#include "CCnvRatesForm.h"
+
+#include <aknnumed.h> 
+#include <f32file.h>
+#include <e32std.h>
+
+_LIT( KCnvPlusSign, "+" );
+_LIT( KCnvMinusSign, "-" );
+_LIT( KCnvExponentSign, "E" );
+_LIT( KCnvDotSign, "." );
+
+_LIT( KCnvMinusInTheMiddle, "?*-?*" );
+_LIT( KCnvPlusInTheMiddle, "?*+?*" );
+_LIT( KCnvExponentInTheMiddle, "?*E?*" );
+_LIT( KCnvExponentInTheMiddleAndEnd, "?*E?*E?" );
+
+	_LIT( KConverterFilename,"UnitConverter.ini");
+	_LIT(KDelimiter, ":");
+
+CCnvMainForm::CCnvMainForm( TBool &aAlreadyDead )
+: iIsFullyConstructed( EFalse ),
+iHasNotifiedDiscFull( EFalse ),
+iLastUsedEditorId( EConverterEditor1 ),
+iHistoryTypeCategory( -1 ),
+iHistoryUnit1Category( -1 ),
+iHistoryUnit2Category( -1 ),
+iAlreadyDead( aAlreadyDead )
+	{
+	}
+
+CCnvMainForm::~CCnvMainForm()
+	{
+	if( iIsFullyConstructed )
+		{
+		SaveState();
+		}
+	delete iModel;
+	delete iConversionTimer;
+	delete iErrorUI;
+	iAlreadyDead = ETrue;
+
+	//remove the edwin observers
+	CEikFloatingPointEditor* editor1 =
+		static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor1 ) );
+	editor1->RemoveEdwinObserver(this);
+
+	CEikFloatingPointEditor* editor2 =
+		static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor2 ) );	
+	editor2->RemoveEdwinObserver(this);
+
+	}
+
+void CCnvMainForm::ConstructL()
+	{
+	CAknDialog::ConstructL( R_CNV_MAINFORM_MENUBAR );
+
+	iErrorUI = CErrorUI::NewL( *iCoeEnv );
+
+	TResourceReader reader;
+	iEikonEnv->CreateResourceReaderLC( reader, R_CNV_MODEL );
+	iModel = CCnvConverter::NewL( reader );
+	CleanupStack::PopAndDestroy(); // reader
+
+	iConversionTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+
+	iCurrencyCategoryId = iModel->CurrencyCategoryId();
+	iIsFullyConstructed = ETrue;
+	isEdwinUpdateText = EFalse;
+	
+		TFileName path;
+    	iEikonEnv->FsSession().PrivatePath(path);
+    	iEikonEnv->FsSession().MkDirAll(path);
+  
+	}
+
+void CCnvMainForm::GetHelpContext( TCoeHelpContext& aContext ) const
+	{
+	aContext.iMajor = KUidCnv;
+	aContext.iContext = KCNV_HLP_MAIN_STATE;
+	}
+
+// Handle commands from Options menu
+void CCnvMainForm::ProcessCommandL( TInt aCommandId )
+	{
+    // this hides the options menu etc.
+    CAknForm::ProcessCommandL( aCommandId );
+
+	switch( aCommandId )
+		{
+		case ECmdSetType:
+			{
+			CmdSetTypeL();
+			break;
+			}
+
+		case ECmdSetUnit:		// FLOWTHROUGH
+		case ECmdSetCurrency:
+			{
+			CmdSetUnitL();
+			break;
+			}
+
+		case ECmdRates:
+			{
+			CmdRatesL();
+			break;
+			}
+		case EAknCmdHelp:
+			{
+			iEikonEnv->EikAppUi()->HandleCommandL( EAknCmdHelp );
+			break;
+			}
+		case EEikCmdExit:
+			{
+			OkToExitL( EAknSoftkeyExit );
+			break;
+			}
+
+		default:
+			{
+			break;
+			}
+		}
+	}
+
+// Takes any action required when the current line is changed to aControlId.
+void CCnvMainForm::LineChangedL( TInt aControlId )
+	{
+
+		CEikButtonGroupContainer& cba = ButtonGroupContainer();
+		cba.SetCommandSetL(R_CNV_MAINFORM_SOFTKEYS);
+		
+	if( ( aControlId == EConverterEditor1 ) ||
+		( aControlId == EConverterEditor2 ) )
+		{
+		CEikFloatingPointEditor* editor =
+			static_cast< CEikFloatingPointEditor* >( Control( aControlId ) );
+
+		// don't clear the selection if there is only '0' in the editor
+		TBuf<KEditorTextMaxLength> editorText;
+		editor->GetText(editorText);
+
+		SynchronousConversionL();
+		//        iActiveEditorChanged = EFalse;
+		}
+	else if(aControlId == EConverterUnit1Popup || 
+		aControlId == EConverterUnit2Popup)
+		{
+			
+									
+		// if focus is moved to unit popup from amount field
+		// then try to do the conversion.
+		// IsEditorValueValidL shows invalid value note if value is not valid
+		TBool editorValueValid = IsEditorValueValidL(iLastUsedEditorId);
+		if (editorValueValid && AreRatesValidL(ETrue))
+			{
+			SynchronousConversionL();
+			}
+		}
+	if(aControlId ==  EConverterUnit1Popup || 
+		aControlId == EConverterUnit2Popup || 
+		aControlId == EConverterTypePopup)
+		{
+		//Makes the MSK visible
+	
+			cba.MakeCommandVisible(EAknSoftkeyChange,ETrue);
+	
+				
+		}
+		else if(aControlId ==EConverterEditor1 ||
+				aControlId ==EConverterEditor2) 
+		{
+			
+		
+		//makes the MSK invisible
+	
+		cba.MakeCommandVisible(EAknSoftkeyChange,EFalse);
+
+		}
+	 cba.DrawNow();
+	}
+
+void CCnvMainForm::DynInitMenuPaneL( TInt aResourceId,
+                                    CEikMenuPane* aMenuPane )
+    {
+    // When click on LSK(option), the invalid value should be set to 0.
+    TInt controlId( IdOfFocusControl() );
+    if ( ( controlId == EConverterEditor1 ) || ( controlId == EConverterEditor2 ) )
+    	  {
+        if ( EditorValueCausesHold( controlId ) || !IsVaildNumberEntered( controlId ) )
+            {
+            SetFloatEditorValueL( controlId, 0.0 );
+            }
+        SynchronousConversionL( EFalse );
+    	}
+
+    TUint currentType( iTypeCategory.CurrentValueIndex() );
+
+	if( aResourceId == R_CNV_MAINFORM_MENUPANE )
+		{
+		if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
+			{
+			aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
+			}
+
+		if( currentType == iCurrencyCategoryId )
+			{
+			aMenuPane->SetItemDimmed( ECmdRates, EFalse ) ;
+			}
+
+		switch( IdOfFocusControl() )
+			{
+			case EConverterUnit1Popup:
+			case EConverterUnit2Popup:
+				{
+				if( currentType == iCurrencyCategoryId )
+					{
+					aMenuPane->SetItemDimmed( ECmdSetCurrency, EFalse ) ;
+					}
+				else
+					{
+					aMenuPane->SetItemDimmed( ECmdSetUnit, EFalse ) ;
+					}
+				break;
+				}
+			default:
+				{
+				break;
+				}
+			}
+		}
+	}
+
+// Handles events to the three pop lists
+void CCnvMainForm::HandleControlEventL( CCoeControl* /*aControl*/,
+									   TCoeEvent aEventType )
+	{
+	// We are interested only about EEventStateChanged events
+	if( aEventType != EEventStateChanged )
+		{
+		return;
+		}
+
+	TInt controlId( IdOfFocusControl() );
+
+	if( !HasReallyChanged( controlId ) )
+		{
+		return;
+		}
+
+	switch( controlId )
+		{
+		case EConverterTypePopup:
+			{
+			HandleCategoryChangedL();
+			break;
+			}
+		case EConverterUnit1Popup:
+		case EConverterUnit2Popup:
+			{
+			HandleUnitChangedL();
+			break;
+			}
+		//These have been moved to OfferKeyEventL
+		case EConverterEditor1:
+		case EConverterEditor2:
+			{
+			iLastUsedEditorId = controlId;
+			if( (iActiveEditorChanged)&&
+				( isEdwinNavigated == EFalse || isEdwinUpdateText )  ) // Is there any navigation (or selection) 
+				//happening on the editor
+				{
+				AsynchronousConversion();
+				}
+			isEdwinNavigated = EFalse; //make the boolean false
+			iActiveEditorChanged = ETrue;
+			break;
+			}
+
+		default:
+			{
+			break;
+			}
+		}
+	}
+
+TBool CCnvMainForm::SaveFormData()
+	{
+	// Always allow exit (data is saved in the destructor)
+	return ETrue;
+	}
+
+TBool CCnvMainForm::OkToExitL( TInt aButtonId )
+	{
+	TBool status( CAknDialog::OkToExitL( aButtonId ) );
+	TInt controlId( IdOfFocusControl() );
+	if( status && ( aButtonId == EAknSoftkeyExit ) )
+		{
+		iEikonEnv->EikAppUi()->HandleCommandL( EAknCmdExit );
+		}
+	else if(aButtonId == EAknSoftkeyChange)
+		{
+		if (controlId == EConverterTypePopup)
+		{
+		CmdSetTypeL();
+		status = EFalse;
+		}
+	else if ((controlId == EConverterUnit1Popup) ||(controlId == EConverterUnit2Popup))
+		{
+		CmdSetUnitL();
+		status = EFalse;
+		}
+		}
+	else
+		{
+		status = EFalse;
+		}
+	return status;
+	}
+
+void CCnvMainForm::PreLayoutDynInitL()
+	{
+	// Store pointers to the popup list controls
+	// (makes further access easier/faster)
+	iTypePopupCtrl =
+		static_cast< CAknPopupField* >( Control( EConverterTypePopup ) );
+	iUnit1PopupCtrl =
+		static_cast< CAknPopupField* >( Control( EConverterUnit1Popup ) );
+	iUnit2PopupCtrl =
+		static_cast< CAknPopupField* >( Control( EConverterUnit2Popup ) );
+
+
+	// Set values for the unit category popup control
+	iModel->GetCategorylistAccessor( iTypeCategory );
+	iTypePopupCtrl->SetQueryValueL( &iTypeCategory );
+
+	// Load user selections from file (if any)
+	LoadStateL();
+
+	// Set initial values for the popup lists
+	HandleCategoryChangedL();
+
+	InitialiseChangeHistory();
+
+	if (iUnit1Category.UnitFactor(iUnit1Category.CurrentValueIndex()) != 0.0 &&
+		iUnit2Category.UnitFactor(iUnit2Category.CurrentValueIndex()) != 0.0)
+		{
+		SynchronousConversionL();
+		}
+	
+	//Add wdwin observers for the two editors so that they can capture the Navigation 
+	//events and not do asynchronous conversion
+	CEikFloatingPointEditor* editor1 =
+		static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor1 ) );	
+
+	CEikFloatingPointEditor* editor2 =
+		static_cast< CEikFloatingPointEditor* >( Control( EConverterEditor2 ) );	
+
+	editor1->AddEdwinObserverL(this);
+	editor2->AddEdwinObserverL(this);
+
+
+	}
+
+TBool CCnvMainForm::HasReallyChanged( TInt controlId )
+	{
+	TBool changed( EFalse );
+
+	switch( controlId )
+		{
+        case EConverterTypePopup:
+            {
+            if( iTypeCategory.CurrentValueIndex() != iHistoryTypeCategory )
+                {
+                changed = ETrue;
+                iHistoryTypeCategory = iTypeCategory.CurrentValueIndex();
+
+                // renew iHistoryUnit1Category and iHistoryUnit2Category
+                iModel->GetCategoryAccessor( iUnit1Category, iHistoryTypeCategory );
+                TUint HistoryUnit1Category;
+                TUint HistoryUnit2Category;
+                iUnit1Category.GetDefaultUnits( HistoryUnit1Category , HistoryUnit2Category );
+                iHistoryUnit1Category = HistoryUnit1Category;
+                iHistoryUnit2Category = HistoryUnit2Category;
+                }
+            break;
+			}
+		case EConverterUnit1Popup:
+			{
+			if( iUnit1Category.CurrentValueIndex() != iHistoryUnit1Category )
+				{
+				changed = ETrue;
+				iHistoryUnit1Category = iUnit1Category.CurrentValueIndex();
+				}
+			break;
+			}
+		case EConverterUnit2Popup:
+			{
+			if( iUnit2Category.CurrentValueIndex() != iHistoryUnit2Category )
+				{
+				changed = ETrue;
+				iHistoryUnit2Category = iUnit2Category.CurrentValueIndex();
+				}
+			break;
+			}
+
+		case EConverterEditor1:
+		case EConverterEditor2:
+			{
+			changed = ETrue;
+			break;
+			}
+
+		default:
+			{
+			break;
+			}
+		}
+
+	return changed;
+	}
+
+void CCnvMainForm::InitialiseChangeHistory()
+	{
+	iHistoryTypeCategory = iTypeCategory.CurrentValueIndex();
+	iHistoryUnit1Category = iUnit1Category.CurrentValueIndex();
+	iHistoryUnit2Category = iUnit2Category.CurrentValueIndex();
+	}
+
+void CCnvMainForm::HandleCategoryChangedL()
+	{
+	TInt categoryId = iTypeCategory.CurrentValueIndex();
+	iModel->GetCategoryAccessor( iUnit1Category, categoryId );
+	iModel->GetCategoryAccessor( iUnit2Category, categoryId );
+
+	TUint srcUnit, dstUnit;
+	iUnit1Category.GetDefaultUnits( srcUnit, dstUnit );
+	iUnit1Category.SetCurrentValueIndex( srcUnit );
+	iUnit2Category.SetCurrentValueIndex( dstUnit );
+
+	// Set arrays to popup lists and redraw them
+	iUnit1PopupCtrl->SetQueryValueL( &iUnit1Category );
+	iUnit2PopupCtrl->SetQueryValueL( &iUnit2Category );
+	iUnit1PopupCtrl->DrawNow();
+	iUnit2PopupCtrl->DrawNow();
+
+	// Reset amount fields
+	TReal zero( 0.0 );
+	SetFloatingPointEditorValueL( EConverterEditor1, &zero );
+	SetFloatingPointEditorValueL( EConverterEditor2, &zero );
+
+    // when category's type is temperature the editor's value can't simply set to zero
+	AsynchronousConversion();
+    
+	iLastUsedEditorId = EConverterEditor1;
+	}
+
+void CCnvMainForm::HandleUnitChangedL()
+	{
+	iUnit1Category.SetDefaultUnits( iUnit1Category.CurrentValueIndex(),
+		iUnit2Category.CurrentValueIndex() );
+	SynchronousConversionL();
+	}
+
+TBool CCnvMainForm::AreRatesValidL(TBool aShowNote)
+	{
+	TInt numInvalid( 0 );
+	if( iUnit1Category.UnitFactor( iUnit1Category.CurrentValueIndex() )
+		== 0.0 )
+		{
+		numInvalid++;
+		SetFloatEditorValueL( EConverterEditor1, 0.0 );
+		}
+	if( iUnit2Category.UnitFactor( iUnit2Category.CurrentValueIndex() )
+		== 0.0 )
+		{
+		numInvalid++;
+		SetFloatEditorValueL( EConverterEditor2, 0.0 );
+		}
+
+	if(numInvalid)
+		{
+		CancelConversion();
+
+		if (aShowNote)
+			{
+			TBool isPlural( EFalse );
+			if( numInvalid > 1 )
+				{
+				isPlural = ETrue;
+				}
+
+			TInt resourceId(R_CNV_MAINFORM_NORATE );
+			if( isPlural )
+				{
+				resourceId = R_CNV_MAINFORM_NORATE_PLURAL;
+				}
+			HBufC* label = iCoeEnv->AllocReadResourceLC( resourceId );
+			CAknErrorNote* note = new( ELeave ) CAknErrorNote;
+			note->ExecuteLD( *label );
+			CleanupStack::PopAndDestroy();	// label;
+			}
+		return EFalse;
+		}
+	else
+		{
+		return ETrue;
+		}
+	}
+
+void CCnvMainForm::ShowInvalidValueNoteL(TInt aEditorId)
+	{
+	CancelConversion();
+	
+	SetFloatEditorValueL( aEditorId, 0.0 );
+	
+	HBufC* label = iCoeEnv->AllocReadResourceLC(
+		R_CNV_MAINFORM_INVALIDVALUE );
+	CAknErrorNote* note = new( ELeave ) CAknErrorNote;
+	note->ExecuteLD( *label );
+	CleanupStack::PopAndDestroy();	// label;
+
+	SynchronousConversionL();
+	}
+
+TBool CCnvMainForm::IsEditorValueValidL( TUint aEditorId )
+	{
+	TReal amount( FloatingPointEditorValue( aEditorId ) );
+
+	TReal minimum;
+	if( aEditorId == EConverterEditor1 )
+		{
+		minimum = iUnit1Category.UnitMinimum(
+			iUnit1Category.CurrentValueIndex() );
+		}
+	else
+		{
+		minimum = iUnit2Category.UnitMinimum(
+			iUnit2Category.CurrentValueIndex() );
+		}
+
+	if( amount < minimum )
+		{
+		ShowInvalidValueNoteL(aEditorId);
+		return EFalse;
+		}
+	else
+		{
+		return ETrue;
+		}
+	}
+
+TBool CCnvMainForm::EditorValueCausesHold( TUint aEditorId )
+	{
+	CEikFloatingPointEditor* editor =
+		static_cast< CEikFloatingPointEditor* >( Control( aEditorId ) );	
+
+	if( editor->TextLength() == 0 )
+		{
+		return ETrue;
+		}
+
+    TBuf< 12 > content;
+    TLocale locale;
+
+    // Not all the countries use '.' to express radix point, some use ','.
+    // So use locale.DecimalSeparator() to get local symbol.
+    TBuf<1> decimal;
+    decimal.Append( locale.DecimalSeparator() );
+    editor->Text()->Extract( content, 0, 12 );
+    TInt contentLength( content.Length() );
+    if ( !content.Compare( KCnvPlusSign ) )
+        {
+        return ETrue;
+        }
+    else if ( !content.Compare( KCnvMinusSign ) )
+        {
+        return ETrue;
+        }
+
+    else if ( !content.Compare( decimal ) )
+        {
+        return ETrue;
+        }
+	else if( contentLength > 1 && 
+		content[ contentLength - 1 ] == KCnvExponentSign()[ 0 ] &&
+		IsDigit( content[ contentLength - 2 ] ) &&
+		content.Match( KCnvExponentInTheMiddle ) == KErrNotFound &&
+		content.Match( KCnvMinusInTheMiddle ) == KErrNotFound &&
+		content.Match( KCnvPlusInTheMiddle ) == KErrNotFound)
+		{
+		// If content ends with <digit>E with no minus, plus or exponent
+		// sign in the middle
+		return ETrue;
+		}
+	else if( contentLength > 2 &&
+		( content[ contentLength - 1 ] == KCnvMinusSign()[ 0 ] ||
+		content[ contentLength - 1 ] == KCnvPlusSign()[ 0 ] ) &&
+		content[ contentLength - 2 ] == KCnvExponentSign()[ 0 ] &&
+		IsDigit( content[ contentLength - 3 ] ) &&
+		content.Match( KCnvExponentInTheMiddleAndEnd ) == KErrNotFound &&
+		content.Match( KCnvMinusInTheMiddle ) == KErrNotFound &&
+		content.Match( KCnvPlusInTheMiddle ) == KErrNotFound )
+		{
+		// If content ends with <digit>E[+|-] with no minus, plus or exponent
+		// sign in the middle
+		return ETrue;
+		}
+	else if(contentLength > 12 &&
+		content.Locate(locale.DecimalSeparator()) == contentLength - 1)
+		{
+		// content ends with decimal separator and there is no other
+		// decimal separator
+		return ETrue;
+		}
+
+
+	return EFalse;
+	}
+
+void CCnvMainForm::CmdRatesL()
+	{
+	TBool wantsRelaunch;
+	TBool shouldExit( EFalse );
+	TBool needsSave( EFalse );
+	do
+		{
+		wantsRelaunch = EFalse;
+		TCnvCategory currencies;
+		iModel->GetCategoryAccessor( currencies, iCurrencyCategoryId );
+
+		CCnvRatesForm* rates = new( ELeave ) CCnvRatesForm( &wantsRelaunch,
+			&shouldExit, &needsSave, currencies);
+
+		CleanupStack::PushL( rates );
+		rates->ConstructL();
+		CleanupStack::Pop(); // rates
+		rates->ExecuteLD( R_CNV_RATESFORM );
+		}
+	while( wantsRelaunch );
+
+	if( needsSave )
+		{
+		SaveState();
+		}
+
+	if( !shouldExit )
+		{
+		// Reset the form (there might be changes in unit names..)
+		HandleCategoryChangedL();
+		
+		DrawNow();
+		}
+	else
+		{
+		TryExitL( EAknSoftkeyExit );
+		}
+	}
+
+void CCnvMainForm::CmdSetTypeL()
+	{
+	TryChangeFocusToL( EConverterTypePopup );
+	iTypePopupCtrl->ActivateSelectionListL();
+	}
+
+void CCnvMainForm::CmdSetUnitL()
+	{
+	switch ( IdOfFocusControl() )
+		{
+		case EConverterUnit1Popup:
+			{
+			iUnit1PopupCtrl->ActivateSelectionListL();							
+			break;
+			}
+
+		case EConverterUnit2Popup:
+			{
+			iUnit2PopupCtrl->ActivateSelectionListL();
+			break;
+			}
+
+		default:
+			{
+			break;
+			}
+		}
+	}
+
+void CCnvMainForm::LoadStateL()
+	{
+	RFileReadStream in;
+	
+		TFileName filePath;
+		TBuf<1> tempDes;
+		TChar driveChar;
+    	User::LeaveIfError(iEikonEnv->FsSession().PrivatePath(filePath));
+    	iEikonEnv->FsSession().DriveToChar(KDefaultDrive, driveChar);
+    	tempDes.Append(driveChar);
+    	filePath.Insert(0,KDelimiter);
+    	filePath.Insert(0,tempDes);
+    	filePath.Append(KConverterFilename);
+  		
+		TInt err( in.Open( iEikonEnv->FsSession(), filePath,
+			EFileRead ) );
+	
+	if( !err )
+		{
+		TRAP( err, iModel->InternalizeL( in ) );
+		if( !err )
+			{
+			TRAP( err, iTypeCategory.SetCurrentValueIndex( in.ReadInt8L() ) );
+			}
+		in.Close();
+		}
+	}
+
+void CCnvMainForm::SaveState()
+	{
+	RFileWriteStream out;
+	
+		TFileName filePath;
+		TBuf<1> tempDes;
+		TChar driveChar;
+    	TRAPD(errd, iEikonEnv->FsSession().PrivatePath(filePath));
+    	iEikonEnv->FsSession().DriveToChar(KDefaultDrive, driveChar);
+    	tempDes.Append(driveChar);
+    	if(!errd)
+    	{
+    		
+    	filePath.Insert(0,KDelimiter);
+    	filePath.Insert(0,tempDes);
+    	filePath.Append(KConverterFilename);
+    	}
+    	
+		TInt err( out.Replace( iEikonEnv->FsSession(), filePath,
+			EFileWrite ) );
+	
+	if( !err )
+		{
+		TRAP( err, iModel->ExternalizeL( out ) );
+		if( !err )
+			{
+			TRAP( err, out.WriteInt8L( iTypeCategory.CurrentValueIndex() ) );
+			}
+		out.Close();
+		}
+
+	if( err && !iHasNotifiedDiscFull )
+		{
+		TRAP_IGNORE(iErrorUI->ShowGlobalErrorNoteL( err ) );
+		iHasNotifiedDiscFull = ETrue;
+		}
+	}
+
+void CCnvMainForm::SynchronousConversionL( TBool aShowRateInvalideNote )
+    {
+    // Don't report an "invalid value" error. Cancel conversion.
+    // if the field is empty (i.e. the user has used delete/backspace) etc.
+    if( EditorValueCausesHold( iLastUsedEditorId ) )
+        {
+        // if one Editor is blank, set the other to 0.
+        CEikFloatingPointEditor* editor =
+        		static_cast< CEikFloatingPointEditor* >( Control( iLastUsedEditorId ) );
+    	if( editor->TextLength() == 0 )
+    		{
+            if( iLastUsedEditorId == EConverterEditor1)
+            	{
+            	SetFloatEditorValueL( EConverterEditor2, 0.0 );
+            	}
+            if( iLastUsedEditorId == EConverterEditor2)
+            	{
+            	SetFloatEditorValueL( EConverterEditor1, 0.0 );
+            	}
+    		}
+        return;
+        }
+
+    if ( !IsVaildNumberEntered( iLastUsedEditorId ) )
+        {
+        ShowInvalidValueNoteL( iLastUsedEditorId );
+        }
+
+
+    // PrepareForFocusLossL leaves if the component is not able to
+    // parse the content. We trap it so that IsEditorValueValidL()
+    // can check and report the situation correctly.
+    TRAP_IGNORE( Control( iLastUsedEditorId )->PrepareForFocusLossL() );
+    TInt CurrentControlId( IdOfFocusControl() );
+    if( CurrentControlId == EConverterUnit1Popup )
+    	{
+    	IsEditorValueValidL( EConverterEditor1 );
+    	}
+    else if (CurrentControlId == EConverterUnit2Popup)
+    	{
+    	IsEditorValueValidL( EConverterEditor2 );
+    	}
+    else if (CurrentControlId == EConverterEditor2 )
+        	{
+        	if ( !IsVaildNumberEntered( EConverterEditor2 ) )
+        		{
+        		iLastUsedEditorId = CurrentControlId;
+        		ShowInvalidValueNoteL( EConverterEditor2 );
+        		}
+        	}
+    else if (CurrentControlId == EConverterEditor1 )
+        	{
+        	if ( !IsVaildNumberEntered( EConverterEditor1 ) )
+        		{
+        		iLastUsedEditorId = CurrentControlId;
+        		ShowInvalidValueNoteL( EConverterEditor1 );
+        		}
+        	}
+    TReal result( 0.0 );
+
+    // send an argument to notify the AreRatesValidL() display a note dialog or not
+    if (IsEditorValueValidL(iLastUsedEditorId))
+		{
+		if (AreRatesValidL(aShowRateInvalideNote))
+			{
+			TReal amount(FloatingPointEditorValue(iLastUsedEditorId));
+			TUint unit1(iUnit1Category.CurrentValueIndex());
+			TUint unit2(iUnit2Category.CurrentValueIndex());
+
+			//        RAPD( ignored, Control( iLastUsedEditorId )->PrepareForFocusLossL() );
+
+
+			// do not reset the touch UI to standby state
+			// CCoeEnv::Static()->SyncNotifyFocusObserversOfChangeInFocus();
+
+
+			// Do the calculation and change the value for the related edit field      
+			ValueCalculationL(unit1, unit2, amount);
+
+			CEikFloatingPointEditor* editor =
+					static_cast<CEikFloatingPointEditor*> (Control(
+							iLastUsedEditorId));
+			TBuf<KEditorTextMaxLength> editorText;
+			editor->GetText(editorText);
+
+			// Use local value for different area
+			TBuf<1> localeZero;
+			localeZero.AppendNum(0);
+			AknTextUtils::LanguageSpecificNumberConversion(localeZero);
+			if (editorText.Length() > 1 && editorText[0] == localeZero[0])
+				{
+				TCursorSelection sel = editor->Selection();
+				TInt removedZeroes = 0;
+				// remove all leading zeroes
+				while (editorText.Length() > 0 && editorText[0]
+						== localeZero[0])
+					{
+					editorText.Delete(0, 1);
+					++removedZeroes;
+					}
+				// if too many zeroes removed, insert one.
+				TLocale locale;
+				if (editorText.Length() == 0 || TChar(editorText[0])
+						== locale.DecimalSeparator())
+					{
+					editorText.Insert(0, localeZero);
+					--removedZeroes;
+					}
+				editor->SetTextL(&editorText);
+
+				// adjust the selection accroding to removed zeroes
+				TInt anchor =
+						(sel.iAnchorPos - removedZeroes > 0) ? sel.iAnchorPos
+								- removedZeroes : 0;
+				TInt cursor =
+						(sel.iCursorPos - removedZeroes > 0) ? sel.iCursorPos
+								- removedZeroes : 0;
+				editor->SetSelectionL(cursor, anchor);
+            
+            if ( !IsVaildNumberEntered( iLastUsedEditorId ) )
+                   {
+                   ShowInvalidValueNoteL( iLastUsedEditorId );
+                   }
+				// notify the touch window
+				editor->SetCursorPosL(cursor, ETrue);
+				editor->DrawNow();
+				}
+			}
+		}
+    }
+
+void CCnvMainForm::AsynchronousConversion()
+	{
+	CancelConversion();
+	TCallBack cb( TimerCallback, this );
+	iConversionTimer->Start( 750000, 0, cb );
+	}
+
+void CCnvMainForm::CancelConversion()
+	{
+	iConversionTimer->Cancel();
+	}
+
+TInt CCnvMainForm::TimerCallback( TAny* aMainForm )
+	{
+
+	CCnvMainForm* form = reinterpret_cast< CCnvMainForm* >( aMainForm );
+
+	TRAP_IGNORE(form->SynchronousConversionL() );
+
+	form->CancelConversion();
+
+	return KErrNone;
+	}
+
+
+
+// ----------------------------------------------------
+// CCnvMainForm::OfferKeyEventL
+// Keyevent process.
+// ----------------------------------------------------
+//
+TKeyResponse CCnvMainForm::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+										  TEventCode aType)
+	{
+
+	if ( !IsFocused() )
+	{
+	   if (aKeyEvent.iCode == EKeyEscape)
+		   {
+		   return CAknForm::OfferKeyEventL( aKeyEvent, aType );
+		   }
+		return EKeyWasNotConsumed;
+	}
+	
+	TInt controlId( IdOfFocusControl() );
+
+	TBool hashKeyPressed = EFalse;
+  
+    // Use decimalChar instead of 46
+    TLocale locale;
+    TChar decimalChar = locale.DecimalSeparator();
+    if ( aKeyEvent.iScanCode == EStdKeyHash || decimalChar == TChar( aKeyEvent.iCode ) )
+        { 
+        hashKeyPressed = ETrue;
+        }
+		
+	if( hashKeyPressed )
+		{
+            // If inputting through VKB or HWR, the event can be done only when aType is equal to EEventKey.
+            // Besides, only when inputting the dot in VKB or HWR, aKeyEvent.iScanCode is equal to decimalChar.
+            TBool VKBdotKeyPressed = EFalse; 
+            if ( ( aKeyEvent.iScanCode == decimalChar ) )
+            {
+                VKBdotKeyPressed = ETrue;
+            }
+            if ( ( aType == EEventKey) && ( !VKBdotKeyPressed ) )
+			{
+				return EKeyWasConsumed;
+			}
+			else if( aType == EEventKeyUp)
+			{
+				TKeyEvent keyevent( aKeyEvent );
+				aType = EEventKey;
+                keyevent.iCode = decimalChar;
+				keyevent.iModifiers = 0;
+				keyevent.iScanCode = 0;
+				keyevent.iRepeats = 0;
+				return  static_cast< CEikFloatingPointEditor* >( Control( controlId ) )
+				->OfferKeyEventL(keyevent,aType);
+			}
+			else
+			{//
+			}
+		}
+	
+	//Not a key event this case handles the menu and exit keys 
+	//when an invalid value is entered in the amount field
+	if(aType == EEventKeyDown) 
+		{
+		if( ( EConverterEditor1 == controlId )||
+			( EConverterEditor2 == controlId ) )
+			{
+
+			if( (aKeyEvent.iScanCode == EStdKeyDevice0) ||//menu Key
+				(aKeyEvent.iScanCode == EStdKeyDevice1) )//Exit key
+				{
+				if( EditorValueCausesHold( controlId ) ||
+					!IsVaildNumberEntered( controlId ) )
+					{
+					SetFloatEditorValueL( controlId, 0.0);
+					}
+				//return EKeyWasNotConsumed;
+				}
+			}
+		}
+
+    if ( aType != EEventKey )
+        {
+        // Return EKeyWasNotConsumed if OfferKeyEventL() does not handle any event.	
+        return EKeyWasNotConsumed;
+        } 	
+
+	if( ( EConverterEditor1 == controlId )||
+		( EConverterEditor2 == controlId ) )
+		{	
+		//Just to see that -9E-99 doesnt appear when an invalid number is editor is 
+		//entered in the editor		
+
+		if(aKeyEvent.iScanCode == EStdKeyUpArrow ||
+			aKeyEvent.iScanCode == EStdKeyDownArrow )
+			{
+			CancelConversion();
+			if( EditorValueCausesHold( controlId ) )
+				{
+				SetFloatEditorValueL( controlId, 0.0);
+				}
+			if(	!IsVaildNumberEntered( controlId ) )
+				{
+				ShowInvalidValueNoteL( controlId );
+				}		
+			}
+
+		iLastUsedEditorId = controlId;
+
+		//For arrow keys asynchronous conversion not required
+		// if (iActiveEditorChanged)
+		// {
+		/*if( ( aKeyEvent.iScanCode != EStdKeyRightArrow )&&
+		( aKeyEvent.iScanCode != EStdKeyLeftArrow )&&
+		( aKeyEvent.iScanCode != EStdKeyUpArrow )&&
+		( aKeyEvent.iScanCode != EStdKeyDownArrow )&&
+		( isEditKey == EFalse ) )
+		{
+		AsynchronousConversion();			
+		}*/
+		//}
+
+		//iActiveEditorChanged = ETrue;
+
+		}
+	return CAknForm::OfferKeyEventL(aKeyEvent, aType);
+
+	}
+
+
+// ----------------------------------------------------
+// CCnvMainForm::IsVaildNumberEntered
+// Checks if a valid number is entered in the editor field and returns
+// ETrue if a vaild number is entered and
+// EFalse if an invalid number is entered
+// ----------------------------------------------------
+//
+
+TBool CCnvMainForm::IsVaildNumberEntered( TInt aEditorId )
+    {
+    CEikFloatingPointEditor* editor =
+        static_cast< CEikFloatingPointEditor* >( Control( aEditorId ) );
+
+    if ( editor->TextLength() == 0 )
+        {
+        return EFalse;
+        }	
+
+    TReal real;
+    CAknNumericEdwin::TValidationStatus validationStatus = editor->GetValueAsReal( real );
+
+    // The enter number is not valid if GetValueAsReal function's return value is not EValueValid 
+    if ( validationStatus != CAknNumericEdwin::EValueValid /*&& validationStatus != CAknNumericEdwin::EValueTooLarge*/ )
+        {
+        return EFalse;
+        }
+    return ETrue;
+    }
+
+
+
+// ----------------------------------------------------
+// CCnvMainForm::HandleEdwinEventL
+// Checks the Navigation events on the editor 
+// ----------------------------------------------------
+//
+
+void CCnvMainForm::HandleEdwinEventL(CEikEdwin* /*aEdwin*/,TEdwinEvent aEventType)
+	{
+	if(EEventNavigation == aEventType)
+		{
+		isEdwinNavigated = ETrue;
+		}
+	 if( aEventType == EEventTextUpdate )
+			{
+			isEdwinUpdateText = ETrue;
+			}
+	
+	}
+
+// ----------------------------------------------------
+// CCnvMainForm::IsDigit
+// Converts the digit from any digit mode (devangiri or arabic) 
+// to western digit and checks whether it is a valid digit or not.
+// ----------------------------------------------------
+//
+TBool CCnvMainForm::IsDigit(TUint aChar)
+    {
+    TBuf<1> digit;
+    digit.Append(aChar);
+    
+    AknTextUtils::ConvertDigitsTo(digit , EDigitTypeWestern);
+    
+    TChar ch = digit[0];
+    return ch.IsDigit();
+    }
+    
+// ----------------------------------------------------
+// CCnvMainForm::PrepareForFocusTransitionL
+// The Uikon framework calls this function immediately before focus move.
+// ----------------------------------------------------
+//    
+void CCnvMainForm::PrepareForFocusTransitionL() 
+    {
+    TInt controlId( IdOfFocusControl() );
+    if ( ( EConverterEditor1 == controlId ) || ( EConverterEditor2 == controlId ) )
+        {
+
+        // record the last use editor id
+        iLastUsedEditorId = controlId;
+        CancelConversion();
+        if ( EditorValueCausesHold( controlId ) )
+            {
+            SetFloatEditorValueL( controlId, 0.0 );
+            }
+
+        // Delete the radix point when there is no number behind it.
+        else if ( IsVaildNumberEntered( controlId ) )
+            {
+            CEikFloatingPointEditor* editor =
+                static_cast<CEikFloatingPointEditor*> ( Control( controlId ) ); 
+            TBuf<KEditorTextMaxLength> editorText;
+            editor->GetText( editorText );
+            TLocale locale;
+            TInt editorLength = editorText.Length();
+
+            // Check if the last character is radix point.
+            if ( editorText[ editorLength - 1 ] == locale.DecimalSeparator() )
+                {
+                editorText.Delete( editorLength - 1, 1 );
+                editor->SetTextL( &editorText );
+                }
+            }
+        }
+    }
+
+// ----------------------------------------------------
+// CCnvMainForm::ValueCalculation
+// Do the calculation and change the value for the related edit field
+// ----------------------------------------------------
+//        
+void CCnvMainForm::ValueCalculationL( TUint aUnit1Popup, TUint aUnit2Popup, TReal aMount )
+    {
+    TReal result( 0.0 );
+    // Use "LastUnit1" and "LastUnit2" to insure that the second amount don't change if the last used editor 
+    // is the second and the category's units do not change.
+    static TInt LastUnit1 = -1;
+    static TInt LastUnit2 = -1;
+    
+    // According to the UI Spec:
+    // 1. If the first conversion unit field is changed, a new conversion is calculated to the 
+    // second amount field of units, or vice versa.
+    // 2. If the first edit field is changed, a new conversion is calculated to the second 
+    // edit field, or vice versa.
+    if ( iLastUsedEditorId == EConverterEditor1 )
+        {
+        //the first unit is changed
+        if ( ( ( IdOfFocusControl() != EConverterEditor1 ) && ( LastUnit1 != aUnit1Popup ) )
+         || ( IdOfFocusControl() == EConverterTypePopup ) )
+            {
+            aMount = FloatingPointEditorValue( EConverterEditor1 );
+            result = iUnit1Category.Convert( aUnit1Popup, aUnit2Popup, aMount );
+            SetFloatEditorValueL( EConverterEditor2, result );
+            }
+        //the second unit is changed
+        else if ( ( IdOfFocusControl() != EConverterEditor1 ) && ( LastUnit2 != aUnit2Popup ) )
+            {
+            aMount = FloatingPointEditorValue( EConverterEditor2 );
+            result = iUnit1Category.Convert( aUnit2Popup, aUnit1Popup, aMount );
+            SetFloatEditorValueL( EConverterEditor1, result );           	
+            }
+        //the first amount field is changed
+        else
+            {        
+            result = iUnit1Category.Convert( aUnit1Popup, aUnit2Popup, aMount );
+            SetFloatEditorValueL( EConverterEditor2, result );
+            }
+        }
+    else
+        {
+        //the first unit is changed
+        if ( ( ( IdOfFocusControl() != EConverterEditor2 ) && ( LastUnit1 != aUnit1Popup ) )
+           || ( IdOfFocusControl() == EConverterTypePopup ))
+            {
+            aMount = FloatingPointEditorValue( EConverterEditor1 );
+            result = iUnit1Category.Convert( aUnit1Popup, aUnit2Popup, aMount );
+            SetFloatEditorValueL( EConverterEditor2, result );
+            }
+        //the second unit is changed
+        else if ( ( IdOfFocusControl() != EConverterEditor2 ) && ( LastUnit2 != aUnit2Popup ) )
+        	{
+            aMount = FloatingPointEditorValue( EConverterEditor2 );
+            result = iUnit1Category.Convert( aUnit2Popup, aUnit1Popup, aMount );
+            SetFloatEditorValueL( EConverterEditor1, result );           	
+        	}
+        //the second amount field is changed
+        else
+            {
+            result = iUnit1Category.Convert( aUnit2Popup, aUnit1Popup, aMount );
+            SetFloatEditorValueL( EConverterEditor1, result );
+            } 
+        }
+
+    // record units of the category at this time.
+    LastUnit1 = aUnit1Popup;
+    LastUnit2 = aUnit2Popup;	
+    }
+//End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvMainForm.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,395 @@
+/*
+* Copyright (c) 2002 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:  
+*     An AVKON form class containing popup fields and floating point editors.
+*     Implements the 'Main State' of the application.
+*
+*/
+
+
+
+#ifndef __CCNVMAINFORM_H__
+#define __CCNVMAINFORM_H__
+
+// INCLUDES
+#include <AknForm.h>
+#include <TCnvCategory.h>
+
+//Select Edwin
+#include <eikedwob.h>
+
+
+// FORWARD DECLARATIONS
+class CCnvConverter;
+class CAknPopupField;
+class CErrorUI;
+
+// CLASS DEFINITION
+/**
+* An AVKON form class containing popup fields and floating point editors.
+* Implements the 'Main State' of the application.
+*/
+class CCnvMainForm : public CAknForm , public MEikEdwinObserver
+	{
+
+	public: // constructors and destructor
+
+		/**
+		* Default constructor.
+		*/
+		CCnvMainForm( TBool &aAlreadyDead );
+
+		/**
+		* Destructor.
+		*/
+		~CCnvMainForm();
+
+		/**
+		* 2nd phase constructor.
+		*/
+		void ConstructL();
+
+	private: // constructors
+
+		/**
+		* Default constructor. Not implemented.
+		*/
+		CCnvMainForm();
+
+	public: // from CCoeControl
+
+		/**
+		* Specifies the help context for this form.
+		* @param aContext the context IDs are placed here
+		*/
+		void GetHelpContext( TCoeHelpContext& aContext ) const;
+
+	public: // from MEikCommandObserver
+
+		/**
+		* Handles menu commands.
+		* @param aCommandId Command identifier.
+		*/
+		void ProcessCommandL( TInt aCommandId );
+
+	public:	// from MEikDialogPageObserver
+
+		/**
+		* Takes any action required when the current line is
+		* changed to aControlId.
+		* @param aControlId Control identifier.
+		*/
+		void LineChangedL( TInt aControlId );
+
+	public:	// from MEikMenuObserver
+
+		/**
+		* Dynamically initialises a menu pane. The Uikon framework calls this
+		* function, immediately before the menu pane is activated.
+		* @param aResourceId Resource ID identifying a menu pane to initialise
+		* @param aMenuPane The in-memory representation of the menu pane.
+		*/
+		void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+	protected: // from MCoeControlObserver
+
+		/**
+		* Handles an event originating from one of the form's controls.
+		* @param aControl The control that reported the event.
+		* @param aEventType The type of the reported event.
+		*/
+		void HandleControlEventL( CCoeControl* aControl,
+			TCoeEvent aEventType );
+
+	protected: // from CAknForm
+
+		/**
+		* Saves form popup field states to a file (not implemented, yet).
+		* @return ETrue if the editable state can be left
+		*         (always in this case).
+		*/
+		TBool SaveFormData();
+
+        /**
+        * Deal with that the field is empty,when move focus to other field.
+        * The Uikon framework calls this function,immediately before focus move. 
+        */
+        void PrepareForFocusTransitionL();
+	protected: // from CEikDialog
+
+		/**
+		* Tests if it is OK to exit the dialog.
+		* @param aButtonId The ID of the button that was activated.
+		* @return ETrue to validate and exit the dialog,
+		*         EFalse to keep the dialog active.
+		*/
+		TBool OkToExitL( TInt aButtonId );
+
+		/**
+		* Pre-layout dialog initialisation.
+		*/
+		void PreLayoutDynInitL();
+
+	private: // new methods
+		/**
+		* returns ETrue if the the character is an integer
+		*/
+		TBool IsDigit(TUint aChar);
+
+		/**
+		* Checks if a form control has REALLY changed (uses history knowledge)
+		* Form controls report bogus state changed events, this is used to
+		* filter them out.
+		* @param controlId Form ID of the control to be checked
+		* @return ETrue if the specified control's state has changed
+		*/
+		TBool HasReallyChanged( TInt controlId );
+
+		/**
+		* Initialised change history (for HasReallyChanged)
+		*/
+		void InitialiseChangeHistory();
+
+		/**
+		* Called when the user has changed
+		* the unit type popup field selection.
+		*/
+		void HandleCategoryChangedL();
+
+		/**
+		* Called when the user has changed
+		* either of the unit popup field selections.
+		*/
+		void HandleUnitChangedL();
+
+		/**
+		* Checks if the unit rates (factors) are defined in the model
+		* for the currently selected unit type.
+		* @param aShowNote If ETrue "rates missing note" is shown, if
+		*                  rates are not valid.
+		* @return ETrue if rates are valid, EFalse otherwise.
+		*/
+		TBool AreRatesValidL(TBool aShowNote);
+
+		/**
+		* Checks if a floating point editor's value is within allowable range.
+		* @param aEditorId Resource ID of the editor control to be checked.
+		* @return ETrue If value is in range, EFalse otherwise.
+		*/
+		TBool IsEditorValueValidL( TUint aEditorId );
+
+		/**
+		* Checks if a floating point editor's value is such that no conversion
+		* should be made and no "invalid value" error should be reported.
+		* @param aEditorId Resource ID of the editor control to be checked.
+		* @return ETrue Indicates that conversion should not proceed.
+		*/
+		TBool EditorValueCausesHold( TUint aEditorId );
+
+		/**
+		* Handles the ECmdRates command. Launches the Rates Form.
+		*/
+		void CmdRatesL();
+
+		/**
+		* Handles the ECmdSetType command.
+		*/
+		void CmdSetTypeL();
+
+		/**
+		* Handles the ECmdSetUnit command.
+		*/
+		void CmdSetUnitL();
+
+		/**
+		* Tells the model to load its state from a file.
+		*/
+		void LoadStateL();
+
+		/**
+		* Tells the model to save its state to a file.
+		* Displays an error note if there is not enough space in permanent
+		* storage.
+		*/
+		void SaveState();
+
+		/**
+		* Calculates and displays the unit conversion immediately.
+		*/
+		void SynchronousConversionL( TBool aShowRateInvalidNote = ETrue );
+
+		/**
+		* Calculates and displays the unit conversion after 0.75 seconds.
+		*/
+		void AsynchronousConversion();
+
+		/**
+		* Cancels a queued asynchronous conversion request, if any.
+		*/
+		void CancelConversion();
+
+		/**
+		* Called by the conversion timer after the 0.75 second timeout
+		* has exipred. Calls SynchronousConversion() to do
+		* the actual conversion.
+		* @param aMainForm Pointer to the CCnvMainForm instance.
+		*/
+		static TInt TimerCallback( TAny* aMainForm );
+
+		/**
+		* Shows an error note for invalid value situation
+		* @param aEditorId Id of the editor that holds the invalid value
+		*/
+		void ShowInvalidValueNoteL(TInt aEditorId);
+
+		/**
+		* From CCoeControl processing of a key event
+		* @param aKeyEvent : Key event information
+		*        aType : EEventKeyDown | EEventKey | EEventKeyUp
+		* @return : EKeyWasConsumed if keyevent is consumed.   
+		*           EKeyWasNotConsumed if keyevent is not consumed.
+		* Handling of the keys is taken care for the editor fields
+		*/
+		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
+			TEventCode aType);
+
+		/**
+		*Checks if the number entered in the editor field is a valid number
+		*@param aEditroId : Id of the editor that needs to be evaluated
+		*@return : EFalse if the editor value is not a vaild number	
+		*		 : ETrue if the number is a valid number
+		*/
+		TBool IsVaildNumberEntered(TInt aEditorId);
+
+		/**
+		*From MEikEdwinObserver. handles the Navigation on the editor control. 
+		*/
+		void HandleEdwinEventL(CEikEdwin* aEdwin,TEdwinEvent aEventType);
+		
+		/**
+		*Do the calculation and change the value for the related edit field
+		*/
+		void ValueCalculationL( TUint aUnit1Popup, TUint aUnit2Popup, TReal aMount );
+
+	private: // data
+
+		/**
+		* Pointer to our model. Owned.
+		*/
+		CCnvConverter* iModel;
+
+		/**
+		* Model accessor for unit types.
+		*/
+		TCnvCategory iTypeCategory;
+
+		/**
+		* Model accessor for source units.
+		*/
+		TCnvCategory iUnit1Category;
+
+		/**
+		* Model accessor for destination units.
+		*/
+		TCnvCategory iUnit2Category;
+
+		/**
+		* Pointer to the Unit Type popup field. Not owned.
+		*/
+		CAknPopupField* iTypePopupCtrl;
+
+		/**
+		* Pointer to the source Unit popup field. Not owned.
+		*/
+		CAknPopupField* iUnit1PopupCtrl;
+
+		/**
+		* Pointer to the destination Unit popup field. Not owned.
+		*/
+		CAknPopupField* iUnit2PopupCtrl;
+
+		/**
+		* Id of the currency category in the model.
+		*/
+		TUint iCurrencyCategoryId;
+
+		/**
+		* ETrue if this instance is fully constructed, EFalse otherwise.
+		*/
+		TBool iIsFullyConstructed;
+
+		/**
+		* ETrue if the user has already been notified that the disk is full.
+		*/
+		TBool iHasNotifiedDiscFull;
+
+		/**
+		* ETrue if the iLastUsedEditorId has changed after the focus
+		* has entered the editor.
+		*/
+		TBool iActiveEditorChanged;
+
+		/**
+		* Pointer to the timer used for asynchronous conversions
+		* (which need a0.75 second delay..)
+		*/
+		CPeriodic* iConversionTimer;
+
+		/**
+		* The id of the unit amount field that the user has modified last.
+		*/
+		TInt iLastUsedEditorId;
+
+		/**
+		* The id of the line that was last active in the form.
+		*/
+		TInt iLastActiveEditorLine;
+
+		/**
+		* The previous type selection.
+		*/
+		TInt iHistoryTypeCategory;
+
+		/**
+		* The previous source unit selection.
+		*/
+		TInt iHistoryUnit1Category;
+
+		/**
+		* The previous destination unit selection.
+		*/
+		TInt iHistoryUnit2Category;
+
+		/**
+		* Pointer to the Error UI object. Owned
+		* Used for displaying the Disk Full error message.
+		*/
+		CErrorUI* iErrorUI;
+
+		/**
+		* Reference to a flag in this form's owner.
+		* Used to indicate that we have been deleted by someone
+		* (could be the app framework.. <sigh>)
+		*/
+		TBool& iAlreadyDead;	
+
+		TKeyEvent iKeyEvent;
+
+		TBool isEdwinNavigated;
+		TBool isEdwinUpdateText;
+
+	};
+
+#endif // __CCNVMAINFORM_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvRatesForm.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,844 @@
+/*
+* Copyright (c) 2002 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:  
+*      This is the implementation of the class defined in CCnvRatesForm.h
+*
+*/
+
+
+
+#include <eikcapc.h>
+#include <eikfpne.h>
+#include <AknQueryDialog.h>
+#include <aknnotewrappers.h>
+#include <akntitle.h>
+#include <StringLoader.h>
+#include <featmgr.h>
+#include <eikmenup.h>
+
+#include <TCnvCategory.h>
+#include "CCnvRatesForm.h"
+#include "CCnvApplication.h"
+
+#include <csxhelp/cnv.hlp.hrh>
+
+#include <Converter.rsg>
+#include "Converter.hrh"
+
+#include <e32math.h> //Header to be included for getting CEikEdwin Text to a number
+
+//CONSTANTS for Max Number of Added Currency
+const TInt KMaxNumberAddCurrency = 40;
+
+CCnvRatesForm::CCnvRatesForm( TBool* aWantsRelaunch, TBool* aShouldExit,
+							 TBool* aModelChanged, TCnvCategory& aCategory ) 
+							 : iWantsRelaunch( aWantsRelaunch ), iShouldExit( aShouldExit ),
+							 iModelChanged( aModelChanged ), iCategory( aCategory ),
+							 iLastUsedEditorId(-1)
+	{
+	}
+
+CCnvRatesForm::CCnvRatesForm()
+	{
+
+	//Member variable set to False in the Constructor
+	iEKeyOk = EFalse;
+	}
+
+CCnvRatesForm::~CCnvRatesForm()
+	{
+	iFormIdMapArray.Close();
+	iFormIdEdwinMapArray.Close();
+	SetDefaultTitle();
+	}
+
+void CCnvRatesForm::ConstructL()
+	{
+	// Use base class to construct menubar
+	CAknDialog::ConstructL( R_CNV_RATESFORM_MENUBAR );
+    iCategory.CreateTempUnitArrayForRestore();
+    iCategory.GetDefaultUnits( iSrcUnitIndexForRestore , iDesUnitIndexForRestore );	
+     iHistoryBaseUnit = iCategory.BaseUnit();
+	}
+
+void CCnvRatesForm::GetHelpContext( TCoeHelpContext& aContext ) const
+	{
+	aContext.iMajor = KUidCnv;
+	aContext.iContext = KCNV_HLP_RATES;
+	}
+
+void CCnvRatesForm::ProcessCommandL( TInt aCommandId )
+	{
+	// Base class handles EAknFormCmdSave among the other things
+	CAknForm::ProcessCommandL( aCommandId );
+
+	switch ( aCommandId )
+		{
+		case ECmdAddCurrency:
+			{			
+			AddNewCurrencyL();
+			break;
+			} 
+		case ECmdDeleteCurrency:
+			{
+			DeleteCurrencyL();
+			break;
+			}
+		case ECmdChangeCurrencyName:
+			{
+			CmdChangeCurrencyNameL();
+			break;
+			}
+		case ECmdSetAsBaseCurrency:
+			{
+			CmdSetAsBaseCurrencyL();
+			break;
+			}
+		case EAknCmdHelp:
+			{
+			iEikonEnv->EikAppUi()->HandleCommandL( EAknCmdHelp );
+			break;
+			}
+		case EEikCmdExit:
+			{
+			*iShouldExit = ETrue;
+			TryExitL( EAknSoftkeyBack );
+			break;
+			}
+		default:
+			{
+			break;
+			}
+		}
+	}
+
+// Takes any action required when the current line is changed to aControlId.
+void CCnvRatesForm::LineChangedL( TInt aControlId )
+	{
+
+	CEikFloatingPointEditor* editor =
+		static_cast< CEikFloatingPointEditor* >( Control( aControlId ) );
+
+	//editor->ClearSelectionL();
+    editor->SetCursorPosL( editor->Text()->DocumentLength(), ETrue );
+
+    if ( iLastUsedEditorId > 0 )
+        {
+        editor =static_cast<CEikFloatingPointEditor*> ( Control( iLastUsedEditorId ) );  
+        TBuf<KEditorTextMaxLength> editorText;
+        editor->GetText( editorText );
+        
+        // Use local value for different area
+        TBuf<1> localeZero;
+        localeZero.AppendNum( 0 );
+        AknTextUtils::LanguageSpecificNumberConversion( localeZero ); 
+        if ( editorText.Length() > 1 && editorText[0] == localeZero[0] )
+            {
+            // remove all leading zeroes
+            while ( editorText.Length() > 0 && editorText[0] == localeZero[0] )
+                {
+                editorText.Delete( 0, 1 );
+                }
+            // if too many zeroes removed, insert one.
+            TLocale locale;
+            if ( editorText.Length() == 0 ||
+                TChar( editorText[0] ) == locale.DecimalSeparator() )
+                {
+                editorText.Insert( 0, localeZero );
+                }
+            editor->SetTextL( &editorText );
+            editor->DrawDeferred();
+            }
+        }
+    iLastUsedEditorId = aControlId;
+	}
+
+void CCnvRatesForm::DoNotSaveFormDataL()
+	{
+	iCategory.RestoreUnitArray();
+	iCategory.SetDefaultUnits( iSrcUnitIndexForRestore , iDesUnitIndexForRestore );
+	iCategory.SetBaseUnit( iHistoryBaseUnit );
+	}
+
+// Saves values from form fields back to the model
+TBool CCnvRatesForm::SaveFormDataL()
+	{
+	SetEditableL( ETrue );
+
+	const MDesCArray* names = iCategory.MdcArray();
+	TInt len( names->MdcaCount() );
+	TInt formIdIndex = 0;
+	for( TInt i = 0; i < len; i ++ )
+		{
+
+		if( i != iCategory.BaseUnit() )
+			{
+			TInt formId = iFormIdMapArray[formIdIndex];
+			//A seperate formIdIndex is maintained for the form as iFormIdMapArray
+			//does not have an index for Base Unit
+			formIdIndex++;
+
+			TReal value = 0; //Contains the value of the editor
+
+			if(KErrNotFound != iFormIdEdwinMapArray.Find(formId))
+				{
+				TBuf<32> edText;
+				GetEdwinText( edText, formId );				
+				TInt64 power = 1;
+				TBool fraction = EFalse;
+				TChar ch;
+
+				for(TInt i = 0; i < edText.Length(); i++)
+					{
+					ch = edText[i];
+
+					if(ch == '+')
+						{
+						if( i != 0 )
+							{
+							value = 0;
+							break;
+							}
+						}
+
+					else if(ch == '.')
+						{
+						fraction = ETrue;
+						}
+					else if(IsDigit(ch))
+						{
+						value = value * 10 + ch.GetNumericValue();
+						if(fraction)
+							{
+							power = power * 10;
+							}
+						}
+					}
+				value = value / power;				
+
+				}
+			else
+				{
+				value = FloatEditorValue( formId  );
+				}
+			iCategory.SetUnitFactor( i, /*FloatEditorValue( formId  )*/value );
+			}		
+		}
+
+	*iModelChanged = ETrue;
+	return ETrue;
+	}
+
+// Sets the focus to the topmost line of the form when the dialog is activated
+void CCnvRatesForm::SetInitialCurrentLine()
+	{
+	CEikDialog::SetInitialCurrentLine();
+	TRAP_IGNORE(TryChangeFocusToL( IdOfFocusControl() ) );	
+	}
+
+void CCnvRatesForm::PreLayoutDynInitL()
+	{
+	SetTitleL( ETrue );
+
+	const MDesCArray* currencies = iCategory.MdcArray();
+	TInt len( currencies->MdcaCount() );
+
+	for( TInt i = 0; i < len; i++ )
+		{
+		if( i != iCategory.BaseUnit() )
+			{
+			// form controls don't like id = 0, so we need to do id += 1..
+			CCoeControl* control =
+				CreateLineByTypeL( currencies->MdcaPoint( i ),
+				ActivePageId(),
+				i + 1,
+				EEikCtFlPtEd,
+				NULL );
+			//Keep the id's of the form in an array so that deletion based on form ids is not a problem.
+			iFormIdMapArray.Append(i+1);
+			CEikFloatingPointEditor* editor =
+				static_cast< CEikFloatingPointEditor* >( control );
+			editor->ConstructL( 0, 9e99, 12 );	// 9e99 = max TReal
+			TReal value( iCategory.UnitFactor( i ) );
+			editor->SetValueL( &value );
+			}
+		}
+	}
+
+void CCnvRatesForm::CmdChangeCurrencyNameL()
+	{
+	// 16 is long enough, current edit window max length is 13
+	// (defined in R_CNV_UNITNAME_QUERY )
+	TBuf< 16 > newName;
+	TBool nameOk( EFalse );
+
+	TInt controlId = IdOfFocusControl();	
+	TInt index =  controlId - 1;
+
+	index = iFormIdMapArray.Find( controlId ); //get the index where the id i
+
+	TUint uintindex = index ;//To remove warnings
+
+	if( uintindex  >= iCategory.BaseUnit())
+		{
+		index++;
+		}
+	const MDesCArray* names = iCategory.MdcArray();
+	newName.Copy( names->MdcaPoint( index  ).Left( MAXCURRENCYNAMELENGTH ) );
+
+
+	TCurrencyType type = NewCurrencyNameDialogL( newName, nameOk );
+
+	if(nameOk)
+		{
+		iCategory.SetUnitName( index , newName , type);
+		Line( controlId )->SetCaptionL( newName );
+		Line( controlId )->DrawDeferred();
+		nameOk = ETrue;
+		*iModelChanged = ETrue;
+		}	
+	}
+
+
+void CCnvRatesForm::CmdSetAsBaseCurrencyL()
+	{
+	CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+
+	if( dlg->ExecuteLD( R_CNV_CONFIRMATION_QUERY ) )
+		{
+		// form controls don't like ID = 0, so IDs are unit id + 1;
+		TInt baseUnit;
+		TUint baseUnitIndex; //To remove warnings
+		//Get the current id of the form.
+		TInt currentFocusIndex = IdOfFocusControl();
+		//Find the id in the map array
+		baseUnit = iFormIdMapArray.Find(currentFocusIndex);
+		baseUnitIndex = baseUnit; //To remove warnings
+		//adjust the baseUnitIndxex to the index in the Currency Category array..
+		if( baseUnitIndex >= iCategory.BaseUnit())
+			{
+			baseUnit++;
+			}
+		iHistoryBaseUnit = baseUnit;
+		iCategory.SetBaseUnit( baseUnit );
+
+		// Reset all currency rates to 1
+		TInt len( iCategory.MdcArray()->MdcaCount() );
+		for( TInt i = 0; i < len; i++ )
+			{
+			iCategory.SetUnitFactor( i, 1.0 );
+			}
+
+		// Except the base unit factor is set to 1.0
+		iCategory.SetUnitFactor( baseUnit, 1.0 );
+
+		// We have to destroy and relaunch the form
+		*iWantsRelaunch = ETrue;
+		delete this;
+		}
+	}
+
+
+// Reset the title to default. Don't want a leave.
+// If it fails, it fails. For use in the destructor.
+void CCnvRatesForm::SetDefaultTitle()
+	{
+	 TRAP_IGNORE(SetTitleL( EFalse ) );
+	}
+
+void CCnvRatesForm::SetTitleL( TBool aNonDefault )
+	{
+	CAknTitlePane* title = static_cast< CAknTitlePane* >(
+		iEikonEnv->AppUiFactory()->StatusPane()->
+		ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+
+	if( aNonDefault )
+		{
+		TInt baseUnit = iCategory.BaseUnit();
+		const MDesCArray* currencies = iCategory.MdcArray();
+		TPtrC unitName = currencies->MdcaPoint( baseUnit );
+		// stuff it into the title text's placeholder
+		HBufC* titleText = StringLoader::LoadL( R_CNV_RATESFORM_TITLE,
+			unitName, iEikonEnv );
+		TPtr titleTextPtr = titleText->Des();
+		CleanupStack::PushL( titleText );
+		AknTextUtils::DisplayTextLanguageSpecificNumberConversion(titleTextPtr);
+		title->SetTextL( *titleText );
+		CleanupStack::PopAndDestroy( titleText ); // titleText
+		}
+	else
+		{
+		title->SetTextToDefaultL();
+		}
+	}	
+
+void CCnvRatesForm::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
+	{
+	//No delete option  for more than two currencies
+	const MDesCArray* names = iCategory.MdcArray();
+	TInt count = names->MdcaCount();
+
+	if (aResourceId == R_CNV_RATESFORM_MENUPANE)
+		{
+
+		if(count <= 2)
+			{
+			aMenuPane->SetItemDimmed(ECmdDeleteCurrency, ETrue);
+
+			}
+		else
+			{
+			aMenuPane->SetItemDimmed(ECmdDeleteCurrency, EFalse);
+			}
+		if(count >= KMaxNumberAddCurrency )
+			{
+			aMenuPane->SetItemDimmed(ECmdAddCurrency, ETrue);
+			}
+		else
+			{
+			aMenuPane->SetItemDimmed(ECmdAddCurrency, EFalse);
+			}
+		if (!FeatureManager::FeatureSupported(KFeatureIdHelp))
+			{
+			aMenuPane->SetItemDimmed(EAknCmdHelp, ETrue);
+			}
+		}
+	}
+//New methods which will imlement add and delete currency implementation
+void CCnvRatesForm::AddNewCurrencyL()
+	{	
+	//_LIT(KDefaultText,"Foreign");
+	//TBuf<16> newFieldPtr;
+	//newFieldPtr.Format(KDefaultText);
+	HBufC* foreignText = StringLoader::LoadLC( R_QTN_CNV_FOREIGN,iEikonEnv );
+	TBuf<16> newFieldPtr;
+	
+	newFieldPtr.Copy(foreignText->Left(MAXCURRENCYNAMELENGTH));
+	
+	TBool nameEntered(EFalse);
+	TCurrencyType type = 	NewCurrencyNameDialogL( newFieldPtr, nameEntered, ETrue );
+
+	TInt id = IdOfFocusControl(); //Get the focus controls id
+	TInt index = iFormIdMapArray.Find(id); //get the index where the id i
+	TInt indexOfCurrency = index;
+	TUint uintindex = indexOfCurrency;//To remove warnings
+
+	if( uintindex  >= iCategory.BaseUnit())
+		{
+		indexOfCurrency++;
+		}
+
+	if(nameEntered)//Dont add any field if the user cancels the dialog
+		{
+		TReal real = 1.0;
+
+		iCategory.AddNewCurrencyL( indexOfCurrency + 1, newFieldPtr, real, type);		
+
+		//TInt newItemId = 0;
+		TInt newItemId = iFormIdMapArray[0];
+
+		//Get the largest formId present now in the form...
+		for(TInt i = 0; i < iFormIdMapArray.Count() ; i++ )
+			{		
+			if( newItemId  < iFormIdMapArray[i])
+				newItemId = iFormIdMapArray[i];
+			}
+
+		newItemId++;
+
+		//Update the new FormId into the form id map array
+		if( index + 1 < iFormIdMapArray.Count() )
+			{
+			iFormIdMapArray.Insert(newItemId,index + 1 );
+			}
+		else
+			{
+			iFormIdMapArray.Append(newItemId);
+			}
+
+		//Update the arrray which holds the CEikEdwin ids...
+		iFormIdEdwinMapArray.Append(newItemId);
+
+
+        CCoeControl* control = CreateLineByTypeL(newFieldPtr, ActivePageId(),
+            newItemId , EEikCtFlPtEd, NULL ) ;
+        CEikEdwin* edwin = STATIC_CAST( CEikEdwin*, control );
+
+        CEikFloatingPointEditor* fpEditor = STATIC_CAST( 
+        CEikFloatingPointEditor*, control );
+        fpEditor->SetMinMax( 0, 9e99 );
+        edwin->ConstructL( EEikEdwinNoHorizScrolling | EEikEdwinResizable, 10, 12, 10 );
+        edwin->SetAknEditorNumericKeymap( EAknEditorConverterNumberModeKeymap );
+
+        edwin->SetAknEditorAllowedInputModes( EAknEditorNumericInputMode );
+
+        edwin->SetAknEditorInputMode( EAknEditorNumericInputMode );
+        edwin->SetAknEditorSpecialCharacterTable( 0 );
+
+        edwin->CreateTextViewL();
+        Line( newItemId )->ActivateL();
+
+        // Set the editor's value at last and use a number instead of the fixed character.
+        SetFloatEditorValueL( IdOfFocusControl(), 1 );
+
+		*iModelChanged = ETrue;
+		}	
+		CleanupStack::PopAndDestroy(); // foreignText HBufC
+	}
+
+
+void CCnvRatesForm::DeleteCurrencyL()
+	{
+
+
+	TInt LineForDeletion = IdOfFocusControl();
+
+	TInt indexOfCurrency = iFormIdMapArray.Find(LineForDeletion);
+	TUint index = indexOfCurrency; //To remove warnings
+
+
+	if( index >= iCategory.BaseUnit())
+		{
+		indexOfCurrency++;
+		}
+
+	const MDesCArray* names = iCategory.MdcArray();
+
+		TBuf<16> currentName;
+	currentName.Copy( names->MdcaPoint( indexOfCurrency ).Left( MAXCURRENCYNAMELENGTH ) );
+
+	HBufC* confirmDelete = StringLoader::LoadLC(
+		R_QTN_CNV_CONFIRM_DELETE,currentName);
+
+	CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+	dlg->SetPromptL( *confirmDelete);
+
+	if( dlg->ExecuteLD( R_CNV_CONFIRMATION_QUERY ) )
+		{	
+		SetFormFlag( EDeleting, ETrue );
+
+		if (LineForDeletion)
+			{
+			iCategory.DeleteCurrencyL( indexOfCurrency );
+			DeleteLine(LineForDeletion);
+			//SetFormFlag( EUnsavedEdit, ETrue );
+			TInt index = iFormIdMapArray.Find(LineForDeletion);
+			iFormIdMapArray.Remove(index);
+
+			if( index  == iFormIdMapArray.Count())
+				{
+				iLastUsedEditorId = iFormIdMapArray[index - 1];
+				}
+			else
+				{
+				iLastUsedEditorId = iFormIdMapArray[index];
+				}
+			}
+
+		DrawNow();
+		SetFormFlag( EDeleting, EFalse );
+		*iModelChanged = ETrue;
+		}
+	CleanupStack::PopAndDestroy();	// confirmDelete;
+	}
+
+//This function launches a dialog to get the new currency name.
+//Note can also be used for Rename Currency, but will be made use, afte the  raised for that has been fixed
+TCurrencyType  CCnvRatesForm::NewCurrencyNameDialogL( TDes& aField, TBool& aNameEntered,  TBool aIsAddNewCurrency )
+	{	
+	TBool nameOk( EFalse );	
+	TCurrencyType type = ENameChanged;
+  //TInt index = IdOfFocusControl() - 1;
+  TInt controlId = IdOfFocusControl();
+  TInt index = iFormIdMapArray.Find( controlId ); //get the index where the id i
+  TUint uintindex = index ;                    //To remove warnings
+    if ( uintindex  >= iCategory.BaseUnit() )     //get correct index
+        {
+        index++;
+        }
+
+	const MDesCArray* names = iCategory.MdcArray();
+	do
+		{
+		CAknTextQueryDialog* dlg =
+			new( ELeave ) CAknTextQueryDialog( aField );
+		CleanupStack::PushL(dlg);
+
+				if( dlg->ExecuteLD( R_CNV_UNITNAME_QUERY ) != EAknSoftkeyOk )
+					{
+					aNameEntered = EFalse;
+					CleanupStack::Pop(dlg);	// dlg
+					return type;
+					}
+		CleanupStack::Pop(dlg);	// dlg
+
+		// Search through all the names to see if the new name already exists
+		TInt len( names->MdcaCount() );
+		TBool nameExists( EFalse );
+        //Set the index larger than all when a new is added, make it compare with 
+        //all of the item to judge if the name is already used
+        if ( aIsAddNewCurrency )
+            {
+            index = len;
+            }
+		
+		for( TInt i = 0; i < len; i ++ )
+			{
+			if( names->MdcaPoint( i ).Compare( aField ) == 0 )
+				{
+                if ( i != index )
+                    {
+				    nameExists = ETrue;
+				    break;
+					}
+				}
+			}
+
+		if( nameExists )
+			{
+			// display error
+			HBufC* label = StringLoader::LoadLC(
+				R_QTN_FLDR_NAME_ALREADY_USED, aField );
+			CAknErrorNote* note = new( ELeave ) CAknErrorNote( ETrue );
+			note->ExecuteLD( *label );
+			CleanupStack::PopAndDestroy();	// label;
+			}
+		else
+			{
+			nameOk = ETrue;
+			}
+		}
+
+	while ( !nameOk );
+	
+	HBufC* homeText = StringLoader::LoadLC( R_QTN_CNV_HOME,iEikonEnv );	
+	HBufC* foreignText = StringLoader::LoadLC( R_QTN_CNV_FOREIGN,iEikonEnv );
+	TBuf<16> defaultTextPtr;
+	TBuf<16> homeTextPtr;
+	TInt equal;
+	
+	defaultTextPtr.Copy(foreignText->Left(MAXCURRENCYNAMELENGTH));
+	homeTextPtr.Copy(homeText->Left(MAXCURRENCYNAMELENGTH));
+	equal = defaultTextPtr.Compare(aField);
+	if(equal==0)
+		type = EForeign;
+	
+	equal = homeTextPtr.Compare(aField);
+	if(equal==0)
+		type = EHome;
+
+	aNameEntered = nameOk;
+	CleanupStack::PopAndDestroy(); // foreignText HBufC
+	CleanupStack::PopAndDestroy(); // HomeText HBufC		
+
+	return type;
+	}
+//
+//ShowInvalidValueNoteL(TInt aEditorId)
+//
+void CCnvRatesForm::ShowInvalidValueNoteL(TInt aEditorId, TBool aSetValue)
+	{
+	HBufC* label = iCoeEnv->AllocReadResourceLC(
+		R_CNV_MAINFORM_INVALIDVALUE );
+	CAknErrorNote* note = new( ELeave ) CAknErrorNote(ETrue);
+	note->ExecuteLD( *label );
+	CleanupStack::PopAndDestroy();	// label;
+	if ( aSetValue )
+		{
+		SetFloatEditorValueL( aEditorId, 0.0 ); 
+		}
+	}
+
+//
+//IsVaildNumberEntered(TInt aEditorId)
+//
+TBool CCnvRatesForm::IsVaildNumberEntered(TInt aEditorId)
+	{
+
+	CEikFloatingPointEditor* editor =
+		static_cast< CEikFloatingPointEditor* >( Control( aEditorId ) );
+
+	if( editor->TextLength() == 0 )
+		{
+		return EFalse;
+		}	
+
+	TReal real;
+	CAknNumericEdwin::TValidationStatus validationStatus = editor->GetValueAsReal(real);
+
+  // The enter number is not valid if GetValueAsReal function's return value is not EValueValid 
+	if( validationStatus != CAknNumericEdwin::EValueValid /* && validationStatus != CAknNumericEdwin::EValueTooLarge */ )
+		{
+		return EFalse;
+		}
+	return ETrue;
+
+	}
+
+
+TBool CCnvRatesForm::OkToExitL(TInt aButtonId)
+	{
+	//Check for validity of the rates entered
+	TInt aControlId( IdOfFocusControl() );			
+	if(!IsVaildNumberEntered(aControlId))
+		{
+		ShowInvalidValueNoteL(aControlId, ETrue );
+		}
+	//Check which one of the two buttons'Options' or 'MSK' is pressed
+	if (aButtonId == EAknSoftkeyOptions && iEKeyOk)
+		{
+		//Make the variable False
+		iEKeyOk = EFalse;
+		return EFalse;
+		}
+	else
+		// Call the Base Class OkToExitL()
+		return CAknForm::OkToExitL(aButtonId);
+
+	}
+//
+//OfferKeyEventL
+//
+TKeyResponse CCnvRatesForm::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
+{
+	
+	// Make the variable 'iEKeyOk' to True if and only if MSK is pressed.
+	if(aKeyEvent.iScanCode == EStdKeyDevice3 && aType == EEventKeyDown)
+		{
+		iEKeyOk = ETrue;
+		}
+	if(aKeyEvent.iScanCode == EStdKeyDevice0 && aType == EEventKeyDown && iEKeyOk)
+		{
+		iEKeyOk = EFalse;
+		}
+
+	
+	TInt controlId1( IdOfFocusControl() );
+	if(aType == EEventKeyDown)
+	{		
+		if((aKeyEvent.iScanCode == EStdKeyDevice0)
+		 ||(aKeyEvent.iScanCode == EStdKeyDevice1)||(aKeyEvent.iScanCode == EStdKeyDevice3) )
+			{			
+			if(!IsVaildNumberEntered(controlId1))
+				{				
+				iError=ETrue;
+				return EKeyWasConsumed;
+				}
+		   	 }
+	 }	
+			
+	if(aType == EEventKeyUp && iError)	
+	{
+		if((aKeyEvent.iScanCode == EStdKeyDevice0)
+		 ||(aKeyEvent.iScanCode == EStdKeyDevice1)||(aKeyEvent.iScanCode == EStdKeyDevice3))
+			{
+			ShowInvalidValueNoteL(controlId1, ETrue); 
+			iError = EFalse;
+			return EKeyWasConsumed;
+			}
+	}
+
+    // Return EKeyWasNotConsumed if OfferKeyEventL() does not handle any event.	
+    if ( aType != EEventKey )
+        {
+        return EKeyWasNotConsumed;
+        }
+
+    if ( ( aKeyEvent.iScanCode == EStdKeyDownArrow ) || ( aKeyEvent.iScanCode == EStdKeyUpArrow ) )
+        {			
+        TInt controlId( IdOfFocusControl() );			
+        if ( !IsVaildNumberEntered( controlId ) )
+            {
+            ShowInvalidValueNoteL( controlId, ETrue);
+            return EKeyWasConsumed;
+            }
+        }	
+    return CAknForm::OfferKeyEventL( aKeyEvent, aType );
+}
+
+// ----------------------------------------------------
+// CCnvRatesForm::IsDigit
+// Converts the digit from any digit mode (devangiri or arabic) 
+// to western digit and checks whether it is a valid digit or not.
+// ----------------------------------------------------
+//
+TBool CCnvRatesForm::IsDigit(TUint aChar)
+	{
+	TBuf<1> digit;
+	digit.Append(aChar);
+	
+	AknTextUtils::ConvertDigitsTo(digit , EDigitTypeWestern);
+	
+	TChar ch = digit[0];
+	return ch.IsDigit();
+	}
+
+
+// ----------------------------------------------------
+// CCnvRatesForm::PrepareForFocusTransitionL
+// Used for touch UI to display the invalid note if number 
+// is invalid
+// ----------------------------------------------------
+//
+void CCnvRatesForm::PrepareForFocusTransitionL()
+    {
+    // Check if touch is enabled or not
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        CAknForm::PrepareForFocusTransitionL();
+        return;
+        }
+
+    // Get the focus of the current control line
+    TInt controlId( IdOfFocusControl() );
+    // Check for validity of the rate entered
+    if (!IsVaildNumberEntered( controlId ) )
+        {
+         ShowInvalidValueNoteL(controlId, EFalse);
+        }
+
+    // Delete the radix point if it is excrescent
+    else
+        {
+        CEikFloatingPointEditor* editor = 
+           static_cast<CEikFloatingPointEditor*> ( Control( controlId ) );
+        TBuf< KEditorTextMaxLength > editorText;
+        editor->GetText( editorText );
+        TInt editorTextLength = editorText.Length();
+        TLocale local;
+        if ( editorText[ editorTextLength - 1 ] == local.DecimalSeparator() )
+            {
+            editorText.Delete( editorTextLength - 1 , 1 );
+            editor->SetTextL( &editorText );
+            }
+        }
+    CAknForm::PrepareForFocusTransitionL();
+    }
+
+
+// ----------------------------------------------------
+// CCnvRatesForm::ActivateL
+// Sets the control as ready to be drawn.
+// ----------------------------------------------------
+//    
+void CCnvRatesForm::ActivateL()
+    {
+    CAknForm::ActivateL();
+    CEikFloatingPointEditor* editor =
+        static_cast< CEikFloatingPointEditor* >( Control( IdOfFocusControl() ) );
+    editor->SetCursorPosL( editor->Text()->DocumentLength(), ETrue );
+    }
+//End of file
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/CCnvRatesForm.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,270 @@
+/*
+* Copyright (c) 2002 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:  
+*     An AVKON form class for changing unit names and factors (rates).
+*     Used with currency units, but is not limited to them.
+*     Implements the 'Rates State' of the application.
+*
+*/
+
+
+
+#ifndef __CCNVRATESFORM_H__
+#define __CCNVRATESFORM_H__
+
+// INCLUDES
+#include <AknForm.h>
+#include "CCnvConverter.h"
+// FORWARD DECLARATIONS
+class TCnvCategory;
+
+// CLASS DEFINITION
+/**
+* An AVKON form class for changing unit names and factors (rates).
+* Used with currency units, but is not limited to them.
+* Implements the 'Rates State' of the application.
+*/
+class CCnvRatesForm : public CAknForm
+	{
+
+	public: // Constructors and destructor
+
+		/**
+		* Constructor.
+		* @param aWantsRelaunch Indicates to the caller if we want
+		*        to be relaunched.
+		* @param aShouldExit Indicates to the caller if the application should
+		*        exit after this form has been closed.
+		* @param aModelChanged Indicates to the caller that the model data
+		*		 has changed and needs saving to permanent storage.
+		* @param aCategory Unit category containing currencies.
+		*/
+
+		CCnvRatesForm( TBool* aWantsRelaunch, TBool* aShouldExit,
+			TBool* aModelChanged, TCnvCategory& aCategory );
+
+		/**
+		* Destructor.
+		*/
+		~CCnvRatesForm();
+
+		/**
+		* 2nd phase constructor.
+		*/
+		void ConstructL();
+
+	public: // from CCoeControl
+
+		/**
+		* Specifies the help context for this form.
+		* @param aContext the context IDs are placed here
+		*/
+		void GetHelpContext( TCoeHelpContext& aContext ) const;
+
+	public: // from MEikCommandObserver
+
+		/**
+		* Handles menu commands.
+		* @param aCommandId Command identifier.
+		*/
+		void ProcessCommandL( TInt aCommandId );
+
+	public:	// from MEikDialogPageObserver
+
+		/**
+		* Takes any action required when the current line
+		* is changed to aControlId.
+		* @param aControlId Control identifier.
+		*/
+		void LineChangedL( TInt aControlId );
+
+	public:	// from MEikMenuObserver
+
+		/**
+		* Dynamically initialises a menu pane. The Uikon framework calls this
+		* function, immediately before the menu pane is activated.
+		* @param aResourceId Resource ID identifying a menu pane to initialise
+		* @param aMenuPane The in-memory representation of the menu pane.
+		*/
+		void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+	protected: // from CAknForm
+	
+		/**
+		* Saves form data to model.
+		* @return ETrue if the editable state can be left
+		*         (always in this case).
+		*/
+		void DoNotSaveFormDataL();
+		/**
+		* Saves form data to model.
+		* @return ETrue if the editable state can be left
+		*         (always in this case).
+		*/
+		TBool SaveFormDataL();
+		/**
+		* Tests if it is OK to exit the dialog.
+		* @param aButtonId The ID of the button that was activated.
+		* @return ETrue to validate and exit the dialog,
+		*         EFalse to keep the dialog active.
+		*/
+		TBool OkToExitL(TInt aButtonId);
+		/**
+		* Sets the focus to the topmost line of the form.
+		* when the dialog is activated.
+		*/
+		void SetInitialCurrentLine();
+		
+		/**
+		* For Touch Ui implementation
+		* To prepare for focus transition from the current line.
+		*/
+		void PrepareForFocusTransitionL();
+
+	protected: // from CEikDialog
+
+		/**
+		* Pre-layout dialog initialisation.
+		* Populates from with floating point editor controls.
+		*/
+		void PreLayoutDynInitL();
+
+	private: // Constructors and destructor.
+
+		/**
+		* Default constructor, empty implementation.
+		*/
+		CCnvRatesForm();
+		
+		/**
+		* returns ETrue if the the character is an integer
+		*/
+		TBool IsDigit(TUint aChar);
+
+	private: // new methods
+
+		/**
+		* Handles the ECmdChangeCurrencyName command.
+		*/
+		void CmdChangeCurrencyNameL();
+
+		/**
+		* Handles the ECmdSetAsBaseCurrency command.
+		*/
+		void CmdSetAsBaseCurrencyL();
+
+		/**
+		* Changes the application title pane text to default.
+		* Non-leaving.
+		*/
+		void SetDefaultTitle();
+
+		/**
+		* Changes the application title pane text.
+		* @param aNonDefault EFalse = set to default.
+		*/
+		void SetTitleL( TBool aNonDefault );
+
+		/**
+		* Handles the Key events for the rates form
+		* @param aKeyEvent : Key event information
+		*        aType : EEventKeyDown | EEventKey | EEventKeyUp
+		* @return : EKeyWasConsumed if keyevent is consumed.   
+		*           EKeyWasNotConsumed if keyevent is not consumed.
+		*/
+		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
+			TEventCode aType);
+
+
+	private: // data
+
+		/**
+		* Pointer to the flag in the caller object.
+		* Used to indicate if we want to be relaunched after exit.
+		*/
+		TBool* iWantsRelaunch;
+
+		/**
+		* Pointer to the flag in the caller object.
+		* Used to indicate if the application should close after form exit.
+		*/
+		TBool* iShouldExit;
+
+		/**
+		* Shows an error note for invalid value situation
+		* @param aEditorId Id of the editor that holds the invalid value
+		* @param aSetValue its value is ETrue or EFalse,
+		*        if aSetValue equals EFlase that does not set FloatEditor Value
+		*/
+		void ShowInvalidValueNoteL(TInt aEditorId, TBool aSetValue);
+
+		/**
+		* Pointer to the flag in the caller object.
+		* Used to indicate if the model data has changed and needs
+		* saving to permanent storage.
+		*/
+		TBool* iModelChanged;
+
+		/**
+		* Model accessor for the units displayed in this form.
+		*/
+		TCnvCategory iCategory;
+
+	private:
+		/**
+		*Implements the dialog to add a new currency OR rename a currency
+		*@param aNewname indicates the text that should appear in the dialog as default
+		*@param aPrompt indicates that title of the dialog
+		*@param aIsAddNewCurrency if add a new currency aIsAddNewCurrency is ETrue,otherwise EFalsse   
+		*/
+		TCurrencyType NewCurrencyNameDialogL(TDes& aNewName,TBool& aNameEntered,TBool aIsAddNewCurrency = EFalse );
+		/**
+		* Adds new currency...
+		*/
+		void AddNewCurrencyL();
+		/**
+		* Deletes the Currency (which is having focus)
+		*/
+		void DeleteCurrencyL();
+
+		/**
+		*Checks if the number entered in the editor field is a valid number
+		*@param aEditroId : Id of the editor that needs to be evaluated
+		*@return : EFalse if the editor value is not a vaild number	
+		*		 : ETrue if the number is a valid number
+		*/
+		TBool IsVaildNumberEntered(TInt aEditorId);
+		
+		/**
+		*Sets the control as ready to be drawn.
+		*/		
+		void ActivateL();
+		
+		RArray<TInt> iFormIdMapArray; //Array which has the ids of the form..
+		RArray<TInt> iFormIdEdwinMapArray; //Array which has the ids of the CEikEdwin editors in the form
+		/*
+		* Last active editor line.
+		*/
+        TInt iLastUsedEditorId;
+		TBool iEKeyOk;
+		TBool iError;
+
+    TUint iSrcUnitIndexForRestore;
+    TUint iDesUnitIndexForRestore;
+    TInt iHistoryBaseUnit;
+
+	};
+
+#endif // __CCNVRATESFORM_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/Converter.hrh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2002 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:  
+*     Defines commands and control identifiers.
+*     The file can be included in C++ or resource file.
+*
+*/
+
+
+
+#ifndef __CONVERTER_HRH__
+#define __CONVERTER_HRH__
+
+enum TMaxValues
+	{
+	KEditorTextMaxLength = 12
+	};
+
+enum TConverterCommands
+	{
+	ECmdSetUnit = 100,			// Don't override UIKON IDs..
+	ECmdSetCurrency,
+	ECmdSetType,
+	ECmdRates,
+	ECmdChangeCurrencyName,
+	ECmdSetAsBaseCurrency,
+	ECmdAddCurrency,
+	ECmdDeleteCurrency
+	};
+
+enum TConverterDlgCtrlIds
+	{
+	EConverterTypePopup = 1,	// Dialogs don't like zero IDs..
+	EConverterUnit1Popup,
+	EConverterEditor1,
+	EConverterUnit2Popup,
+	EConverterEditor2,
+	EConverterNote,
+	EConverterDummy
+	};
+
+#define MAXCURRENCYNAMELENGTH 13
+
+enum TConverterUnitIds
+	{
+	EAreaItemAcres = 1,
+	EAreaItemAres, 
+	EAreaItemHectares, 
+	EAreaItemSqCm, 
+	EAreaItemSqFeet, 
+	EAreaItemSqInches, 
+	EAreaItemSqKm, 
+	EAreaItemSqMetres, 
+	EAreaItemSqMiles, 
+	EAreaItemSqMm, 
+	EAreaItemSqYards, 
+	EEnergItemCalor, 
+	EEnergItemElecVol, 
+	EEnergItemHrsPwH, 
+	EEnergItemJoules, 
+	EEnergItemKCalor, 
+	EEnergItemKJoules, 
+	EEnergItemKwH, 
+	ELengthItemCm, 
+	ELengthItemFeet, 
+	ELengthItemInches, 
+	ELengthItemKm, 
+	ELengthItemMetres, 
+	ELengthItemMiles, 
+	ELengthItemMm, 
+	ELengthItemNm, 
+	ELengthItemYards, 
+	EMassItemGrams, 
+	EMassItemKilograms, 
+	EMassItemMTons, 
+	EMassItemMilgrams, 
+	EMassItemOunces, 
+	EMassItemPounds, 
+	EMassItemStones, 
+	EPowerItemHorsepwr, 
+	EPowerItemKWatts, 
+	EPowerItemWatts, 
+	EPressureItemAthm, 
+	EPressureItemBars, 
+	EPressureItemMmhg, 
+	EPressureItemPasc, 
+	ETempItemCelsius, 
+	ETempItemFahrenh, 
+	ETempItemKelvin, 
+	ETimeItemDays, 
+	ETimeItemHours, 
+	ETimeItemMinutes, 
+	ETimeItemSeconds, 
+	ETimeItemWeeks, 
+	EVelItemFeetSec, 
+	EVelItemKmH, 
+	EVelItemKnots, 
+	EVelItemMetresSec, 
+	EVelItemMilesH, 
+	EVolItemBarrels, 
+	EVolItemCubCm, 
+	EVolItemCubFeet, 
+	EVolItemCubInches, 
+	EVolItemCubMetres, 
+	EVolItemCubMm, 
+	EVolItemGallonsUk, 
+	EVolItemGallonsUs, 
+	EVolItemLiqOuncUk, 
+	EVolItemLiqOuncUs, 
+	EVolItemLiqPints, 
+	EVolItemLitres, 
+	EVolItemMillilitres, 
+	EVolItemPintsIm, 	
+	EVolItemPintsUs,
+	ECurrencyHome,
+	ECurrencyForeign
+	};
+
+#endif	// __CONVERTER_HRH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/Ui/Src/Converter.rh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2002 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:  
+*     Defines resource structures for unit data storage.
+*     The file can be included in a resource file only.
+*
+*/
+
+
+
+#ifndef __CONVERTER_RH__
+#define __CONVERTER_RH__
+
+STRUCT CNV_MODEL
+	{
+	WORD modelVersion = 0;			// version number of this model 
+	WORD currencycategory = 0;		// id of the currency category
+	STRUCT categories[];			// CNV_CATEGORY array
+	}
+
+STRUCT CNV_CATEGORY
+	{
+	LTEXT name;				// textual name of this category
+	BYTE ischineseorder = 0;// is order of src/dest default or chinese special	
+	BYTE baseunit = 0;		// id of base unit (on which all unit factors are based)
+	BYTE unit1 = 0;			// id of default source unit (for conversion)
+	BYTE unit2 = 0;			// id of default destination unit (for conversion)
+	BYTE istemperature = 0;	// is this category temperatures (1 if yes) ?
+	STRUCT units[];			// CNV_UNIT array
+	}
+
+STRUCT CNV_UNIT
+	{
+	LTEXT name;				// textual name of this unit
+	DOUBLE factor = 0.0;	// factor for conversion (all units)
+	WORD id;				// id of the unit
+	}
+
+STRUCT CNV_UNIT_CURRENCY
+	{
+	LTEXT name;				// textual name of this unit
+	DOUBLE factor = 0.0;	// factor for conversion (all units)
+	WORD id;				// id of the unit
+	BYTE type = 0;	
+	}
+	
+STRUCT CNV_UNIT_TEMPERATURE
+	{
+	LTEXT name;				// textual name of this unit
+	DOUBLE factor = 0.0;	// factor for conversion (all units)
+	WORD id;
+	DOUBLE offset = 0.0;	// offset for conversion (temperature units)
+	DOUBLE min = 0.0;		// minimum acceptable value (all units)
+	}
+
+#endif	// __CONVERTER_RH__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/aif/ConverterAif.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2002 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:  
+*     This is the application information file resource definition file 
+*     for Converter.app
+*  -------------------------------------------------------------------
+*
+*/
+
+
+
+#include <aiftool.rh>
+
+RESOURCE AIF_DATA
+	{
+	app_uid = 0x101f4668;
+	num_icons = 2;
+	embeddability = KAppNotEmbeddable;
+	hidden = KAppNotHidden;
+	newfile = KAppDoesNotSupportNewFile;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/eabi/ConverterEngine_EKA2u.def	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,38 @@
+EXPORTS
+	_ZN12TCnvCategory11SetBaseUnitEj @ 1 NONAME
+	_ZN12TCnvCategory11SetUnitNameEjRK7TDesC1613TCurrencyType @ 2 NONAME
+	_ZN12TCnvCategory13SetUnitFactorEjRKd @ 3 NONAME
+	_ZN12TCnvCategory15AddNewCurrencyLEiR7TDesC16Rd13TCurrencyType @ 4 NONAME
+	_ZN12TCnvCategory15DeleteCurrencyLEi @ 5 NONAME
+	_ZN12TCnvCategory15SetDefaultUnitsEjj @ 6 NONAME
+	_ZN12TCnvCategory18CurrentValueTextLCEv @ 7 NONAME
+	_ZN12TCnvCategory20SetCurrentValueIndexEi @ 8 NONAME
+	_ZN12TCnvCategoryC1Ev @ 9 NONAME
+	_ZN12TCnvCategoryC2Ev @ 10 NONAME
+	_ZN13CCnvConverter12InternalizeLER11RReadStream @ 11 NONAME
+	_ZN13CCnvConverter19GetCategoryAccessorER12TCnvCategoryj @ 12 NONAME
+	_ZN13CCnvConverter23GetCategorylistAccessorER12TCnvCategory @ 13 NONAME
+	_ZN13CCnvConverter4NewLER15TResourceReader @ 14 NONAME
+	_ZN13CCnvConverterD0Ev @ 15 NONAME
+	_ZN13CCnvConverterD1Ev @ 16 NONAME
+	_ZN13CCnvConverterD2Ev @ 17 NONAME
+	_ZNK12TCnvCategory10UnitFactorEj @ 18 NONAME
+	_ZNK12TCnvCategory11UnitMinimumEj @ 19 NONAME
+	_ZNK12TCnvCategory15GetDefaultUnitsERjS0_ @ 20 NONAME
+	_ZNK12TCnvCategory17CurrentValueIndexEv @ 21 NONAME
+	_ZNK12TCnvCategory7ConvertEjjRKdj @ 22 NONAME
+	_ZNK12TCnvCategory8BaseUnitEv @ 23 NONAME
+	_ZNK12TCnvCategory8MdcArrayEv @ 24 NONAME
+	_ZNK13CCnvConverter12ExternalizeLER12RWriteStream @ 25 NONAME
+	_ZNK13CCnvConverter18CurrencyCategoryIdEv @ 26 NONAME
+	_ZTI12CCnvCategory @ 27 NONAME ; #<TI>#
+	_ZTI12TCnvCategory @ 28 NONAME ; #<TI>#
+	_ZTI13CCnvConverter @ 29 NONAME ; #<TI>#
+	_ZTV12CCnvCategory @ 30 NONAME ; #<VT>#
+	_ZTV12TCnvCategory @ 31 NONAME ; #<VT>#
+	_ZTV13CCnvConverter @ 32 NONAME ; #<VT>#
+	_ZThn4_N13CCnvConverterD0Ev @ 33 NONAME ; #<thunk>#
+	_ZThn4_N13CCnvConverterD1Ev @ 34 NONAME ; #<thunk>#
+	_ZN12TCnvCategory16RestoreUnitArrayEv @ 35 NONAME
+	_ZN12TCnvCategory29CreateTempUnitArrayForRestoreEv @ 36 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/eabi/ConverterEngineu.def	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,32 @@
+EXPORTS
+	_ZN12TCnvCategory11SetBaseUnitEj @ 1 NONAME
+	_ZN12TCnvCategory11SetUnitNameEjRK7TDesC16 @ 2 NONAME
+	_ZN12TCnvCategory13SetUnitFactorEjRKd @ 3 NONAME
+	_ZN12TCnvCategory15SetDefaultUnitsEjj @ 4 NONAME
+	_ZN12TCnvCategory18CurrentValueTextLCEv @ 5 NONAME
+	_ZN12TCnvCategory20SetCurrentValueIndexEi @ 6 NONAME
+	_ZN12TCnvCategoryC1Ev @ 7 NONAME
+	_ZN12TCnvCategoryC2Ev @ 8 NONAME
+	_ZN13CCnvConverter12InternalizeLER11RReadStream @ 9 NONAME
+	_ZN13CCnvConverter19GetCategoryAccessorER12TCnvCategoryj @ 10 NONAME
+	_ZN13CCnvConverter23GetCategorylistAccessorER12TCnvCategory @ 11 NONAME
+	_ZN13CCnvConverter4NewLER15TResourceReader @ 12 NONAME
+	_ZN13CCnvConverterD0Ev @ 13 NONAME
+	_ZN13CCnvConverterD1Ev @ 14 NONAME
+	_ZN13CCnvConverterD2Ev @ 15 NONAME
+	_ZNK12TCnvCategory10UnitFactorEj @ 16 NONAME
+	_ZNK12TCnvCategory11UnitMinimumEj @ 17 NONAME
+	_ZNK12TCnvCategory15GetDefaultUnitsERjS0_ @ 18 NONAME
+	_ZNK12TCnvCategory17CurrentValueIndexEv @ 19 NONAME
+	_ZNK12TCnvCategory7ConvertEjjRKdj @ 20 NONAME
+	_ZNK12TCnvCategory8BaseUnitEv @ 21 NONAME
+	_ZNK12TCnvCategory8MdcArrayEv @ 22 NONAME
+	_ZNK13CCnvConverter12ExternalizeLER12RWriteStream @ 23 NONAME
+	_ZNK13CCnvConverter18CurrencyCategoryIdEv @ 24 NONAME
+	_ZTI12TCnvCategory @ 25 NONAME ; #<TI>#
+	_ZTV12TCnvCategory @ 26 NONAME ; #<VT>#
+	_ZThn4_N13CCnvConverterD0Ev @ 27 NONAME ; #<thunk>#
+	_ZThn4_N13CCnvConverterD1Ev @ 28 NONAME ; #<thunk>#
+	_ZN12TCnvCategory15AddNewCurrencyLEiR7TDesC16Rd @ 29 NONAME
+	_ZN12TCnvCategory15DeleteCurrencyLEi @ 30 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Inc/CCnvConverter.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2002 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:  
+*     This class is a data container of unit categories.
+*     It is able to construct itself from a resource file.
+*     This class implements the Model Instantiation API.
+*
+*/
+
+
+
+#ifndef __CCNVCONVERTER_H__
+#define __CCNVCONVERTER_H__
+
+// INCLUDES
+#include <e32base.h>
+#include <bamdesca.h>
+
+// FORWARD DECLARATIONS
+class CCnvCategory;
+class TCnvCategory;
+class RWriteStream;
+class TResourceReader;
+
+// CLASS DEFINITION
+/**
+* This class is a data container of unit categories.
+* It is able to construct itself from a resource file.
+* This class implements the Model Instantiation API.
+*/
+enum TCurrencyType
+{
+	ENotApplicable,
+	ENameChanged,
+	EHome,
+	EForeign
+};
+
+class CCnvConverter : public CBase, public MDesCArray
+	{
+	public:	// Constructors and destructor.
+
+		/**
+		* Destructor.
+		*/
+		IMPORT_C ~CCnvConverter();
+
+		/**
+		* Two-phased constructor
+		* @param aReader A resource reader object initialised to a resource.
+		*/
+		IMPORT_C static CCnvConverter* NewL( TResourceReader& aReader );
+
+	private: // Constructors
+
+		/**
+		* Default constructor.
+		* 1 = minimum array granularity
+		*/
+		inline CCnvConverter() : iCategoryArray( 1 ) {};
+
+		/**
+		* Constructs the model a CNV_MODEL resource.
+		* @param aReader A resource reader object initialised to a resource.
+		*/
+		void ConstructFromResourceL( TResourceReader& aReader );
+
+	public: // from MDesCArray (need not to be imported, vftable takes care..)
+
+		/**
+		* Returns the number of unit categories.
+		* @return number of items.
+		*/
+		TInt MdcaCount() const;
+
+		/**
+		* Returns a pointer to a unit category name specified by aIndex.
+		* @param aIndex Defines the point in the array that is 
+		*        queried for the name.
+		* @return Pointer to category name.
+		*/
+		TPtrC MdcaPoint( TInt aIndex ) const;
+ 
+	public: // new methods
+
+		/**
+		* Returns a category accessor for the requested category.
+		* @param aCategory Category accessor placeholder.
+		* @param aCategoryIndex Category identifier.
+		*/
+		IMPORT_C void GetCategoryAccessor( TCnvCategory& aCategory,
+										   TUint aCategoryIndex );
+		/**
+		* Return a category accessor for the category list.
+		* @param aCategory Category accessor placeholder.
+		*/
+		IMPORT_C void GetCategorylistAccessor( TCnvCategory& aCategory );
+
+		/**
+		* Returns the index of the currency category.
+		* @return category index.
+		*/
+		IMPORT_C TUint CurrencyCategoryId() const;
+
+		/**
+		* Stores the category array to the given stream.
+		* @param aStream Stream for writing.
+		*/
+		IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
+
+		/**
+		* Loads the category array from the given stream.
+		* @param aStream Stream for reading.
+		*/
+		IMPORT_C void InternalizeL( RReadStream& aStream );
+
+	private: // new methods
+
+		/**
+		* Skips zero or more category structures.
+		* @param aCount Skips this many categories
+		* @param aReader A resource reader object initialised to a resource.
+		*/
+		void SkipCategoriesL( TInt aCount, TResourceReader& aReader );
+
+	private: // data
+
+		/**
+		* The running version number of the model data (structure and content)
+		*/
+		TUint iModelVersion;
+
+		/**
+		* The index of the category containing currencies (in the array).
+		*/
+		TUint iCurrencyCategory;
+		
+		/**
+		* The array for categories in this model. Owned.
+		*/
+		CArrayPtrSeg< CCnvCategory > iCategoryArray;
+
+	};
+
+#endif // __CCNVCONVERTER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Inc/TCnvCategory.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,229 @@
+/*
+* Copyright (c) 2002 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:  
+*     This class can be seen as a view to a subset (one unit category) of
+*     the data stored in the data model.
+*	  It does not own or copy any model data.
+*     This class implements the Model Access API.
+*
+*/
+
+
+
+#ifndef __TCNVCATEGORY_H__
+#define __TCNVCATEGORY_H__
+
+// INCLUDES
+#include <e32base.h>
+#include <AknQueryValue.h>
+#include "CCnvConverter.h"
+// FORWARD DECLARATIONS
+class CCnvCategory;
+class MDesCArray;
+
+enum TPanicCode
+	{
+	EPanicPreCond_Convert = 1,
+	EPanicPreCond_UnitFactor,
+	EPanicPreCond_UnitMinimum,
+	EPanicPreCond_SetUnitFactor,
+	EPanicPreCond_SetUnitName,
+	EPanicPreCond_BaseUnit,
+	EPanicPreCond_SetBaseUnit,
+	EPanicPreCond_GetDefaultUnits,
+	EPanicPreCond_SetDefaultUnits,
+	EPanicPreCond_CurrentValueTextLC
+	};
+
+_LIT(KPanicText, "TCnvCategory");
+
+// CLASS DEFINITION
+/**
+* This class can be seen as a view to a subset (one unit category) of
+* the data stored in the data model. It does not own or copy any model data.
+* This class implements the Model Access API.
+*/
+class TCnvCategory : public MAknQueryValue
+	{
+	public: // Constructors.
+
+ 		/**
+		* Default constructor.
+		*/
+		IMPORT_C TCnvCategory();
+
+ 		/**
+		* Constructor.
+		*/
+		TCnvCategory( CCnvCategory* aCategory );
+
+		/**
+		* Constructor.
+		*/
+		TCnvCategory( MDesCArray* aDesCArray );
+
+	public: // from MAknQueryValue
+
+		/**
+		* Returns a descriptor array interface to the category data.
+		* @return Text array accessor.
+		*/
+		IMPORT_C const MDesCArray* MdcArray() const;
+
+		/**
+		* Returns the text associated with the current selection.
+		* @return currently selected item's text.
+		*/
+		IMPORT_C HBufC* CurrentValueTextLC();
+
+		/**
+		* Returns the index of the current selection. 
+		* @return currently selected item.
+		*/
+		IMPORT_C TInt CurrentValueIndex() const;
+
+		/**
+		* Set the index of the current selection. 
+		* @param aIndex Newly selected item.
+		*/
+		IMPORT_C void SetCurrentValueIndex( const TInt aIndex );
+
+	public: // new methods
+
+		/**
+		* Calculates the conversion from source unit to destination unit.
+		* @param aSourceUnit Index of the source unit.
+		* @param aDestinationUnit Index of the destination unit.
+		* @param aAmount Convert this many source units.
+		* @return Result of conversion, rounded to aDecimals decimal places.
+		*/
+		IMPORT_C TReal Convert( TUint aSourceUnit, TUint aDestinationUnit,
+								const TReal& aAmount,
+								TUint aDecimals = 5 ) const;
+
+		/**
+		* Returns the factor (rate) of the specified unit.
+		* @param unit index (identifier).
+		*/
+		IMPORT_C TReal UnitFactor( TUint aUnit ) const;
+
+		/**
+		* Returns the minimum allowable amount for the specified unit.
+		* @param unit index (identifier).
+		*/
+		IMPORT_C TReal UnitMinimum( TUint aUnit ) const;
+
+		/**
+		* Changes the factor (rate) of the specified unit.
+		* @param aUnit index (identifier).
+		* @param aNewFactor new factor for the unit.
+		*/
+		IMPORT_C void SetUnitFactor( TUint aUnit, const TReal& aNewFactor );
+
+		/**
+		* Changes the name of the specified unit.
+		* @param aUnit index (identifier).
+		* @param aNewName new name for the unit.
+		*/
+		IMPORT_C void SetUnitName( TUint aUnit, const TDesC& aNewName , TCurrencyType aType);
+
+		/**
+		* Returns the index of the base unit.
+		* @return base unit index.
+		*/
+		IMPORT_C TUint BaseUnit() const;
+
+		/**
+		* Changes the index of the base unit.
+		* @param aBaseUnit index.
+		*/
+		IMPORT_C void SetBaseUnit( TUint aBaseUnit );
+
+		/**
+		* Returns the default unit indices.
+		* @param aSourceUnit Index placeholder of the source unit.
+		* @param aDestinationUnit Index placeholder of the destination unit.
+		*/
+		IMPORT_C void GetDefaultUnits( TUint& aSourceUnit,
+									   TUint& aDestinationUnit ) const;
+
+		/**
+		* Sets the default unit indices.
+		* @param aSourceUnit Index of the new source unit.
+		* @param aDestinationUnit Index of the new destination unit.
+		*/
+		IMPORT_C void SetDefaultUnits( TUint aSourceUnit,
+									   TUint aDestinationUnit );
+		/**
+		*Deletes a particular currency  from the list.
+		*@param aControlId indicates which currency has to be deleted.
+		*/
+		IMPORT_C void AddNewCurrencyL(TInt aControlId, TDesC& aNewName , TReal& aNewFactor, TCurrencyType aType);
+		/**
+		*Adds a new field at a given position(focus)
+		*@param aControlId indicates the currenct focus and the new currency 
+		*		should be added accordingly
+		*@param aNewName indicates the name of the currecy being added
+		*@param aNewFactor indicates the factor of the currency that will be added
+		*/
+		IMPORT_C void DeleteCurrencyL( TInt aCurrencyId );
+        
+        /**
+        *Create a temp array to save the previous unit for restore
+        *
+        */
+        IMPORT_C void CreateTempUnitArrayForRestore();
+
+        /**
+        *restore the unit array that not be modified
+        *
+        */
+        IMPORT_C void RestoreUnitArray();
+
+    private: // from MAknQueryValue, empty implementations, not to be used!
+			 // inlined to avoid exporting these.
+
+		inline TBool CreateEditorL() { return EFalse; }
+		inline void SetQueryMode( MAknQueryValue::TMode ) {};
+		inline void SetSettingPageResourceIds( TInt, TInt ) {};
+		inline void SetAutoAppend( TBool ) {};	
+		inline void AppendValueIfNewL() {};
+
+	private: // data
+
+		/**
+		* Pointer to the category object this class accesses. Not owned.
+		*/
+		CCnvCategory* iCategory;
+
+		/**
+		* Pointer to the name array. Not owned. (MAknQueryValue interface).
+		*/
+		MDesCArray* iDesCArray;
+
+		/**
+		* Index of the currently selected value (MAknQueryValue interface).
+		*/
+		TUint iCurrentValueIndex;
+
+		/**
+		* ETrue if the instance can be used only as a MAknQueryValue.
+		* It is the case when this class is
+		* constructed by TCnvCategory( MDesCArray* aDesCArray ) 
+		*/
+		TBool iIsQueryValueOnly;
+
+	};
+
+#endif // __TCNVCATEGORY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Src/CCnvCategory.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,290 @@
+/*
+* Copyright (c) 2002 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:  
+*	  This is the implementation of the class defined in CCnvCategory.h
+*
+*/
+
+
+
+#include <barsread.h>	// TResourceReader
+#include <e32math.h>	// Math::Round()
+#include <s32strm.h>	// RReadStream, RWriteStream
+#include <Converter.rsg>
+#include "CCnvCategory.h"
+
+CCnvCategory::~CCnvCategory()
+	{
+	iUnitArray.Reset();
+	iTempUintForRestoreArray.Reset();
+	}
+
+CCnvCategory* CCnvCategory::NewLC( TResourceReader& aReader , TBool aIsCurrencyCategory)
+	{
+	CCnvCategory* self = new( ELeave ) CCnvCategory;
+	CleanupStack::PushL( self );
+	self->ConstructFromResourceL( aReader ,aIsCurrencyCategory );
+
+	return self;
+	}
+
+void CCnvCategory::ConstructFromResourceL( TResourceReader& aReader, TBool aIsCurrencyCategory)  
+	{
+	// read the category parameters
+	iName.Copy( aReader.ReadTPtrC() );
+	TInt isChineseorder = aReader.ReadInt8();
+	iBaseUnitIndex = aReader.ReadInt8();
+
+
+	if( isChineseorder == 1)
+		{
+		switch( User::Language() )
+			{
+			case ELangHongKongChinese:
+			case ELangTaiwanChinese:
+			case ELangPrcChinese:
+				iDestinationUnitIndex = aReader.ReadInt8();
+				iSourceUnitIndex = aReader.ReadInt8();		
+				break;
+			default:
+				iSourceUnitIndex = aReader.ReadInt8();
+				iDestinationUnitIndex = aReader.ReadInt8();
+				break;
+			}
+		}
+	else
+		{
+		iSourceUnitIndex = aReader.ReadInt8();
+		iDestinationUnitIndex = aReader.ReadInt8();
+		}
+	
+	TBool isTemperatureCategory( EFalse );
+	if( aReader.ReadInt8() != 0 )
+		{
+		isTemperatureCategory = ETrue;
+		}
+
+	// start reading the unit array
+	TInt numUnits = aReader.ReadInt16();
+
+	TCnvUnit unit;
+	for( TInt i = 0; i < numUnits; i++ )
+		{
+		unit.ReadFromResource( aReader, isTemperatureCategory, aIsCurrencyCategory );
+		iUnitArray.AppendL( unit );
+		}
+	}
+
+TInt CCnvCategory::MdcaCount() const
+	{
+	return iUnitArray.Count();
+	}
+
+// Returns the name of the unit at index 'aIndex'
+TPtrC CCnvCategory::MdcaPoint( TInt aIndex ) const
+	{
+	return TPtrC( iUnitArray.At( aIndex ).iName );
+	}
+
+TReal CCnvCategory::Convert( TUint aSourceUnit, TUint aDestinationUnit,
+							const TReal& aAmount, TUint aDecimals ) const
+	{
+	const TCnvUnit& srcUnit = iUnitArray.At( aSourceUnit );
+	const TCnvUnit& dstUnit = iUnitArray.At( aDestinationUnit );
+
+	TReal result( ( aAmount - srcUnit.iOffset ) / srcUnit.iFactor
+		* dstUnit.iFactor + dstUnit.iOffset );
+	Math::Round( result, result, aDecimals );
+	return result;
+	}
+
+void CCnvCategory::GetDefaultUnits( TUint& aSourceUnit,
+								   TUint& aDestinationUnit ) const
+	{
+	aSourceUnit = iSourceUnitIndex;
+	aDestinationUnit = iDestinationUnitIndex;
+	}
+
+void CCnvCategory::SetDefaultUnits( TUint aSourceUnit,
+								   TUint aDestinationUnit )
+	{
+	iSourceUnitIndex = aSourceUnit;
+	iDestinationUnitIndex = aDestinationUnit;
+	}
+
+TUint CCnvCategory::BaseUnit() const
+	{
+	return iBaseUnitIndex;
+	}
+
+void CCnvCategory::SetBaseUnit( const TUint& aBaseUnit )
+	{
+	iBaseUnitIndex = aBaseUnit;
+	}
+
+const TDes& CCnvCategory::Name() const
+	{
+	return iName;
+	}
+
+TCnvUnit& CCnvCategory::Unit( TUint aIndex )
+	{
+	return iUnitArray.At( aIndex );
+	}
+
+// Store the data in a stream.
+void CCnvCategory::ExternalizeL( RWriteStream& aStream ) const
+	{
+	aStream.WriteUint8L( iBaseUnitIndex );
+	aStream.WriteUint8L( iSourceUnitIndex );
+	aStream.WriteUint8L( iDestinationUnitIndex );
+
+	TUint len( iUnitArray.Count() );
+	aStream.WriteUint8L( iUnitArray.Count() );
+	for( TUint i = 0; i < len; i ++)
+		{
+		iUnitArray.At( i ).ExternalizeL( aStream );
+		}
+	}
+
+// Recover the data from a stream.
+void CCnvCategory::InternalizeL( RReadStream& aStream, TBool aIsCurrencyCategory )
+	{
+	TBuf<16> currencyNames[3];
+	
+	iBaseUnitIndex = aStream.ReadUint8L();
+	iSourceUnitIndex = aStream.ReadUint8L();
+	iDestinationUnitIndex = aStream.ReadUint8L();
+
+	TUint len( aStream.ReadUint8L() );
+	
+	//The ini file exists. So delete the existing iUnitArray and load it again 
+	//from the Configuration Settings file
+	
+	//Trying to use enum values as array indexes
+	currencyNames[1] = iUnitArray.At(0).iName; // Qtn_Cnv_Home
+	currencyNames[2] = iUnitArray.At(1).iName; // Qtn_Cnv_Foreign
+	
+	iUnitArray.Delete(0,iUnitArray.Count());	
+
+	for( TUint i = 0; i < len; i ++)
+		{
+		//Change: Loads the currencies directly from ini file. no searching..
+		//		TInt index;
+		TCnvUnit unit;
+		unit.InternalizeL( aStream , aIsCurrencyCategory);
+
+		iUnitArray.AppendL(unit);
+		}
+		
+	TCurrencyType type;
+	
+	for( TUint in = 0; in < len; in++)
+		{
+			type = iUnitArray.At(in).iNameType;
+			if(type == EHome)
+				iUnitArray.At(in).iName = currencyNames[1];
+			else if(type == EForeign)
+				iUnitArray.At(in).iName = currencyNames[2];
+		}
+	}
+
+
+void CCnvCategory::AddNewCurrencyL( TInt aCurrencyId, TDesC& aNewName, TReal& aNewFactor, TCurrencyType aType)
+	{
+	TCnvUnit unit;
+	TUint curencyId = aCurrencyId; // To remove the warnings
+	unit.iName  = aNewName;	
+	unit.iFactor = aNewFactor;
+	unit.iNameType = aType;
+	unit.iIsCurrencyUnit = ETrue;
+	//To calculate the id for the new currency added.
+	//will run thru the ids, gets the largest id and increments it and assigns to the new unit.
+	//Make sure that the ids for the currencies have the largest possible value in the hrh file.
+	TUint id;
+	id = iUnitArray.At(0).iId;
+	for(TInt i = 1; i < iUnitArray.Count(); i++)
+		{
+		if(id < iUnitArray.At(i).iId)
+			{
+			id = iUnitArray.At(i).iId;
+			}
+		}
+	id++;
+	unit.iId = id;
+
+	iUnitArray.InsertL( curencyId, unit );
+	//New element has been added. So set the base source and destination currencies accordingly
+	if( iBaseUnitIndex >= curencyId )
+		{		
+		iBaseUnitIndex++; 
+		}
+	if( iSourceUnitIndex >= curencyId )
+		{		
+		iSourceUnitIndex++; 
+		}
+	if( iDestinationUnitIndex >= curencyId )
+		{		
+		iDestinationUnitIndex++; 
+		}
+
+	}
+
+
+
+void CCnvCategory::DeleteCurrency(TInt aCurrencyId)
+	{
+	iUnitArray.Delete(aCurrencyId);
+
+	TUint unsignedCurrencyId = aCurrencyId; //to remove warnings
+
+	//An element has been deleted. So set the base source and destination currencies accordingly
+	if(iBaseUnitIndex >= unsignedCurrencyId   )
+		{
+		if( iBaseUnitIndex > 0)
+			iBaseUnitIndex--;
+		}
+	if(iSourceUnitIndex >= unsignedCurrencyId   )
+		{
+		if( iSourceUnitIndex > 0)
+			iSourceUnitIndex--;
+		}
+	if(iDestinationUnitIndex >= unsignedCurrencyId   )
+		{
+		if( iDestinationUnitIndex > 0)
+			iDestinationUnitIndex--;
+		}
+
+	}
+
+
+void CCnvCategory::CreateTempUnitArrayForRestore()
+	{
+	iTempUintForRestoreArray.Reset();
+	for ( TInt i = 0; i < iUnitArray.Count() ; i++ )
+		{
+		TRAP_IGNORE( iTempUintForRestoreArray.AppendL( iUnitArray.At( i ) ) );
+		}
+	}
+
+void CCnvCategory::RestoreUnitArray()
+	{
+	iUnitArray.Reset();
+	for ( TInt i = 0 ; i < iTempUintForRestoreArray.Count() ; i++ )
+		{
+		TRAP_IGNORE( iUnitArray.AppendL( iTempUintForRestoreArray.At( i ) ) );
+		}
+	}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Src/CCnvCategory.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,212 @@
+/*
+* Copyright (c) 2002 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:  
+*     This class is a data container of unit conversion parameters
+*     for a single unit category. It creates and owns the units in this
+*     category. It is able to construct itself from a resource file.
+*
+*/
+
+
+
+#ifndef __CCNVCATEGORY_H__
+#define __CCNVCATEGORY_H__
+
+// INCLUDES
+#include <e32base.h>
+#include <bamdesca.h>
+#include "TCnvUnit.h"
+
+// FORWARD DECLARATIONS
+class TResourceReader;
+class RWriteStream;
+
+// CONSTANTS
+const TInt KMaxNameLength = 32;
+
+// CLASS DEFINITION
+/**
+* This class is a data container of unit conversion parameters
+* for a single unit category. It creates and owns the units in this category.
+* It is able to construct itself from a resource file.
+*/
+class CCnvCategory : public CBase, public MDesCArray
+	{
+	public:	// Constructors and destructor
+
+		/**
+		* Destructor.
+		*/
+		~CCnvCategory();
+
+		/**
+		* Two-phased constructor
+		* @param aReader A resource reader object initialised to a resource.
+		*/
+		static CCnvCategory* NewLC( TResourceReader& aReader, TBool aIsCurrencyCategory = EFalse );
+
+	private: // Constructors
+
+		/**
+		* Default constructor. Inlined to save a few bytes
+		* 2 = array granularity ( balanced between memory usage and speed )
+		*/
+		inline CCnvCategory() : iUnitArray( 2 ) , iTempUintForRestoreArray( 2 ) {};
+
+		/**
+		* Constructs this category from a CNV_CATEGORY resource.
+		* @param aReader A resource reader object initialised to a resource.
+		*/
+		void ConstructFromResourceL( TResourceReader& aReader , TBool aIsCurrencyCategory = EFalse);
+
+	public: // from MDesCArray
+
+		/**
+		* Returns the number of items (units) in this category.
+		* @return number of items.
+		*/
+		TInt MdcaCount() const;
+
+		/**
+		* Returns a pointer to a unit name specified by aIndex.
+		* @param aIndex Defines the point in the array that is 
+		*        queried for the name.
+		* @return Pointer to unit name.
+		*/
+		TPtrC MdcaPoint( TInt aIndex ) const;
+  
+	public:	// new methods
+
+		/**
+		* Calculates the conversion from source unit to destination unit.
+		* @param aSourceUnit Index of the source unit.
+		* @param aDestinationUnit Index of the destination unit.
+		* @param aAmount Convert this many source units.
+		* @return Result of conversion, rounded to aDecimals decimal places.
+		*/
+		TReal Convert( TUint aSourceUnit, TUint aDestinationUnit,
+					   const TReal& aAmount, TUint aDecimals ) const;
+
+		/**
+		* Returns the default unit indices.
+		* @param aSourceUnit Index placeholder of the source unit.
+		* @param aDestinationUnit Index placeholder of the destination unit.
+		*/
+		void GetDefaultUnits( TUint& aSourceUnit,
+							  TUint& aDestinationUnit ) const;
+
+		/**
+		* Sets the default unit indices.
+		* @param aSourceUnit Index of the new source unit.
+		* @param aDestinationUnit Index of the new destination unit.
+		*/
+		void SetDefaultUnits( TUint aSourceUnit, TUint aDestinationUnit );
+
+		/**
+		* Returns the index of the base unit.
+		* @return base unit index.
+		*/
+		TUint BaseUnit() const;
+
+		/**
+		* Changes the index of the base unit.
+		* @param aIndex new base unit index.
+		*/
+		void SetBaseUnit( const TUint& aIndex );
+
+		/**
+		* Returns a pointer to this category's name.
+		* @return the category name.
+		*/
+		const TDes& Name() const;
+
+		/**
+		* Returns a reference to the Unit object identified by aIndex.
+		* @return the requested Unit object.
+		*/
+		TCnvUnit& Unit( TUint aIndex );
+
+		/**
+		* Stores the unit array to the given stream.
+		* @param aStream Stream for writing.
+		*/
+		void ExternalizeL( RWriteStream& aStream ) const;
+
+		/**
+		* Loads the unit array from the given stream.
+		* @param aStream Stream for reading.
+		*/
+		void InternalizeL( RReadStream& aStream , TBool aIsCurrencyCategory = EFalse);
+		
+		/**
+		* create a unit array copy
+		* 
+		*/
+		void CreateTempUnitArrayForRestore();
+		
+		/**
+		* restore the unit array
+		* 
+		*/
+		void RestoreUnitArray();
+
+	private: // data
+
+		/**
+		* Index of the default source unit  (in the unit array).
+		*/
+		TUint iSourceUnitIndex;
+
+		/**
+		* Index of the default destination unit (in the unit array).
+		*/
+		TUint iDestinationUnitIndex;
+
+		/**
+		* Index of the base unit (in the unit array).
+		*/
+		TUint iBaseUnitIndex;
+
+		/**
+		* Name of this category.
+		*/
+		TBuf< KMaxNameLength > iName;
+
+		/**
+		* The array for units in this category. Owned.
+		*/
+		CArrayFixSeg< TCnvUnit > iUnitArray;
+		
+		// Save unit for restore
+		CArrayFixSeg< TCnvUnit > iTempUintForRestoreArray;
+
+	public:
+		/**
+		*Deletes a particular currency  from the list.
+		*@param aControlId indicates which currency has to be deleted.
+		*/
+		void DeleteCurrency(TInt aCurrencyId);
+		
+		/**
+		*Adds a new field at a given position(focus)
+		*@param aControlId indicates the currenct focus and the new currency 
+		*		should be added accordingly
+		*@param aNewName indicates the name of the currecy being added
+		*@param aNewFactor indicates the factor of the currency that will be added
+		*/
+		void AddNewCurrencyL( TInt aCurrencyId, TDesC& aNewName, TReal& aNewFactor , TCurrencyType aType);
+
+	};
+
+#endif // __CCNVCATEGORY_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Src/CCnvConverter.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2002 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:  
+*	  This is the implementation of the class defined in CCnvConverter.h
+*
+*/
+
+
+
+#include <s32strm.h>
+#include <barsread.h>
+
+#include "CCnvConverter.h"
+#include "CCnvCategory.h"
+#include "TCnvCategory.h"
+
+
+EXPORT_C CCnvConverter::~CCnvConverter()
+	{
+	iCategoryArray.ResetAndDestroy();
+	}
+
+EXPORT_C CCnvConverter* CCnvConverter::NewL( TResourceReader& aReader )
+	{
+	CCnvConverter* self = new( ELeave ) CCnvConverter;
+	CleanupStack::PushL( self );
+	self->ConstructFromResourceL( aReader );
+	CleanupStack::Pop();	// self;
+
+	return self;
+	}
+
+void CCnvConverter::ConstructFromResourceL( TResourceReader& aReader )
+	{
+	iModelVersion = aReader.ReadInt16(); 
+	iCurrencyCategory = aReader.ReadInt16();
+iCurrencyCategory = iCurrencyCategory ;
+
+	TUint numCategories( aReader.ReadInt16() );
+
+	for( TUint i = 0; i < numCategories ; i++ )
+		{
+		if(i == iCurrencyCategory)
+			{
+			CCnvCategory* category = CCnvCategory::NewLC( aReader, ETrue ); // Load Currency
+			iCategoryArray.AppendL( category );
+			CleanupStack::Pop();	// category
+			}
+		else
+			{
+			CCnvCategory* category = CCnvCategory::NewLC( aReader );
+			iCategoryArray.AppendL( category );
+			CleanupStack::Pop();	// category
+			}
+		}
+	}
+
+TInt CCnvConverter::MdcaCount() const
+	{
+	return iCategoryArray.Count();
+	}
+
+TPtrC CCnvConverter::MdcaPoint( TInt aIndex ) const
+	{
+	return TPtrC( iCategoryArray.At( aIndex )->Name() );
+	}
+
+EXPORT_C void CCnvConverter::GetCategoryAccessor( TCnvCategory& aCategory,
+												 TUint aCategoryIndex )
+	{
+	aCategory = TCnvCategory( iCategoryArray.At( aCategoryIndex ) );
+	}
+
+EXPORT_C void CCnvConverter::GetCategorylistAccessor(
+	TCnvCategory& aCategory )
+	{
+	aCategory = TCnvCategory( this );
+	}
+
+EXPORT_C TUint CCnvConverter::CurrencyCategoryId() const
+	{
+	return iCurrencyCategory;
+	}
+
+// Store the data in a stream.
+EXPORT_C void CCnvConverter::ExternalizeL( RWriteStream& aStream ) const
+	{
+	// Write the current model version
+	aStream.WriteUint32L( iModelVersion );
+
+	// Write the current model language variant
+	aStream.WriteUint32L( User::Language() );
+
+	// Save out the currency category as a whole
+	CCnvCategory* category = iCategoryArray.At( iCurrencyCategory );
+	category->ExternalizeL( aStream );
+
+	// Save
+	TUint len( iCategoryArray.Count() );
+	for( TUint i = 0; i < len; i++ )
+		{
+		TUint aSrc( 0 ), aDst( 0 );
+		category = iCategoryArray.At( i );
+		category->GetDefaultUnits( aSrc, aDst );
+		aStream.WriteUint8L( aSrc );
+		aStream.WriteUint8L( aDst );
+		}
+	}
+
+// Recover the data from a stream.
+EXPORT_C void CCnvConverter::InternalizeL( RReadStream& aStream )
+	{
+	TUint version( aStream.ReadUint32L() );
+	if( version != iModelVersion )
+		{
+		User::Leave( KErrCorrupt );
+		}
+	TInt language( aStream.ReadUint32L() );
+	language = language; // suppress compiler warnings
+	/*if( language != User::Language() )
+	{
+	User::Leave( KErrCorrupt );
+	}
+	*/
+	// Read in the currency category as a whole
+	CCnvCategory* category = iCategoryArray.At( iCurrencyCategory );
+	category->InternalizeL( aStream );
+
+	TUint len( iCategoryArray.Count() );
+	for( TUint i = 0; i < len; i++ )
+		{
+		TUint src( aStream.ReadUint8L() );
+		TUint dst( aStream.ReadUint8L() );
+		category = iCategoryArray.At( i );
+		category->SetDefaultUnits( src, dst );
+		}
+	}
+
+
+void CCnvConverter::SkipCategoriesL( TInt aCount, TResourceReader& aReader )
+	{
+	for( TInt i = 0; i < aCount; i++ )
+		{
+		CCnvCategory::NewLC( aReader );
+		CleanupStack::PopAndDestroy();
+		}
+	}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Src/DllMain.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2002 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:  
+*	  The E32Dll() function is required by all DLLs; it is defined 
+*     as the main DLL entry point which implies that it is exported, 
+*     even though there is no explicit EXPORT_C in the C++ code. Its 
+*     primary use is to allocate thread-local storage.
+*
+*/
+
+
+
+#include <e32base.h>
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Src/TCnvCategory.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2002 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:  
+*	  This is the implementation of the class defined in TCnvCategory.h
+*
+*/
+
+
+
+#include "CCnvCategory.h"
+#include "TCnvUnit.h"
+#include "TCnvCategory.h"
+
+
+EXPORT_C TCnvCategory::TCnvCategory() :
+	iCategory( NULL ), iDesCArray( NULL ),
+		iCurrentValueIndex( 0 ), iIsQueryValueOnly( EFalse )
+		{
+		}
+
+TCnvCategory::TCnvCategory( CCnvCategory* aCategory ) :
+	iCategory( aCategory ), iDesCArray( aCategory ),
+		iCurrentValueIndex( 0 ), iIsQueryValueOnly( EFalse )
+		{
+		}
+
+TCnvCategory::TCnvCategory( MDesCArray* aDesCArray ): 
+	iCategory( NULL ), iDesCArray( aDesCArray ), 
+		iCurrentValueIndex( 0 ), iIsQueryValueOnly( ETrue )
+		{
+		}
+
+EXPORT_C TReal TCnvCategory::Convert( TUint aSourceUnit,
+	TUint aDestinationUnit,
+	const TReal& aAmount,
+	TUint aDecimals ) const
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_Convert ) );
+	return iCategory->Convert( aSourceUnit, aDestinationUnit,
+		aAmount, aDecimals );
+	}
+
+EXPORT_C TReal TCnvCategory::UnitFactor( TUint aUnit ) const
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_UnitFactor ) );
+	return iCategory->Unit( aUnit ).iFactor; 
+	}
+
+EXPORT_C TReal TCnvCategory::UnitMinimum( TUint aUnit ) const
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_UnitMinimum ) );
+	return iCategory->Unit( aUnit ).iMinimum; 
+	}
+
+EXPORT_C void TCnvCategory::SetUnitFactor( TUint aUnit,
+	const TReal& aNewFactor )
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_SetUnitFactor ) );
+	iCategory->Unit( aUnit ).iFactor = aNewFactor;
+	}
+
+EXPORT_C void TCnvCategory::SetUnitName( TUint aUnit, const TDesC& aNewName, TCurrencyType aType )
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_SetUnitName ) );
+	iCategory->Unit( aUnit ).iName.Copy( aNewName );
+	iCategory->Unit( aUnit ).iNameType = aType;
+	}
+
+EXPORT_C TUint TCnvCategory::BaseUnit() const
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_BaseUnit ) );
+	return iCategory->BaseUnit();
+	}
+
+EXPORT_C void TCnvCategory::SetBaseUnit( TUint aBaseUnit )
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_SetBaseUnit ) );
+	iCategory->SetBaseUnit( aBaseUnit );
+	iCategory->Unit( aBaseUnit ).iFactor = 1.0;
+	}
+
+EXPORT_C void TCnvCategory::GetDefaultUnits( TUint& aSourceUnit,
+	TUint& aDestinationUnit ) const
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText, EPanicPreCond_GetDefaultUnits ) );
+	iCategory->GetDefaultUnits( aSourceUnit, aDestinationUnit );
+	}
+
+EXPORT_C void TCnvCategory::SetDefaultUnits( TUint aSourceUnit,
+	TUint aDestinationUnit )
+	{
+	__ASSERT_DEBUG( iCategory, User::Panic(KPanicText,  EPanicPreCond_SetDefaultUnits ) );
+	iCategory->SetDefaultUnits( aSourceUnit, aDestinationUnit );
+	}
+
+EXPORT_C const MDesCArray* TCnvCategory::MdcArray() const
+	{
+	return iDesCArray;
+	}
+
+EXPORT_C HBufC* TCnvCategory::CurrentValueTextLC()
+	{
+	__ASSERT_DEBUG( iDesCArray, User::Panic(KPanicText, EPanicPreCond_CurrentValueTextLC ) );
+	TPtrC ptr = iDesCArray->MdcaPoint( iCurrentValueIndex );
+	HBufC* buf = HBufC::NewLC( ptr.Length() );
+	buf->operator=( ptr );
+	return buf;
+	}
+
+EXPORT_C TInt TCnvCategory::CurrentValueIndex() const
+	{
+	return iCurrentValueIndex;
+	}
+
+EXPORT_C void TCnvCategory::SetCurrentValueIndex( const TInt aIndex )
+	{
+	iCurrentValueIndex = aIndex;
+	}
+
+EXPORT_C void TCnvCategory::AddNewCurrencyL( TInt aControlId, TDesC& aNewName, TReal& aNewFactor, TCurrencyType aType )
+	{
+	iCategory->AddNewCurrencyL( aControlId, aNewName, aNewFactor, aType );
+	}
+
+EXPORT_C void TCnvCategory::DeleteCurrencyL(TInt aCurrencyId)
+	{
+	iCategory->DeleteCurrency( aCurrencyId);
+	}
+
+EXPORT_C void TCnvCategory::CreateTempUnitArrayForRestore()
+	{
+	iCategory->CreateTempUnitArrayForRestore();
+	}
+EXPORT_C void TCnvCategory::RestoreUnitArray()
+	{
+	iCategory->RestoreUnitArray();
+	}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Src/TCnvUnit.cpp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2002 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:  
+*	  This is the implementation of the class defined in TCnvUnit.h
+*
+*/
+
+
+
+#include <barsread.h>
+#include <s32strm.h>
+
+#include "TCnvUnit.h"
+
+TCnvUnit::TCnvUnit() : 
+	iFactor( 0 ), iOffset( 0 ), 
+	iMinimum( 0 ), iId( 0 ), 
+	iIsTemperatureUnit( EFalse ),
+	iIsCurrencyUnit ( EFalse )
+	{
+	}
+
+// Read the data from a resource. If this is a temperature unit we have
+// a couple extra parameters to read.
+void TCnvUnit::ReadFromResource( TResourceReader& aReader,
+								 TBool aIsTemperature, TBool aIsCurrencyUnit )
+	{
+	// This flag has been done to avoid storing the two additional TReals in
+	// resources and streams (they are valid only for temperature units).
+	iIsTemperatureUnit = aIsTemperature;
+	iIsCurrencyUnit = aIsCurrencyUnit;
+
+	iName.Copy( aReader.ReadTPtrC() );
+	iFactor = aReader.ReadReal64();
+	iId = aReader.ReadUint16();
+
+	if( iIsTemperatureUnit )
+		{
+		iOffset = aReader.ReadReal64();
+		iMinimum = aReader.ReadReal64();
+		}
+	
+	if(iIsCurrencyUnit)	
+		{
+		TUint nameType (aReader.ReadUint8());
+		iNameType = (TCurrencyType)nameType;
+		}
+	}
+
+// Store the data in a stream.
+void TCnvUnit::ExternalizeL( RWriteStream& aStream ) const
+	{
+	aStream.WriteUint16L( iName.Length() );
+	aStream.WriteL( iName );
+
+	aStream.WriteReal64L( iFactor );
+	
+	aStream.WriteUint16L( iId );
+
+	aStream.WriteUint8L( iIsTemperatureUnit );
+	if( iIsTemperatureUnit )
+		{
+		aStream.WriteReal64L( iOffset );
+		aStream.WriteReal64L( iMinimum );
+		}
+		
+	aStream.WriteUint8L( iIsCurrencyUnit );
+	if(iIsCurrencyUnit)
+		{
+		aStream.WriteUint8L( iNameType );
+		}
+	}
+
+// Recover the data from a stream.
+void TCnvUnit::InternalizeL( RReadStream& aStream, TBool aIsCurrencyCategory )
+	{
+	iIsCurrencyUnit = aIsCurrencyCategory;
+	TUint nameLength( aStream.ReadUint16L() );
+	aStream.ReadL( iName, nameLength );
+
+	iFactor = aStream.ReadReal64L();
+
+	iId = aStream.ReadUint16L();
+
+	iIsTemperatureUnit = aStream.ReadUint8L();
+
+	if( iIsTemperatureUnit )
+		{
+		iOffset = aStream.ReadReal64L();
+		iMinimum = aStream.ReadReal64L();
+		}
+	
+	iIsCurrencyUnit = aStream.ReadUint8L();
+	
+	if(iIsCurrencyUnit)
+		{
+		TUint nameType (aStream.ReadUint8L());
+		iNameType = (TCurrencyType)nameType;
+		}
+	}
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/engine/Src/TCnvUnit.h	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2002 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:  
+*     This class is a data container of unit conversion parameters
+*     for a single unit.
+*     It is able to construct itself from a resource file.
+*
+*/
+
+
+
+#ifndef __TCNVUNIT_H__
+#define __TCNVUNIT_H__
+
+// INCLUDES
+#include <e32base.h>
+#include "CCnvConverter.h"
+// FORWARD DECLARATIONS
+class TResourceReader;
+class RWriteStream;
+
+// CONSTANTS
+const TInt KMaxUnitNameLength = 36;
+
+// CLASS DEFINITION
+/**
+* This class is a data container of unit conversion parameters
+* for a single unit.
+* It is able to construct itself from a resource file.
+*/
+class TCnvUnit
+	{
+	public: // Constructors
+
+		TCnvUnit();
+
+	public:	// new methods.
+
+		/**
+		* Constructs this unit from a CNV_UNIT or CNV_UNIT_TEMPERATURE
+		* resource.
+		* @param aReader A resource reader object initialised to a resource.
+		* @param aIsTemperature EFalse if we are going to read a CNV_UNIT
+		*        resource, ETrue if a CNV_UNIT_TEMPERATURE.
+		*/
+		void ReadFromResource( TResourceReader& aReader,
+							   TBool aIsTemperature = EFalse, TBool aIsCurrencyUnit =EFalse);
+
+		/**
+		* Stores the member variables to the given stream.
+		* @param aStream Stream for writing.
+		*/
+		void ExternalizeL( RWriteStream& aStream ) const;
+
+		/**
+		* Loads the member variables from the given stream.
+		* @param aStream Stream for reading.
+		*/
+		void InternalizeL( RReadStream& aStream , TBool aIsCurrencyCategory = EFalse);
+
+	public: // data
+
+		/**
+		* The factor for converting this unit to the base unit.
+		*/
+		TReal iFactor;
+
+		/**
+		* The offset for converting this unit to the base unit.
+		* Used only with temperature units.
+		*/
+		TReal iOffset;
+
+		/**
+		* Minimum allowable unit amount in conversion.
+		* Used only with temperature units.
+		*/
+		TReal iMinimum;
+
+		/**
+		* Unit name. Max lengh of 35 used in unit name queries.
+		*/
+		TBuf< KMaxUnitNameLength > iName;
+
+		/**
+		* Id of the unit. Used to identify unit among all other units.
+		* Unique.
+		*/
+		TUint iId;
+
+//	private: // data
+
+		/**
+		* ETrue if this unit defines a temperature, EFalse otherwise.
+		*/
+		TBool iIsTemperatureUnit;
+		TBool iIsCurrencyUnit;
+		TCurrencyType iNameType;
+	};
+
+#endif // __TCNVUNIT_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/Converter.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,468 @@
+/*
+* Copyright (c) 2002 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:  
+*     This is the resource definition file for Converter.app
+*  -------------------------------------------------------------------
+*
+*/
+
+
+#include <eikon.rsg>
+#include <eikon.rh>
+#include <uikon.rh>
+
+#include <avkon.loc>
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <avkon.rh>
+#include <avkon.mbg>
+
+
+#include <appinfo.rh>//svg icons
+#include <data_caging_paths_strings.hrh>
+#include "Converter.rh"
+#include "Converter.hrh"
+#include <converter.loc>
+#include <converterengine.loc>
+
+NAME CONV
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf = ""; }
+
+RESOURCE EIK_APP_INFO
+	{
+	}
+
+
+// -- Main form + associated menus -------------------------------------------
+
+RESOURCE DIALOG r_cnv_mainform
+	{
+	flags = EEikDialogFlagNoDrag
+			| EEikDialogFlagFillAppClientRect
+			| EEikDialogFlagButtonsRight
+			| EEikDialogFlagCbaButtons
+			| EEikDialogFlagNoTitleBar;
+buttons	=r_cnv_mainform_softkeys;
+
+	
+	form = r_cnv_mainform_form;
+	}
+	
+
+
+RESOURCE FORM r_cnv_mainform_form
+	{
+	flags = EEikFormEditModeOnly;
+	items =
+		{
+		// conversion type
+		DLG_LINE
+			{
+			type	= EAknCtPopupField;
+			id		= EConverterTypePopup;
+			prompt	= qtn_cnv_label_type;
+			itemflags = EEikDlgItemTakesEnterKey
+						| EEikDlgItemOfferAllHotKeys;
+		    control	= POPUP_FIELD {};
+			},
+
+		// top unit popup
+		DLG_LINE
+			{
+			type	= EAknCtPopupField;
+			id		= EConverterUnit1Popup;
+			prompt	= qtn_cnv_label_unit;
+			itemflags = EEikDlgItemTakesEnterKey
+						| EEikDlgItemOfferAllHotKeys
+						| EEikDlgItemSeparatorAfter;
+		    control	= POPUP_FIELD {};
+			},
+
+		// top amount editor
+		DLG_LINE
+			{
+			type	= EEikCtFlPtEd;
+			id		= EConverterEditor1;
+			prompt	= qtn_cnv_label_amount;
+			itemflags = EEikDlgItemTakesEnterKey;
+			
+			control	= FLPTED { maxlength = KEditorTextMaxLength; };
+			},
+
+		// bottom unit popup
+		DLG_LINE
+			{
+			type	= EAknCtPopupField;
+			id		= EConverterUnit2Popup;
+			prompt	= qtn_cnv_label_unit;
+			itemflags = EEikDlgItemTakesEnterKey
+						| EEikDlgItemOfferAllHotKeys
+						| EEikDlgItemSeparatorAfter;
+		    control	= POPUP_FIELD {};
+			},
+
+		// bottom amount editor
+		DLG_LINE
+			{
+			type	= EEikCtFlPtEd;
+			id		= EConverterEditor2;
+			prompt	= qtn_cnv_label_amount;
+			control	= FLPTED { maxlength = KEditorTextMaxLength; };
+			}
+		};
+	}
+
+RESOURCE MENU_BAR r_cnv_mainform_menubar
+	{
+    titles=
+		{
+		MENU_TITLE { menu_pane = r_cnv_mainform_menupane; }
+		};
+	}
+
+RESOURCE MENU_PANE r_cnv_mainform_menupane
+	{
+	items=
+		{
+		MENU_ITEM { command = ECmdSetUnit; txt = qtn_cnv_set_unit; flags = EEikMenuItemDimmed; },
+		MENU_ITEM { command = ECmdSetCurrency; txt = qtn_cnv_set_currency; flags = EEikMenuItemDimmed; },
+		MENU_ITEM { command = ECmdSetType; txt = qtn_cnv_set_type; },
+		MENU_ITEM { command = ECmdRates; txt = qtn_cnv_rates; flags = EEikMenuItemDimmed; },
+		MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
+		MENU_ITEM { command = EEikCmdExit ; txt = qtn_options_exit; }
+		};
+	}
+
+
+// -- Rates form + associated menus ------------------------------------------
+
+RESOURCE DIALOG r_cnv_ratesform
+	{
+	flags = EEikDialogFlagNoDrag
+			| EEikDialogFlagFillAppClientRect
+			| EEikDialogFlagButtonsRight
+			| EEikDialogFlagCbaButtons
+			| EEikDialogFlagNoTitleBar
+			| EEikDialogFlagWait;
+	buttons = r_cnv_ratesform_softkeys;
+	form = r_cnv_ratesform_form;
+	}
+
+RESOURCE FORM r_cnv_ratesform_form
+	{
+	flags = EEikFormEditModeOnly;
+	items = {};	// This has to be an empty array, we'll fill it up later
+	}
+
+RESOURCE TBUF r_cnv_ratesform_title { buf = qtn_cnv_rates_title; }
+
+RESOURCE MENU_BAR r_cnv_ratesform_menubar
+	{
+    titles=
+		{
+		MENU_TITLE { menu_pane = r_cnv_ratesform_menupane; }
+		};
+	}
+
+RESOURCE MENU_PANE r_cnv_ratesform_menupane
+	{
+	items=
+		{
+		MENU_ITEM { command = ECmdAddCurrency; txt = qtn_cnv_add_currency_rate; },
+		MENU_ITEM { command = ECmdDeleteCurrency; txt = qtn_cnv_opt_delete_currency; },
+		MENU_ITEM { command = ECmdChangeCurrencyName; txt = qtn_cnv_rename_currency; },
+		MENU_ITEM { command = ECmdSetAsBaseCurrency; txt = qtn_cnv_base_currency; },
+		MENU_ITEM { command = EAknFormCmdSave; txt = qtn_cnv_save; },
+		MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
+		MENU_ITEM { command = EEikCmdExit; txt = qtn_options_exit; }
+		};
+	}
+
+RESOURCE CBA r_cnv_ratesform_softkeys
+	{
+	buttons =
+		{
+		CBA_BUTTON { id = EAknSoftkeyOptions; txt = text_softkey_option;},
+		CBA_BUTTON { id = EAknSoftkeyBack; txt = text_softkey_done; }
+		};
+	}
+
+// -- Rates form confirmation query ------------------------------------------
+
+RESOURCE DIALOG r_cnv_confirmation_query
+	{
+	flags = EGeneralQueryFlags;
+	buttons = R_AVKON_SOFTKEYS_YES_NO__YES;
+    items=
+		{
+		DLG_LINE
+			{
+			type = EAknCtQuery;
+			id = EGeneralQuery;
+			control = AVKON_CONFIRMATION_QUERY
+				{
+				layout = EConfirmationLayout;
+				label = qtn_cnf_conf_base_currency;
+				};
+			}
+		};
+	}
+
+// -- Rates form unit name query ---------------------------------------------
+
+RESOURCE DIALOG r_cnv_unitname_query
+	{
+	flags = EGeneralQueryFlags;
+	buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
+	items=
+		{
+		DLG_LINE
+			{
+			type = EAknCtQuery;
+			id = EGeneralQuery;
+			control= AVKON_DATA_QUERY
+				{
+				layout = EDataLayout;
+				label = qtn_cnv_edit_name_prompt;
+				control = EDWIN
+					{
+					maxlength = MAXCURRENCYNAMELENGTH;
+					};
+				};
+			}
+		};
+	}
+
+// -- Error note texts -------------------------------------------------------
+
+RESOURCE TBUF r_qtn_fldr_name_already_used { buf = qtn_fldr_name_already_used; }
+RESOURCE TBUF r_cnv_mainform_norate { buf = qtn_cnv_error_no_rate_singular; }
+RESOURCE TBUF r_cnv_mainform_norate_plural { buf = qtn_cnv_error_no_rate_plural; }
+RESOURCE TBUF r_cnv_mainform_invalidvalue { buf = qtn_cnv_error_invalid; }
+
+// -- Unit conversion parameters ---------------------------------------------
+
+RESOURCE CNV_MODEL r_cnv_model
+	{
+	// REMEMBER TO INCREMENT THIS VERSION NUMBER EVERY TIME THE ABOVE DATA IS
+	// MODIFIED (EVEN JUST UNIT NAMES) THIS IS TO AVOID CONFLICT BETWEEN
+	// SAVED APPLICATION SETTINGS AND THE DATA BELOW.
+	modelVersion = 8;
+	currencycategory = 0;
+	categories =
+		{
+		// NORMAL, NON-CHINESE, CURRENCY CATEGORY
+		CNV_CATEGORY
+			{
+			ischineseorder = 0; baseunit = 0; unit1 = 0; unit2 = 1; name = qtn_cnv_type_currency;
+			units =
+				{
+//Change: Only six currencies are present. There is no language dependent base currency..
+
+				CNV_UNIT_CURRENCY { name = qtn_cnv_rate_home; factor = 1.0; id = ECurrencyHome; type = 2;},
+				CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
+				CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
+				CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
+				CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
+				CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;},
+				CNV_UNIT_CURRENCY { name = qtn_cnv_rate_foreign; factor = 1.0; id = ECurrencyForeign; type = 3;}
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 6; unit1 = 1; unit2 = 6; name = qtn_cnv_type_area;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_area_item_sq_inches;		factor = 1550.0031000062001;		id = EAreaItemSqInches; },	// 6
+				CNV_UNIT { name = qtn_cnv_area_item_sq_feet;		factor = 10.763910416709722;		id = EAreaItemSqFeet; },	// 7
+				CNV_UNIT { name = qtn_cnv_area_item_sq_yards;		factor = 1.1959900463010802;		id = EAreaItemSqYards; },	// 8
+				CNV_UNIT { name = qtn_cnv_area_item_sq_miles;		factor = 0.0000003861021585424;		id = EAreaItemSqMiles; },	// 10
+				CNV_UNIT { name = qtn_cnv_area_item_sq_mm;			factor = 1000000.0;					id = EAreaItemSqMm; },		// 0
+				CNV_UNIT { name = qtn_cnv_area_item_sq_cm;			factor = 10000.0;					id = EAreaItemSqCm; },		// 1
+				CNV_UNIT { name = qtn_cnv_area_item_sq_metres;		factor = 1.0;						id = EAreaItemSqMetres; },	// 2
+				CNV_UNIT { name = qtn_cnv_area_item_sq_km;			factor = 0.000001;					id = EAreaItemSqKm; },		// 5
+				CNV_UNIT { name = qtn_cnv_area_item_acres;			factor = 0.00024710538146716527;	id = EAreaItemAcres; },		// 9
+				CNV_UNIT { name = qtn_cnv_area_item_ares;			factor = 0.01;						id = EAreaItemAres; },		// 3
+				CNV_UNIT { name = qtn_cnv_area_item_hectares;		factor = 0.0001;					id = EAreaItemHectares; }	// 4
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 0; baseunit = 2; unit1 = 1; unit2 = 3; name = qtn_cnv_type_energy;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_energ_item_calor;			factor = 0.23884589662749592;		id = EEnergItemCalor; },	// 0
+				CNV_UNIT { name = qtn_cnv_energ_item_k_calor;		factor = 0.00023884589662749592;	id = EEnergItemKCalor; },	// 1
+				CNV_UNIT { name = qtn_cnv_energ_item_joules;		factor = 1.0;						id = EEnergItemJoules; },	// 2
+				CNV_UNIT { name = qtn_cnv_energ_item_k_joules;		factor = 0.001;						id = EEnergItemKJoules; },	// 3
+				CNV_UNIT { name = qtn_cnv_energ_item_hrs_pw_h;		factor = 0.00000037300002052;		id = EEnergItemHrsPwH; },	// 4
+				CNV_UNIT { name = qtn_cnv_energ_item_kw_h;			factor = 0.00000027777777777778;	id = EEnergItemKwH; },		// 5
+				CNV_UNIT { name = qtn_cnv_energ_item_elec_vol;		factor = 6241506000000000000.0;		id = EEnergItemElecVol; }	// 6
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 2; unit1 = 7; unit2 = 2; name = qtn_cnv_type_length;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_length_item_mm;			factor = 1000.0;					id = ELengthItemMm; },		// 0
+				CNV_UNIT { name = qtn_cnv_length_item_cm;			factor = 100.0;						id = ELengthItemCm; },		// 1
+				CNV_UNIT { name = qtn_cnv_length_item_metres;		factor = 1.0;						id = ELengthItemMetres; },	// 2
+				CNV_UNIT { name = qtn_cnv_length_item_km;			factor = 0.001;						id = ELengthItemKm; },		// 3
+				CNV_UNIT { name = qtn_cnv_length_item_inches;		factor = 39.37007874015748;			id = ELengthItemInches; },	// 4
+				CNV_UNIT { name = qtn_cnv_length_item_feet;			factor = 3.280839895013123;			id = ELengthItemFeet; },	// 5
+				CNV_UNIT { name = qtn_cnv_length_item_yards;		factor = 1.0936132983377076;		id = ELengthItemYards; },	// 6
+				CNV_UNIT { name = qtn_cnv_length_item_miles;		factor = 0.0006213711922373338;		id = ELengthItemMiles; },	// 7
+				CNV_UNIT { name = qtn_cnv_length_item_nm;			factor = 0.0005399568034557234;		id = ELengthItemNm; }		// 8
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 1; unit1 = 5; unit2 = 2; name = qtn_cnv_type_mass;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_mass_item_milgrams;		factor = 1000.0;					id = EMassItemMilgrams; },	// 0
+				CNV_UNIT { name = qtn_cnv_mass_item_grams;			factor = 1.0;						id = EMassItemGrams; },		// 1
+				CNV_UNIT { name = qtn_cnv_mass_item_kilograms;		factor = 0.001;						id = EMassItemKilograms; },	// 2
+				CNV_UNIT { name = qtn_cnv_mass_item_m_tons;			factor = 0.000001;					id = EMassItemMTons; },		// 3
+				CNV_UNIT { name = qtn_cnv_mass_item_ounces;			factor = 0.03527396194958041;		id = EMassItemOunces; },	// 4
+				CNV_UNIT { name = qtn_cnv_mass_item_pounds;			factor = 0.002204622621848776;		id = EMassItemPounds; },	// 5
+				CNV_UNIT { name = qtn_cnv_mass_item_stones;			factor = 0.0001574730444177697;		id = EMassItemStones; }		// 6
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 0; unit1 = 2; unit2 = 1; name = qtn_cnv_type_power;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_power_item_watts;			factor = 1.0;						id = EPowerItemWatts; },	// 0
+				CNV_UNIT { name = qtn_cnv_power_item_k_watts;		factor = 0.001;						id = EPowerItemKWatts; },	// 1
+				CNV_UNIT { name = qtn_cnv_power_item_horsepwr;		factor = 0.001341021858656296;		id = EPowerItemHorsepwr; }	// 2
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 2; unit1 = 2; unit2 = 1; name = qtn_cnv_type_pressure;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_pressure_item_athm;		factor = 0.00000986923266716013;	id = EPressureItemAthm; },	// 0
+				CNV_UNIT { name = qtn_cnv_pressure_item_bars;		factor = 0.00001;					id = EPressureItemBars; },	// 1
+				CNV_UNIT { name = qtn_cnv_pressure_item_pasc;		factor = 1.0;						id = EPressureItemPasc; },	// 2
+				CNV_UNIT { name = qtn_cnv_pressure_item_mmhg;		factor = 0.0075006;         		id = EPressureItemMmhg; }	// 3
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 2; unit1 = 1; unit2 = 0; istemperature = 1; name = qtn_cnv_type_temperature;
+			units =
+				{
+				CNV_UNIT_TEMPERATURE { name = qtn_cnv_temp_item_celsius;	factor = 1.0; offset = 0.0; min = -273.15;	id = ETempItemCelsius; }, // 0
+				CNV_UNIT_TEMPERATURE { name = qtn_cnv_temp_item_fahrenh;	factor = 1.8; offset = 32; min = -459.67;	id = ETempItemFahrenh; }, // 1
+				CNV_UNIT_TEMPERATURE { name = qtn_cnv_temp_item_kelvin;		factor = 1.0; offset = 273.15;				id = ETempItemKelvin; }	  // 2
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 4; unit1 = 3; unit2 = 2; name = qtn_cnv_type_time;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_time_item_seconds;		factor = 1.0;						id = ETimeItemSeconds; },	// 0
+				CNV_UNIT { name = qtn_cnv_time_item_minutes;		factor = 0.016666666666666667;		id = ETimeItemMinutes; },	// 1
+				CNV_UNIT { name = qtn_cnv_time_item_hours;			factor = 0.000277777777777778;		id = ETimeItemHours; },		// 2
+				CNV_UNIT { name = qtn_cnv_time_item_days;			factor = 0.0000115740740740740741;	id = ETimeItemDays; },		// 3
+				CNV_UNIT { name = qtn_cnv_time_item_weeks;			factor = 0.00000165343915343915343; id = ETimeItemWeeks; }		// 4
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 1; unit1 = 2; unit2 = 0; name = qtn_cnv_type_velocity;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_vel_item_km_h;			factor = 1.0;						id = EVelItemKmH; },		// 0
+				CNV_UNIT { name = qtn_cnv_vel_item_metres_sec;		factor = 0.2777777777777778;		id = EVelItemMetresSec; },	// 1
+				CNV_UNIT { name = qtn_cnv_vel_item_miles_h;			factor = 0.6213711922373341;		id = EVelItemMilesH; },		// 2
+				CNV_UNIT { name = qtn_cnv_vel_item_feet_sec;		factor = 0.9113444152814232;		id = EVelItemFeetSec; },	// 3
+				CNV_UNIT { name = qtn_cnv_vel_item_knots;			factor = 0.539957269941486;			id = EVelItemKnots; }		// 4
+				};
+			},
+
+		CNV_CATEGORY
+			{
+			ischineseorder = 1; baseunit = 1; unit1 = 8; unit2 = 1; name = qtn_cnv_type_volume;
+			units =
+				{
+				CNV_UNIT { name = qtn_cnv_vol_item_millilitres;		factor = 1000.0;					id = EVolItemMillilitres; },// 0
+				CNV_UNIT { name = qtn_cnv_vol_item_litres;			factor = 1.0;						id = EVolItemLitres; },		// 1
+				CNV_UNIT { name = qtn_cnv_vol_item_cub_mm;			factor = 1000000.0;					id = EVolItemCubMm; },		// 2
+				CNV_UNIT { name = qtn_cnv_vol_item_cub_cm;			factor = 1000.0;					id = EVolItemCubCm; },		// 3
+				CNV_UNIT { name = qtn_cnv_vol_item_cub_metres;		factor = 0.001;						id = EVolItemCubMetres; },	// 4
+				CNV_UNIT { name = qtn_cnv_vol_item_cub_inches;		factor = 61.023744094732294;		id = EVolItemCubInches; },	// 5
+				CNV_UNIT { name = qtn_cnv_vol_item_cub_feet;		factor = 0.0353146667214886;		id = EVolItemCubFeet; },	// 6
+				CNV_UNIT { name = qtn_cnv_vol_item_gallons_uk;		factor = 0.21996924829908782;		id = EVolItemGallonsUk; },	// 7
+				CNV_UNIT { name = qtn_cnv_vol_item_gallons_us;		factor = 0.2641720523581485;		id = EVolItemGallonsUs; },	// 8
+				CNV_UNIT { name = qtn_cnv_vol_item_pints_im;		factor = 1.7597539863927025;		id = EVolItemPintsIm; },	// 9
+				CNV_UNIT { name = qtn_cnv_vol_item_pints_us;		factor = 1.8161659685377122;		id = EVolItemPintsUs; },	// 10
+				CNV_UNIT { name = qtn_cnv_vol_item_liq_pints;		factor = 2.113376418865188;			id = EVolItemLiqPints; },	// 11
+				CNV_UNIT { name = qtn_cnv_vol_item_liq_ounc_us;		factor = 33.81402270184301;			id = EVolItemLiqOuncUs; },	// 12
+				CNV_UNIT { name = qtn_cnv_vol_item_liq_ounc_uk;		factor = 35.19507972785406;			id = EVolItemLiqOuncUk; },	// 13
+				CNV_UNIT { name = qtn_cnv_vol_item_barrels;			factor = 0.006289810770432106;		id = EVolItemBarrels; }		// 14
+				};
+			}
+		};
+	}
+
+RESOURCE TBUF r_qtn_cnv_confirm_delete { buf = qtn_cnv_query_del_currency; }
+RESOURCE TBUF r_qtn_cnv_foreign {buf = qtn_cnv_rate_foreign; } 
+RESOURCE TBUF r_qtn_cnv_home {buf = qtn_cnv_rate_home; } 
+
+//Resource for MSK
+
+RESOURCE CBA r_cnv_mainform_softkeys
+	{
+	buttons =
+		{
+		CBA_BUTTON { id = EAknSoftkeyOptions; txt = text_softkey_option;},
+		CBA_BUTTON { id = EAknSoftkeyExit; txt = text_softkey_exit; },
+		CBA_BUTTON { id = EAknSoftkeyChange; txt =qtn_options_change;}
+		};
+	}
+
+RESOURCE LOCALISABLE_APP_INFO r_cnv_localisable_app_info
+    {
+    short_caption = qtn_cnv_app_caption_short;
+    caption_and_icon = 
+    CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_cnv_app_caption;
+#ifdef __SCALABLE_ICONS
+        number_of_icons = 1;
+        icon_file = APP_BITMAP_DIR"\\converter_aif.mif";
+#else
+        number_of_icons = 2;
+        icon_file = APP_BITMAP_DIR"\\Converter_aif.mbm";
+#endif
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/Converter_caption.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2002 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:  
+*     This is the caption resource definition file for Converter.app
+*  -------------------------------------------------------------------
+*
+*/
+
+
+
+#include <apcaptionfile.rh>
+#include <Converter.loc>
+
+RESOURCE CAPTION_DATA
+	{
+	caption = qtn_cnv_app_caption;
+	shortcaption = qtn_cnv_app_caption_short;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/backup_registration.xml	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+    <passive_backup>
+      <include_directory name = "\"/>
+    </passive_backup>
+    <restore requires_reboot = "no"/>
+</backup_registration>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2002 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:  This file provides the information required for building Converter
+*
+*/
+
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+//  Help exports
+#include "../help/group/bld.inf"
+
+PRJ_EXPORTS
+./backup_registration.xml /epoc32/data/z/private/101f4668/backup_registration.xml
+./backup_registration.xml /epoc32/release/winscw/udeb/z/private/101f4668/backup_registration.xml
+./backup_registration.xml /epoc32/release/winscw/urel/z/private/101f4668/backup_registration.xml
+// export localised loc file
+../loc/Converter.loc   APP_LAYER_LOC_EXPORT_PATH(converter.loc)
+../loc/ConverterEngine.loc   APP_LAYER_LOC_EXPORT_PATH(converterengine.loc)
+
+// export IBY files
+../rom/Converter.iby            CORE_APP_LAYER_IBY_EXPORT_PATH(converter.iby)
+../rom/Converterengine.iby      CORE_APP_LAYER_IBY_EXPORT_PATH(converterengine.iby)
+../rom/ConverterResources.iby   LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(converterresources.iby)
+
+PRJ_MMPFILES
+
+//	#ifdef __SCALABLE_ICONS
+//		gnumakefile converter_icons_aif_scalable_dc.mk
+//	#else
+//		gnumakefile converter_icons_aif_bitmaps_dc.mk
+//	#endif
+
+engine.mmp
+ui.mmp
+
+PRJ_EXTENSIONS
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE converter_aif.mif
+OPTION SOURCES -c8,8 qgn_menu_cnv
+END
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/converter_icons_aif_bitmaps.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2004 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:  Icons makefile for project Converter
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\system\apps\converter
+ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mbm
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_cnv_lst.bmp \
+		/c8,8 qgn_menu_cnv_cxt.bmp
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/converter_icons_aif_bitmaps_dc.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2004 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:  Icons makefile for project Converter
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+# Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\RESOURCE\APPS
+ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mbm
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_cnv_lst.bmp \
+		/c8,8 qgn_menu_cnv_cxt.bmp
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/converter_icons_aif_scalable.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2004 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:  Icons makefile for project Converter
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+#  Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\system\apps\converter
+ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mif
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+#  Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_cnv.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/converter_icons_aif_scalable_dc.mk	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2004 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:  Icons makefile for project Converter
+#
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
+else
+ZDIR=\epoc32\data\z
+endif
+
+# ----------------------------------------------------------------------------
+#  Configure these
+# ----------------------------------------------------------------------------
+
+TARGETDIR=$(ZDIR)\RESOURCE\APPS
+ICONTARGETFILENAME=$(TARGETDIR)\converter_aif.mif
+
+do_nothing :
+	@rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+#  Configure these.
+#
+# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by
+# MifConv if the mask detph is defined.
+#
+# NOTE 2: Usually, source paths should not be included in the bitmap
+# definitions. MifConv searches for the icons in all icon directories in a
+# predefined order, which is currently \s60\icons, \s60\bitmaps2.
+# The directory \s60\icons is included in the search only if the feature flag
+# __SCALABLE_ICONS is defined.
+# ----------------------------------------------------------------------------
+
+RESOURCE :
+	mifconv $(ICONTARGETFILENAME) \
+		/c8,8 qgn_menu_cnv.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+	@echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/converter_reg.rss	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2004 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:   This file contains the application registration resource.
+*
+*/
+
+
+
+#include <appinfo.rh>
+#include <Converter.rsg>
+
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x101f4668 // Define your application UID here
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "converter";
+    localisable_resource_file = APP_RESOURCE_DIR"\\converter";
+    localisable_resource_id = R_CNV_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/engine.mmp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2002 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:  
+*	  This is the project definition file. It defines the application UIDs,
+*     source code, paths and libraries needed.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+LANGUAGE_IDS
+TARGET		converterengine.dll
+TARGETTYPE	dll
+UID		0x1000008d 0x101f4669
+
+VENDORID	VID_DEFAULT
+
+CAPABILITY 	CAP_GENERAL_DLL
+
+SOURCEPATH	../engine/Src
+SOURCE		DllMain.cpp CCnvConverter.cpp CCnvCategory.cpp
+SOURCE		TCnvCategory.cpp TCnvUnit.cpp
+ 
+USERINCLUDE	../engine/Inc  
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY		euser.lib bafl.lib estor.lib avkon.lib
+
+
+     #if defined(ARMCC)
+         DEFFILE ../eabi/ConverterEngine_EKA2.def
+     #elif defined( WINSCW )
+         DEFFILE ../BWinsCw/ConverterEngine_EKA2.def
+     #elif defined( WINS )
+         DEFFILE ../BWins/ConverterEngine_EKA2.def
+     #else
+         DEFFILE ../BMarm/ConverterEngine_EKA2.def
+     #endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/group/ui.mmp	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2002 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:  
+*	  This is the project definition file. It defines the application UIDs,
+*     source code, paths, bitmaps and libraries needed.
+*
+*/
+
+
+
+
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+EPOCSTACKSIZE 0X5000
+
+TARGET 			converter.exe
+TARGETTYPE 		exe
+
+UID			0x100039ce 0x101f4668
+
+VENDORID	VID_DEFAULT
+
+CAPABILITY 	CAP_APPLICATION
+
+APP_LAYER_SYSTEMINCLUDE
+
+START RESOURCE ../group/Converter.rss
+HEADER
+
+TARGETPATH    APP_RESOURCE_DIR
+
+LANGUAGE_IDS
+END 
+
+START RESOURCE ../group/converter_reg.rss
+DEPENDS converter.rsg
+// Do not change the UID below.
+TARGETPATH /private/10003a3f/apps
+END
+
+
+SOURCEPATH	../Ui/Src
+SOURCE		CCnvApplication.cpp CCnvDocument.cpp CCnvAppUi.cpp
+SOURCE		CCnvMainForm.cpp CCnvRatesForm.cpp
+
+USERINCLUDE	 ../group ../Ui/Src  
+ 
+
+SYSTEMINCLUDE	../engine/Inc
+
+LIBRARY		euser.lib apparc.lib cone.lib eikcore.lib
+LIBRARY		eikcoctl.lib avkon.lib eikdlg.lib
+LIBRARY		eikctl.lib	// CEikFloatingPointEditor
+LIBRARY		commonengine.lib // StringLoader
+LIBRARY		estor.lib // RFileWriteStream, RFileReadStream
+LIBRARY		commonui.lib // CErrorUI
+LIBRARY		featmgr.lib // Feature Manager
+LIBRARY		converterengine.lib
+LIBRARY		hlplch.lib // HlpLauncher
+LIBRARY		efsrv.lib
+
+
Binary file extras/converter/help/data/xhtml.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/help/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009 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:
+* Export help related files.
+*
+*/
+
+#include <platform_paths.hrh>				
+PRJ_EXPORTS
+:zip ../data/xhtml.zip   /epoc32/data/z/resource/ overwrite
+:zip ../data/xhtml.zip   /epoc32/winscw/c/resource/ overwrite
+
+../inc/cnv.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/cnv.hlp.hrh)
+../rom/converterhelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(converterhelps_variant.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/help/inc/cnv.hlp.hrh	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 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:
+*
+*/
+	
+//
+// cnv.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __CNV_HLP_HRH__
+#define __CNV_HLP_HRH__
+
+_LIT(KCNV_HLP_RATES, "CNV_HLP_RATES"); // 
+_LIT(KCNV_HLP_MAIN_STATE, "CNV_HLP_MAIN_STATE"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/help/rom/converterhelps_variant.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 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: 
+*
+*/
+
+#ifndef __CONVERTERHELPS_VARIANT_IBY__
+#define __CONVERTERHELPS_VARIANT_IBY__
+
+#if defined(FF_S60_HELPS_IN_USE)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4668\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4668\meta.xml)
+#endif
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/loc/Converter.loc	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,229 @@
+/*
+* Copyright (c) 2002 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:  
+*     This is a localisation file for Converter.app
+*     A .loc file is the one and only place where the logical strings
+*     to be localised are defined. 
+*  -------------------------------------------------------------------
+*
+*/
+
+
+
+// LOCALISATION STRINGS
+
+
+// -- Menu items -------------------------------------------------------------
+
+// d: Command in options list (main form).
+// d: Changes the type of conversion being performed (length, area, temp, etc)
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_set_type		"Set type"
+
+// d: Command in options list (main form).
+// d: Changes the current unit (meters, feet, mm, etc)
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_set_unit		"Set unit"
+
+// d: Command in options list (main form).
+// d: Changes the current currency unit
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_set_currency	"Set currency"
+
+// d: Command in options list (main form).
+// d: Opens rates form
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_rates			"Rates"
+
+// d: Command in options list (rates form).
+// d: used for changing the name of a currency
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_rename_currency	"Rename Currency"
+
+// d: Command in options list (rates form).
+// d: used for selecting a new base currency
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_base_currency	"Set as base currency"
+
+// d: Command in options list (rates form).
+// d: used to save edited currency rates
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_save			"Save"
+
+// d: Command in options list (rates form).
+// d: used to add new currencies
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_add_currency_rate        "Add Currency Rate"
+
+// d: Command in options list (rates form).
+// d: used to delete currencies
+// l: list_single_pane_t1_cp2
+//
+#define qtn_cnv_opt_delete_currency     "Delete Currency Rate"
+
+// -- Form texts -------------------------------------------------------------
+
+// d: Form field label (main form)
+// d: Identifies popup field for setting type of conversion
+// l: form_field_data_pane_t1
+//
+#define qtn_cnv_label_type		"Type"
+
+// d: Form field label (main form)
+// d: Identifies popup field for setting conversion unit
+// l: form_field_data_pane_t1
+//
+#define qtn_cnv_label_unit		"Unit"
+
+// d: Form field label (main form)
+// d: Identifies popup field for entering data
+// l: form_field_data_pane_t1
+//
+#define qtn_cnv_label_amount	"Amount"
+
+// d: Form title (rates form)
+// d: Displayed while in rates form
+// l: title_pane_t2/opt9
+//
+#define qtn_cnv_rates_title		"Rates (1 %U)"
+
+// -- Query and note texts ---------------------------------------------------
+
+// d: Confirmation that all currency rates are about to be reset
+// d: Note that the confirmation dialog only fits 20-25 characters comfortably on a line
+// l: popup_note_window
+//
+#define qtn_cnf_conf_base_currency	"All set rates will be cleared.Continue?"
+
+// d: Query prompt used when renaming a currency
+// l: popup_query_data_window
+//
+#define qtn_cnv_edit_name_prompt		"Currency name:"
+
+// d: Error note text (main form)
+// d: Displayed when attempting to convert using a currency whose rate has not be established.
+// l: popup_note_window
+//
+#define qtn_cnv_error_no_rate_singular	"Currency rate\nis missing."
+
+// d: Error note text (main form)
+// d: Displayed when attempting to convert using a currency whose rate has not be established.
+// l: popup_note_window
+//
+#define qtn_cnv_error_no_rate_plural	"Currency rates\nare missing."
+
+// d: Error note text (main form)
+// d: Displayed when attempting to convert a value smaller than the units minimum value
+// l: popup_note_window
+//
+#define qtn_cnv_error_invalid	"Invalid value."
+
+
+// d: Confirmation that the currency on focus will be deleted
+// d: Note that the confirmation dialog only fits 20-25 characters comfortably on a line
+// l: popup_note_window
+//
+#define qtn_cnv_query_del_currency      "Delete Currency Rate %U?"
+
+
+// -- Application captions ---------------------------------------------------
+
+//d:The application's caption string for the AIF file
+//d:Long version
+//l:list_single_large_graphic_pane_t1
+//
+#define qtn_cnv_app_caption		"Converter"
+
+//d:The application's caption string for the AIF file
+//d:Short version
+//l:cell_app_pane_t1
+//
+#define qtn_cnv_app_caption_short	"Converter"
+
+
+// -- Unit category names ----------------------------------------------------
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_currency		"Currency"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_area			"Area"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_energy			"Energy"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_length			"Length"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_mass			"Mass"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_power			"Power"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_pressure		"Pressure"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_temperature	"Temperature"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_time			"Time"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_velocity		"Velocity"
+
+// d: Popup field choice (main form)
+// d: Unit category
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_type_volume			"Volume"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/loc/ConverterEngine.loc	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,708 @@
+/*
+* Copyright (c) 2002 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:  
+*     This is a localisation file for Converter.app
+*     A .loc file is the one and only place where the logical strings
+*     to be localised are defined. 
+*  -------------------------------------------------------------------
+*
+*/
+
+
+
+// LOCALISATION STRINGS
+
+
+
+// -- Unit names -------------------------------------------------------------
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_usd "USD"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_eur "EUR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_gbp "GBP"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_jpy "JPY"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_aed "AED"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_aud "AUD"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_bgl "BGL"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_brr "BRR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_cad "CAD"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_chf "CHF"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_cny "CNY"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_czk "CZK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_dkk "DKK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_eek "EEK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_egp "EGP"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_hkd "HKD"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_hrk "HRK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_huf "HUF"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_idr "IDR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_ils "ILS"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_inr "INR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_isk "ISK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_mxp "MXP"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_myr "MYR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_nok "NOK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_nzd "NZD"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_php "PHP"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_pln "PLN"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_rol "ROL"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_rur "RUR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_sar "SAR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_sek "SEK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_sgd "SGD"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_sit "SIT"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_skk "SKK"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_thb "THB"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_trl "TRL"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_chi_cnv_currency_twd "TWD"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_chi_cnv_currency_krw "KRW"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_uah "UAH"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_yun "YUN"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_currency_zar "ZAR"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+
+#define qtn_cnv_area_item_sq_mm	"Square millimetres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_sq_cm	"Square centimetres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_sq_metres	"Square metres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_ares	"Ares"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_hectares	"Hectares"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_sq_km	"Square kilometres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_sq_inches	"Square inches"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_sq_feet	"Square feet"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_sq_yards	"Square yards"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_acres	"Acres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_area_item_sq_miles	"Square miles"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_energ_item_calor	"Calories"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_energ_item_k_calor	"Kilocalories"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_energ_item_joules	"Joules"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_energ_item_k_joules	"Kilojoules"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_energ_item_hrs_pw_h	"Horsepower-hours"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_energ_item_kw_h	"Kilowatt-hours"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_energ_item_elec_vol	"Electron volts"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_mm	"Millimetres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_cm	"Centimetres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_metres	"Metres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_km	"Kilometres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_inches	"Inches"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_feet	"Feet"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_yards	"Yards"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_miles	"Miles"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_length_item_nm	"Nautical miles"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_mass_item_milgrams	"Milligrams"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_mass_item_grams	"Grams"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_mass_item_kilograms	"Kilograms"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_mass_item_m_tons	"Metric tons"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_mass_item_ounces	"Ounces"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_mass_item_pounds	"Pounds"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_mass_item_stones	"Stones"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_power_item_watts	"Watts"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_power_item_k_watts	"Kilowatts"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_power_item_horsepwr	"Horsepower"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_pressure_item_athm	"Atmospheres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_pressure_item_bars	"Bars"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_pressure_item_pasc	"Pascals"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_pressure_item_mmhg	"mm Hg"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_temp_item_celsius	"Celsius"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_temp_item_fahrenh	"Fahrenheit"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_temp_item_kelvin	"Kelvin"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_time_item_seconds	"Seconds"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_time_item_minutes	"Minutes"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_time_item_hours	"Hours"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_time_item_days	"Days"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_time_item_weeks	"Weeks"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vel_item_km_h	"Kilometres/hour"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vel_item_metres_sec	"Metres/second"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vel_item_miles_h	"Miles/hour"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vel_item_feet_sec	"Feet/second"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vel_item_knots	"Knots"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_millilitres	"Millilitres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_litres	"Litres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_cub_mm	"Cubic mm"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_cub_cm	"Cubic cm"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_cub_metres	"Cubic metres"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_cub_inches	"Cubic inches"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_cub_feet	"Cubic feet"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_gallons_uk	"Gallons (UK)"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_gallons_us	"Gallons (US)"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_pints_im	"Pints (UK)"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_pints_us	"Dry pints (US)"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_liq_pints	"Liquid pints (US)"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_liq_ounc_us	"Liquid ounces (US)"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_liq_ounc_uk	"Liquid ounces (UK)"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+//
+#define qtn_cnv_vol_item_barrels	"Barrels"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+
+#define qtn_cnv_rate_home	"Home"
+
+// d: Popup field choice (main form)
+// d: Unit item
+// l: list_form_graphic_pane_t1
+#define qtn_cnv_rate_foreign	"Foreign"
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/rom/Converter.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2002 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:  Image description file for project Converter
+* 
+*/
+
+
+
+#ifndef __CONVERTER_IBY__
+#define __CONVERTER_IBY__
+
+S60_APP_EXE(converter)
+S60_APP_AIF_ICONS(converter)
+S60_APP_AIF_RSC(converter)
+data=DATAZ_\private\101f4668\backup_registration.xml private\101f4668\backup_registration.xml
+#endif __CONVERTER_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/rom/ConverterResources.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2002 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:  Image description file for Converter
+*     
+*
+*/
+
+
+
+#ifndef __CONVERTER_RESOURCES_IBY__
+#define __CONVERTER_RESOURCES_IBY__
+
+//Resource file(s) for CONVERTER application
+#ifndef NO_PIMS_IN_ROM
+S60_APP_CAPTION(Converter)
+S60_APP_RESOURCE(Converter)
+#endif
+//Resource file(s) for CONVERTERENGINE application
+//data=ABI_DIR\BUILD_DIR\ConverterEngine.rsc                            System\Data\Converterengine.rsc
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/converter/rom/Converterengine.iby	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2002 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:  Image description file for converter engine
+*    
+*
+*/
+
+
+
+#ifndef __CONVERTERENGINE_IBY__
+#define __CONVERTERENGINE_IBY__
+
+file=ABI_DIR\BUILD_DIR\converterengine.dll         SHARED_LIB_DIR\converterengine.dll
+
+#endif __CONVERTERENGINE_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extras/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2006-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"
+* 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:   Build info file for Ado domain extrapimui extras subsystem components.
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+// extras subsystem
+#include "../about/group/bld.inf"
+#include "../calcsoft/group/bld.inf"
+#include "../converter/group/bld.inf"
+
+
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+
+PRJ_TESTEXPORTS
+
+
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/group/bld.inf	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2006-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"
+* 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:   Build info file for Ado domain extrapimui extras subsystem components.
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+// extras subsystem
+#include "../extras/group/bld.inf"
+
+
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+
+PRJ_TESTEXPORTS
+
+
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/layers.sysdef.xml	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+  <!ENTITY layer_real_source_path "sf/app/utils" >
+]>
+
+<SystemDefinition name="utils" schema="1.4.0">
+  <systemModel>
+    <layer name="app_layer">
+      <module name="utils">
+        <unit unitID="orgdo.utils" mrp="" bldFile="&layer_real_source_path;/group" name="utils" />
+      </module>
+    </layer>
+  </systemModel>
+</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0">
+  <package id="utils" name="Utility Apps" levels="app">
+    <collection id="extras" name="Extras" level="app">
+      <component id="about" filter="s60" name="About Application">
+        <unit bldFile="extras/about/group"/>
+      </component>
+      <component id="calcsoft" filter="s60" name="Calculator Application">
+        <unit bldFile="extras/calcsoft/group"/>
+      </component>
+      <component id="converter" filter="s60" name="Unit Converter">
+        <unit bldFile="extras/converter/group"/>
+      </component>
+    </collection>
+  </package>
+</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_4_0.dtd	Mon Jan 18 20:20:33 2010 +0200
@@ -0,0 +1,86 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>