static private CreateTable ( int rowCount, int columnCount ) : System.Xml.Linq.XElement | ||
rowCount | int | |
columnCount | int | |
리턴 | System.Xml.Linq.XElement |
public Table InsertTable(int index, int rowCount, int columnCount) { XElement newTable = HelperFunctions.CreateTable(rowCount, columnCount); Paragraph p = HelperFunctions.GetFirstParagraphEffectedByInsert(Document, index); if (p == null) { Xml.Elements().First().AddFirst(newTable); } else { XElement[] split = HelperFunctions.SplitParagraph(p, index - p.startIndex); p.Xml.ReplaceWith ( split[0], newTable, split[1] ); } return(new Table(Document, newTable) { mainPart = mainPart }); }
public virtual Table InsertTable(int rowCount, int columnCount) //Dmitchern, changed to virtual, and overrided in Table.Cell { XElement newTable = HelperFunctions.CreateTable(rowCount, columnCount); Xml.Add(newTable); return(new Table(Document, newTable)); }
public virtual Table InsertTableBeforeSelf(int rowCount, int columnCount, TableLook tableLook = null) { XElement newTable = HelperFunctions.CreateTable(rowCount, columnCount, tableLook); Xml.AddBeforeSelf(newTable); XElement newlyInserted = Xml.ElementsBeforeSelf().Last(); return(new Table(Document, newlyInserted)); }
public virtual Table InsertTableAfterSelf(int rowCount, int columnCount) { XElement newTable = HelperFunctions.CreateTable(rowCount, columnCount); Xml.AddAfterSelf(newTable); XElement newlyInserted = Xml.ElementsAfterSelf().First(); return(new Table(Document, newlyInserted)); }
public virtual Table InsertTable(int rowCount, int columnCount) { XElement xElement = HelperFunctions.CreateTable(rowCount, columnCount); base.Xml.Add(xElement); return(new Table(base.Document, xElement) { mainPart = mainPart }); }
public virtual Table InsertTableBeforeSelf(int rowCount, int columnCount) { XElement newTable = HelperFunctions.CreateTable(rowCount, columnCount); Xml.AddBeforeSelf(newTable); XElement newlyInserted = Xml.ElementsBeforeSelf().Last(); return(new Table(Document, newlyInserted) { mainPart = mainPart }); }
public virtual Table InsertTableAfterSelf(int rowCount, int columnCount) { XElement content = HelperFunctions.CreateTable(rowCount, columnCount); base.Xml.AddAfterSelf(content); XElement xml = base.Xml.ElementsAfterSelf().First(); return(new Table(base.Document, xml) { mainPart = mainPart }); }
public Table InsertTable(int index, int rowCount, int columnCount) { XElement xElement = HelperFunctions.CreateTable(rowCount, columnCount); Paragraph firstParagraphEffectedByInsert = HelperFunctions.GetFirstParagraphEffectedByInsert(base.Document, index); if (firstParagraphEffectedByInsert == null) { base.Xml.Elements().First().AddFirst(xElement); } else { XElement[] array = HelperFunctions.SplitParagraph(firstParagraphEffectedByInsert, index - firstParagraphEffectedByInsert.startIndex); firstParagraphEffectedByInsert.Xml.ReplaceWith(array[0], xElement, array[1]); } return(new Table(base.Document, xElement) { mainPart = mainPart }); }