Lines Matching refs:errorCode
89 CollationFastLatinBuilder::CollationFastLatinBuilder(UErrorCode &errorCode)
91 contractionCEs(errorCode), uniqueCEs(errorCode),
103 CollationFastLatinBuilder::forData(const CollationData &data, UErrorCode &errorCode) {
104 if(U_FAILURE(errorCode)) { return FALSE; }
106 errorCode = U_INVALID_STATE_ERROR;
109 if(!loadGroups(data, errorCode)) { return FALSE; }
113 getCEs(data, errorCode);
114 if(!encodeUniqueCEs(errorCode)) { return FALSE; }
120 getCEs(data, errorCode);
121 if(!encodeUniqueCEs(errorCode)) { return FALSE; }
132 encodeCharCEs(errorCode) && encodeContractions(errorCode);
139 CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &errorCode) {
140 if(U_FAILURE(errorCode)) { return FALSE; }
205 CollationFastLatinBuilder::getCEs(const CollationData &data, UErrorCode &errorCode) {
206 if(U_FAILURE(errorCode)) { return; }
222 if(getCEsFromCE32(*d, c, ce32, errorCode)) {
225 addUniqueCE(ce0, errorCode);
226 addUniqueCE(ce1, errorCode);
236 addContractionEntry(CollationFastLatin::CONTR_CHAR_MASK, ce0, ce1, errorCode);
242 contractionCEs.addElement(CollationFastLatin::CONTR_CHAR_MASK, errorCode);
247 UErrorCode &errorCode) {
248 if(U_FAILURE(errorCode)) { return FALSE; }
292 return getCEsFromContractionCE32(data, ce32, errorCode);
343 UErrorCode &errorCode) {
344 if(U_FAILURE(errorCode)) { return FALSE; }
351 if(getCEsFromCE32(data, U_SENTINEL, ce32, errorCode)) {
352 addContractionEntry(CollationFastLatin::CONTR_CHAR_MASK, ce0, ce1, errorCode);
355 addContractionEntry(CollationFastLatin::CONTR_CHAR_MASK, Collation::NO_CE, 0, errorCode);
361 UCharsTrie::Iterator suffixes(p + 2, 0, errorCode);
362 while(suffixes.next(errorCode)) {
369 addContractionEntry(x, Collation::NO_CE, 0, errorCode);
375 addContractionEntry(prevX, ce0, ce1, errorCode);
378 if(suffix.length() == 1 && getCEsFromCE32(data, U_SENTINEL, ce32, errorCode)) {
381 addContractionEntry(x, Collation::NO_CE, 0, errorCode);
387 addContractionEntry(prevX, ce0, ce1, errorCode);
389 if(U_FAILURE(errorCode)) { return FALSE; }
402 UErrorCode &errorCode) {
403 contractionCEs.addElement(x, errorCode);
404 contractionCEs.addElement(cce0, errorCode);
405 contractionCEs.addElement(cce1, errorCode);
406 addUniqueCE(cce0, errorCode);
407 addUniqueCE(cce1, errorCode);
411 CollationFastLatinBuilder::addUniqueCE(int64_t ce, UErrorCode &errorCode) {
412 if(U_FAILURE(errorCode)) { return; }
417 uniqueCEs.insertElementAt(ce, ~i, errorCode);
430 CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) {
431 if(U_FAILURE(errorCode)) { return FALSE; }
435 errorCode = U_MEMORY_ALLOCATION_ERROR;
561 return U_SUCCESS(errorCode);
565 CollationFastLatinBuilder::encodeCharCEs(UErrorCode &errorCode) {
566 if(U_FAILURE(errorCode)) { return FALSE; }
590 return U_SUCCESS(errorCode);
594 CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) {
597 if(U_FAILURE(errorCode)) { return FALSE; }
637 errorCode = U_MEMORY_ALLOCATION_ERROR;