Changeset 1106
- Timestamp:
- 03/26/10 23:35:01 (2 years ago)
- Location:
- trunk/docx4j/src/main/java/org/docx4j
- Files:
-
- 2 edited
-
TextUtils.java (modified) (4 diffs)
-
wml/SdtRun.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/TextUtils.java
r1096 r1106 27 27 28 28 import javax.xml.bind.JAXBContext; 29 import javax.xml.bind.JAXBElement; 29 30 import javax.xml.bind.Marshaller; 31 import javax.xml.namespace.QName; 30 32 31 33 import org.apache.log4j.Logger; … … 42 44 43 45 /** 44 * Extract contents of <w:t> elements.46 * Extract contents of descendant <w:t> elements. 45 47 * 46 48 * @param o … … 54 56 55 57 /** 56 * Extract contents of <w:t> elements.58 * Extract contents of descendant <w:t> elements. 57 59 * 58 60 * @param o … … 68 70 69 71 } 72 73 /** 74 * Extract contents of descendant <w:t> elements. 75 * Use this for objects which don't have @XmlRootElement 76 * 77 * @param o 78 * @param w 79 * @param jc 80 * @param uri 81 * @param local 82 * @param declaredType 83 * @throws Exception 84 */ 85 public static void extractText(Object o, Writer w, JAXBContext jc, 86 String uri, String local, Class declaredType) throws Exception { 87 88 Marshaller marshaller=jc.createMarshaller(); 89 NamespacePrefixMapperUtils.setProperty(marshaller, 90 NamespacePrefixMapperUtils.getPrefixMapper()); 91 marshaller.marshal( 92 new JAXBElement(new QName(uri,local), declaredType, o ), 93 new TextExtractor(w)); 94 } 95 70 96 71 97 /** -
trunk/docx4j/src/main/java/org/docx4j/wml/SdtRun.java
r359 r1106 25 25 import javax.xml.bind.annotation.XmlAccessType; 26 26 import javax.xml.bind.annotation.XmlAccessorType; 27 import javax.xml.bind.annotation.XmlRootElement; 27 28 import javax.xml.bind.annotation.XmlTransient; 28 29 import javax.xml.bind.annotation.XmlType; … … 57 58 "sdtContent" 58 59 }) 60 @XmlRootElement(name = "sdt") 59 61 public class SdtRun 60 62 implements Child
Note: See TracChangeset
for help on using the changeset viewer.
