From 506d11aa8563bdae65574a9b73c9b8f00cfcc153 Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Tue, 9 Jan 2018 14:16:04 +0000 Subject: FOP-2768: Reduced space for content after table git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1820665 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/fop/layoutmgr/table/TableStepper.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'fop-core') diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java index a6344f4b7..1d41d6cf1 100644 --- a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java +++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java @@ -270,12 +270,17 @@ public class TableStepper { breakClass = nextBreakClass; } returnList.add(new BreakElement(penaltyPos, effPenaltyLen, p, breakClass, context)); - if (penaltyOrGlueLen < 0) { - returnList.add(new KnuthGlue(-penaltyOrGlueLen, 0, 0, new Position(null), true)); - } laststep = step; step = getNextStep(); + + if (penaltyOrGlueLen < 0) { + if (step < 0) { + returnList.add(new KnuthGlue(0, -penaltyOrGlueLen, 0, new Position(null), true)); + } else { + returnList.add(new KnuthGlue(-penaltyOrGlueLen, 0, 0, new Position(null), true)); + } + } } while (step >= 0); assert !returnList.isEmpty(); lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true); -- cgit v1.2.3