coffeycathal_cp 14 年之前
父節點
當前提交
fbea5f0b5b
共有 4 個文件被更改,包括 12 次插入9 次删除
  1. 2
    2
      DocX/Container.cs
  2. 6
    6
      DocX/DocX.cs
  3. 1
    0
      Examples/Program.cs
  4. 3
    1
      UnitTests/UnitTest1.cs

+ 2
- 2
DocX/Container.cs 查看文件

@@ -420,7 +420,7 @@ namespace Novacode
return p;
}
public Table InsertTable(int coloumnCount, int rowCount)
public Table InsertTable(int rowCount, int coloumnCount)
{
XElement newTable = HelperFunctions.CreateTable(rowCount, coloumnCount);
Xml.Elements().First().Add(newTable);
@@ -428,7 +428,7 @@ namespace Novacode
return new Table(Document, newTable);
}
public Table InsertTable(int index, int coloumnCount, int rowCount)
public Table InsertTable(int index, int rowCount, int coloumnCount)
{
XElement newTable = HelperFunctions.CreateTable(rowCount, coloumnCount);

+ 6
- 6
DocX/DocX.cs 查看文件

@@ -930,12 +930,12 @@ namespace Novacode
/// }// Release this document from memory.
/// </code>
/// </example>
public new Table InsertTable(int coloumnCount, int rowCount)
public new Table InsertTable(int rowCount, int coloumnCount)
{
if (rowCount < 1 || coloumnCount < 1)
throw new ArgumentOutOfRangeException("Row and Coloumn count must be greater than zero.");
Table t = base.InsertTable(coloumnCount, rowCount);
Table t = base.InsertTable(rowCount, coloumnCount);
t.mainPart = mainPart;
return t;
}
@@ -1042,8 +1042,8 @@ namespace Novacode
/// // Create a document.
/// using (DocX document = DocX.Load(@"C:\Example\Test.docx"))
/// {
/// // Create a new Table with 2 coloumns and 3 rows. Insert this Table at index 37.
/// Table newTable = document.InsertTable(37, 2, 3);
/// // Create a new Table with 3 rows and 2 coloumns. Insert this Table at index 37.
/// Table newTable = document.InsertTable(37, 3, 2);
///
/// // Set the design of this Table.
/// newTable.Design = TableDesign.LightShadingAccent3;
@@ -1065,12 +1065,12 @@ namespace Novacode
/// }// Release this document from memory.
/// </code>
/// </example>
public new Table InsertTable(int index, int coloumnCount, int rowCount)
public new Table InsertTable(int index, int rowCount, int coloumnCount)
{
if (rowCount < 1 || coloumnCount < 1)
throw new ArgumentOutOfRangeException("Row and Column count must be greater than zero.");
Table t = InsertTable(index, coloumnCount, rowCount);
Table t = InsertTable(index, rowCount, coloumnCount);
t.mainPart = mainPart;
return t;
}

+ 1
- 0
Examples/Program.cs 查看文件

@@ -77,6 +77,7 @@ namespace Examples
// Indent only the first line of the Paragraph.
p.IndentationFirstLine = 1.0f;
// Save all changes made to this document.
document.Save();
Console.WriteLine("\tCreated: docs\\Indentation.docx\n");

+ 3
- 1
UnitTests/UnitTest1.cs 查看文件

@@ -1047,7 +1047,9 @@ namespace UnitTests
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);
Table t = document.AddTable(2, 3);
int cc = t.ColumnCount;
Paragraph p = t.Rows[0].Cells[0].Paragraphs[0];
p.AppendHyperlink(h);
}

Loading…
取消
儲存