> On Jan 31, 2006, at 06:12, Manuel Mall wrote:
>
>>
>> Just curious if you had a chance to have a look yet.
>
> Errm... A look yes, but I haven't found the time to correct it yet.
> BTW: does anyone know whether the removeTrailingSpaces() method was
> the only part of layout concerned with space removal? The funny thing
> is that if I remove the border and padding props, the remaining space
> disappears. If that is so, then AFAICT, it's possible that my
> algorithm still doesn't produce the proper result, but layout
> corrects this (unless there's border-and-padding involved --which,
> IIC, leads to a different element list being constructed for spaces
> (?) see TextLayoutManager at line 832 "if (lineStartBAP != 0 ||
> lineEndBAP != 0)"; I presume BAP is short for Border And Padding)
>

If BAP != 0 then a Knuth box element is inserted. This acts as a fence for
removeTrailingSpaces(), that is removeTrailingSapces() cannot distinguish
if the Box represents an actual word in the text or is a border/padding
space reservation and stops removal once it sees a Box. So, yes IMO your
algorithm does not produce a proper result but removeTrailingSpaces()
hides this unless we have border/padding intervening.

> Cheers,
>
> Andreas
>

Manuel

Reply via email to