Changeset 1463
- Timestamp:
- 04/03/11 07:27:03 (14 months ago)
- Location:
- trunk/docx4j/src/main/java/org/docx4j
- Files:
-
- 8 added
- 2 edited
-
TraversalUtil.java (modified) (2 diffs)
-
model/images/WordXmlPictureE10.java (modified) (3 diffs)
-
vml/presentationDrawing/header.txt (added)
-
vml/presentationDrawing/script (added)
-
vml/root/header.txt (added)
-
vml/root/script (added)
-
vml/spreadsheetDrawing/header.txt (added)
-
vml/spreadsheetDrawing/script (added)
-
vml/wordprocessingDrawing/header.txt (added)
-
vml/wordprocessingDrawing/script (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/TraversalUtil.java
r1453 r1463 4 4 import java.util.ArrayList; 5 5 import java.util.List; 6 7 import javax.xml.bind.JAXBElement; 6 8 7 9 import org.apache.log4j.Logger; … … 190 192 return ((Pict)o).getAnyAndAny(); // (why didn't the reflection below find this?) 191 193 } else if (o instanceof org.docx4j.vml.CTShape) { 192 return ((org.docx4j.vml.CTShape)o).getAny(); 194 // return ((org.docx4j.vml.CTShape)o).getAny(); 195 List<Object> artificialList = new ArrayList<Object>(); 196 for (JAXBElement<?> j : ((org.docx4j.vml.CTShape)o).getPathOrFormulasOrHandles() ) { 197 artificialList.add(j); 198 } 199 return artificialList; 193 200 } else if (o instanceof org.docx4j.vml.CTTextbox) { 194 return ((org.docx4j.vml.CTTextbox)o).getAny(); 195 } else if (o instanceof org.docx4j.wml.CTTxbxContent) { 196 return ((org.docx4j.wml.CTTxbxContent)o).getEGBlockLevelElts(); 201 // return ((org.docx4j.vml.CTTextbox)o).getAny(); 202 return ((org.docx4j.vml.CTTextbox)o).getTxbxContent().getEGBlockLevelElts(); 203 // grandchildren 204 205 // } else if (o instanceof org.docx4j.wml.CTTxbxContent) { 206 // return ((org.docx4j.wml.CTTxbxContent)o).getEGBlockLevelElts(); 197 207 } else if (o instanceof CTObject) { 198 208 return ((CTObject)o).getAnyAndAny(); -
trunk/docx4j/src/main/java/org/docx4j/model/images/WordXmlPictureE10.java
r1138 r1463 140 140 private void findImageData() { 141 141 142 if (shape.get Any()==null) {142 if (shape.getPathOrFormulasOrHandles()==null) { 143 143 log.debug("Shape had no any: " + XmlUtils.marshaltoString(shape, true)); 144 144 } else { 145 for (Object o : shape.get Any() ) {145 for (Object o : shape.getPathOrFormulasOrHandles() ) { 146 146 if (o instanceof JAXBElement ) { 147 147 JAXBElement jb = (JAXBElement)o; … … 187 187 } 188 188 189 String imgRelId = converter.imageData.getOtherAttributes().get( 190 new QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "id")); 191 //NB r:id is not given by getId()! 189 // String imgRelId = converter.imageData.getOtherAttributes().get( 190 // new QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "id")); 191 192 String imgRelId = converter.imageData.getId(); 192 193 if (imgRelId!=null && !imgRelId.equals("")) { 193 194 log.debug("Handling " + imgRelId); … … 344 345 345 346 private void readStandardAttributes(CTShape shape) { 346 this.id = shape.getId(); 347 // this.id = shape.getId(); 348 this.id = shape.getVmlId(); 349 347 350 this.pType = shape.getType(); 348 351 this.alt = shape.getAlt();
Note: See TracChangeset
for help on using the changeset viewer.
