[jira] [Commented] (FOP-2469) [PATCH] Auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17150100#comment-17150100 ] Mathieu Malaterre commented on FOP-2469: [~esclim] any progress ? Thanks > [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: 2.5 > Environment: Windows 7, JDK 7 >Reporter: Gregor Berg >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469-2018-07-17.patch, > FOP-2469_20150621.patch, FOP2469-auto-table-layout.xml, > resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, > test.fo, test2.fo, warning-only-static-columns-are-spanned.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 (v8.3.4#803005)
[jira] [Commented] (FOP-2469) [PATCH] Auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16850616#comment-16850616 ] Petter Reinholdtsen commented on FOP-2469: -- [~esclim]: Hi. Did you make any progress during your investigation a year ago? > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469-2018-07-17.patch, > FOP-2469_20150621.patch, FOP2469-auto-table-layout.xml, > resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, > test.fo, test2.fo, warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] Auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16599270#comment-16599270 ] Eric Lim commented on FOP-2469: --- I don't think table footer adding a new line is not entirely an auto table layout issue. If you add more characters to the text marker and show borders, then you will see the table marker outside the table. See attached test2.fo. I'll investigate more next week. > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469-2018-07-17.patch, > FOP-2469_20150621.patch, FOP2469-auto-table-layout.xml, > resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, > test.fo, test2.fo, warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16598596#comment-16598596 ] simon steiner commented on FOP-2469: Table footer has newline after this patch, see test.fo file > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469-2018-07-17.patch, > FOP-2469_20150621.patch, FOP2469-auto-table-layout.xml, > resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, > test.fo, warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590336#comment-16590336 ] Petter Reinholdtsen commented on FOP-2469: -- Hi. Did anyone have time to review the patch and consider if it is OK to include in the default FOP distribution? -- Happy hacking Petter Reinholdtsen > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469-2018-07-17.patch, > FOP-2469_20150621.patch, FOP2469-auto-table-layout.xml, > resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, > warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16547315#comment-16547315 ] Eric Lim commented on FOP-2469: --- Added FOP-2469-2018-07-17.patch. Patch is essentially a roll up of previous patch + auto table width support + bug fixes + new tests. Patch still needs work and more tests. > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469-2018-07-17.patch, > FOP-2469_20150621.patch, FOP2469-auto-table-layout.xml, > resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, > warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518644#comment-16518644 ] Petter Reinholdtsen commented on FOP-2469: -- Using the document mentioned above, and running "sed -i 's/ colwidth="[0-9]*\*"// ' docbook/0*.xml" to get rid of all preset colwidth, I discovered what I suspect is a bug in the patch. The table column headers seem to be ignored when deciding the width of the table column. I saw several tables where the header texts where on top of each other, because a column did not have any data, and its width was very small, causing the header text to flow into the next column. Oversight? > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469_20150621.patch, > FOP2469-auto-table-layout.xml, resize-all-but-static-spanned-columns.xml, > resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16517955#comment-16517955 ] Petter Reinholdtsen commented on FOP-2469: -- I managed to build with the patch in Debian Stable (failed in Debian Unstabe), and am happy to report that the patch made tables in my document a lot better. I even saved 4 pages. The document I work on is available from https://github.com/arkivverket/noark5-tjenestegrensesnitt-standard] > if you want to test yourself. I still try to decide if I will use dblatex or fop to process it. > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469_20150621.patch, > FOP2469-auto-table-layout.xml, resize-all-but-static-spanned-columns.xml, > resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16517799#comment-16517799 ] Petter Reinholdtsen commented on FOP-2469: -- For the record, I just tried to apply this patch to the latest Debian package, and it applied with minimal manual cleanup (had to manually apply two small changes two two files that had changed slightly). The updated patch is available from the equivalent Debian bug, https://bugs.debian.org/847190 >. Unfortunately the code do not build because my compiler fail to find javax.xml.XMLConstants.ACCESS_EXTERNAL_DTD and javax.xml.XMLConstants.ACCESS_EXTERNAL_STYLESHEET. I have no idea why. > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469_20150621.patch, > FOP2469-auto-table-layout.xml, resize-all-but-static-spanned-columns.xml, > resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16398486#comment-16398486 ] Gerard de Leeuw commented on FOP-2469: -- I was wondering if this issue is still a candidate to be merged into trunk. This issue is now more than 2 years old and using FOP 2.2 I still get the following warning: {noformat} 2018-03-14 13:11:38.519 [WARN] org.apache.fop.apps.FOUserAgent:97 - The following feature isn't implemented by Apache FOP, yet: table-layout="auto" (on fo:table){noformat} > [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 >Assignee: Andreas L. Delmelle >Priority: Major > Fix For: trunk > > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469_20150621.patch, > FOP2469-auto-table-layout.xml, resize-all-but-static-spanned-columns.xml, > resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v7.6.3#76005)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15826243#comment-15826243 ] Guillaume Delhumeau commented on FOP-2469: -- Hello. Would you mind giving me a status about this work? Do you plan to merge it soon into trunk? Thanks you for your help. Guillaume D. > [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 >Assignee: Andreas L. Delmelle > Fix For: trunk > > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469_20150621.patch, > FOP2469-auto-table-layout.xml, resize-all-but-static-spanned-columns.xml, > resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15725230#comment-15725230 ] Mathieu Malaterre commented on FOP-2469: This is getting very confusing. I suspect that from reading: https://wiki.apache.org/xmlgraphics-fop/AutoTableLayout the following issues should be assumed to be closed (invalid / marked as duplicates?): * https://issues.apache.org/jira/browse/FOP-1226 * https://issues.apache.org/jira/browse/FOP-1674 * https://issues.apache.org/jira/browse/FOP-2450 Could someone please clarify that the issue associated with auto table layout really is #2469 > [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 >Assignee: Andreas L. Delmelle > Fix For: trunk > > Attachments: 2015-05-13-auto-table-layout.patch, > 2015-05-27-LM-to-LC-refactoring.patch, > 2015-06-09-LM-to-LC-refactoring-update.patch, FOP-2469_20150621.patch, > FOP2469-auto-table-layout.xml, resize-all-but-static-spanned-columns.xml, > resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590434#comment-14590434 ] Andreas L. Delmelle commented on FOP-2469: -- Nice read, thanks! :) Should be more than enough to be able to locate it. In the meantime, interesting observation - Try running the first example (FOP2469...xml) against a fresh trunk, with the latest patch applied, and enable assertions. On my end, this fails with: {code} Caused by: java.lang.AssertionError at org.apache.fop.layoutmgr.table.TableLayoutManager.setPossibleWidths(TableLayoutManager.java:647) at org.apache.fop.layoutmgr.table.ColumnSetup.redistribute(ColumnSetup.java:469) ... {code} Without assertions enabled, it comes through nicely, so no problem there. Just seems like that method is called while it is -- or at least, it _was_ at some point in your thought process ;) -- not expected ( ? ) Could be a consequence of the LM-to-LC refactoring. [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.patch, 2015-06-09-LM-to-LC-refactoring-update.patch, FOP2469-auto-table-layout.xml, LayoutContext_Tweak.diff, resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14588646#comment-14588646 ] Gregor Berg commented on FOP-2469: -- In the width determination, having one table is quite simple and straight-forward: collect minIPD and IPD and, if the sum of IPDs is greater than the available space: redistribute until each column has an individual optimal value opt for which holds: minIPD=opt=IPD (for each column's respective pair of minIPD and IPD!). In case we have to deal with nested tables, things get much more complicated mainly due to the fact that we cannot know the minIPD of the 'outside' table without determining the minIPD of the 'inside' table (which is the sum of all column's minIPD + indentations). If, e.g., the outer table is fixed, has a width of 100pt and two columns, both columns would have a 'hard refIPD' of 50pt, which is set for all the outer table's TableCellLMs. If another table, which has a minIPD of 51pt, is contained in one of these table cells an overflow will occur since FOP cannot shrink the inner table any more. HOWEVER, if the outer table itself is contained in a table with auto-layout, its 'hard refIPF' is subject to change depending on how wide the column of the auto table will be. In these cases, the innermost table's minIPD is set as minIPD of the middle/fixed table's TableCellLM, which in turn may influence the minIPD of the outer auto table. Essentially, FOP needs to derive appropriate minIPD values for all containers - while it starts from the top, FOP has to drill down into each atomic unit and, if one of its parents uses auto-layout, propagate its minIPD bottom-up. During this process, ipd values may be smaller than minIPD values - this should be handled by increasing the ipd value which, in turn, is propagated via context.setRefIPD(): {code:title=TableLayoutManager.getNextKnuthElements()|borderStyle=solid} referenceIPD = context.getRefIPD(); // ... final int ipd = childLC.getRefIPD(); if (currentChildLM instanceof LineLayoutManager) { if (getContentAreaIPD() ipd (isAutoLayout() || context.isChildOfAutoLayoutElement())) { this.referenceIPD = this.startIndent + ipd + this.endIndent; updateContentAreaIPDwithOverconstrainedAdjust(); context.setRefIPD(this.referenceIPD); } } else if (this.referenceIPD ipd (isAutoLayout() || context.isChildOfAutoLayoutElement())) { this.referenceIPD = ipd; updateContentAreaIPDwithOverconstrainedAdjust(); context.setRefIPD(this.referenceIPD); } {code} So, while it should not occur, it is technically possible that a PGU's TableCellLM has an ipd which is less than its minIPD. *Possible cause are:* the TableCellLM's ipd was not increased after the TableCellLM's content was determined to require more space _or_ the PGU's minIPD was calculated incorrectly. The latter happened for me which is why you can find this crude correction as well: {code:title=TableLayoutManager.setBaseLength()|borderStyle=solid} if ((availableSpanWidth == 0) || (length == null)) { // TODO: remove the following IF as soon as the computation of minIPD is corrected if (minIPD ipd) {// happens e.g. for cells containing a space: ipd=0, minIPD=len( ) ipd = minIPD; } // ... } {code} Looking at this assignment and the _if_ clause above - it may also be the case that your code bypasses this first assignment and goes straight to _else_. In this case, it may be worth a try to put this corrective assignment even before the first _if_ to ensure that the minIPD value (the least amount of space this LM needs) is the one which FOP propagates to from this LM upwards. I hope this helps to solve the problem. [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.patch, 2015-06-09-LM-to-LC-refactoring-update.patch, FOP2469-auto-table-layout.xml, LayoutContext_Tweak.diff, resize-all-but-static-spanned-columns.xml, resize-spanned-columns.xml, warning-only-static-columns-are-spanned.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14582223#comment-14582223 ] Andreas L. Delmelle commented on FOP-2469: -- I finally had a much closer look at the patch yesterday and today, attempting to merge it into my local branch -- so far, so good, although the test file did throw an Exception at one point. This is likely related to changes I have on my end, so no worries there, but... Looking at the stack trace, I have run into another minor thing that bothered me slightly, design-wise: more imports from the o.a.f.layoutmgr package in the o.a.f.fo.flow package. That said, there were already some there... References the other way around bother me less, somehow. Perhaps more a matter of personal taste. As a resolution (for me, at least), I have moved the body of that method getNextKEFromPrimary() into the TableContentLayoutManager.determineWidthOfPrimaryGridUnit(), since it is the only place where it is called from, and I do not immediately see anything in said method that cannot be handled within the context of the layoutmgr package ( ? ) Perhaps that whole PGU class should move to the LM side, but that is a different story -- and a lot more work, so not right now... ;) OK, at least that stack trace looks a bit -- prettier. All calls in o.a.f.layoutmgr... {code} java.lang.IllegalArgumentException: min (27840) opt (27180) at org.apache.fop.traits.MinOptMax.getInstance(MinOptMax.java:59) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.setBaseLength( ) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.determineWidthOfPrimary( ) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.iterateOverTableRows( ) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.determineAutoLayoutWidths( ) at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements( ) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements( ) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements( ) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements( ) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements( ) ... {code} Now, on with the hunt for the cause of that Exception! :) [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.patch, 2015-06-09-LM-to-LC-refactoring-update.patch, FOP2469-auto-table-layout.xml, LayoutContext_Tweak.diff 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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14582518#comment-14582518 ] Gregor Berg commented on FOP-2469: -- (replying on the above post does not work...) Actually, the ipd should always be greater than or *equal to* the minIPD: for instance, the length of one character may be the minimal, optimal, and maximal width of a table cell. However, the determination of minIPD (usually length of longest KnuthBox) may lead to different results then the one for ipd. For instance, as indicated in the comments eight lines above your code sample, the minIPD of is greater than its ipd(=0). In my fo examples, this case only occured for a table cell containing a single space, but all such cases should be detected and corrected during the very first encounter (eight lines above, before the initial MinOptMax instance is created). WIthout having additional details (which FO file you used and which parts you changed) I cannot support your search. [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.patch, 2015-06-09-LM-to-LC-refactoring-update.patch, FOP2469-auto-table-layout.xml, LayoutContext_Tweak.diff 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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14579527#comment-14579527 ] Gregor Berg commented on FOP-2469: -- Surprisingly, there are not that many LC.newInstance() calls. While I cannot judge most of these calls right away, the ones I created can be switched to (an extended version of) copyOf() without any (apparent) problems. Apart from that, BlockStackingLM’s makeChildLayoutContext() jumps out right away. [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.patch, 2015-06-09-LM-to-LC-refactoring-update.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14579551#comment-14579551 ] Gregor Berg commented on FOP-2469: -- The TODO related to getMinIPD was initially meant as a reminder that hyphenation should be considered for this value as well (in case of TextLMs) - the current approach takes only the longest KnuthBox (== the longest word in a sequence). In extreme cases (many columns with long _breakable_ words), results which incorporate hyphenation are less likely to produce overflows. Therefore, I like the idea of moving getMinIPD() to KnuthSequences - especially for TextLMs which could easily check for viable hyphenations as part of _their_ new getMinIPD-determination (well, some special cases remain). [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.patch, 2015-06-09-LM-to-LC-refactoring-update.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14575949#comment-14575949 ] Andreas L. Delmelle commented on FOP-2469: -- Investigating a bit further the creation and usage of the LayoutContext, I am beginning to think that all usages of LC.newInstance() are actually candidates for a switch to copyOf() or offspringOf(). The former would copy the whole parent context, all flags and settings included, which may be undesirable in some cases, but is likely to be what one would expect from a child context anyway. The latter currently copies only one single flag, but could easily be extended to serve other purposes as well. At least, it seems it was intended to be an in-between of newInstance() and copyOf(). The explicit LC init calls (copyPendingMarks(), setRefIPD()...) in the various LMs still remain, but would then override the inherited settings. The settings that are not explicitly set or unset by the LM can then be assumed to be propagated, which is exactly the behaviour we are looking for. [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14571715#comment-14571715 ] Andreas L. Delmelle commented on FOP-2469: -- Started looking into both patches, and I must say that at first glance, I do like the LC approach more, in spite of the increased effort... I am definitely going to have a closer look into how that LC initialization can be streamlined. If that triggers even more invasive refactoring somewhere else, _so mote it be_. ;) I also have a few ideas on the TODOs you have, concerning folding the getMinIPD() into the element collection loop. Since I am working in a local sandbox on refactoring KnuthSequence, I wonder whether that folding could go even deeper...? getMinIPD() could be considered a function of the element list (sequence) returned by each childLM. If the minimum width required for the largest ListElement in the sequence is updated automatically with each added (relevant) element, regardless of which LM is building it, then calling said function on a completed sequence would again become a constant time operation. That is, instead of requiring an additional iteration over the sequence, or maybe a painful integration of this logic into the various getNextKE() implementations. More to follow, probably in the weekend. Stay tuned... [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 Assignee: Andreas L. Delmelle Fix For: trunk Attachments: 2015-05-13-auto-table-layout.patch, 2015-05-27-LM-to-LC-refactoring.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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14560986#comment-14560986 ] Gregor Berg commented on FOP-2469: -- I tried to pass the information (whether the current LM is contained in an element using automatic layout and whether the current invocation is part of the preprocessing step) *down* using LayoutContexts (LCs). What I found is: * I had to propagate the two corresponding booleans at least 5 times to a new childLC (= LayoutContext.newInstance()) ** if this propagation is skipped/forgotten at any point in the LC chain, the results are catastrophic ** since any LM should be able to contain any other LM, each LM's individual version of creating a new LC (e.g. BlockStackingLM's makeChildLayoutContext(LC)) needs to be adapted to *always* propagate these two new values * in the current version of the patch, most decisions of how to continue or which value to return are based on the LM and its bottom-up lookup instead of the LC ** the LM is almost always explicitly accessible, while the LC neets to be passed down (up to 5 times, through stacks of other methods) into individual methods were the decision is made While I think that the second point might be solved through refactoring, changing the way LCs are initialized throughout FOP (first point) may not be feasible for this context. A patch file illustrating such a refactoring (2015-05-27-LM-to-LC-refactoring.patch: covers some cases, others will produce incorrect results) will be attached shortly - it will show how much additional effort would have to go into LC initialization. [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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14560501#comment-14560501 ] Gregor Berg commented on FOP-2469: -- I finished some documentation over the last week and already got sidetracked into some changes I'm currently working on. Anyway, the documentation (of the current version of the patch) is available under https://wiki.apache.org/xmlgraphics-fop/AutoTableLayout. [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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14550470#comment-14550470 ] Gregor Berg commented on FOP-2469: -- You are right. While I initially tried to work around the Layoutcontext, this is exactly the kind of information which should be kept 'as context'. However, after refactoring the other three methods, it turns out to be not quite as straightforward; some methods return different values depending on which 'mode' their container is in, without any explicit Layoutcontext whatsoever. I'll have to look into this later, but simply replacing these methods won't work. Concerning documentation: I tried to use the fop wiki (i.e. https://wiki.apache.org/xmlgraphics-fop/AutoTableLayout), but I require permissions to edit anything. Could you please grant me access to the wiki? Account: GregorBerg [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 (v6.3.4#6332)
Re: [jira] [Commented] (FOP-2469) [PATCH] auto table layout
On 19 May 2015, at 19:45, Andreas Delmelle andreas.delme...@telenet.be wrote: snip / If anyone on with the appropriate karma is reading this: Can you please assist Gregor? If I should be able to help him out myself, please let me know what I can/should do, so that I can take care of it myself. Thanks! Hmm... Seems I may have some more catching up to do. I restored my old account, and cannot even seem to update any pages myself. It just shows 'Immutable Page' everywhere. Should this still be working? KR Andreas signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [jira] [Commented] (FOP-2469) [PATCH] auto table layout
Try now (it should work if your account is AndreasDelmelle). We had to put some ACLs in place due to spam. Should work for Gregor too. On 5/19/15 8:47 PM, Andreas Delmelle wrote: On 19 May 2015, at 19:45, Andreas Delmelle andreas.delme...@telenet.be wrote: snip / If anyone on with the appropriate karma is reading this: Can you please assist Gregor? If I should be able to help him out myself, please let me know what I can/should do, so that I can take care of it myself. Thanks! Hmm... Seems I may have some more catching up to do. I restored my old account, and cannot even seem to update any pages myself. It just shows 'Immutable Page' everywhere. Should this still be working? KR Andreas
Re: [jira] [Commented] (FOP-2469) [PATCH] auto table layout
On 19 May 2015, at 22:44, Luis Bernardo lmpmberna...@gmail.com wrote: Try now (it should work if your account is AndreasDelmelle). We had to put some ACLs in place due to spam. Should work for Gregor too. Aah, I had a vague suspicion that it was something in that direction... I recall seeing those abuses in the past, in the form of random bogus pages being added to the Wiki, either by bots or real people who had naught better to do. :) Anyway, Big Thanks, Luis! KR Andreas
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14551176#comment-14551176 ] Luis Bernardo commented on FOP-2469: We know the implementation is suboptimal if performance is your yardstick. But the end result is almost optimal, as far as the algorithm goes (except that the algorithm assumes constant width). An approach like the one suggested would lead to better performance, but potentially could result in suboptimal end result (although most if the time it would be OK). [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 (v6.3.4#6332)
Re: [jira] [Commented] (FOP-2469) [PATCH] auto table layout
Hi people, On 19 May 2015, at 15:58, Gregor Berg (JIRA) j...@apache.org wrote: snip / Concerning documentation: I tried to use the fop wiki (i.e. https://wiki.apache.org/xmlgraphics-fop/AutoTableLayout), but I require permissions to edit anything. Could you please grant me access to the wiki? Account: GregorBerg Slightly problematic request here, as I only became active again very recently myself, so I am not really sure what I would need to do for that... :( If anyone on with the appropriate karma is reading this: Can you please assist Gregor? If I should be able to help him out myself, please let me know what I can/should do, so that I can take care of it myself. Thanks! KR Andreas
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14551034#comment-14551034 ] Andreas L. Delmelle commented on FOP-2469: -- Side-note - Reading that (rather old) Wiki page again, with Jeremias' brain-dump (his words, not mine ;)), it just so happens that in my local sandbox, I am currently toying with that split in line-layout he is referring to. The problem Jeremias mentions has led to an implementation for changing page IPD that is actually suboptimal. No complaints on those who did the implementation, mind you. It is actually quite a feat that that someone managed to implement it in the first place. R-E-S-P-E-C-T! :) However, as a result, if you have a page-sequence with alternating page-masters with different margins, then (assuming no forced breaks) due to the fact that line-breaking is not really interrupted, the process will go roughly as: - perform line-breaking for all 40 pages - start page-breaking, and notice that available IPD changes after the first page - throw away every computed break after that first page, and restart from the second - perform line-breaking for 39 pages - start page-breaking, and notice that available IPD changes after the second page - throw away ... and restart from the third page - perform line-breaking for 38 pages etc. [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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547238#comment-14547238 ] Andreas L. Delmelle commented on FOP-2469: -- Thanks for the explanation. The example you give happens to be the one method that I do not see an issue with, as it could be applicable outside of the auto-table-layout context as well... ;) Just an idea, but mentioning the word context there makes me wonder whether some of the information (e.g. the boolean checked via isAutoLayout()) can be passed *down* by the ancestor TableLM through the LayoutContext. Not sure how other devs feel about this, but that way, there would be no need to go up the LM hierarchy to make that determination. It would already be set by the relevant ancestor LM and be immediately available via a quick check context.isAutoLayout(), which would have a guaranteed O(1) performance, no matter how deeply nested a structure we are talking about...? Anyways, still need to dive in a bit deeper to see whether that could work. In the meantime, I am definitely looking forward to your additional documentation. [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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547140#comment-14547140 ] Andreas L. Delmelle commented on FOP-2469: -- Had a closer look at the patch. Looks promising, but I already have one preliminary question: What exactly is the rationale for adding the related methods to AbstractBaseLayoutManager and method signatures to the LayoutManager interface? Those serve as the base class and interface for ALL layout managers, not only those related to tables. Somehow, something does not feel quite right about that. It seems to 'pollute' the general LM interfaces with methods that only apply in a very specific context (?) It almost has a similar feel as adding signatures for map-related methods to the general Collection interface or AbstractCollection base class in the JCF... At this point, I am not insisting that the approach is wrong. Could be that I am missing something obvious... It's been known to happen. :-) Can you clarify? [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 (v6.3.4#6332)
[jira] [Commented] (FOP-2469) [PATCH] auto table layout
[ https://issues.apache.org/jira/browse/FOP-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14547157#comment-14547157 ] 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 (v6.3.4#6332)