Просмотр исходного кода

Fixed the issue Paragraph.InsertTableBeforeSelf() throws a null reference exception.

master
coffeycathal_cp 14 лет назад
Родитель
Сommit
1121147bd4
1 измененных файлов: 2 добавлений и 2 удалений
  1. 2
    2
      DocX/_BaseClasses.cs

+ 2
- 2
DocX/_BaseClasses.cs Просмотреть файл

{ {
XElement newTable = HelperFunctions.CreateTable(rowCount, coloumnCount); XElement newTable = HelperFunctions.CreateTable(rowCount, coloumnCount);
Xml.AddBeforeSelf(newTable); Xml.AddBeforeSelf(newTable);
XElement newlyInserted = Xml.ElementsBeforeSelf().First();
XElement newlyInserted = Xml.ElementsBeforeSelf().Last();
return new Table(Document, newlyInserted); return new Table(Document, newlyInserted);
} }
public virtual Table InsertTableBeforeSelf(Table t) public virtual Table InsertTableBeforeSelf(Table t)
{ {
Xml.AddBeforeSelf(t.Xml); Xml.AddBeforeSelf(t.Xml);
XElement newlyInserted = Xml.ElementsBeforeSelf().First();
XElement newlyInserted = Xml.ElementsBeforeSelf().Last();
t.Xml = newlyInserted; t.Xml = newlyInserted;

Загрузка…
Отмена
Сохранить