aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java8
-rw-r--r--test/layoutengine/testcases/wrapper_text-transform_1.xml5
2 files changed, 7 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
index 7e709a93b..0e3667798 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
@@ -458,14 +458,14 @@ public class TextLayoutManager extends LeafNodeLayoutManager {
wordSpaceIPD, false));
sequence.add
(new KnuthGlue(0, 3 * LineLayoutManager.DEFAULT_SPACE_WIDTH, 0,
- new LeafPosition(this, vecAreaInfo.size() - 1), false));
+ new LeafPosition(this, -1), false));
sequence.add
(new KnuthPenalty(0, 0, false,
new LeafPosition(this, -1), true));
sequence.add
(new KnuthGlue(wordSpaceIPD.opt,
- 6 * LineLayoutManager.DEFAULT_SPACE_WIDTH, 0,
- new LeafPosition(this, -1), true));
+ new LeafPosition(this, vecAreaInfo.size() - 1), true));
sequence.add
(new KnuthInlineBox(0, 0, 0, 0,
new LeafPosition(this, -1), true));
@@ -486,14 +486,14 @@ public class TextLayoutManager extends LeafNodeLayoutManager {
wordSpaceIPD, false));
sequence.add
(new KnuthGlue(0, 3 * wordSpaceIPD.opt, 0,
- new LeafPosition(this, vecAreaInfo.size() - 1), false));
+ new LeafPosition(this, -1), false));
sequence.add
(new KnuthPenalty(0, 0, false,
new LeafPosition(this, -1), true));
sequence.add
(new KnuthGlue(wordSpaceIPD.opt,
- 3 * wordSpaceIPD.opt, 0,
- new LeafPosition(this, -1), true));
+ new LeafPosition(this, vecAreaInfo.size() - 1), true));
iNextStart ++;
break;
diff --git a/test/layoutengine/testcases/wrapper_text-transform_1.xml b/test/layoutengine/testcases/wrapper_text-transform_1.xml
index 25133063d..827113678 100644
--- a/test/layoutengine/testcases/wrapper_text-transform_1.xml
+++ b/test/layoutengine/testcases/wrapper_text-transform_1.xml
@@ -41,7 +41,8 @@
<checks>
<eval expected="none: This tExT is left as-IS." xpath="//flow/block[1]"/>
<eval expected="capitalize: This TExT Is Capitalized." xpath="//flow/block[2]"/>
- <eval expected="uppercase: THIS TEXT IS CONVERTED TO UPPERCASE. LIBERTÉ, ÉGALITÉ, FRATERNITÉ UND KÄSE." xpath="//flow/block[3]"/>
- <eval expected="lowercase: this text is converted to lowercase. liberté, égalité, fraternité und käse." xpath="//flow/block[4]"/>
+ <!-- spaces are discarded when around a line break -->
+ <eval expected="uppercase: THIS TEXT IS CONVERTED TO UPPERCASE.LIBERTÉ, ÉGALITÉ, FRATERNITÉ UND KÄSE." xpath="//flow/block[3]"/>
+ <eval expected="lowercase: this text is converted to lowercase. liberté, égalité,fraternité und käse." xpath="//flow/block[4]"/>
</checks>
</testcase>