mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-09 15:27:38 +00:00
ICU-3931 Updates
X-SVN-Rev: 27457
This commit is contained in:
parent
a4cf14cb20
commit
f8125a14a4
1 changed files with 5 additions and 13 deletions
|
@ -209,7 +209,7 @@ SelectFormat::applyPattern(const UnicodeString& newPattern, UErrorCode& status)
|
|||
}//end of switch(state)
|
||||
}
|
||||
|
||||
//Check if the stae machine is back to startState
|
||||
//Check if the state machine is back to startState
|
||||
if ( state != startState){
|
||||
status = U_PATTERN_SYNTAX_ERROR;
|
||||
return;
|
||||
|
@ -233,7 +233,7 @@ SelectFormat::format(const Formattable& obj,
|
|||
switch (obj.getType())
|
||||
{
|
||||
case Formattable::kString:
|
||||
return format((UnicodeString)obj.getString(), appendTo, pos, status);
|
||||
return format(obj.getString(), appendTo, pos, status);
|
||||
default:
|
||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return appendTo;
|
||||
|
@ -246,8 +246,6 @@ SelectFormat::format(const UnicodeString& sInput,
|
|||
FieldPosition& pos,
|
||||
UErrorCode& status) const {
|
||||
|
||||
if (U_FAILURE(status)) return appendTo;
|
||||
|
||||
//Check for the validity of the keyword
|
||||
if ( !checkValidKeyword(sInput) ){
|
||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
|
@ -269,8 +267,7 @@ SelectFormat::format(const UnicodeString& sInput,
|
|||
|
||||
UnicodeString&
|
||||
SelectFormat::toPattern(UnicodeString& appendTo) {
|
||||
appendTo += pattern;
|
||||
return appendTo;
|
||||
return appendTo += pattern;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -310,13 +307,8 @@ SelectFormat::classifyCharacter(UChar ch, characterClass& type) const{
|
|||
UBool
|
||||
SelectFormat::checkSufficientDefinition() {
|
||||
// Check that at least the default rule is defined.
|
||||
if (parsedValuesHash == NULL) return FALSE;
|
||||
if (parsedValuesHash->get(SELECT_KEYWORD_OTHER) == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
return TRUE;
|
||||
}
|
||||
return (parsedValuesHash != NULL &&
|
||||
parsedValuesHash->get(SELECT_KEYWORD_OTHER) != NULL) ;
|
||||
}
|
||||
|
||||
UBool
|
||||
|
|
Loading…
Add table
Reference in a new issue