} else { // TESTING!
Logger.logErr("OOXMLAdapter.parseDrawingXML: Unknown twoCellAnchor type");
}
} else if (tnm.equals("oneCellAnchor")) { // unclear if this can be root of charts and images as well as shapes
lastTag.push(tnm);
OneCellAnchor oca= (OneCellAnchor) OneCellAnchor.parseOOXML(xpp, lastTag, bk).cloneElement();
if (oca.hasImage()) {
String s= oca.getEmbed(); // rid of embedded object
if (s.indexOf("rId")==0) { // should!
String imgFile= OOXMLReader.parsePathForZip(OOXMLReader.getFilename(drawingFiles, s), parentDir);
ZipEntry img= new ZipEntry(imgFile);
BufferedInputStream is= new BufferedInputStream
(OOXMLReader.wrapInputStream(zip.getInputStream(img)));
ImageHandle im= new ImageHandle(is, this);
this.insertImage(im);
im.setName(oca.getName());
im.setShapeName(oca.getDescr());
im.setBounds(oca.getBounds()); // must do after insert
im.setSpPr(oca.getSppr()); // set image shape properties
im.update(); // update underlying image record with set data
}
} else if (oca.hasChart()) {
String s= oca.getEmbed();
if (s.indexOf("rId")==0) { // should!
String chart= OOXMLReader.getFilename(drawingFiles, s);
String name= oca.getName();
if (name==null || name.equals("null")) {
name="Untitled Chart";
}
ChartHandle ch= bk.createChart(name, bk.getWorkSheet(this.getSheetName()));
ch.setRelativeBounds(oca.getBounds());
//ch.setChartTitle(name);
chart= OOXMLReader.parsePathForZip(chart, parentDir);
ZipEntry chFile= new ZipEntry(chart);
ch.parseOOXML(OOXMLReader.wrapInputStream(zip.getInputStream(chFile)));
}
} else if (oca.hasShape()) {
this.addOOXMLShape(oca); // just store shape for later output since prev. versions do not handle shapes
} else { // TESTING!
Logger.logErr("OOXMLAdapter.parseDrawingXML: Unknown oneCellAnchor type");
}
} else if (tnm.equals("userShapes")) { // drawings ONTOP of charts = Reference to Chart Drawing Part