https://bugs.documentfoundation.org/show_bug.cgi?id=56408
--- Comment #33 from Jonathan Clark <[email protected]> --- The root cause for this bug is Writer failing to backtrack before bidi portions while doing line breaking. In order to lay out and render text, Writer must segment the text into portions. This can happen for a variety of reasons. For example, if only a part of a word in English text changes, the track changes feature will split that word across two or more portions. Having to segment text in this way creates a situation where, potentially, a portion containing a break opportunity fits on a line, followed by an arbitrary number of portions which overflow the line, none of which contain break opportunities. In order to lay out such text correctly, Writer keeps track of the portion and position of the last break opportunity. Then, if unbreakable portions cause the line to overflow, Writer can backtrack (rewind) to the previous break opportunity, insert the break, and then continue layout from that point. This mechanism works correctly for both LTR and RTL text. However, it's currently broken for bidirectional text. Inserting text which implies a direction change produces a bidi portion (a type of multi portion). The relevant backtracking code was written deliberately so that Writer always treats the start of a multi portion as a break opportunity. I'm still unsure why; it's possible this was only intended for the other types of multi portions, and bidi portions were affected inadvertently. -- You are receiving this mail because: You are the assignee for the bug.
