From 5bcd5f1f2f587405256da3ffb4f645f6e83d070a Mon Sep 17 00:00:00 2001 From: Peter Herweg Date: Tue, 27 Jan 2004 17:33:27 +0000 Subject: [PATCH] Removed call of JFOR's WhiteSpaceCollapser; now this is done by FOP git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197275 13f79535-47bb-0310-9956-ffa450edef68 --- .../render/rtf/rtflib/rtfdoc/RtfParagraph.java | 7 ------- .../fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java | 15 ++++----------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java index 878542c83..8eb6658cc 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java @@ -136,13 +136,6 @@ implements IRtfTextContainer, IRtfPageBreakContainer, IRtfHyperLinkContainer, * @throws IOException for I/O problems */ protected void writeRtfPrefix() throws IOException { - // collapse whitespace before writing out - // TODO could be made configurable - if (attrib != null && attrib.isSet("WhiteSpaceFalse")) { - attrib.unset("WhiteSpaceFalse"); - } else { - new WhitespaceCollapser(this); - } //Reset paragraph properties if needed if (resetProperties) { diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java index 79f71dcb0..ebb5f883f 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java @@ -228,19 +228,12 @@ public class RtfTextrun extends RtfContainer { */ protected void writeRtfContent() throws IOException { /** - *TODO: The textrun's children are iterated threetimes: - * 1. In WhitespaceCollapser - * 2. To determine the last RtfParagraphBreak - * 3. To write the children + *TODO: The textrun's children are iterated twice: + * 1. To determine the last RtfParagraphBreak + * 2. To write the children * Maybe this can be done more efficient. */ - - if (attrib != null && attrib.isSet("WhiteSpaceFalse")) { - attrib.unset("WhiteSpaceFalse"); - } else { - new WhitespaceCollapser(this); - } - + //determine, if this RtfTextrun is the last child of its parent boolean bLast = false; for (Iterator it = parent.getChildren().iterator(); it.hasNext();) { -- 2.39.5