boolean signalKeepWithNext = false;
int laststep = 0;
int step;
- int addedBoxLen = 0;
+ int cumulateLength = 0; // Length of the content accumulated before the break
TableContentPosition lastTCPos = null;
LinkedList returnList = new LinkedList();
while ((step = getNextStep()) >= 0) {
int normalRow = activeRowIndex;
int increase = step - laststep;
int penaltyOrGlueLen = step + getMaxRemainingHeight() - totalHeight;
- int boxLen = step - addedBoxLen - Math.max(0, penaltyOrGlueLen);
- addedBoxLen += boxLen;
+ int boxLen = step - cumulateLength - Math.max(0, penaltyOrGlueLen)/* the penalty, if any */;
+ cumulateLength += boxLen + Math.max(0, -penaltyOrGlueLen)/* the glue, if any */;
boolean forcedBreak = false;
int breakClass = -1;
<changes>
<release version="FOP Trunk">
+ <action context="Code" dev="VH" type="fix">
+ Bugfix in tables: wrong element generation by the merging algorithm when glues must be
+ produced to cope with conditional spaces. The corresponding length was added twice: one in
+ the glue itself and one in the following box.
+ </action>
<action context="Code" dev="JM" type="fix">
Bugfix for URI resolution: Make StreamSources without system identifier work again.
</action>
Avoid a NullPointerException in AreaTreeHandler.endDocument().
</action>
<action context="Code" dev="VH" type="fix" fixes-bug="43766">
- Bugfix: breaks generated by the merging algorithm for a table-row containing empty cells had always a
- penalty of 900.
+ Bugfix: breaks generated by the merging algorithm for a table-row containing empty cells
+ had always a penalty of 900.
</action>
<action context="Code" dev="JM" type="add" fixes-bug="43605" due-to="V. Schappert">
Added methods for fo:page-number-citation(-last) in FOEventHandler.
<eval expected="31800" xpath="//pageViewport[8]//flow/block[2]/block/@bpd"/>
<eval expected="16800" xpath="//pageViewport[9]//flow/block/@bpd"/>
<eval expected="16800" xpath="//pageViewport[9]//flow/block/block/@bpd"/>
+
+ <element-list category="breaker">
+ <skip>3</skip> <!-- The block before the table -->
+ <penalty p="INF" w="0"/>
+ <glue w="4000"/> <!-- The border before -->
+ <box w="16800"/> <!-- Line 1 -->
+ <penalty p="0" w="0"/>
+ <glue w="25000"/> <!-- The space between lines -->
+ <box w="16800"/> <!-- Line 2 -->
+ <skip>3</skip> <!-- glue for end of page TODO missing element for border-after!! -->
+ </element-list>
</checks>
</testcase>