if(r instanceof EscherSpgrRecord) {
// This may be overriden by a later EscherClientAnchorRecord
EscherSpgrRecord spgr = (EscherSpgrRecord)r;
if(model instanceof HSSFShapeGroup) {
HSSFShapeGroup g = (HSSFShapeGroup)model;
g.setCoordinates(
spgr.getRectX1(), spgr.getRectY1(),
spgr.getRectX2(), spgr.getRectY2()
);
} else {
throw new IllegalStateException("Got top level anchor but not processing a group");
}
}
else if(r instanceof EscherClientAnchorRecord) {
EscherClientAnchorRecord car = (EscherClientAnchorRecord)r;
if(model instanceof HSSFShape) {
HSSFShape g = (HSSFShape)model;
g.getAnchor().setDx1(car.getDx1());
g.getAnchor().setDx2(car.getDx2());
g.getAnchor().setDy1(car.getDy1());
g.getAnchor().setDy2(car.getDy2());
} else {
throw new IllegalStateException("Got top level anchor but not processing a group or shape");
}
}
else if(r instanceof EscherTextboxRecord) {