You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Simon Pepping <sp...@leverkruid.nl> on 2004/04/06 13:31:44 UTC

Re: DO NOT REPLY [Bug 27901] - [PATCH] TextCharIterator.remove() does not work properly

On Sun, Apr 04, 2004 at 06:41:41AM -0000, bugzilla@apache.org wrote:
> ------- Additional Comments From glenmazza@yahoo.com  2004-04-04 06:41 -------
> Anyway, please check the latest solution applied.  Here I brought in the old
> solution to solve the extra spaces problem, while keeping the new solution for
> the more commonly occurring spaces at the front of fo:text.
> 
> (As stated above, I suspect < 10%), so more optimization may be needed here. 
> (Perhaps an error in my logic of when RemoveA vs. RemoveB should be called.)
> 
> Comments most welcome.

The code seems OK to me. 

I have a remark on the logic of nextCharCalled. It is equal to
curIndex - startIndex. Also, in remove() you should separately
consider the case nextCharCalled == 0: it should not happen.

I have looked at the output in the area tree (at output). It does not
reproduce the error in the first block of my test fo, the one with the
colored inline FOs. That may be an error of the PDF renderer. It does
reproduce the error in the second block: The second line is longer
than in the other blocks, and the last line is dropped. That may be an
error in the layout managers.

I saw no problem with the logic of RemoveA, RemoveB or
RemoveC. RemoveB does handle trailing spaces except for the last one.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.nl


Re: [Bug 27901] - [PATCH] TextCharIterator.remove() does not work properly

Posted by Simon Pepping <sp...@leverkruid.nl>.
I should add that I have realized that the rules of whitespace
handling in the FO spec are quite complicated, and that it is unwise
to handle whitespace outside of the Block.handleWhiteSpace method.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.nl