Search in sources :

Example 6 with CTShapeNonVisual

use of org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.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;
}
Also used : CTShapeNonVisual(org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual) CTShapeProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties) CTCustomGeometry2D(org.openxmlformats.schemas.drawingml.x2006.main.CTCustomGeometry2D) CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps) CTGeomRect(org.openxmlformats.schemas.drawingml.x2006.main.CTGeomRect) CTShape(org.openxmlformats.schemas.presentationml.x2006.main.CTShape)

Aggregations

CTNonVisualDrawingProps (org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps)5 CTShapeNonVisual (org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShapeNonVisual)4 CTShapeProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties)3 CTHyperlink (org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink)2 CTPresetGeometry2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D)2 CTShape (org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape)2 CTShape (org.openxmlformats.schemas.presentationml.x2006.main.CTShape)2 CTShapeNonVisual (org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual)2 QName (javax.xml.namespace.QName)1 XmlCursor (org.apache.xmlbeans.XmlCursor)1 CTCustomGeometry2D (org.openxmlformats.schemas.drawingml.x2006.main.CTCustomGeometry2D)1 CTGeomRect (org.openxmlformats.schemas.drawingml.x2006.main.CTGeomRect)1 CTOfficeArtExtension (org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtension)1 CTOfficeArtExtensionList (org.openxmlformats.schemas.drawingml.x2006.main.CTOfficeArtExtensionList)1 CTPoint2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D)1 CTPositiveSize2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D)1 CTTransform2D (org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D)1