Return the overall directionality of this word.
| 200 | |
| 201 | // Return the overall directionality of this word. |
| 202 | StrongScriptDirection LTRResultIterator::WordDirection() const { |
| 203 | if (it_->word() == NULL) return DIR_NEUTRAL; |
| 204 | bool has_rtl = it_->word()->AnyRtlCharsInWord(); |
| 205 | bool has_ltr = it_->word()->AnyLtrCharsInWord(); |
| 206 | if (has_rtl && !has_ltr) |
| 207 | return DIR_RIGHT_TO_LEFT; |
| 208 | if (has_ltr && !has_rtl) |
| 209 | return DIR_LEFT_TO_RIGHT; |
| 210 | if (!has_ltr && !has_rtl) |
| 211 | return DIR_NEUTRAL; |
| 212 | return DIR_MIX; |
| 213 | } |
| 214 | |
| 215 | // Returns true if the current word was found in a dictionary. |
| 216 | bool LTRResultIterator::WordIsFromDictionary() const { |
no test coverage detected