for(Iterator<EscherRecord> spIt = cp.getChildRecords().iterator(); spIt.hasNext();) {
EscherContainerRecord shapeContainer = (EscherContainerRecord)spIt.next();
for(EscherRecord shapeChildRecord : shapeContainer.getChildRecords()) {
int recordId = shapeChildRecord.getRecordId();
if (recordId == EscherSpRecord.RECORD_ID){
EscherSpRecord sp = (EscherSpRecord)shapeChildRecord;
int shapeId = drawingManager.allocateShapeId((short)dgId, dg);
//allocateShapeId increments the number of shapes. roll back to the previous value
dg.setNumShapes(dg.getNumShapes()-1);
sp.setShapeId(shapeId);
} else if (recordId == EscherOptRecord.RECORD_ID){
EscherOptRecord opt = (EscherOptRecord)shapeChildRecord;
EscherSimpleProperty prop = (EscherSimpleProperty)opt.lookup(
EscherProperties.BLIP__BLIPTODISPLAY );
if (prop != null){