Example #1
0
        //private List<CT_AbsoulteCellAnchor> absoluteCellAnchors = new List<CT_AbsoulteCellAnchor>();

        public CT_TwoCellAnchor AddNewTwoCellAnchor()
        {
            CT_TwoCellAnchor anchor = new CT_TwoCellAnchor();
            cellAnchors.Add(anchor);
            return anchor;
        }
Example #2
0
        internal static CT_TwoCellAnchor Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            CT_TwoCellAnchor twoCellAnchor = new CT_TwoCellAnchor();
            if (node.Attributes["editAs"] != null)
                twoCellAnchor.editAs = (ST_EditAs)Enum.Parse(typeof(ST_EditAs), node.Attributes["editAs"].Value);

            foreach(XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "from")
                {
                    twoCellAnchor.from = CT_Marker.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "to")
                {
                    twoCellAnchor.to = CT_Marker.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "sp")
                {
                    twoCellAnchor.sp = CT_Shape.Parse(childNode, namespaceManager); ;
                }
                else if (childNode.LocalName == "pic")
                {
                    twoCellAnchor.picture = CT_Picture.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "cxnSp")
                {
                    twoCellAnchor.connector = CT_Connector.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "grpSp")
                {
                    twoCellAnchor.groupShape = CT_GroupShape.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "graphicFrame")
                {
                    twoCellAnchor.graphicFrame = CT_GraphicalObjectFrame.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "clientData")
                {
                    twoCellAnchor.clientData = CT_AnchorClientData.Parse(childNode, namespaceManager);
                }
            }
            return twoCellAnchor;
        }
Example #3
0
        internal static CT_TwoCellAnchor Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            CT_TwoCellAnchor twoCellAnchor = new CT_TwoCellAnchor();
            twoCellAnchor.from = CT_Marker.Parse(node.FirstChild, namespaceManager);
            twoCellAnchor.to = CT_Marker.Parse(node.FirstChild.NextSibling, namespaceManager);
            if (node.Attributes["editAs"] != null)
                twoCellAnchor.editAs = (ST_EditAs)Enum.Parse(typeof(ST_EditAs), node.Attributes["editAs"].Value);

            CT_Shape ctShape = CT_Shape.Parse(node.SelectSingleNode("xdr:sp", namespaceManager), namespaceManager);
            twoCellAnchor.sp = ctShape;
            CT_Picture ctPic = CT_Picture.Parse(node.SelectSingleNode("xdr:pic", namespaceManager), namespaceManager);
            twoCellAnchor.picture = ctPic;
            CT_Connector ctConnector = CT_Connector.Parse(node.SelectSingleNode("xdr:cxnSp", namespaceManager), namespaceManager);
            twoCellAnchor.connector = ctConnector;
            CT_GroupShape ctGroupShape = CT_GroupShape.Parse(node.SelectSingleNode("xdr:grpSp", namespaceManager), namespaceManager);
            twoCellAnchor.groupShape = ctGroupShape;
            CT_GraphicalObjectFrame ctGraphFrame = CT_GraphicalObjectFrame.Parse(node.SelectSingleNode("xdr:graphicFrame", namespaceManager), namespaceManager);
            twoCellAnchor.graphicFrame = ctGraphFrame;
            return twoCellAnchor;
        }