Searched refs:breaker (Results 1 – 5 of 5) sorted by relevance
/frameworks/minikin/tests/unittest/ |
D | WordBreakerTests.cpp | 37 WordBreaker breaker; in TEST() local 38 breaker.setText(buf, NELEM(buf)); in TEST() 39 EXPECT_EQ(0, breaker.current()); in TEST() 40 EXPECT_EQ(6, breaker.followingWithLocale(Locale("en-US"), 0)); // after "hello " in TEST() 41 EXPECT_EQ(0, breaker.wordStart()); // "hello" in TEST() 42 EXPECT_EQ(5, breaker.wordEnd()); in TEST() 43 EXPECT_EQ(0, breaker.breakBadness()); in TEST() 44 EXPECT_EQ(6, breaker.current()); in TEST() 45 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST() 46 EXPECT_EQ(6, breaker.wordStart()); // "world" in TEST() [all …]
|
/frameworks/minikin/libs/minikin/ |
D | LineBreakerUtil.h | 133 inline Range wordRange() const { return breaker.wordRange(); } in wordRange() 144 inline int wordBreakPenalty() const { return breaker.breakBadness(); } in wordBreakPenalty() 146 CharProcessor(const U16StringPiece& text) { breaker.setText(text.data(), text.size()); } in CharProcessor() 154 nextWordBreak = breaker.followingWithLocale(locale, run.getRange().getStart()); in updateLocaleIfNecessary() 167 nextWordBreak = breaker.next(); in feedChar() 188 WordBreaker breaker; member
|
D | WordBreaker.h | 44 Slot() : localeId(0), breaker(nullptr) {} in Slot() 45 Slot(uint64_t localeId, IcuUbrkUniquePtr&& breaker) in Slot() 46 : localeId(localeId), breaker(std::move(breaker)) {} in Slot() 56 IcuUbrkUniquePtr breaker; member
|
D | WordBreaker.cpp | 61 if (slot.breaker.get() == nullptr) { in release() 83 ubrk_setUText(mIcuBreaker.breaker.get(), &mUText, &status); in followingWithLocale() 165 int32_t result = ubrk_following(mIcuBreaker.breaker.get(), mCurrent); in iteratorNext() 167 result = ubrk_next(mIcuBreaker.breaker.get()); in iteratorNext() 215 if (!ubrk_isBoundary(mIcuBreaker.breaker.get(), i)) { in detectEmailOrUrl() 219 i = ubrk_following(mIcuBreaker.breaker.get(), i); in detectEmailOrUrl()
|
D | GreedyLineBreaker.cpp | 81 void processLineBreak(uint32_t offset, WordBreaker* breaker, bool doHyphenation); 92 bool tryLineBreakWithHyphenation(const Range& range, WordBreaker* breaker); 163 bool GreedyLineBreaker::tryLineBreakWithHyphenation(const Range& range, WordBreaker* breaker) { in tryLineBreakWithHyphenation() argument 179 const Range targetRange = breaker->wordRange(); in tryLineBreakWithHyphenation() 297 void GreedyLineBreaker::processLineBreak(uint32_t offset, WordBreaker* breaker, in processLineBreak() argument 303 } else if (doHyphenation && tryLineBreakWithHyphenation(lineRange, breaker)) { in processLineBreak() 313 const bool isInEmailOrUrl = breaker->breakBadness() != 0; in processLineBreak()
|