// If we are already in a hyphenation loop, then stop.
if (inlineLC.tryHyphenate()) {
+ if (prevBP == null) {
+ vecInlineBreaks.add(bp);
+ prevBP = bp;
+ }
break;
}
// Otherwise, prepare to try hyphenation
inlineLC.setHyphContext(
getHyphenContext((prevBP == null) ? prev : prevBP, bp));
if (inlineLC.getHyphContext() == null) {
+ if (prevBP == null) {
+ vecInlineBreaks.add(bp);
+ prevBP = bp;
+ }
break;
}
inlineLC.setFlags(LayoutContext.TRY_HYPHENATE,
/* If we are not in justified text, we can end the line at
* prevBP.
*/
+ if (prevBP == null) {
+ vecInlineBreaks.add(bp);
+ prevBP = bp;
+ }
break;
}
} else {
return null;
}
if (prevBP == null) {
- vecInlineBreaks.add(bp);
prevBP = bp;
}