| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 1996-2014, International Business Machines | 3 * Copyright (C) 1996-2014, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ******************************************************************************* | 5 ******************************************************************************* |
| 6 * file name: ucol_res.cpp | 6 * file name: ucol_res.cpp |
| 7 * encoding: US-ASCII | 7 * encoding: US-ASCII |
| 8 * tab size: 8 (not used) | 8 * tab size: 8 (not used) |
| 9 * indentation:4 | 9 * indentation:4 |
| 10 * | 10 * |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 return loadFromCollations(errorCode); | 217 return loadFromCollations(errorCode); |
| 218 } else { | 218 } else { |
| 219 return loadFromData(errorCode); | 219 return loadFromData(errorCode); |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 | 222 |
| 223 const CollationCacheEntry * | 223 const CollationCacheEntry * |
| 224 CollationLoader::loadFromLocale(UErrorCode &errorCode) { | 224 CollationLoader::loadFromLocale(UErrorCode &errorCode) { |
| 225 if(U_FAILURE(errorCode)) { return NULL; } | 225 if(U_FAILURE(errorCode)) { return NULL; } |
| 226 U_ASSERT(bundle == NULL); | 226 U_ASSERT(bundle == NULL); |
| 227 bundle = ures_open(U_ICUDATA_COLL, locale.getBaseName(), &errorCode); | 227 bundle = ures_openNoDefault(U_ICUDATA_COLL, locale.getBaseName(), &errorCode
); |
| 228 if(errorCode == U_MISSING_RESOURCE_ERROR) { | 228 if(errorCode == U_MISSING_RESOURCE_ERROR) { |
| 229 errorCode = U_USING_DEFAULT_WARNING; | 229 errorCode = U_USING_DEFAULT_WARNING; |
| 230 | 230 |
| 231 // Have to add that ref that we promise. | 231 // Have to add that ref that we promise. |
| 232 rootEntry->addRef(); | 232 rootEntry->addRef(); |
| 233 return rootEntry; | 233 return rootEntry; |
| 234 } | 234 } |
| 235 Locale requestedLocale(locale); | 235 Locale requestedLocale(locale); |
| 236 const char *vLocale = ures_getLocaleByType(bundle, ULOC_ACTUAL_LOCALE, &erro
rCode); | 236 const char *vLocale = ures_getLocaleByType(bundle, ULOC_ACTUAL_LOCALE, &erro
rCode); |
| 237 if(U_FAILURE(errorCode)) { return NULL; } | 237 if(U_FAILURE(errorCode)) { return NULL; } |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 const char* keyword, const char* locale, | 736 const char* keyword, const char* locale, |
| 737 UBool* isAvailable, UErrorCode* status) | 737 UBool* isAvailable, UErrorCode* status) |
| 738 { | 738 { |
| 739 // N.B.: Resource name is "collations" but keyword is "collation" | 739 // N.B.: Resource name is "collations" but keyword is "collation" |
| 740 return ures_getFunctionalEquivalent(result, resultCapacity, U_ICUDATA_COLL, | 740 return ures_getFunctionalEquivalent(result, resultCapacity, U_ICUDATA_COLL, |
| 741 "collations", keyword, locale, | 741 "collations", keyword, locale, |
| 742 isAvailable, TRUE, status); | 742 isAvailable, TRUE, status); |
| 743 } | 743 } |
| 744 | 744 |
| 745 #endif /* #if !UCONFIG_NO_COLLATION */ | 745 #endif /* #if !UCONFIG_NO_COLLATION */ |
| OLD | NEW |