| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (C) 2008-2010, International Business Machines | 3 * Copyright (C) 2008-2010, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************** | 5 ********************************************************************** |
| 6 * Date Name Description | 6 * Date Name Description |
| 7 * 05/11/2008 Andy Heninger Port from Java | 7 * 05/11/2008 Andy Heninger Port from Java |
| 8 ********************************************************************** | 8 ********************************************************************** |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 // | 168 // |
| 169 // replaceableAsString Hack to let break iterators work | 169 // replaceableAsString Hack to let break iterators work |
| 170 // on the replaceable text from transliterators. | 170 // on the replaceable text from transliterators. |
| 171 // In practice, the only real Replaceable type that we | 171 // In practice, the only real Replaceable type that we |
| 172 // will be seeing is UnicodeString, so this function | 172 // will be seeing is UnicodeString, so this function |
| 173 // will normally be efficient. | 173 // will normally be efficient. |
| 174 // | 174 // |
| 175 UnicodeString BreakTransliterator::replaceableAsString(Replaceable &r) { | 175 UnicodeString BreakTransliterator::replaceableAsString(Replaceable &r) { |
| 176 UnicodeString s; | 176 UnicodeString s; |
| 177 UnicodeString *rs = dynamic_cast<UnicodeString *>(&r); | 177 UnicodeString *rs = CR_DYNAMIC_CAST<UnicodeString *>(&r); |
| 178 if (rs != NULL) { | 178 if (rs != NULL) { |
| 179 s = *rs; | 179 s = *rs; |
| 180 } else { | 180 } else { |
| 181 r.extractBetween(0, r.length(), s); | 181 r.extractBetween(0, r.length(), s); |
| 182 } | 182 } |
| 183 return s; | 183 return s; |
| 184 } | 184 } |
| 185 | 185 |
| 186 U_NAMESPACE_END | 186 U_NAMESPACE_END |
| 187 | 187 |
| 188 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ | 188 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ |
| OLD | NEW |