You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by bc...@apache.org on 2004/10/01 11:30:35 UTC
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc RtfAttributes.java RtfElement.java
bckfnn 2004/10/01 02:30:35
Modified: src/java/org/apache/fop/render/rtf/rtflib/rtfdoc
RtfAttributes.java RtfElement.java
Log:
Support nested attribute values, for use with border control words.
Revision Changes Path
1.3 +12 -1 xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
Index: RtfAttributes.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RtfAttributes.java 27 Feb 2004 17:54:01 -0000 1.2
+++ RtfAttributes.java 1 Oct 2004 09:30:35 -0000 1.3
@@ -145,6 +145,17 @@
}
/**
+ * 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
*/
1.3 +11 -3 xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java
Index: RtfElement.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfElement.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RtfElement.java 27 Feb 2004 17:54:01 -0000 1.2
+++ RtfElement.java 1 Oct 2004 09:30:35 -0000 1.3
@@ -211,7 +211,11 @@
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 @@
cw += value;
} else if (value instanceof String) {
cw += value;
- }
+ } else if (value instanceof RtfAttributes) {
+ writeControlWord(cw);
+ writeAttributes((RtfAttributes) value, null);
+ return;
+ }
writeControlWordNS(cw);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org