Bug report for Fop [2006/12/24]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 953|Opn|Nor|2001-03-12|Incorrect hyperlinks area rendering in justified t| | 1063|New|Nor|2001-03-21|fop does not handle large fo files| | 1180|New|Maj|2001-04-02|Problem with monospaced font | | 1773|Opn|Blk|2001-05-16|A table that is bigger than the page produces an e| | 1859|Opn|Min|2001-05-22|org.apache.fop.apps.Driver.reset() doesn't fully r| | 1998|New|Nor|2001-06-05|linefeed-treatment not understood | | 2150|Ass|Maj|2001-06-13|New page with a table-header but without any tabl| | 2475|Ass|Nor|2001-07-06|Borders don't appear to work in | | 2740|New|Maj|2001-07-23|multi-page tables sometimes render badly | | 2909|New|Maj|2001-07-30|Gradient render error | | 2964|Ass|Nor|2001-08-02|problems with height of cells in tables | | 2988|New|Maj|2001-08-03|0.19: list-item-label does not stick to list-item-| | 3044|Ass|Maj|2001-08-08|keep-together not functioning | | 3280|New|Nor|2001-08-27|PCL Renderer doesn't work | | 3305|Opn|Nor|2001-08-28|list-block overlapping footnote body | | 3497|New|Cri|2001-09-07|id already exists error when using span="all" attr| | 3824|New|Blk|2001-09-25|MIF option with tables| | 4030|New|Nor|2001-10-08|IOException creating Postscript with graphics on S| | 4126|New|Nor|2001-10-12|FontState.width() returns pts instead of millipts | | 4226|New|Nor|2001-10-17|The orphans property doesn't seem to work | | 4388|New|Nor|2001-10-24|Nullpointer exception in the construction of new D| | 4415|New|Nor|2001-10-25|scaling="uniform" does not work on images... | | 4510|New|Nor|2001-10-30|fo:inline common properties ignored? | | 4535|New|Maj|2001-10-31|PCL renderer 1.13 not rendering SVG | | 4767|New|Nor|2001-11-09|SVG text is distored in PDF output| | 4814|Opn|Nor|2001-11-12|0.20.2RC infinitely loops if there are tables in f| | 5001|New|Nor|2001-11-21|content-width and content-height ignored? | | 5010|New|Enh|2001-11-21|Better error reporting needed | | 5124|New|Maj|2001-11-27|fo:block-container is not rendered properly using | | 5335|New|Min|2001-12-10|Text with embedded CID fonts not retrievable from | | 5655|Ass|Nor|2002-01-02|text-decoration cannot take multiple values | | 6094|Opn|Maj|2002-01-29|0.20.3rc hangs in endless loop| | 6237|Opn|Nor|2002-02-05|fi (fi ligature) produces a "sharp"? | | 6305|New|Nor|2002-02-07|Using fo:table-and-caption results in empty output| | 6427|New|Enh|2002-02-13|Adding additional Type 1 fonts problem| | 6437|New|Maj|2002-02-13|Tables without fo:table-column don't render | | 6483|New|Nor|2002-02-15|Table, Loop, "footer could not fit on page, moving| | 6844|New|Nor|2002-03-04|No line breaks inserted in list-item-label| | 6918|New|Enh|2002-03-06|reference-orientation has no effect | | 6997|New|Nor|2002-03-09|[PATCH] Row-spanned row data breaks over a page wi| | 7241|New|Nor|2002-03-19|keep-with-previous, keep-with-next only working on| | 7283|New|Nor|2002-03-20|Table border misaligned when using margin-left in | | 7337|New|Nor|2002-03-21|border around external image leaves empty space | | 7487|New|Nor|2002-03-26|break-before="page" for table inserts empty page | | 7496|New|Nor|2002-03-26|The table header borders are not adjusted to the b| | 7525|New|Cri|2002-03-27|table with spans inside a list-block | | 7919|New|Cri|2002-04-10|problem to use attribute linefeed-treatment and li| | 8003|Ass|Maj|2002-04-12|FopImageFactory never releases cached images | | 8050|New|Nor|2002-04-13|Soft hyphen () is not handled properly | | 8321|New|Nor|2002-04-19|from-parent('width') returns 0 for nested tables | | 8463|New|Nor|2002-04-24|SVG clipping in external.fo example doc when rende| | 8767|Ass|Min|2002-05-03|Image
Re: Columns from first row (continued)
On Dec 24, 2006, at 10:56, Andreas L Delmelle wrote: In the meantime, I've locally patched FOP to correctly deal with this. Forget it. Too simplistic. After running a few thorough tests, percentages are still not correctly distributed... :( Works nicely for FixedLength though. I'll still work out the percentage bit, and try to get it out of the way before the release. Stay tuned. Cheers, Andreas
Re: New FOP release: FOP 0.93
On Sun, Dec 24, 2006 at 10:09:14AM -0600, Jess Holle wrote: > Is there any sort of time table for a non-alpha/beta 0.9x or 1.0 release? That is what I am preparing: FOP 0.93 (without beta), to be released on 2 January 2007. Regards, Simon -- Simon Pepping home page: http://www.leverkruid.eu
Re: New FOP release: FOP 0.93
Is there any sort of time table for a non-alpha/beta 0.9x or 1.0 release? -- Jess Holle
Re: test
Andreas L Delmelle wrote: Just testing... Seems like a few of my responses never made it to the list the past couple of days. The listserver ist blacklisted from time to time: Hi. This is the qmail-send program at apache.org. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <[EMAIL PROTECTED]>: Connected to 82.218.134.240 but sender was rejected. Remote host said: 553 5.3.0 Mail from ^B. rejected - see +http://spamcop.net/w3m?action=checkblock&ip=140.211.11.2 for more information.
Re: svn commit: r489881 - in /xmlgraphics/fop/branches/fop-0_93: ./ src/documentation/ src/documentation/content/xdocs/ src/documentation/content/xdocs/0.93/ src/documentation/resources/stylesheets/
On Sat, Dec 23, 2006 at 12:42:40PM +0100, Andreas L Delmelle wrote: > On Dec 23, 2006, at 12:33, [EMAIL PROTECTED] wrote: > > Hi Simon, > > Seems my response to your post yesterday didn't make it to the list > for some reason... Andreas, Your response was received but not yet processed. I try to do one thing at a time. Simon > Anyway, this known issue > > >+ > >+Omitting fo:table-column or having fo:table-column without > >a column-width > >+and attempting to create columns implicitly from the first > >+table row is not implemented, yet (Bugzilla #35656 >a>). > >+ > > as Jeremias confirmed, has been resolved, for the largest part... The > testcases that were enabled with the patch solving the bug are only > basic. AFAICT, currently there is one tiny hole in the code: > > > > spanned="2"> > ... > > The current code creates two implicit columns, but does not > distribute the cell width yet. The cell width is only used in case > the cell spans only one column. > > > > Cheers, > > Andreas > -- Simon Pepping home page: http://www.leverkruid.eu
Columns from first row (continued)
(Sorry for sending this as a new post, but seems my reply didn't come through again ... *sigh*) In the meantime, I've locally patched FOP to correctly deal with this. Patch consists of a few changes in TableBody, TableRow and PercentLength. The latter only because I needed to have some way to be able to get the percentage value of the cell-width, divide it by the number of columns spanned, and construct a new PercentLength with the percentage distributed over the number of columns. Full patch below. If no one objects, I'll commit this to the trunk and the release branch, together with a few testcases, so this issue is out of the way. Cheers, Andreas Index: src/java/org/apache/fop/fo/flow/TableBody.java === --- src/java/org/apache/fop/fo/flow/TableBody.java (revision 489884) +++ src/java/org/apache/fop/fo/flow/TableBody.java (working copy) @@ -40,6 +40,9 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBorderPaddingBackground; import org.apache.fop.fo.properties.CommonRelativePosition; +import org.apache.fop.fo.properties.FixedLength; +import org.apache.fop.fo.properties.LengthProperty; +import org.apache.fop.fo.properties.PercentLength; /** * Class modelling the fo:table-body object. @@ -201,9 +204,16 @@ int colSpan = cell.getNumberColumnsSpanned(); Length colWidth = null; -if (cell.getWidth().getEnum() != EN_AUTO -&& colSpan == 1) { -colWidth = cell.getWidth(); +if (cell.getWidth().getEnum() != EN_AUTO) { +LengthProperty p = (LengthProperty) cell.getWidth(); +if (p instanceof FixedLength) { +colWidth = new FixedLength(p.getValue () / colSpan); +} else if (p instanceof PercentLength) { +PercentLength pctLength = (PercentLength) p; +double factor = pctLength.getPercentage () / 100; +colWidth = new PercentLength(factor / colSpan, +pctLength.getBaseLength()); +} } for (int i = colNr; i < colNr + colSpan; ++i) { Index: src/java/org/apache/fop/fo/flow/TableRow.java === --- src/java/org/apache/fop/fo/flow/TableRow.java (revision 489884) +++ src/java/org/apache/fop/fo/flow/TableRow.java (working copy) @@ -34,8 +34,11 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBorderPaddingBackground; import org.apache.fop.fo.properties.CommonRelativePosition; +import org.apache.fop.fo.properties.FixedLength; import org.apache.fop.fo.properties.KeepProperty; +import org.apache.fop.fo.properties.LengthProperty; import org.apache.fop.fo.properties.LengthRangeProperty; +import org.apache.fop.fo.properties.PercentLength; /** * Class modelling the fo:table-row object. @@ -133,9 +136,16 @@ int colSpan = cell.getNumberColumnsSpanned(); Length colWidth = null; -if (cell.getWidth().getEnum() != EN_AUTO -&& colSpan == 1) { -colWidth = cell.getWidth(); +if (cell.getWidth().getEnum() != EN_AUTO) { +LengthProperty p = (LengthProperty) cell.getWidth (); +if (p instanceof FixedLength) { +colWidth = new FixedLength(p.getValue() / colSpan); +} else if (p instanceof PercentLength) { +PercentLength pctLength = (PercentLength) p; +double factor = pctLength.getPercentage() / 100; +colWidth = new PercentLength(factor / colSpan, +pctLength.getBaseLength()); +} } for (int i = colNr; i < colNr + colSpan; ++i) { Index: src/java/org/apache/fop/fo/properties/PercentLength.java === --- src/java/org/apache/fop/fo/properties/PercentLength.java (revision 489884) +++ src/java/org/apache/fop/fo/properties/PercentLength.java (working copy) @@ -68,8 +68,8 @@ * * @return the percentage value */ -protected double getPercentage() { -return factor * 100; +public double getPercentage() { +return factor * 100.0; } /**
Re: Open issue: table-columns from first row?
On Dec 24, 2006, at 09:53, Andreas L Delmelle wrote: Just had another look, and it currently only works correctly in case there is no column-spanning going on in any of the cells in the first row. ... In this case, two implicit columns are created, but the cell's width is not yet distributed over the two columns. I'll add a testcase demonstrating what still goes wrong, but the issue probably needs to put in a slightly different wording, indicating that it works apart from the above reservation. In the meantime, I've locally patched FOP to correctly deal with this. Patch consists of a few changes in TableBody, TableRow and PercentLength. The latter only because I needed to have some way to be able to get the percentage value of the cell-width, divide it by the number of columns spanned, and construct a new PercentLength with the percentage distributed over the number of columns. Full patch below. If no one objects, I'll commit this to the trunk and the release branch, so this issue is out of the way. Cheers, Andreas Index: src/java/org/apache/fop/fo/flow/TableBody.java === --- src/java/org/apache/fop/fo/flow/TableBody.java (revision 489884) +++ src/java/org/apache/fop/fo/flow/TableBody.java (working copy) @@ -40,6 +40,9 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBorderPaddingBackground; import org.apache.fop.fo.properties.CommonRelativePosition; +import org.apache.fop.fo.properties.FixedLength; +import org.apache.fop.fo.properties.LengthProperty; +import org.apache.fop.fo.properties.PercentLength; /** * Class modelling the fo:table-body object. @@ -80,7 +83,7 @@ /** * @see FObj#bind(PropertyList) */ -public void bind(PropertyList pList) throws FOPException { +protected void bind(PropertyList pList) throws FOPException { commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps(); super.bind(pList); //Used by convertCellsToRows() @@ -201,9 +204,16 @@ int colSpan = cell.getNumberColumnsSpanned(); Length colWidth = null; -if (cell.getWidth().getEnum() != EN_AUTO -&& colSpan == 1) { -colWidth = cell.getWidth(); +if (cell.getWidth().getEnum() != EN_AUTO) { +LengthProperty p = (LengthProperty) cell.getWidth(); +if (p instanceof FixedLength) { +colWidth = new FixedLength(p.getValue () / colSpan); +} else if (p instanceof PercentLength) { +PercentLength pctLength = (PercentLength) p; +double factor = pctLength.getPercentage () / 100; +colWidth = new PercentLength(factor / colSpan, +pctLength.getBaseLength()); +} } for (int i = colNr; i < colNr + colSpan; ++i) { Index: src/java/org/apache/fop/fo/flow/TableRow.java === --- src/java/org/apache/fop/fo/flow/TableRow.java (revision 489884) +++ src/java/org/apache/fop/fo/flow/TableRow.java (working copy) @@ -34,8 +34,11 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBorderPaddingBackground; import org.apache.fop.fo.properties.CommonRelativePosition; +import org.apache.fop.fo.properties.FixedLength; import org.apache.fop.fo.properties.KeepProperty; +import org.apache.fop.fo.properties.LengthProperty; import org.apache.fop.fo.properties.LengthRangeProperty; +import org.apache.fop.fo.properties.PercentLength; /** * Class modelling the fo:table-row object. @@ -74,7 +77,7 @@ /** * @see org.apache.fop.fo.FObj#bind(PropertyList) */ -public void bind(PropertyList pList) throws FOPException { +protected void bind(PropertyList pList) throws FOPException { blockProgressionDimension = pList.get (PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange(); commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps(); @@ -133,9 +136,16 @@ int colSpan = cell.getNumberColumnsSpanned(); Length colWidth = null; -if (cell.getWidth().getEnum() != EN_AUTO -&& colSpan == 1) { -colWidth = cell.getWidth(); +if (cell.getWidth().getEnum() != EN_AUTO) { +LengthProperty p = (LengthProperty) cell.getWidth (); +if (p instanceof FixedLength) { +colWidth = new FixedLength(p.getValue() / colSpan); +} else if (p instanceof PercentLength) { +
Open issue: table-columns from first row?
Hi all, Since two replies I sent to Simon's posts seemed to end up in oblivion, I'll post it as a new message. Concerns the following issue: [Simon:] Uncertain status. The linked bug is resolved, but the description does not match the description of the bug: Omitting fo:table-column or having fo:table-column without a column-width and attempting to create columns implicitly from the first table row is not implemented, yet (Bugzilla #35656). Just had another look, and it currently only works correctly in case there is no column-spanning going on in any of the cells in the first row. ... In this case, two implicit columns are created, but the cell's width is not yet distributed over the two columns. I'll add a testcase demonstrating what still goes wrong, but the issue probably needs to put in a slightly different wording, indicating that it works apart from the above reservation. Cheers, Andreas
test
Just testing... Seems like a few of my responses never made it to the list the past couple of days.