* Create and initialize a CTTwoCellAnchor that anchors a shape against top-left and bottom-right cells.
*
* @return a new CTTwoCellAnchor
*/
private CTTwoCellAnchor createTwoCellAnchor(XSSFClientAnchor anchor) {
CTTwoCellAnchor ctAnchor = drawing.addNewTwoCellAnchor();
ctAnchor.setFrom(anchor.getFrom());
ctAnchor.setTo(anchor.getTo());
ctAnchor.addNewClientData();
anchor.setTo(ctAnchor.getTo());
anchor.setFrom(ctAnchor.getFrom());
STEditAs.Enum aditAs;
switch(anchor.getAnchorType()) {
case ClientAnchor.DONT_MOVE_AND_RESIZE: aditAs = STEditAs.ABSOLUTE; break;
case ClientAnchor.MOVE_AND_RESIZE: aditAs = STEditAs.TWO_CELL; break;
case ClientAnchor.MOVE_DONT_RESIZE: aditAs = STEditAs.ONE_CELL; break;
default: aditAs = STEditAs.ONE_CELL;
}
ctAnchor.setEditAs(aditAs);
return ctAnchor;
}