Example #1
0
 public CT_Comment InsertNewComment(int index)
 {
     if (null == commentField) { commentField = new List<CT_Comment>(); }
     CT_Comment com = new CT_Comment();
     commentField.Insert(index,com);
     return com;            
 }
Example #2
0
 public CT_Comment AddNewComment()
 {
     if (null == commentField) { commentField = new List<CT_Comment>(); }
     CT_Comment com= new CT_Comment();
     commentField.Add(com);
     return com;
 }
Example #3
0
        public CT_Comment InsertNewComment(int index)
        {
            if (null == commentField)
            {
                commentField = new List <CT_Comment>();
            }
            CT_Comment com = new CT_Comment();

            commentField.Insert(index, com);
            return(com);
        }
Example #4
0
        public CT_Comment AddNewComment()
        {
            if (null == commentField)
            {
                commentField = new List <CT_Comment>();
            }
            CT_Comment com = new CT_Comment();

            commentField.Add(com);
            return(com);
        }
Example #5
0
        private string guidField = null; // optional attribute

        //public CT_Comment()
        //{
        //    this.textField = new CT_Rst();
        //}
        public static CT_Comment Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
                return null;
            CT_Comment ctObj = new CT_Comment();
            ctObj.@ref = XmlHelper.ReadString(node.Attributes["ref"]);
            if (node.Attributes["authorId"] != null)
                ctObj.authorId = XmlHelper.ReadUInt(node.Attributes["authorId"]);
            ctObj.guid = XmlHelper.ReadString(node.Attributes["guid"]);
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "text")
                    ctObj.text = CT_Rst.Parse(childNode, namespaceManager);
            }
            return ctObj;
        }
Example #6
0
        public static CT_CommentList Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CommentList ctObj = new CT_CommentList();

            ctObj.comment = new List <CT_Comment>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "comment")
                {
                    ctObj.comment.Add(CT_Comment.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Example #7
0
        public static CommentsDocument Parse(XmlDocument xmlDoc, XmlNamespaceManager NameSpaceManager)
        {
            CommentsDocument commentsDoc = new CommentsDocument();

            commentsDoc.comments = new CT_Comments();
            foreach (XmlElement node in xmlDoc.SelectNodes("//d:authors/d:author", NameSpaceManager))
            {
                commentsDoc.comments.authors.AddAuthor(node.InnerText);
            }
            foreach (XmlElement node in xmlDoc.SelectNodes("//d:commentList/d:comment", NameSpaceManager))
            {
                CT_Comment comment = commentsDoc.comments.commentList.AddNewComment();
                comment.authorId = uint.Parse(node.GetAttribute("authorId"));
                comment.@ref     = node.GetAttribute("ref");
                comment.text     = CT_Rst.Parse(node.ChildNodes[0], NameSpaceManager);
            }
            return(commentsDoc);
        }
Example #8
0
        private string guidField = null;         // optional attribute

        //public CT_Comment()
        //{
        //    this.textField = new CT_Rst();
        //}
        public static CT_Comment Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Comment ctObj = new CT_Comment();

            ctObj.@ref = XmlHelper.ReadString(node.Attributes["ref"]);
            if (node.Attributes["authorId"] != null)
            {
                ctObj.authorId = XmlHelper.ReadUInt(node.Attributes["authorId"]);
            }
            ctObj.guid = XmlHelper.ReadString(node.Attributes["guid"]);
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "text")
                {
                    ctObj.text = CT_Rst.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Example #9
0
 /**
  * Creates a new XSSFComment, associated with a given
  *  low level comment object.
  */
 public XSSFComment(CommentsTable comments, CT_Comment comment, CT_Shape vmlShape)
 {
     _comment = comment;
     _comments = comments;
     _vmlShape = vmlShape;
 }