From bc0c8c93b299ec1eb8142a4dafebbdbfdbdb0455 Mon Sep 17 00:00:00 2001 From: fotis Date: Tue, 20 Feb 2001 19:14:37 +0000 Subject: [PATCH] fixed: problems if calculated leader-length < 0 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194078 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/layout/LineArea.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/apache/fop/layout/LineArea.java b/src/org/apache/fop/layout/LineArea.java index 8ccc24ea5..01052ef9d 100644 --- a/src/org/apache/fop/layout/LineArea.java +++ b/src/org/apache/fop/layout/LineArea.java @@ -504,6 +504,12 @@ public class LineArea extends Area { } else if ((leaderLengthOptimum > leaderLengthMaximum) && (leaderLengthOptimum < remainingWidth)) { leaderLength = leaderLengthOptimum; } + + //stop if leader-length is too small + if (leaderLength <= 0 ) { + return; + } + switch (leaderPattern) { case LeaderPattern.SPACE: //whitespace setting must be false for this -- 2.39.5