aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2000-11-28 06:56:51 +0000
committerKeiron Liddle <keiron@apache.org>2000-11-28 06:56:51 +0000
commite636b00ca25beabb705740925e8f9e5b73045ce9 (patch)
treeb3b8c0cc079fa23738916a6b641aa36389098518
parente057e98bab01cb7254ce3a834b8318f3c64a531d (diff)
downloadxmlgraphics-fop-e636b00ca25beabb705740925e8f9e5b73045ce9.tar.gz
xmlgraphics-fop-e636b00ca25beabb705740925e8f9e5b73045ce9.zip
Added a check to make sure a whitespace space isn't added to the
end of a line, makes sure that the right alignment works Code changes sponsored by Dresdner Bank, Germany git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193842 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/org/apache/fop/layout/LineArea.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/org/apache/fop/layout/LineArea.java b/src/org/apache/fop/layout/LineArea.java
index 923e549e6..e11000073 100644
--- a/src/org/apache/fop/layout/LineArea.java
+++ b/src/org/apache/fop/layout/LineArea.java
@@ -525,9 +525,13 @@ public class LineArea extends Area {
*/
public void addPending() {
if (spaceWidth > 0) {
- addChild(new InlineSpace(spaceWidth));
- finalWidth += spaceWidth;
- spaceWidth = 0;
+ // this should handle the correct amount of space after
+ // the text if there is no more text, important for right alignment
+ if(this.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE || pendingAreas.size() > 0) {
+ addChild(new InlineSpace(spaceWidth));
+ finalWidth += spaceWidth;
+ spaceWidth = 0;
+ }
}
Enumeration e = pendingAreas.elements();