/**
         * Initialize default structure of a new graphic frame
         */
        public static CT_GraphicalObjectFrame Prototype()
        {
            CT_GraphicalObjectFrame graphicFrame = new CT_GraphicalObjectFrame();

            NPOI.OpenXmlFormats.Dml.Spreadsheet.CT_GraphicalObjectFrameNonVisual nvGraphic = graphicFrame.AddNewNvGraphicFramePr();
            NPOI.OpenXmlFormats.Dml.Spreadsheet.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);
        }
Exemple #2
0
 public void Set(CT_GraphicalObjectFrame obj)
 {
     this.xfrmField             = obj.xfrmField;
     this.graphicField          = obj.graphicField;
     this.nvGraphicFramePrField = obj.nvGraphicFramePrField;
     this.macroField            = obj.macroField;
     this.fPublishedField       = obj.fPublishedField;
 }
Exemple #3
0
 public static CT_GraphicalObjectFrameNonVisual Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_GraphicalObjectFrameNonVisual ctObj = new CT_GraphicalObjectFrameNonVisual();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "cNvPr")
             ctObj.cNvPr = CT_NonVisualDrawingProps.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "cNvGraphicFramePr")
             ctObj.cNvGraphicFramePr = CT_NonVisualGraphicFrameProperties.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
Exemple #4
0
 public void Set(CT_GraphicalObjectFrame obj)
 {
     this.xfrmField = obj.xfrmField;
     this.graphicField = obj.graphicField;
     this.nvGraphicFramePrField = obj.nvGraphicFramePrField;
     this.macroField = obj.macroField;
     this.fPublishedField = obj.fPublishedField;
 }