Bug 50901 - [PATCH] Percental table column width not calculated from table
Summary: [PATCH] Percental table column width not calculated from table
Status: RESOLVED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: rtf (show other bugs)
Version: 1.0
Hardware: Other All
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 08:24 UTC by carsten.pfeiffer
Modified: 2012-04-08 20:22 UTC (History)
0 users



Attachments
Example fo file, a table with 3 columns (2.21 KB, text/x-xslfo)
2011-03-09 08:24 UTC, carsten.pfeiffer
Details
Patch that fixes the problem for me. (1.12 KB, patch)
2011-03-09 08:25 UTC, carsten.pfeiffer
Details | Diff
The RTF output without the patch applied, only 1 column is visible (3.84 KB, application/rtf)
2011-03-09 08:26 UTC, carsten.pfeiffer
Details
The RTF output without the patch applied, all column are visible (3.87 KB, application/rtf)
2011-03-09 08:27 UTC, carsten.pfeiffer
Details
For comparison, the PDF output (unaffected by the patch) (5.38 KB, application/pdf)
2011-03-09 08:27 UTC, carsten.pfeiffer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description carsten.pfeiffer 2011-03-09 08:24:24 UTC
Created attachment 26750 [details]
Example fo file, a table with 3 columns

The width of table columns is not correctly calculated for RTF output. A percental width should be calculated from the enclosing table's width.

org.apache.fop.layoutmgr.table.TableLayoutManager actually does this for PDF output (see getBaseLength() implementation), but org.apache.fop.render.rtf.rtflib.tools.PercentContext doesn't.

The result is that the last column gets the entire space.

I'll attach a small example demonstrating the problem as well as a patch that fixes that problem for me.
Comment 1 carsten.pfeiffer 2011-03-09 08:25:48 UTC
Created attachment 26751 [details]
Patch that fixes the problem for me.
Comment 2 carsten.pfeiffer 2011-03-09 08:26:45 UTC
Created attachment 26752 [details]
The RTF output without the patch applied, only 1 column is visible
Comment 3 carsten.pfeiffer 2011-03-09 08:27:15 UTC
Created attachment 26753 [details]
The RTF output without the patch applied, all column are visible
Comment 4 carsten.pfeiffer 2011-03-09 08:27:51 UTC
Created attachment 26754 [details]
For comparison, the PDF output (unaffected by the patch)
Comment 5 carsten.pfeiffer 2011-10-18 09:52:15 UTC
ping
Comment 6 Glenn Adams 2012-04-07 01:42:01 UTC
resetting P2 open bugs to P3 pending further review
Comment 7 Glenn Adams 2012-04-08 09:11:03 UTC
increase priority due to presence of a patch
Comment 8 Glenn Adams 2012-04-08 20:22:25 UTC
patch landed at http://svn.apache.org/viewvc?view=revision&revision=1311081

thanks carsten!