Home | History | Annotate | Download | only in i18n

Lines Matching refs:errorCode

154                                      const RuleBasedCollator *base, UErrorCode &errorCode)
162 if(U_FAILURE(errorCode)) { return; }
164 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
167 const CollationTailoring *root = CollationRoot::getRoot(errorCode);
168 if(U_FAILURE(errorCode)) { return; }
170 errorCode = U_UNSUPPORTED_ERROR;
175 errorCode = U_MEMORY_ALLOCATION_ERROR;
178 CollationDataReader::read(base->tailoring, bin, length, *t, errorCode);
179 if(U_FAILURE(errorCode)) { return; }
181 adoptTailoring(t.orphan(), errorCode);
202 RuleBasedCollator::adoptTailoring(CollationTailoring *t, UErrorCode &errorCode) {
203 if(U_FAILURE(errorCode)) {
210 errorCode = U_MEMORY_ALLOCATION_ERROR;
261 UErrorCode errorCode = U_ZERO_ERROR;
262 LocalPointer<UnicodeSet> thisTailored(getTailoredSet(errorCode));
263 LocalPointer<UnicodeSet> otherTailored(o.getTailoredSet(errorCode));
264 if(U_FAILURE(errorCode)) { return FALSE; }
279 UErrorCode errorCode = U_ZERO_ERROR;
280 LocalPointer<UnicodeSet> set(getTailoredSet(errorCode));
281 if(U_FAILURE(errorCode)) { return 0; }
305 RuleBasedCollator::getLocale(ULocDataLocaleType type, UErrorCode& errorCode) const {
306 if(U_FAILURE(errorCode)) {
316 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
322 RuleBasedCollator::internalGetLocaleID(ULocDataLocaleType type, UErrorCode &errorCode) const {
323 if(U_FAILURE(errorCode)) {
336 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
368 RuleBasedCollator::getTailoredSet(UErrorCode &errorCode) const {
369 if(U_FAILURE(errorCode)) { return NULL; }
372 errorCode = U_MEMORY_ALLOCATION_ERROR;
376 TailoredSet(tailored).forData(data, errorCode);
377 if(U_FAILURE(errorCode)) {
388 UBool addPrefixes, UErrorCode &errorCode) const {
389 if(U_FAILURE(errorCode)) { return; }
396 ContractionsAndExpansions(contractions, expansions, NULL, addPrefixes).forData(data, errorCode);
400 RuleBasedCollator::internalAddContractions(UChar32 c, UnicodeSet &set, UErrorCode &errorCode) const {
401 if(U_FAILURE(errorCode)) { return; }
402 ContractionsAndExpansions(&set, NULL, NULL, FALSE).forCodePoint(data, c, errorCode);
411 RuleBasedCollator::getAttribute(UColAttribute attr, UErrorCode &errorCode) const {
412 if(U_FAILURE(errorCode)) { return UCOL_DEFAULT; }
437 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
445 UErrorCode &errorCode) {
446 UColAttributeValue oldValue = getAttribute(attr, errorCode);
447 if(U_FAILURE(errorCode)) { return; }
461 errorCode = U_MEMORY_ALLOCATION_ERROR;
468 defaultSettings.options, errorCode);
471 ownedSettings->setAlternateHandling(value, defaultSettings.options, errorCode);
474 ownedSettings->setCaseFirst(value, defaultSettings.options, errorCode);
478 defaultSettings.options, errorCode);
482 defaultSettings.options, errorCode);
485 ownedSettings->setStrength(value, defaultSettings.options, errorCode);
490 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
494 ownedSettings->setFlag(CollationSettings::NUMERIC, value, defaultSettings.options, errorCode);
497 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
500 if(U_FAILURE(errorCode)) { return; }
510 RuleBasedCollator::setMaxVariable(UColReorderCode group, UErrorCode &errorCode) {
511 if(U_FAILURE(errorCode)) { return *this; }
519 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
536 errorCode = U_MEMORY_ALLOCATION_ERROR;
545 ownedSettings->setMaxVariable(value, defaultSettings.options, errorCode);
546 if(U_FAILURE(errorCode)) { return *this; }
563 RuleBasedCollator::getVariableTop(UErrorCode & /*errorCode*/) const {
568 RuleBasedCollator::setVariableTop(const UChar *varTop, int32_t len, UErrorCode &errorCode) {
569 if(U_FAILURE(errorCode)) { return 0; }
571 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
576 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
583 ce1 = ci.nextCE(errorCode);
584 ce2 = ci.nextCE(errorCode);
587 ce1 = ci.nextCE(errorCode);
588 ce2 = ci.nextCE(errorCode);
591 errorCode = U_CE_NOT_FOUND_ERROR;
594 setVariableTop((uint32_t)(ce1 >> 32), errorCode);
599 RuleBasedCollator::setVariableTop(const UnicodeString &varTop, UErrorCode &errorCode) {
600 return setVariableTop(varTop.getBuffer(), varTop.length(), errorCode);
604 RuleBasedCollator::setVariableTop(uint32_t varTop, UErrorCode &errorCode) {
605 if(U_FAILURE(errorCode)) { return; }
611 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
620 errorCode = U_MEMORY_ALLOCATION_ERROR;
624 getDefaultSettings().options, errorCode);
625 if(U_FAILURE(errorCode)) { return; }
639 UErrorCode &errorCode) const {
640 if(U_FAILURE(errorCode)) { return 0; }
642 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
648 errorCode = U_BUFFER_OVERFLOW_ERROR;
657 UErrorCode &errorCode) {
658 if(U_FAILURE(errorCode)) { return; }
660 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
675 errorCode = U_MEMORY_ALLOCATION_ERROR;
678 ownedSettings->copyReorderingFrom(defaultSettings, errorCode);
685 errorCode = U_MEMORY_ALLOCATION_ERROR;
688 ownedSettings->setReordering(*data, reorderCodes, length, errorCode);
701 UErrorCode &errorCode) const {
702 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
704 right.getBuffer(), right.length(), errorCode);
709 int32_t length, UErrorCode &errorCode) const {
710 if(U_FAILURE(errorCode) || length == 0) { return UCOL_EQUAL; }
712 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
720 right.getBuffer(), rightLength, errorCode);
726 UErrorCode &errorCode) const {
727 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
729 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
739 return doCompare(left, leftLength, right, rightLength, errorCode);
744 UErrorCode &errorCode) const {
745 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
749 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
752 return doCompare(leftBytes, left.length(), rightBytes, right.length(), errorCode);
758 UErrorCode &errorCode) const {
759 if(U_FAILURE(errorCode)) { return UCOL_EQUAL; }
761 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
772 reinterpret_cast<const uint8_t *>(right), rightLength, errorCode);
856 UErrorCode errorCode = U_ZERO_ERROR;
857 const UChar *spanLimit = nfcImpl.makeFCD(text, textLimit, NULL, errorCode);
858 if(U_FAILURE(errorCode)) { return; }
866 if(buffer.init(str.length(), errorCode)) {
867 nfcImpl.makeFCD(spanLimit, textLimit, &buffer, errorCode);
870 if(U_SUCCESS(errorCode)) {
903 UErrorCode errorCode = U_ZERO_ERROR;
904 return u8ci.nextCodePoint(errorCode);
927 UErrorCode errorCode = U_ZERO_ERROR;
928 return uici.nextCodePoint(errorCode);
970 UErrorCode &errorCode) const {
971 // U_FAILURE(errorCode) checked by caller.
1054 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1060 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1063 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) {
1089 UErrorCode &errorCode) const {
1090 // U_FAILURE(errorCode) checked by caller.
1181 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1185 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1188 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) {
1217 UErrorCode &errorCode) const {
1218 if(U_FAILURE(errorCode) || &left == &right) { return UCOL_EQUAL; }
1253 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1257 result = CollationCompare::compareUpToQuaternary(leftIter, rightIter, *settings, errorCode);
1259 if(result != UCOL_EQUAL || settings->getStrength() < UCOL_IDENTICAL || U_FAILURE(errorCode)) {
1280 UErrorCode &errorCode) const {
1281 return getCollationKey(s.getBuffer(), s.length(), key, errorCode);
1286 UErrorCode &errorCode) const {
1287 if(U_FAILURE(errorCode)) {
1291 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
1296 writeSortKey(s, length, sink, errorCode);
1297 if(U_FAILURE(errorCode)) {
1300 errorCode = U_MEMORY_ALLOCATION_ERROR;
1326 UErrorCode errorCode = U_ZERO_ERROR;
1327 writeSortKey(s, length, sink, errorCode);
1328 return U_SUCCESS(errorCode) ? sink.NumberOfBytesAppended() : 0;
1333 SortKeyByteSink &sink, UErrorCode &errorCode) const {
1334 if(U_FAILURE(errorCode)) { return; }
1342 callback, TRUE, errorCode);
1347 callback, TRUE, errorCode);
1350 writeIdenticalLevel(s, limit, sink, errorCode);
1358 SortKeyByteSink &sink, UErrorCode &errorCode) const {
1360 const UChar *nfdQCYesLimit = data->nfcImpl.decompose(s, limit, NULL, errorCode);
1361 if(U_FAILURE(errorCode)) { return; }
1378 data->nfcImpl.decompose(nfdQCYesLimit, limit, nfd, destLengthEstimate, errorCode);
1424 uint8_t *dest, int32_t count, UErrorCode &errorCode) const {
1425 if(U_FAILURE(errorCode)) { return 0; }
1427 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
1443 sink, level, callback, FALSE, errorCode);
1447 sink, level, callback, FALSE, errorCode);
1449 if(U_FAILURE(errorCode)) { return 0; }
1472 writeIdenticalLevel(sArray, sArray + s.length(), sink, errorCode);
1473 if(U_FAILURE(errorCode)) { return 0; }
1492 UErrorCode &errorCode) const {
1493 if(U_FAILURE(errorCode)) { return; }
1500 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) {
1501 ces.addElement(ce, errorCode);
1506 while((ce = iter.nextCE(errorCode)) != Collation::NO_CE) {
1507 ces.addElement(ce, errorCode);
1515 UErrorCode &errorCode) {
1516 if(U_FAILURE(errorCode) || length == 0) { return; }
1518 s.append('_', errorCode);
1520 s.append(letter, errorCode);
1522 s.append(uprv_toupper(subtag[i]), errorCode);
1527 UErrorCode &errorCode) {
1528 if(U_FAILURE(errorCode)) { return; }
1530 s.append('_', errorCode);
1533 s.append(letter, errorCode);
1534 s.append(valueChars[value], errorCode);
1542 UErrorCode &errorCode) const {
1543 if(U_FAILURE(errorCode)) { return 0; }
1545 errorCode = U_ILLEGAL_ARGUMENT_ERROR;
1549 locale = internalGetLocaleID(ULOC_VALID_LOCALE, errorCode);
1555 NULL, &errorCode);
1556 if(U_FAILURE(errorCode)) { return 0; }
1568 appendAttribute(result, 'A', getAttribute(UCOL_ALTERNATE_HANDLING, errorCode), errorCode);
1573 appendAttribute(result, 'C', getAttribute(UCOL_CASE_FIRST, errorCode), errorCode);
1576 appendAttribute(result, 'D', getAttribute(UCOL_NUMERIC_COLLATION, errorCode), errorCode);
1579 appendAttribute(result, 'E', getAttribute(UCOL_CASE_LEVEL, errorCode), errorCode);
1582 appendAttribute(result, 'F', getAttribute(UCOL_FRENCH_COLLATION, errorCode), errorCode);
1585 length = uloc_getKeywordValue(resultLocale, "collation", subtag, UPRV_LENGTHOF(subtag), &errorCode);
1586 appendSubtag(result, 'K', subtag, length, errorCode);
1587 length = uloc_getLanguage(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode);
1588 appendSubtag(result, 'L', subtag, length, errorCode);
1590 appendAttribute(result, 'N', getAttribute(UCOL_NORMALIZATION_MODE, errorCode), errorCode);
1592 length = uloc_getCountry(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode);
1593 appendSubtag(result, 'R', subtag, length, errorCode);
1595 appendAttribute(result, 'S', getAttribute(UCOL_STRENGTH, errorCode), errorCode);
1597 length = uloc_getVariant(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode);
1598 appendSubtag(result, 'V', subtag, length, errorCode);
1599 length = uloc_getScript(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode);
1600 appendSubtag(result, 'Z', subtag, length, errorCode);
1602 if(U_FAILURE(errorCode)) { return 0; }
1606 return u_terminateChars(buffer, capacity, result.length(), &errorCode);
1615 RuleBasedCollator::computeMaxExpansions(const CollationTailoring *t, UErrorCode &errorCode) {
1616 t->maxExpansions = CollationElementIterator::computeMaxExpansions(t->data, errorCode);
1620 RuleBasedCollator::initMaxExpansions(UErrorCode &errorCode) const {
1621 umtx_initOnce(tailoring->maxExpansionsInitOnce, computeMaxExpansions, tailoring, errorCode);
1622 return U_SUCCESS(errorCode);
1627 UErrorCode errorCode = U_ZERO_ERROR;
1628 if(!initMaxExpansions(errorCode)) { return NULL; }
1629 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode);
1630 if(U_FAILURE(errorCode)) {
1639 UErrorCode errorCode = U_ZERO_ERROR;
1640 if(!initMaxExpansions(errorCode)) { return NULL; }
1641 CollationElementIterator *cei = new CollationElementIterator(source, this, errorCode);
1642 if(U_FAILURE(errorCode)) {
1651 UErrorCode errorCode = U_ZERO_ERROR;
1652 (void)initMaxExpansions(errorCode);