Ejemplo n.º 1
0
        public XSSFSimpleShape CreateSimpleShape(XSSFChildAnchor anchor)
        {
            CT_Shape ctShape = this.ctGroup.AddNewSp();

            ctShape.Set(XSSFSimpleShape.Prototype());
            XSSFSimpleShape xssfSimpleShape = new XSSFSimpleShape(this.GetDrawing(), ctShape);

            xssfSimpleShape.parent = this;
            xssfSimpleShape.anchor = (XSSFAnchor)anchor;
            xssfSimpleShape.GetCTShape().spPr.xfrm = anchor.GetCTTransform2D();
            return(xssfSimpleShape);
        }
Ejemplo n.º 2
0
        public ITextbox CreateTextbox(IClientAnchor anchor)
        {
            long num = this.newShapeId();

            NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Shape ctShape = this.CreateTwoCellAnchor(anchor).AddNewSp();
            ctShape.Set(XSSFSimpleShape.Prototype());
            ctShape.nvSpPr.cNvPr.id = (uint)num;
            XSSFTextBox xssfTextBox = new XSSFTextBox(this, ctShape);

            xssfTextBox.anchor = (XSSFAnchor)anchor;
            return((ITextbox)xssfTextBox);
        }
Ejemplo n.º 3
0
        public XSSFSimpleShape CreateSimpleShape(XSSFClientAnchor anchor)
        {
            long num = this.newShapeId();

            NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_Shape ctShape = this.CreateTwoCellAnchor((IClientAnchor)anchor).AddNewSp();
            ctShape.Set(XSSFSimpleShape.Prototype());
            ctShape.nvSpPr.cNvPr.id = (uint)num;
            XSSFSimpleShape xssfSimpleShape = new XSSFSimpleShape(this, ctShape);

            xssfSimpleShape.anchor = (XSSFAnchor)anchor;
            return(xssfSimpleShape);
        }
Ejemplo n.º 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 XSSFSimpleShape CreateSimpleShape(XSSFClientAnchor anchor)
        {
            long             shapeId  = newShapeId();
            CT_TwoCellAnchor ctAnchor = CreateTwoCellAnchor(anchor);
            CT_Shape         ctShape  = ctAnchor.AddNewSp();

            ctShape.Set(XSSFSimpleShape.Prototype());
            ctShape.nvSpPr.cNvPr.id = (uint)(shapeId);
            XSSFSimpleShape shape = new XSSFSimpleShape(this, ctShape);

            shape.anchor = anchor;
            return(shape);
        }
Ejemplo n.º 5
0
        /**
         * Constructs a textbox under the Drawing.
         *
         * @param anchor    the client anchor describes how this group is attached
         *                  to the sheet.
         * @return      the newly Created textbox.
         */
        public ITextbox CreateTextbox(IClientAnchor anchor)
        {
            long             shapeId  = newShapeId();
            CT_TwoCellAnchor ctAnchor = CreateTwoCellAnchor(anchor);
            CT_Shape         ctShape  = ctAnchor.AddNewSp();

            ctShape.Set(XSSFSimpleShape.Prototype());
            ctShape.nvSpPr.cNvPr.id = (uint)shapeId;
            XSSFTextBox shape = new XSSFTextBox(this, ctShape);

            shape.anchor = (XSSFClientAnchor)anchor;
            return(shape);
        }
Ejemplo n.º 6
0
        /**
         * Constructs a textbox.
         *
         * @param anchor the child anchor describes how this shape is attached
         *               to the group.
         * @return      the newly Created textbox.
         */
        public XSSFTextBox CreateTextbox(XSSFChildAnchor anchor)
        {
            CT_Shape ctShape = ctGroup.AddNewSp();

            ctShape.Set(XSSFSimpleShape.Prototype());

            XSSFTextBox shape = new XSSFTextBox(GetDrawing(), ctShape);

            shape.parent = this;
            shape.anchor = anchor;
            shape.GetCTShape().spPr.xfrm = (anchor.GetCTTransform2D());
            return(shape);
        }