Search in sources :

Example 11 with CTNonVisualDrawingProps

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;
}
Also used : CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps)

Example 12 with CTNonVisualDrawingProps

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;
}
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 13 with CTNonVisualDrawingProps

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;
}
Also used : CTBlipFillProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties) CTShapeProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties) CTBlip(org.openxmlformats.schemas.drawingml.x2006.main.CTBlip) CTPresetGeometry2D(org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D) CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps) CTPicture(org.openxmlformats.schemas.presentationml.x2006.main.CTPicture) CTPictureNonVisual(org.openxmlformats.schemas.presentationml.x2006.main.CTPictureNonVisual)

Example 14 with CTNonVisualDrawingProps

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;
}
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)

Example 15 with CTNonVisualDrawingProps

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;
}
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)18 CTPositiveSize2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D)8 CTShapeProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties)8 CTPoint2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D)7 CTPresetGeometry2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D)7 CTTransform2D (org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D)5 CTBlipFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties)4 QName (javax.xml.namespace.QName)3 XmlCursor (org.apache.xmlbeans.XmlCursor)3 CTShape (org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape)3 CTShapeNonVisual (org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShapeNonVisual)3 CTBlip (org.openxmlformats.schemas.drawingml.x2006.main.CTBlip)2 CTGraphicalObjectData (org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObjectData)2 CTGroupShapeProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties)2 CTGroupTransform2D (org.openxmlformats.schemas.drawingml.x2006.main.CTGroupTransform2D)2 CTHyperlink (org.openxmlformats.schemas.drawingml.x2006.main.CTHyperlink)2 CTNonVisualPictureProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualPictureProperties)2 CTInline (org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTInline)2 CTGroupShape (org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape)2 CTGroupShapeNonVisual (org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShapeNonVisual)2