use of org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual in project poi by apache.
the class XSLFAutoShape method prototype.
/**
* @param shapeId 1-based shapeId
*/
static CTShape prototype(int shapeId) {
CTShape ct = CTShape.Factory.newInstance();
CTShapeNonVisual nvSpPr = ct.addNewNvSpPr();
CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
cnv.setName("AutoShape " + shapeId);
cnv.setId(shapeId + 1);
nvSpPr.addNewCNvSpPr();
nvSpPr.addNewNvPr();
CTShapeProperties spPr = ct.addNewSpPr();
CTPresetGeometry2D prst = spPr.addNewPrstGeom();
prst.setPrst(STShapeType.RECT);
prst.addNewAvLst();
return ct;
}
use of org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual in project poi by apache.
the class XSLFTextBox method prototype.
/**
*
* @param shapeId 1-based shapeId
*/
static CTShape prototype(int shapeId) {
CTShape ct = CTShape.Factory.newInstance();
CTShapeNonVisual nvSpPr = ct.addNewNvSpPr();
CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
cnv.setName("TextBox " + shapeId);
cnv.setId(shapeId + 1);
nvSpPr.addNewCNvSpPr().setTxBox(true);
nvSpPr.addNewNvPr();
CTShapeProperties spPr = ct.addNewSpPr();
CTPresetGeometry2D prst = spPr.addNewPrstGeom();
prst.setPrst(STShapeType.RECT);
prst.addNewAvLst();
CTTextBody txBody = ct.addNewTxBody();
XSLFAutoShape.initTextBody(txBody);
return ct;
}
use of org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual in project poi by apache.
the class XSLFFreeformShape method prototype.
/**
* @param shapeId 1-based shapeId
*/
static CTShape prototype(int shapeId) {
CTShape ct = CTShape.Factory.newInstance();
CTShapeNonVisual nvSpPr = ct.addNewNvSpPr();
CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
cnv.setName("Freeform " + shapeId);
cnv.setId(shapeId + 1);
nvSpPr.addNewCNvSpPr();
nvSpPr.addNewNvPr();
CTShapeProperties spPr = ct.addNewSpPr();
CTCustomGeometry2D geom = spPr.addNewCustGeom();
geom.addNewAvLst();
geom.addNewGdLst();
geom.addNewAhLst();
geom.addNewCxnLst();
CTGeomRect rect = geom.addNewRect();
rect.setR("r");
rect.setB("b");
rect.setT("t");
rect.setL("l");
geom.addNewPathLst();
return ct;
}
Aggregations