On Wed, Aug 23, 2006 at 09:59:14PM +0200, Andreas L Delmelle wrote:
> On Aug 23, 2006, at 21:16, Patrick Paul wrote:
> 
> Simon's correct. I'll clarify a bit more. From what I could tell,  
> Patrick's patch has added code at the right places, it only seems a  
> bit awkward to me to import stuff related to table-layout into the  
> LineLayoutManager (even if it is nothing more than a TableHelper).

I had not realized you were talking about tables. I thought it was
connected with the need to find a layout solution for page sequences
with different page widths.
 
> (Note: this part was not wrong per se in the patch. It just seems  
> there currently is no other way, precisely because list-creation and  
> breaking are performed in the same method. The only place where it  
> can be entered is somewhere between those two statements -- 
> collectInlineKnuthElements() and createLineBreaks().)
> 
> A more correct approach --a matter of taste?-- would be for the  
> TableContentLM to 'collect' the accumulated list of its descendant  
> LMs, perform the min/max-width calculation, update the LayoutContext,  
> and send it back down to the LineBreaker.
> 
> Maybe someone sees another approach that I'm overlooking?

The LineLM is the master of the inline content, so to say, so it
governs the line breaking process. Therefore it may be the right
object to be requested to calculate the width of the content. But
maybe it would be better to add a getTotalWidth method to the
Paragraph.

Regards, Simon

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

Reply via email to