Bug 47835 - Percentages not working for provisional-distance-between-starts
Percentages not working for provisional-distance-between-starts
Status: CLOSED FIXED
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout
0.95
PC Windows Vista
: P2 normal
: ---
Assigned To: fop-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-09-14 05:34 UTC by Eric Amick
Modified: 2012-04-01 06:50 UTC (History)
0 users



Attachments
FO demonstrating bug. The first list uses percentage, the second doesn't. (1.90 KB, application/octet-stream)
2009-09-14 05:34 UTC, Eric Amick
Details
Let provisional-distance-between-starts act correctly as percentage (506 bytes, patch)
2009-09-17 14:49 UTC, Jonathan Levinson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Amick 2009-09-14 05:34:44 UTC
Created attachment 24256 [details]
FO demonstrating bug. The first list uses percentage, the second doesn't.

According to the spec, percentages are allowed for
provisional-distance-between-starts, but FOP doesn't handle it correctly.
Comment 1 Jonathan Levinson 2009-09-17 14:49:13 UTC
Created attachment 24285 [details]
Let provisional-distance-between-starts act correctly as percentage

This is a patch to FOPPropertyMapping.java.
Comment 2 Jonathan Levinson 2009-09-17 14:54:57 UTC
According to standard:

The "provisional-distance-between-start" is specified as a percentage of the inline progression dimension of the closet ancestor block-area.

To its definition in FOPPropertyMapping.java I added the following:

        m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);

I ran the JUNIT tests and no new problems resulted.

I generated the PDF with the new fop.jar and the percentage distances seemed correct.
Comment 3 Venkat Reddy 2009-09-18 02:30:31 UTC
(In reply to comment #2)
> According to standard:
> The "provisional-distance-between-start" is specified as a percentage of the
> inline progression dimension of the closet ancestor block-area.
> To its definition in FOPPropertyMapping.java I added the following:
>         m.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
> I ran the JUNIT tests and no new problems resulted.
> I generated the PDF with the new fop.jar and the percentage distances seemed
> correct.

Yes. This patch is working perfectly. I have tested the orginal pdabs.fo with provisional-distance-between-start="50%", the space created between elements.
Excellent.
Comment 4 Vincent Hennebert 2009-10-13 03:26:57 UTC
Fixed in revision 824668:
http://svn.apache.org/viewvc?rev=824668&view=rev
Thanks for the patch!

Vincent
Comment 5 Glenn Adams 2012-04-01 06:50:18 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed