diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-30 12:57:44 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-30 12:57:44 +0000 |
commit | 7c11b556c2e1dbe2dfe6c1978b1c9e17afb43bdf (patch) | |
tree | e193a13ebe4a59eff7069f00d8a37bd180e9ab5a /src | |
parent | a39fe65769a87b3134b6d3b23724d1b1316f0060 (diff) | |
download | xmlgraphics-fop-7c11b556c2e1dbe2dfe6c1978b1c9e17afb43bdf.tar.gz xmlgraphics-fop-7c11b556c2e1dbe2dfe6c1978b1c9e17afb43bdf.zip |
Fix for ClassCastException as shown in text-align2 (Reported by Lawrence Michel).
Wrong alignment was taken to remove trailing spaces.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@264773 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index e294908a8..f5a19c08f 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -279,7 +279,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager KnuthElement removedElement; while (this.size() > ignoreAtStart && ((KnuthElement) this.get(this.size() - 1)).isGlue()) { - if (textAlignment == EN_CENTER) { + if (textAlignmentLast == EN_CENTER) { // centered text: the pattern is // <glue> <penaly> <glue> <box> <penaly> <glue> removedElement = (KnuthGlue) this.remove(this.size() - 1); @@ -288,7 +288,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager removedElement = (KnuthGlue) this.remove(this.size() - 1); removedElement = (KnuthPenalty) this.remove(this.size() - 1); removedElement = (KnuthGlue) this.remove(this.size() - 1); - } else if (textAlignment == EN_START || textAlignment == EN_END) { + } else if (textAlignmentLast == EN_START || textAlignmentLast == EN_END) { // left- or right-aligned text: the pattern is // <glue> <penalty> <glue> removedElement = (KnuthGlue) this.remove(this.size() - 1); @@ -1411,7 +1411,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager break; } } - // collect word fragments, ignoring auxiliary elements; // each word fragment was created by a different TextLM if (firstElement.isBox() && !firstElement.isAuxiliary()) { |