예제 #1
0
        /**
         * Initialize default structure of a new shape group
         */
        internal static CT_GroupShape Prototype()
        {
            if (prototype == null)
            {
                CT_GroupShape shape = new CT_GroupShape();


                CT_GroupShapeNonVisual   nv   = shape.AddNewNvGrpSpPr();
                CT_NonVisualDrawingProps nvpr = nv.AddNewCNvPr();
                nvpr.id   = (0);
                nvpr.name = ("Group 0");
                nv.AddNewCNvGrpSpPr();
                CT_GroupShapeProperties sp  = shape.AddNewGrpSpPr();
                CT_GroupTransform2D     t2d = sp.AddNewXfrm();
                CT_PositiveSize2D       p1  = t2d.AddNewExt();
                p1.cx = (0);
                p1.cy = (0);
                CT_Point2D p2 = t2d.AddNewOff();
                p2.x = (0);
                p2.y = (0);
                CT_PositiveSize2D p3 = t2d.AddNewChExt();
                p3.cx = (0);
                p3.cy = (0);
                CT_Point2D p4 = t2d.AddNewChOff();
                p4.x = (0);
                p4.y = (0);

                prototype = shape;
            }
            return(prototype);
        }
예제 #2
0
 internal static CT_GroupShape Prototype()
 {
     if (XSSFShapeGroup.prototype == null)
     {
         CT_GroupShape            ctGroupShape        = new CT_GroupShape();
         CT_GroupShapeNonVisual   groupShapeNonVisual = ctGroupShape.AddNewNvGrpSpPr();
         CT_NonVisualDrawingProps visualDrawingProps  = groupShapeNonVisual.AddNewCNvPr();
         visualDrawingProps.id   = 0U;
         visualDrawingProps.name = "Group 0";
         groupShapeNonVisual.AddNewCNvGrpSpPr();
         CT_GroupTransform2D groupTransform2D  = ctGroupShape.AddNewGrpSpPr().AddNewXfrm();
         CT_PositiveSize2D   ctPositiveSize2D1 = groupTransform2D.AddNewExt();
         ctPositiveSize2D1.cx = 0L;
         ctPositiveSize2D1.cy = 0L;
         CT_Point2D ctPoint2D1 = groupTransform2D.AddNewOff();
         ctPoint2D1.x = 0L;
         ctPoint2D1.y = 0L;
         CT_PositiveSize2D ctPositiveSize2D2 = groupTransform2D.AddNewChExt();
         ctPositiveSize2D2.cx = 0L;
         ctPositiveSize2D2.cy = 0L;
         CT_Point2D ctPoint2D2 = groupTransform2D.AddNewChOff();
         ctPoint2D2.x             = 0L;
         ctPoint2D2.y             = 0L;
         XSSFShapeGroup.prototype = ctGroupShape;
     }
     return(XSSFShapeGroup.prototype);
 }
예제 #3
0
        public XSSFShapeGroup CreateGroup(XSSFClientAnchor anchor)
        {
            CT_GroupShape ctGroup = this.CreateTwoCellAnchor((IClientAnchor)anchor).AddNewGrpSp();

            ctGroup.Set(XSSFShapeGroup.Prototype());
            XSSFShapeGroup xssfShapeGroup = new XSSFShapeGroup(this, ctGroup);

            xssfShapeGroup.anchor = (XSSFAnchor)anchor;
            return(xssfShapeGroup);
        }
예제 #4
0
        /**
         * Creates a simple shape.  This includes such shapes as lines, rectangles,
         * and ovals.
         *
         * @param anchor    the client anchor describes how this group is attached
         *                  to the sheet.
         * @return  the newly Created shape.
         */
        public XSSFShapeGroup CreateGroup(XSSFClientAnchor anchor)
        {
            CT_TwoCellAnchor ctAnchor = CreateTwoCellAnchor(anchor);
            CT_GroupShape    ctGroup  = ctAnchor.AddNewGrpSp();

            ctGroup.Set(XSSFShapeGroup.Prototype());

            XSSFShapeGroup shape = new XSSFShapeGroup(this, ctGroup);

            shape.anchor = anchor;
            return(shape);
        }
예제 #5
0
 /**
  * Construct a new XSSFSimpleShape object.
  *
  * @param Drawing the XSSFDrawing that owns this shape
  * @param ctGroup the XML bean that stores this group content
  */
 public XSSFShapeGroup(XSSFDrawing drawing, CT_GroupShape ctGroup)
 {
     this.drawing = drawing;
     this.ctGroup = ctGroup;
 }