Exemplo n.º 1
0
        /**
         * Initialize default structure of a new graphic frame
         */
        public static CT_GraphicalObjectFrame Prototype()
        {
            if (prototype == null)
            {
                CT_GraphicalObjectFrame graphicFrame = new CT_GraphicalObjectFrame();

                CT_GraphicalObjectFrameNonVisual nvGraphic = graphicFrame.AddNewNvGraphicFramePr();
                CT_NonVisualDrawingProps         props     = nvGraphic.AddNewCNvPr();
                props.id   = (0);
                props.name = ("Diagramm 1");
                nvGraphic.AddNewCNvGraphicFramePr();



                CT_Transform2D    transform = graphicFrame.AddNewXfrm();
                CT_PositiveSize2D extPoint  = transform.AddNewExt();
                CT_Point2D        offPoint  = transform.AddNewOff();

                extPoint.cx = (0);
                extPoint.cy = (0);
                offPoint.x  = (0);
                offPoint.y  = (0);

                CT_GraphicalObject graphic = graphicFrame.AddNewGraphic();

                prototype = graphicFrame;
            }
            return(prototype);
        }
Exemplo n.º 2
0
 public static CT_GraphicalObjectFrame Prototype()
 {
     if (XSSFGraphicFrame.prototype == null)
     {
         CT_GraphicalObjectFrame          graphicalObjectFrame = new CT_GraphicalObjectFrame();
         CT_GraphicalObjectFrameNonVisual objectFrameNonVisual = graphicalObjectFrame.AddNewNvGraphicFramePr();
         CT_NonVisualDrawingProps         visualDrawingProps   = objectFrameNonVisual.AddNewCNvPr();
         visualDrawingProps.id   = 0U;
         visualDrawingProps.name = "Diagramm 1";
         objectFrameNonVisual.AddNewCNvGraphicFramePr();
         CT_Transform2D    ctTransform2D    = graphicalObjectFrame.AddNewXfrm();
         CT_PositiveSize2D ctPositiveSize2D = ctTransform2D.AddNewExt();
         CT_Point2D        ctPoint2D        = ctTransform2D.AddNewOff();
         ctPositiveSize2D.cx = 0L;
         ctPositiveSize2D.cy = 0L;
         ctPoint2D.x         = 0L;
         ctPoint2D.y         = 0L;
         graphicalObjectFrame.AddNewGraphic();
         XSSFGraphicFrame.prototype = graphicalObjectFrame;
     }
     return(XSSFGraphicFrame.prototype);
 }