From a6ab60495d80dfdb04600acf887d23db02d89b22 Mon Sep 17 00:00:00 2001 From: Hokwon Song Date: Wed, 17 Apr 2013 20:55:38 +0900 Subject: [PATCH] Remove the api version checking Change-Id: I59079ca05c0f49a0b187103a1af8982aee1901cb Signed-off-by: Hokwon Song --- src/locales/FLclLocale.cpp | 56 +++------------------------------------------- 1 file changed, 3 insertions(+), 53 deletions(-) diff --git a/src/locales/FLclLocale.cpp b/src/locales/FLclLocale.cpp index 226ed11..6f7ee09 100644 --- a/src/locales/FLclLocale.cpp +++ b/src/locales/FLclLocale.cpp @@ -875,10 +875,6 @@ Locale::SetVariantCodeString(const String* pVariantCode) LanguageCode Locale::GetLanguageCode(void) const { - if ((__languageCode == LANGUAGE_INVALID) && (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1)) - { - return LANGUAGE_INVALID_RESERVED; - } return __languageCode; } @@ -886,10 +882,6 @@ Locale::GetLanguageCode(void) const CountryCode Locale::GetCountryCode(void) const { - if ((__countryCode == COUNTRY_INVALID) && (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1)) - { - return COUNTRY_INVALID_RESERVED; - } return __countryCode; } @@ -1001,12 +993,6 @@ Locale::StringToLanguageCode(const String& languageCodeString) LanguageCode invalidLanguageCode = LANGUAGE_INVALID; LanguageCode maxLangageCode = LANGUAGE_MAX; - if (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) - { - invalidLanguageCode = LANGUAGE_INVALID_RESERVED; - maxLangageCode = LanguageMaxReserved; - } - if (!languageCodeString.IsEmpty()) { for (int i = 0; i < maxLangageCode; i++) @@ -1032,12 +1018,6 @@ Locale::StringToCountryCode(const String& countryCodeString) CountryCode invalidCountryCode = COUNTRY_INVALID; CountryCode maxCountryCode = COUNTRY_MAX; - if (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) - { - invalidCountryCode = COUNTRY_INVALID_RESERVED; - maxCountryCode = CountryMaxReserved; - } - if(!countryCodeString.IsEmpty()) { for (int i = 0; i < maxCountryCode; i++) @@ -1060,13 +1040,6 @@ Locale::StringToCountryCode(const String& countryCodeString) String Locale::LanguageCodeToString(LanguageCode languageCode) { - if (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) - { - return ((languageCode >= LANGUAGE_AAR) && (languageCode < LanguageMaxReserved)) - ? LanguageCodeString3LetterArray[languageCode] - : String(); - } - return ((languageCode > LANGUAGE_INVALID) && (languageCode < LANGUAGE_MAX)) ? LanguageCodeString3LetterArray[languageCode] : String(); @@ -1076,13 +1049,6 @@ Locale::LanguageCodeToString(LanguageCode languageCode) String Locale::CountryCodeToString(CountryCode countryCode) { - if (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) - { - return ((countryCode >= COUNTRY_AF) && (countryCode < CountryMaxReserved)) - ? CountryCodeString2LetterArray[countryCode] - : String(); - } - return ((countryCode > COUNTRY_INVALID) && (countryCode < COUNTRY_MAX)) ? CountryCodeString2LetterArray[countryCode] : String(); @@ -1092,13 +1058,6 @@ Locale::CountryCodeToString(CountryCode countryCode) String Locale::LanguageCodeToTwoLetterLanguageCodeString(LanguageCode languageCode) { - if (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) - { - return ((languageCode >= LANGUAGE_AAR) && (languageCode < LanguageMaxReserved)) - ? _LocaleImpl::Get2LetterLanguageCodeString(LanguageCodeString3LetterArray[languageCode]) - : String(); - } - return ((languageCode > LANGUAGE_INVALID) && (languageCode < LANGUAGE_MAX)) ? _LocaleImpl::Get2LetterLanguageCodeString(LanguageCodeString3LetterArray[languageCode]) : String(); @@ -1117,20 +1076,13 @@ Locale::TwoLetterLanguageCodeStringToLanguageCode(const String& languageCodeStri std::unique_ptr pLangStr (_StringConverter::CopyToCharArrayN(languageCodeString)); return StringToLanguageCode(_LocaleImpl::Get3LetterLanguageCodeString(pLangStr.get())); } - return (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) ? LANGUAGE_INVALID_RESERVED : LANGUAGE_INVALID; + return LANGUAGE_INVALID; } String Locale::CountryCodeToThreeLetterCountryCodeString(CountryCode countryCode) { - if (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) - { - return ((countryCode >= COUNTRY_AF) && (countryCode < CountryMaxReserved)) - ? _LocaleImpl::Get3LetterCountryCodeString(CountryCodeString2LetterArray[countryCode]) - : String(); - } - return ((countryCode > COUNTRY_INVALID) && (countryCode < COUNTRY_MAX)) ? _LocaleImpl::Get3LetterCountryCodeString(CountryCodeString2LetterArray[countryCode]) : String(); @@ -1142,9 +1094,7 @@ Locale::ThreeLetterCountryCodeStringToCountryCode(const String& countryCodeStrin { if (countryCodeString.GetLength() == 3) { - CountryCode maxCountryCode = (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) - ? (CountryCode)(COUNTRY_INVALID_RESERVED - 1) - : COUNTRY_MAX; + CountryCode maxCountryCode = COUNTRY_MAX; for (int i = 0; i < maxCountryCode; i++) { @@ -1156,7 +1106,7 @@ Locale::ThreeLetterCountryCodeStringToCountryCode(const String& countryCodeStrin } } - return (Tizen::App::_AppInfo::GetApiVersion() < _API_VERSION_2_1) ? COUNTRY_INVALID_RESERVED : COUNTRY_INVALID; + return COUNTRY_INVALID; } -- 2.7.4