Home | History | Annotate | Download | only in i18n

Lines Matching refs:errorCode

65                            UErrorCode &errorCode) {
66 if (U_FAILURE(errorCode)) { return NULL; }
72 errorCode = U_MEMORY_ALLOCATION_ERROR;
102 UErrorCode errorCode = U_ZERO_ERROR;
103 UCollationResult cmp = coll.compare(s, *si, errorCode);
144 UErrorCode &errorCode) {
152 collatorPrimaryOnly.compare(name, bucket->lowerBoundary_, errorCode);
191 const UnicodeString &name, UErrorCode &errorCode) const {
192 return buckets_->getBucketIndex(name, *collatorPrimaryOnly_, errorCode);
254 AlphabeticIndex::ImmutableIndex *AlphabeticIndex::buildImmutableIndex(UErrorCode &errorCode) {
255 if (U_FAILURE(errorCode)) { return NULL; }
261 LocalPointer<BucketList> immutableBucketList(createBucketList(errorCode));
265 errorCode = U_MEMORY_ALLOCATION_ERROR;
270 errorCode = U_MEMORY_ALLOCATION_ERROR;
295 void AlphabeticIndex::initLabels(UVector &indexCharacters, UErrorCode &errorCode) const {
296 const Normalizer2 *nfkdNormalizer = Normalizer2::getNFKDInstance(errorCode);
297 if (U_FAILURE(errorCode)) { return; }
322 errorCode = U_MEMORY_ALLOCATION_ERROR;
329 if (collatorPrimaryOnly_->compare(*item, firstScriptBoundary, errorCode) < 0) {
331 } else if (collatorPrimaryOnly_->compare(*item, overflowBoundary, errorCode) >= 0) {
334 collatorPrimaryOnly_->compare(*item, separated(*item), errorCode) == 0) {
341 ownedString(*item, ownedItem, errorCode), ~insertionPoint, errorCode);
346 ownedString(*item, ownedItem, errorCode), insertionPoint);
351 if (U_FAILURE(errorCode)) { return; }
397 const UnicodeString &s, UErrorCode &errorCode) {
398 cei.setText(s, errorCode);
401 int32_t ce32 = cei.next(errorCode);
419 BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const {
421 UVector indexCharacters(errorCode);
423 initLabels(indexCharacters, errorCode);
424 if (U_FAILURE(errorCode)) { return NULL; }
430 errorCode = U_MEMORY_ALLOCATION_ERROR;
434 if (collatorPrimaryOnly_->getAttribute(UCOL_ALTERNATE_HANDLING, errorCode) == UCOL_SHIFTED) {
436 (int32_t)collatorPrimaryOnly_->getVariableTop(errorCode));
453 LocalPointer<UVector> bucketList(new UVector(errorCode));
455 errorCode = U_MEMORY_ALLOCATION_ERROR;
463 errorCode = U_MEMORY_ALLOCATION_ERROR;
466 bucketList->addElement(bucket, errorCode);
467 if (U_FAILURE(errorCode)) { return NULL; }
477 if (collatorPrimaryOnly_->compare(current, *scriptUpperBoundary, errorCode) >= 0) {
483 if (collatorPrimaryOnly_->compare(current, *scriptUpperBoundary, errorCode) < 0) {
493 errorCode = U_MEMORY_ALLOCATION_ERROR;
496 bucketList->addElement(bucket, errorCode);
502 errorCode = U_MEMORY_ALLOCATION_ERROR;
505 bucketList->addElement(bucket, errorCode);
517 hasMultiplePrimaryWeights(*cei, variableTop, current, errorCode) &&
529 *cei, variableTop, singleBucket->lowerBoundary_, errorCode)) {
538 errorCode = U_MEMORY_ALLOCATION_ERROR;
542 bucketList->addElement(bucket, errorCode);
549 if (U_FAILURE(errorCode)) { return NULL; }
554 errorCode = U_MEMORY_ALLOCATION_ERROR;
563 errorCode = U_MEMORY_ALLOCATION_ERROR;
566 bucketList->addElement(bucket, errorCode); // final
582 if (U_FAILURE(errorCode)) { return NULL; }
586 errorCode = U_MEMORY_ALLOCATION_ERROR;
610 LocalPointer<UVector> publicBucketList(new UVector(errorCode));
612 errorCode = U_MEMORY_ALLOCATION_ERROR;
620 publicBucketList->addElement(bucket, errorCode);
623 if (U_FAILURE(errorCode)) { return NULL; }
626 errorCode = U_MEMORY_ALLOCATION_ERROR;
637 void AlphabeticIndex::initBuckets(UErrorCode &errorCode) {
638 if (U_FAILURE(errorCode) || buckets_ != NULL) {
641 buckets_ = createBucketList(errorCode);
642 if (U_FAILURE(errorCode) || inputList_ == NULL || inputList_->isEmpty()) {
648 inputList_->sortWithUComparator(recordCompareFn, collator_, errorCode);
672 collatorPrimaryOnly_->compare(r->name_, *upperBoundary, errorCode) >= 0) {
688 bucket->records_ = new UVector(errorCode);
690 errorCode = U_MEMORY_ALLOCATION_ERROR;
694 bucket->records_->addElement(r, errorCode);
787 UBool AlphabeticIndex::addChineseIndexCharacters(UErrorCode &errorCode) {
790 contractions.toUSet(), NULL, FALSE, &errorCode);
791 if (U_FAILURE(errorCode)) { return FALSE; }
800 collatorPrimaryOnly_->compare(s, firstHanBoundary, errorCode) < 0) {
824 errorCode = U_MEMORY_ALLOCATION_ERROR;
1041 UErrorCode errorCode = U_ZERO_ERROR;
1042 return col->compare(*leftString, *rightString, errorCode);
1055 UErrorCode errorCode = U_ZERO_ERROR;
1056 return col->compare(leftRec->name_, rightRec->name_, errorCode);