gracefully handle when icu is built without BreakIterator support: -DUCONFIG_NO_BREAK_ITERATION=1

This commit is contained in:
Dane Springmeyer 2013-08-13 19:32:20 -04:00
parent b6df3848c4
commit 750b4e144b

View file

@ -63,10 +63,13 @@ void text_node::apply(char_properties const& p, feature_impl const& feature, pro
{ {
text_str = text_str.toLower(); text_str = text_str.toLower();
} }
#if !UCONFIG_NO_BREAK_ITERATION
else if (p.text_transform == CAPITALIZE) else if (p.text_transform == CAPITALIZE)
{ {
// note: requires BreakIterator support in ICU which is optional
text_str = text_str.toTitle(NULL); text_str = text_str.toTitle(NULL);
} }
#endif
if (text_str.length() > 0) { if (text_str.length() > 0) {
output.push_back(p, text_str); output.push_back(p, text_str);
} }