You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/02 17:58:35 UTC
svn commit: r227030 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
Author: jeremias
Date: Tue Aug 2 08:58:31 2005
New Revision: 227030
URL: http://svn.apache.org/viewcvs?rev=227030&view=rev
Log:
Fix for table-body4.xml. Higher penalty values for breaks that would results in unwelcome table breaks. At the moment this is hard-coded to an arbitrary value and needs to be refined.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java?rev=227030&r1=227029&r2=227030&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java Tue Aug 2 08:58:31 2005
@@ -324,9 +324,19 @@
}
}
int p = 0;
+ boolean allCellsHaveContributed = true;
signalKeepWithNext = false;
for (int i = 0; i < start.length; i++) {
+ if (start[i] == 0 && end[i] < 0 && elementLists[i] != null) {
+ allCellsHaveContributed = false;
+ }
signalKeepWithNext |= keepWithNextSignals[i];
+ }
+ if (!allCellsHaveContributed) {
+ //Not all cells have contributed to a newly started row. The penalty here is
+ //used to avoid breaks resulting in badly broken tables.
+ //See also: http://marc.theaimsgroup.com/?t=112248999600005&r=1&w=2
+ p = 900; //KnuthPenalty.INFINITE; //TODO Arbitrary value. Please refine.
}
if (signalKeepWithNext || getTableLM().mustKeepTogether()) {
p = KnuthPenalty.INFINITE;
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org