Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: source/i18n/ucol_res.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/i18n/ucol.cpp ('k') | source/i18n/ucoleitr.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 */
OLDNEW
« no previous file with comments | « source/i18n/ucol.cpp ('k') | source/i18n/ucoleitr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698