Gregor Berg commented on FOP-2469:

Hi Andreas,

Basically, each method added to AbstractBaseLayoutManager uses recursion to 
gather values from its child LMs or goes up the hierarchy to determine whether 
it is used in a dynamic block (which modifies how it needs to be rendered).

For instance, getMinimumIPD():
I ran into the problem that any table cell may contain any other type of 
content and, thus, any other Layoutmanager (LM). 
To determine the width of an auto-layout column of a table, each table cell LM 
of this column needs to know how wide its content will be (preferably max and 
min values for each table cell) before the column width can be calculated. 
Since each table cell may contain any type of content and, thus, any other LM, 
each LM needs to supply these values (via getMinimumIPD() which recursively 
obtains the minimum width of the _widest_ childLM).
While most LMs simply return the max value returned from its childLMs, 
ExternalGraphicLM returns a concrete value and TableCellLM adds its 
indentations values before returning the max childLM value.

I hope that answers your question :)
Throughout next week, I’m going to document some of the algorithms/assumptions 
of this patch.

> [PATCH] auto table layout
> -------------------------
>                 Key: FOP-2469
>                 URL: https://issues.apache.org/jira/browse/FOP-2469
>             Project: Fop
>          Issue Type: Bug
>          Components: layout/unqualified
>    Affects Versions: trunk
>         Environment: Windows 7, JDK 7
>            Reporter: Gregor Berg
>             Fix For: trunk
>         Attachments: 2015-05-13-auto-table-layout.patch, 
> FOP2469-auto-table-layout.xml
> Hi,
> this is a patch which enables table-layout=auto. It is quite robust, it can 
> not only handle linebreaks and pagebreaks, but it also copes with auto tables 
> in fixed tables in auto tables.
> Essentially, it is the patch of issue FOP-2450 adapted to the trunk version 
> of FOP.
> Best regards,
> Gregor

This message was sent by Atlassian JIRA

Reply via email to