| if (rowCount < 1 || coloumnCount < 1) | if (rowCount < 1 || coloumnCount < 1) | ||||
| throw new ArgumentOutOfRangeException("Row and Coloumn count must be greater than zero."); | throw new ArgumentOutOfRangeException("Row and Coloumn count must be greater than zero."); | ||||
| return (new Table(this, HelperFunctions.CreateTable(rowCount, coloumnCount))); | |||||
| Table t = new Table(this, HelperFunctions.CreateTable(rowCount, coloumnCount)); | |||||
| t.mainPart = mainPart; | |||||
| return t; | |||||
| } | } | ||||
| /// <summary> | /// <summary> |
| File.Delete(file_temp); | File.Delete(file_temp); | ||||
| } | } | ||||
| [TestMethod] | |||||
| public void Test_Table_mainPart_bug9526() | |||||
| { | |||||
| using (DocX document = DocX.Create("test.docx")) | |||||
| { | |||||
| Hyperlink h = document.AddHyperlink("follow me", new Uri("http://www.google.com")); | |||||
| Table t = document.AddTable(2, 2); | |||||
| Paragraph p = t.Rows[0].Cells[0].Paragraphs[0]; | |||||
| p.AppendHyperlink(h); | |||||
| } | |||||
| } | |||||
| [TestMethod] | [TestMethod] | ||||
| public void Test_Table_InsertRow() | public void Test_Table_InsertRow() | ||||
| { | { |