aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2009-03-01 12:25:29 +0000
committerJeremias Maerki <jeremias@apache.org>2009-03-01 12:25:29 +0000
commit05f1c240b65132869d6bf5265c45e902d9d6ef83 (patch)
tree450e683af2bfcad5bce685d4b1b576eab402c5aa /src/java/org
parent8a4cbce7b55ca009bc00bb70bac495bc326ed5a7 (diff)
downloadxmlgraphics-fop-05f1c240b65132869d6bf5265c45e902d9d6ef83.tar.gz
xmlgraphics-fop-05f1c240b65132869d6bf5265c45e902d9d6ef83.zip
Fixed BPD trait and border painting for leaders with leader-pattern="space" (and similar cases).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@749012 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/fo/flow/Leader.java2
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java8
-rw-r--r--src/java/org/apache/fop/render/AbstractRenderer.java5
3 files changed, 7 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java
index d72ed1e63..c25fc8cab 100644
--- a/src/java/org/apache/fop/fo/flow/Leader.java
+++ b/src/java/org/apache/fop/fo/flow/Leader.java
@@ -73,6 +73,7 @@ public class Leader extends InlineLevel {
leaderLength = pList.get(PR_LEADER_LENGTH).getLengthRange();
leaderPattern = pList.get(PR_LEADER_PATTERN).getEnum();
leaderPatternWidth = pList.get(PR_LEADER_PATTERN_WIDTH).getLength();
+ ruleThickness = pList.get(PR_RULE_THICKNESS).getLength();
switch(leaderPattern) {
case EN_SPACE:
// use Space
@@ -81,7 +82,6 @@ public class Leader extends InlineLevel {
// the following properties only apply
// for leader-pattern = "rule"
ruleStyle = pList.get(PR_RULE_STYLE).getEnum();
- ruleThickness = pList.get(PR_RULE_THICKNESS).getLength();
break;
case EN_DOTS:
break;
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
index f3bbc454a..f436059dc 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
@@ -120,17 +120,15 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager {
org.apache.fop.area.inline.Leader leader
= new org.apache.fop.area.inline.Leader();
leader.setRuleStyle(fobj.getRuleStyle());
- leader.setRuleThickness(fobj.getRuleThickness().getValue(this));
- leader.setBPD(fobj.getRuleThickness().getValue(this));
leaderArea = leader;
} else {
leaderArea = new Space();
- leaderArea.setBPD(1);
}
+ leaderArea.setBPD(fobj.getRuleThickness().getValue(this));
leaderArea.addTrait(Trait.COLOR, fobj.getColor());
} else if (fobj.getLeaderPattern() == EN_SPACE) {
leaderArea = new Space();
- leaderArea.setBPD(1);
+ leaderArea.setBPD(fobj.getRuleThickness().getValue(this));
} else if (fobj.getLeaderPattern() == EN_DOTS) {
TextArea t = new TextArea();
char dot = '.'; // userAgent.getLeaderDotCharacter();
@@ -198,7 +196,7 @@ public class LeaderLayoutManager extends LeafNodeLayoutManager {
} else {
//Content collapsed to nothing, so use a space
leaderArea = new Space();
- leaderArea.setBPD(1);
+ leaderArea.setBPD(fobj.getRuleThickness().getValue(this));
}
}
TraitSetter.setProducerID(leaderArea, fobj.getId());
diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java
index 943c8c9da..0c324a0be 100644
--- a/src/java/org/apache/fop/render/AbstractRenderer.java
+++ b/src/java/org/apache/fop/render/AbstractRenderer.java
@@ -29,8 +29,11 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import org.w3c.dom.Document;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.area.Area;
@@ -66,7 +69,6 @@ import org.apache.fop.area.inline.WordArea;
import org.apache.fop.events.ResourceEventProducer;
import org.apache.fop.fo.Constants;
import org.apache.fop.fonts.FontInfo;
-import org.w3c.dom.Document;
/**
* Abstract base class for all renderers. The Abstract renderer does all the
@@ -648,7 +650,6 @@ public abstract class AbstractRenderer
* @param space the space to render
*/
protected void renderInlineSpace(Space space) {
- space.setBPD(0);
renderInlineAreaBackAndBorders(space);
// an inline space moves the inline progression position
// for the current block by the width or height of the space