On 17 Nov 2008, at 21:35, Andreas Delmelle wrote:

Just some more follow-up:
On 17 Nov 2008, at 20:40, Simon Pepping wrote:

Someone sent me a file which also shows problems with hyphenation:

<fo:block hyphenate="true"><fo:inline>Some text ending in a space and
a period .</fo:inline></fo:block>

If the text is longer than a line, parts of the text
disappear. Without hyphenation there is no problem. Maybe it is
related.

<snip />
One thing I noticed, that seems suspicious:
Is it normal if applyChanges() returned true for a TextLayoutManager, that getChangedKnuthElements() isn't called later for that instance? Doesn't that lead to wrong position-pointers?

In the meantime, I'm quite certain this is not normal/expected. I remember when looking into Bugzilla 38264 earlier this year, that applyChanges() only takes care of splitting the AreaInfos into hyphenated word-fragments. getChangedKnuthElements() normally takes care of regenerating the element-list to reflect the changed positions. If this doesn't happen, well... the longer the paragraph, the weirder the results. :/

Looking closer, line 918 in TextLM is the cause of this:

this.hasChanged = !nothingChanged;

If hyphenate() is called multiple times, and the last time it changes nothing, then applyChanges() will always return false, which results in getChangedKnuthElements() not being called later.

Making it:
this.hasChanged = (this.hasChanged || !nothingChanged);

Seems to correct the issue at hand.


Cheers

Andreas

Reply via email to