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

Side by Side Diff: source/i18n/coll.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/calendar.cpp ('k') | source/i18n/collation.h » ('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 Corporation and 3 * Copyright (C) 1996-2014, International Business Machines Corporation and
4 * others. All Rights Reserved. 4 * others. All Rights Reserved.
5 ****************************************************************************** 5 ******************************************************************************
6 */ 6 */
7 7
8 /** 8 /**
9 * File coll.cpp 9 * File coll.cpp
10 * 10 *
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 #endif /* UCONFIG_NO_SERVICE */ 862 #endif /* UCONFIG_NO_SERVICE */
863 UErrorCode status = U_ZERO_ERROR; 863 UErrorCode status = U_ZERO_ERROR;
864 if (isAvailableLocaleListInitialized(status)) { 864 if (isAvailableLocaleListInitialized(status)) {
865 return new CollationLocaleListEnumeration(); 865 return new CollationLocaleListEnumeration();
866 } 866 }
867 return NULL; 867 return NULL;
868 } 868 }
869 869
870 StringEnumeration* U_EXPORT2 870 StringEnumeration* U_EXPORT2
871 Collator::getKeywords(UErrorCode& status) { 871 Collator::getKeywords(UErrorCode& status) {
872 // This is a wrapper over ucol_getKeywords 872 return UStringEnumeration::fromUEnumeration(
873 UEnumeration* uenum = ucol_getKeywords(&status); 873 ucol_getKeywords(&status), status);
874 if (U_FAILURE(status)) {
875 uenum_close(uenum);
876 return NULL;
877 }
878 return new UStringEnumeration(uenum);
879 } 874 }
880 875
881 StringEnumeration* U_EXPORT2 876 StringEnumeration* U_EXPORT2
882 Collator::getKeywordValues(const char *keyword, UErrorCode& status) { 877 Collator::getKeywordValues(const char *keyword, UErrorCode& status) {
883 // This is a wrapper over ucol_getKeywordValues 878 return UStringEnumeration::fromUEnumeration(
884 UEnumeration* uenum = ucol_getKeywordValues(keyword, &status); 879 ucol_getKeywordValues(keyword, &status), status);
885 if (U_FAILURE(status)) {
886 uenum_close(uenum);
887 return NULL;
888 }
889 return new UStringEnumeration(uenum);
890 } 880 }
891 881
892 StringEnumeration* U_EXPORT2 882 StringEnumeration* U_EXPORT2
893 Collator::getKeywordValuesForLocale(const char* key, const Locale& locale, 883 Collator::getKeywordValuesForLocale(const char* key, const Locale& locale,
894 UBool commonlyUsed, UErrorCode& status) { 884 UBool commonlyUsed, UErrorCode& status) {
895 // This is a wrapper over ucol_getKeywordValuesForLocale 885 return UStringEnumeration::fromUEnumeration(
896 UEnumeration *uenum = ucol_getKeywordValuesForLocale(key, locale.getName(), 886 ucol_getKeywordValuesForLocale(
897 commonlyUsed, &status); 887 key, locale.getName(), commonlyUsed, &status),
898 if (U_FAILURE(status)) { 888 status);
899 uenum_close(uenum);
900 return NULL;
901 }
902 return new UStringEnumeration(uenum);
903 } 889 }
904 890
905 Locale U_EXPORT2 891 Locale U_EXPORT2
906 Collator::getFunctionalEquivalent(const char* keyword, const Locale& locale, 892 Collator::getFunctionalEquivalent(const char* keyword, const Locale& locale,
907 UBool& isAvailable, UErrorCode& status) { 893 UBool& isAvailable, UErrorCode& status) {
908 // This is a wrapper over ucol_getFunctionalEquivalent 894 // This is a wrapper over ucol_getFunctionalEquivalent
909 char loc[ULOC_FULLNAME_CAPACITY]; 895 char loc[ULOC_FULLNAME_CAPACITY];
910 /*int32_t len =*/ ucol_getFunctionalEquivalent(loc, sizeof(loc), 896 /*int32_t len =*/ ucol_getFunctionalEquivalent(loc, sizeof(loc),
911 keyword, locale.getName(), &isAvailable, &status); 897 keyword, locale.getName(), &isAvailable, &status);
912 if (U_FAILURE(status)) { 898 if (U_FAILURE(status)) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 /* This is useless information */ 1001 /* This is useless information */
1016 /*const UVersionInfo Collator::fVersion = {1, 1, 0, 0};*/ 1002 /*const UVersionInfo Collator::fVersion = {1, 1, 0, 0};*/
1017 1003
1018 // ------------------------------------- 1004 // -------------------------------------
1019 1005
1020 U_NAMESPACE_END 1006 U_NAMESPACE_END
1021 1007
1022 #endif /* #if !UCONFIG_NO_COLLATION */ 1008 #endif /* #if !UCONFIG_NO_COLLATION */
1023 1009
1024 /* eof */ 1010 /* eof */
OLDNEW
« no previous file with comments | « source/i18n/calendar.cpp ('k') | source/i18n/collation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698