Search in sources :

Example 1 with CTGroupShapeNonVisual

use of org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShapeNonVisual in project poi by apache.

the class XSSFShapeGroup method prototype.

/**
     * Initialize default structure of a new shape group
     */
protected static CTGroupShape prototype() {
    if (prototype == null) {
        CTGroupShape shape = CTGroupShape.Factory.newInstance();
        CTGroupShapeNonVisual nv = shape.addNewNvGrpSpPr();
        CTNonVisualDrawingProps nvpr = nv.addNewCNvPr();
        nvpr.setId(0);
        nvpr.setName("Group 0");
        nv.addNewCNvGrpSpPr();
        CTGroupShapeProperties sp = shape.addNewGrpSpPr();
        CTGroupTransform2D t2d = sp.addNewXfrm();
        CTPositiveSize2D p1 = t2d.addNewExt();
        p1.setCx(0);
        p1.setCy(0);
        CTPoint2D p2 = t2d.addNewOff();
        p2.setX(0);
        p2.setY(0);
        CTPositiveSize2D p3 = t2d.addNewChExt();
        p3.setCx(0);
        p3.setCy(0);
        CTPoint2D p4 = t2d.addNewChOff();
        p4.setX(0);
        p4.setY(0);
        prototype = shape;
    }
    return prototype;
}
Also used : CTPoint2D(org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D) CTGroupTransform2D(org.openxmlformats.schemas.drawingml.x2006.main.CTGroupTransform2D) CTGroupShapeNonVisual(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShapeNonVisual) CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps) CTGroupShapeProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties) CTPositiveSize2D(org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D) CTGroupShape(org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape)

Example 2 with CTGroupShapeNonVisual

use of org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShapeNonVisual 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;
}
Also used : CTCommonSlideData(org.openxmlformats.schemas.presentationml.x2006.main.CTCommonSlideData) CTPoint2D(org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D) CTGroupTransform2D(org.openxmlformats.schemas.drawingml.x2006.main.CTGroupTransform2D) CTGroupShapeNonVisual(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShapeNonVisual) CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps) CTGroupShapeProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties) CTSlide(org.openxmlformats.schemas.presentationml.x2006.main.CTSlide) CTPositiveSize2D(org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D) CTGroupShape(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape)

Example 3 with CTGroupShapeNonVisual

use of org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShapeNonVisual 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;
}
Also used : CTGroupShapeNonVisual(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShapeNonVisual) CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps) CTGroupShape(org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape)

Aggregations

CTNonVisualDrawingProps (org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps)3 CTGroupShapeProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties)2 CTGroupTransform2D (org.openxmlformats.schemas.drawingml.x2006.main.CTGroupTransform2D)2 CTPoint2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D)2 CTPositiveSize2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D)2 CTGroupShape (org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape)2 CTGroupShapeNonVisual (org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShapeNonVisual)2 CTGroupShape (org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShape)1 CTGroupShapeNonVisual (org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTGroupShapeNonVisual)1 CTCommonSlideData (org.openxmlformats.schemas.presentationml.x2006.main.CTCommonSlideData)1 CTSlide (org.openxmlformats.schemas.presentationml.x2006.main.CTSlide)1