diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-12-22 14:11:52 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-12-22 14:11:52 +0000 |
commit | 8ef2099f5d82ff553b2c34420eb269d1e9d07b22 (patch) | |
tree | c92e300da257596719bca296811b2809adb635b9 /src/sandbox/org | |
parent | e8383ed28560a67758a45f0b421021b210d6ca1f (diff) | |
download | xmlgraphics-fop-8ef2099f5d82ff553b2c34420eb269d1e9d07b22.tar.gz xmlgraphics-fop-8ef2099f5d82ff553b2c34420eb269d1e9d07b22.zip |
Need to use xml:space="preserve" on text elements in IF and SVG output to avoid problems with editing those files in XML editors and rendering SVG text starting or ending with whitespace.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@728699 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/sandbox/org')
-rw-r--r-- | src/sandbox/org/apache/fop/render/svg/SVGPainter.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sandbox/org/apache/fop/render/svg/SVGPainter.java b/src/sandbox/org/apache/fop/render/svg/SVGPainter.java index c9b7b7e3b..df67971b8 100644 --- a/src/sandbox/org/apache/fop/render/svg/SVGPainter.java +++ b/src/sandbox/org/apache/fop/render/svg/SVGPainter.java @@ -58,6 +58,7 @@ import org.apache.fop.traits.BorderProps; import org.apache.fop.traits.RuleStyle; import org.apache.fop.util.ColorUtil; import org.apache.fop.util.GenerationHelperContentHandler; +import org.apache.fop.util.XMLConstants; import org.apache.fop.util.XMLUtil; /** @@ -330,6 +331,7 @@ public class SVGPainter extends AbstractIFPainter implements SVGConstants { try { establish(MODE_TEXT); AttributesImpl atts = new AttributesImpl(); + XMLUtil.addAttribute(atts, XMLConstants.XML_SPACE, "preserve"); XMLUtil.addAttribute(atts, "x", Integer.toString(x)); XMLUtil.addAttribute(atts, "y", Integer.toString(y)); if (dx != null) { |