Exemple #1
0
 public CommentsTable()
     : base()
 {
     comments = new CT_Comments();
     comments.AddNewCommentList();
     comments.AddNewAuthors().AddAuthor(DEFAULT_AUTHOR);
 }
Exemple #2
0
        public void GetCellComment()
        {
            CommentsTable sheetComments = new CommentsTable();

            CT_Comments    comments    = sheetComments.GetCTComments();
            CT_CommentList commentList = comments.commentList;

            // Create 2 comments for A1 and A" cells
            CT_Comment comment0 = commentList.InsertNewComment(0);

            comment0.@ref = "A1";
            CT_Rst ctrst0 = new CT_Rst();

            ctrst0.t      = (TEST_A1_TEXT);
            comment0.text = (ctrst0);
            CT_Comment comment1 = commentList.InsertNewComment(0);

            comment1.@ref = ("A2");
            CT_Rst ctrst1 = new CT_Rst();

            ctrst1.t      = (TEST_A2_TEXT);
            comment1.text = (ctrst1);

            // Test Finding the right comment for a cell
            Assert.AreSame(comment0, sheetComments.GetCTComment("A1"));
            Assert.AreSame(comment1, sheetComments.GetCTComment("A2"));
            Assert.IsNull(sheetComments.GetCTComment("A3"));
        }
Exemple #3
0
 public CommentsTable()
     : base()
 {
     comments = new CT_Comments();
     comments.AddNewCommentList();
     comments.AddNewAuthors().AddAuthor("");
 }
Exemple #4
0
        public CommentsTable()
            : base()
        {

            comments = new CT_Comments();
            comments.AddNewCommentList();
            comments.AddNewAuthors().AddAuthor("");
        }
Exemple #5
0
 public void ReadFrom(Stream is1)
 {
     try
     {
         this.comments = CommentsDocument.Parse(is1).GetComments();
     }
     catch (XmlException ex)
     {
         throw new IOException(ex.Message);
     }
 }
Exemple #6
0
 public void ReadFrom(XmlDocument xmlDoc)
 {
     try
     {
         CommentsDocument doc = CommentsDocument.Parse(xmlDoc, NamespaceManager);
         comments = doc.GetComments();
     }
     catch (XmlException e)
     {
         throw new IOException(e.Message);
     }
 }
Exemple #7
0
 public void ReadFrom(Stream is1)
 {
     try
     {
         CommentsDocument doc = CommentsDocument.Parse(is1);
         comments = doc.GetComments();
     }
     catch (XmlException e)
     {
         throw new IOException(e.Message);
     }
 }
Exemple #8
0
 public void ReadFrom(Stream is1)
 {
     try
     {
         CommentsDocument doc = CommentsDocument.Parse(is1);
         comments = doc.GetComments();
     }
     catch (XmlException e)
     {
         throw new IOException(e.Message);
     }
 }
Exemple #9
0
        public void ReadFrom(XmlDocument xmlDoc)
        {
            try
            {
                CommentsDocument doc = CommentsDocument.Parse(xmlDoc, NamespaceManager);
                comments = doc.GetComments();

            }
            catch (XmlException e)
            {
                throw new IOException(e.Message);
            }
        }
Exemple #10
0
 public void ReadFrom(Stream is1)
 {
     try
     {
         XmlDocument      xmlDoc = ConvertStreamToXml(is1);
         CommentsDocument doc    = CommentsDocument.Parse(xmlDoc, NamespaceManager);
         comments = doc.GetComments();
     }
     catch (XmlException e)
     {
         throw new IOException(e.Message);
     }
 }
Exemple #11
0
 public CommentsDocument(CT_Comments comments)
 {
     this.comments = comments;
 }
Exemple #12
0
 public CommentsDocument()
 {
     comments = new CT_Comments();
 }
Exemple #13
0
 public CommentsTable()
 {
     this.comments = new CT_Comments();
     this.comments.AddNewCommentList();
     this.comments.AddNewAuthors().AddAuthor("");
 }