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
*/
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();