use of org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps in project poi by apache.
the class XSLFSimpleShape method createHyperlink.
@Override
public XSLFHyperlink createHyperlink() {
XSLFHyperlink hl = getHyperlink();
if (hl == null) {
CTNonVisualDrawingProps cNvPr = getCNvPr();
hl = new XSLFHyperlink(cNvPr.addNewHlinkClick(), getSheet());
}
return hl;
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps in project poi by apache.
the class XSLFSlide method prototype.
private static CTSlide prototype() {
CTSlide ctSlide = CTSlide.Factory.newInstance();
CTCommonSlideData cSld = ctSlide.addNewCSld();
CTGroupShape spTree = cSld.addNewSpTree();
CTGroupShapeNonVisual nvGrpSpPr = spTree.addNewNvGrpSpPr();
CTNonVisualDrawingProps cnvPr = nvGrpSpPr.addNewCNvPr();
cnvPr.setId(1);
cnvPr.setName("");
nvGrpSpPr.addNewCNvGrpSpPr();
nvGrpSpPr.addNewNvPr();
CTGroupShapeProperties grpSpr = spTree.addNewGrpSpPr();
CTGroupTransform2D xfrm = grpSpr.addNewXfrm();
CTPoint2D off = xfrm.addNewOff();
off.setX(0);
off.setY(0);
CTPositiveSize2D ext = xfrm.addNewExt();
ext.setCx(0);
ext.setCy(0);
CTPoint2D choff = xfrm.addNewChOff();
choff.setX(0);
choff.setY(0);
CTPositiveSize2D chExt = xfrm.addNewChExt();
chExt.setCx(0);
chExt.setCy(0);
ctSlide.addNewClrMapOvr().addNewMasterClrMapping();
return ctSlide;
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps in project poi by apache.
the class XSLFPictureShape method prototype.
/**
* @param shapeId 1-based shapeId
* @param rel relationship to the picture data in the ooxml package
*/
static CTPicture prototype(int shapeId, String rel) {
CTPicture ct = CTPicture.Factory.newInstance();
CTPictureNonVisual nvSpPr = ct.addNewNvPicPr();
CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
cnv.setName("Picture " + shapeId);
cnv.setId(shapeId + 1);
nvSpPr.addNewCNvPicPr().addNewPicLocks().setNoChangeAspect(true);
nvSpPr.addNewNvPr();
CTBlipFillProperties blipFill = ct.addNewBlipFill();
CTBlip blip = blipFill.addNewBlip();
blip.setEmbed(rel);
blipFill.addNewStretch().addNewFillRect();
CTShapeProperties spPr = ct.addNewSpPr();
CTPresetGeometry2D prst = spPr.addNewPrstGeom();
prst.setPrst(STShapeType.RECT);
prst.addNewAvLst();
return ct;
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps 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;
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps in project poi by apache.
the class XSLFGroupShape method prototype.
/**
* @param shapeId 1-based shapeId
*/
static CTGroupShape prototype(int shapeId) {
CTGroupShape ct = CTGroupShape.Factory.newInstance();
CTGroupShapeNonVisual nvSpPr = ct.addNewNvGrpSpPr();
CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
cnv.setName("Group " + shapeId);
cnv.setId(shapeId + 1);
nvSpPr.addNewCNvGrpSpPr();
nvSpPr.addNewNvPr();
ct.addNewGrpSpPr();
return ct;
}
Aggregations