kernel/eka/euser/us_exec.cpp
changeset 259 57b9594f5772
parent 201 43365a9b78a3
child 271 dc268b18d709
equal deleted inserted replaced
247:d8d70de2bd36 259:57b9594f5772
  2885 stored in this TExtendedLocale. If you want to set the system wide settings with
  2885 stored in this TExtendedLocale. If you want to set the system wide settings with
  2886 the locale information in the DLL, you can call TExtendedLocale::SaveSystemSettings
  2886 the locale information in the DLL, you can call TExtendedLocale::SaveSystemSettings
  2887 after calling this function.
  2887 after calling this function.
  2888 
  2888 
  2889 @param aLocaleDllName The name of the locale DLL to be loaded
  2889 @param aLocaleDllName The name of the locale DLL to be loaded
  2890 @return KErrNone if successful, system wide error if not
  2890 @return KErrNone if successful, KErrNotSupported if the DLL name matches the pattern
       
  2891 of a new-style locale library, system wide error otherwise
  2891 
  2892 
  2892 @see TExtendedLocale::SaveSystemSettings 
  2893 @see TExtendedLocale::SaveSystemSettings 
  2893 */
  2894 */
  2894 EXPORT_C TInt TExtendedLocale::LoadLocale(const TDesC& aLocaleDllName)
  2895 EXPORT_C TInt TExtendedLocale::LoadLocale(const TDesC& aLocaleDllName)
  2895 	{
  2896 	{
  2896 #ifdef SYMBIAN_DISTINCT_LOCALE_MODEL
  2897 #ifdef SYMBIAN_DISTINCT_LOCALE_MODEL
       
  2898 	if (aLocaleDllName.Find(KFindLan) != KErrNotFound || aLocaleDllName.Find(KFindReg) != KErrNotFound || aLocaleDllName.Find(KFindCol) != KErrNotFound)
       
  2899 		{
       
  2900 		return KErrNotSupported; // Only try to load old-style locale libraries
       
  2901 		}
  2897 	TLibraryFunction data[KNumLocaleExports];
  2902 	TLibraryFunction data[KNumLocaleExports];
  2898 	TInt r = DoLoadLocale(aLocaleDllName, &data[0]);
  2903 	TInt r = DoLoadLocale(aLocaleDllName, &data[0]);
  2899 	if(r == KErrNone)
  2904 	if(r == KErrNone)
  2900 		{
  2905 		{
  2901 		iLocale.iExtraNegativeCurrencyFormatFlags=0x80000000;
  2906 		iLocale.iExtraNegativeCurrencyFormatFlags=0x80000000;
  2991 with the locale information stored in the DLLs. The locale information is only
  2996 with the locale information stored in the DLLs. The locale information is only
  2992 stored in this TExtendedLocale. If you want to set the system wide settings with
  2997 stored in this TExtendedLocale. If you want to set the system wide settings with
  2993 the locale information in the DLL, you can call TExtendedLocale::SaveSystemSettings
  2998 the locale information in the DLL, you can call TExtendedLocale::SaveSystemSettings
  2994 after calling this function.
  2999 after calling this function.
  2995 
  3000 
       
  3001 If the function fails then it will call LoadSystemSettings() to return its members
       
  3002 to a known, good state.
       
  3003 
  2996 @param aLanguageLocaleDllName The name of the language locale DLL to be loaded
  3004 @param aLanguageLocaleDllName The name of the language locale DLL to be loaded
  2997 @param aRegionLocaleDllName The name of the region locale DLL to be loaded
  3005 @param aRegionLocaleDllName The name of the region locale DLL to be loaded
  2998 @param aCollationLocaleDllName The name of the collation locale DLL to be loaded
  3006 @param aCollationLocaleDllName The name of the collation locale DLL to be loaded
  2999 
  3007 
  3000 @return KErrNone if successful, system wide error if not
  3008 @return KErrNone if successful, system wide error if not
  3004 #ifdef SYMBIAN_DISTINCT_LOCALE_MODEL
  3012 #ifdef SYMBIAN_DISTINCT_LOCALE_MODEL
  3005 EXPORT_C TInt TExtendedLocale::LoadLocale(const TDesC& aLanguageLocaleDllName, 
  3013 EXPORT_C TInt TExtendedLocale::LoadLocale(const TDesC& aLanguageLocaleDllName, 
  3006 		const TDesC& aRegionLocaleDllName, 
  3014 		const TDesC& aRegionLocaleDllName, 
  3007 		const TDesC& aCollationLocaleDllName)
  3015 		const TDesC& aCollationLocaleDllName)
  3008 	{
  3016 	{
  3009 
       
  3010 	TInt err = LoadLocaleAspect(aLanguageLocaleDllName);
  3017 	TInt err = LoadLocaleAspect(aLanguageLocaleDllName);
       
  3018 
       
  3019 	if(err == KErrNone)
       
  3020 		err = LoadLocaleAspect(aRegionLocaleDllName);
       
  3021 
       
  3022 	if(err == KErrNone)
       
  3023 		err = LoadLocaleAspect(aCollationLocaleDllName);
       
  3024 
  3011 	if(err != KErrNone)
  3025 	if(err != KErrNone)
  3012 		return err;
  3026 		LoadSystemSettings();	
  3013 	
       
  3014 	err = LoadLocaleAspect(aRegionLocaleDllName);
       
  3015 	if(err != KErrNone)
       
  3016 		return err;
       
  3017 	
       
  3018 	err = LoadLocaleAspect(aCollationLocaleDllName);
       
  3019 	if(err != KErrNone)
       
  3020 		return err;	
       
  3021 
  3027 
  3022 	return err;	
  3028 	return err;	
  3023 	}
  3029 	}
  3024 #else
  3030 #else
  3025 EXPORT_C TInt TExtendedLocale::LoadLocale(const TDesC& /*aLanguageLocaleDllName*/, 
  3031 EXPORT_C TInt TExtendedLocale::LoadLocale(const TDesC& /*aLanguageLocaleDllName*/,