From d4ec49dd8f220752be8a5ab0cf6d6f4e30a1e685 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Fri, 17 Dec 2010 10:57:18 +0000 Subject: Auxiliary positions do not have an index value; fixing this in InlineStackingLM.applyChanges, rewrapping positions; fixed bug 49870 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1050342 13f79535-47bb-0310-9956-ffa450edef68 --- .../inline/InlineStackingLayoutManager.java | 7 +++- .../inline_hyphenation_border.xml | 49 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 test/layoutengine/standard-testcases/inline_hyphenation_border.xml diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java index bcc03b956..8d8de3d22 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java @@ -339,8 +339,11 @@ public abstract class InlineStackingLayoutManager extends AbstractLayoutManager oldListIterator = oldList.listIterator(); while (oldListIterator.hasNext()) { oldElement = (KnuthElement) oldListIterator.next(); - oldElement.setPosition - (notifyPos(new NonLeafPosition(this, oldElement.getPosition()))); + NonLeafPosition newPos = new NonLeafPosition(this, oldElement.getPosition()); + if (newPos.generatesAreas()) { + notifyPos(newPos); + } + oldElement.setPosition(newPos); } return bSomethingChanged; } diff --git a/test/layoutengine/standard-testcases/inline_hyphenation_border.xml b/test/layoutengine/standard-testcases/inline_hyphenation_border.xml new file mode 100644 index 000000000..f3c133e6e --- /dev/null +++ b/test/layoutengine/standard-testcases/inline_hyphenation_border.xml @@ -0,0 +1,49 @@ + + + + + +

+ This test checks whether the border is properly rendered with + hyphenation. I effectively checks whether + InlineStackingLM.applyChanges rewraps the positions properly. +

+
+ + + + + + + + + + + Test + + + + + + + + + + + +
-- cgit v1.2.3