aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2008-02-08 19:20:27 +0000
committerSimon Pepping <spepping@apache.org>2008-02-08 19:20:27 +0000
commit308f50089a6a3248549e761f4941a7cf1eb622b4 (patch)
treece026cf9a7f9ebffd2be79bbeaac820e39d6412a /src/java
parent3002c185c73a306039088488edc37b6ddeb78e6d (diff)
downloadxmlgraphics-fop-308f50089a6a3248549e761f4941a7cf1eb622b4.tar.gz
xmlgraphics-fop-308f50089a6a3248549e761f4941a7cf1eb622b4.zip
In addKnuthElementsForBorderPaddingXXX, if the returnlist is a
BlockKnuthSequence, the border and padding should be added to the first or last paragraph inside it, but it is too late to do that now. At least, avoid adding it to the bpd sequence. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@619979 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rwxr-xr-xsrc/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
index b10e41132..b449b6689 100755
--- a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
@@ -548,6 +548,14 @@ public class InlineLayoutManager extends InlineStackingLayoutManager {
*/
protected void addKnuthElementsForBorderPaddingStart(List returnList) {
//Border and Padding (start)
+ /**
+ * If the returnlist is a BlockKnuthSequence, the border and padding should be added
+ * to the first paragraph inside it, but it is too late to do that now.
+ * At least, avoid adding it to the bpd sequence.
+ */
+ if (returnList instanceof BlockKnuthSequence) {
+ return;
+ }
CommonBorderPaddingBackground borderAndPadding = fobj.getCommonBorderPaddingBackground();
if (borderAndPadding != null) {
int ipStart = borderAndPadding.getBorderStartWidth(false)
@@ -564,6 +572,14 @@ public class InlineLayoutManager extends InlineStackingLayoutManager {
*/
protected void addKnuthElementsForBorderPaddingEnd(List returnList) {
//Border and Padding (after)
+ /**
+ * If the returnlist is a BlockKnuthSequence, the border and padding should be added
+ * to the last paragraph inside it, but it is too late to do that now.
+ * At least, avoid adding it to the bpd sequence.
+ */
+ if (returnList instanceof BlockKnuthSequence) {
+ return;
+ }
CommonBorderPaddingBackground borderAndPadding = fobj.getCommonBorderPaddingBackground();
if (borderAndPadding != null) {
int ipEnd = borderAndPadding.getBorderEndWidth(false)