diff options
author | Finn Bock <bckfnn@apache.org> | 2004-10-01 09:30:35 +0000 |
---|---|---|
committer | Finn Bock <bckfnn@apache.org> | 2004-10-01 09:30:35 +0000 |
commit | 10159ea46c0a601de39cc920d19db12571bc7a34 (patch) | |
tree | 0ed779e465d4d9ca1e5f44b075b80faedd28dc25 /src/java/org/apache/fop/render | |
parent | 567623167bdcc8a3e9c932370f3f3329a2832dcd (diff) | |
download | xmlgraphics-fop-10159ea46c0a601de39cc920d19db12571bc7a34.tar.gz xmlgraphics-fop-10159ea46c0a601de39cc920d19db12571bc7a34.zip |
Support nested attribute values, for use with border control words.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render')
-rw-r--r-- | src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java | 11 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java | 12 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java index 225e66eaf..26fcbb71b 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java @@ -145,6 +145,17 @@ implements java.lang.Cloneable { } /** + * Set an attribute that has nested attributes as value + * @param name name of attribute + * @param type value of the nested attributes + * @return this (which now contains the new entry) + */ + public RtfAttributes set(String name, RtfAttributes value) { + values.put(name, value); + return this; + } + + /** * @param name String containing attribute name * @return the value of an attribute, null if not found */ diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java index 4ce4bf41a..03d5697d3 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java @@ -211,7 +211,11 @@ public abstract class RtfElement { cw += value; } else if (value instanceof String) { cw += value; - } + } else if (value instanceof RtfAttributes) { + writeControlWord(cw); + writeAttributes((RtfAttributes) value, null); + return; + } writeControlWord(cw); } @@ -229,7 +233,11 @@ public abstract class RtfElement { cw += value; } else if (value instanceof String) { cw += value; - } + } else if (value instanceof RtfAttributes) { + writeControlWord(cw); + writeAttributes((RtfAttributes) value, null); + return; + } writeControlWordNS(cw); } |