return NULL;
}
-UnicodeString* BreakIterator::ResetAdoptedText(
+icu::UnicodeString* BreakIterator::ResetAdoptedText(
v8::Handle<v8::Object> obj, v8::Handle<v8::Value> value) {
// Get the previous value from the internal field.
- UnicodeString* text = static_cast<UnicodeString*>(
+ icu::UnicodeString* text = static_cast<icu::UnicodeString*>(
obj->GetPointerFromInternalField(1));
delete text;
// Assign new value to the internal pointer.
v8::String::Value text_value(value);
- text = new UnicodeString(
+ text = new icu::UnicodeString(
reinterpret_cast<const UChar*>(*text_value), text_value.length());
obj->SetPointerInInternalField(1, text);
// pointing to a break iterator.
delete UnpackBreakIterator(persistent_object);
- delete static_cast<UnicodeString*>(
+ delete static_cast<icu::UnicodeString*>(
persistent_object->GetPointerFromInternalField(1));
// Then dispose of the persistent handle to JS object.
}
// TODO(cira): Remove cast once ICU fixes base BreakIterator class.
- int32_t status =
- static_cast<RuleBasedBreakIterator*>(break_iterator)->getRuleStatus();
+ icu::RuleBasedBreakIterator* rule_based_iterator =
+ static_cast<icu::RuleBasedBreakIterator*>(break_iterator);
+ int32_t status = rule_based_iterator->getRuleStatus();
// Keep return values in sync with JavaScript BreakType enum.
if (status >= UBRK_WORD_NONE && status < UBRK_WORD_NONE_LIMIT) {
return v8::Int32::New(UBRK_WORD_NONE);
// Deletes the old value and sets the adopted text in
// corresponding JavaScript object.
- static UnicodeString* ResetAdoptedText(v8::Handle<v8::Object> obj,
- v8::Handle<v8::Value> text_value);
+ static icu::UnicodeString* ResetAdoptedText(v8::Handle<v8::Object> obj,
+ v8::Handle<v8::Value> text_value);
// Release memory we allocated for the BreakIterator once the JS object that
// holds the pointer gets garbage collected.
v8::Local<v8::Array> all_locales = v8::Array::New();
int count = 0;
- const Locale* icu_locales = icu::Locale::getAvailableLocales(count);
+ const icu::Locale* icu_locales = icu::Locale::getAvailableLocales(count);
for (int i = 0; i < count; ++i) {
all_locales->Set(i, v8::String::New(icu_locales[i].getName()));
}
icu::Locale icu_locale(base_locale.c_str());
icu::Locale display_locale =
icu::Locale(*v8::String::Utf8Value(args[1]->ToString()));
- UnicodeString result;
+ icu::UnicodeString result;
if (item == "language") {
icu_locale.getDisplayLanguage(display_locale, result);
} else if (item == "script") {