Pārlūkot izejas kodu

Allows pictures in headers and footers inside Tables using AppendPicture(). Credit goes to Slipy (Adam)

master
MadBoy_cp pirms 12 gadiem
vecāks
revīzija
ad172a21a5
2 mainītis faili ar 61 papildinājumiem un 0 dzēšanām
  1. 30
    0
      DocX/Footer.cs
  2. 31
    0
      DocX/Header.cs

+ 30
- 0
DocX/Footer.cs Parādīt failu

@@ -135,5 +135,35 @@ namespace Novacode
return l;
}
}
public new Table InsertTable(int rowCount, int columnCount)
{
if (rowCount < 1 || columnCount < 1)
throw new ArgumentOutOfRangeException("Row and Column count must be greater than zero.");
Table t = base.InsertTable(rowCount, columnCount);
t.mainPart = mainPart;
return t;
}
public new Table InsertTable(int index, Table t)
{
Table t2 = base.InsertTable(index, t);
t2.mainPart = mainPart;
return t2;
}
public new Table InsertTable(Table t)
{
t = base.InsertTable(t);
t.mainPart = mainPart;
return t;
}
public new Table InsertTable(int index, int rowCount, int columnCount)
{
if (rowCount < 1 || columnCount < 1)
throw new ArgumentOutOfRangeException("Row and Column count must be greater than zero.");
Table t = base.InsertTable(index, rowCount, columnCount);
t.mainPart = mainPart;
return t;
}
}
}

+ 31
- 0
DocX/Header.cs Parādīt failu

@@ -159,5 +159,36 @@ namespace Novacode
return new List<Image>();
}
}
public new Table InsertTable(int rowCount, int columnCount)
{
if (rowCount < 1 || columnCount < 1)
throw new ArgumentOutOfRangeException("Row and Column count must be greater than zero.");
Table t = base.InsertTable(rowCount, columnCount);
t.mainPart = mainPart;
return t;
}
public new Table InsertTable(int index, Table t)
{
Table t2 = base.InsertTable(index, t);
t2.mainPart = mainPart;
return t2;
}
public new Table InsertTable(Table t)
{
t = base.InsertTable(t);
t.mainPart = mainPart;
return t;
}
public new Table InsertTable(int index, int rowCount, int columnCount)
{
if (rowCount < 1 || columnCount < 1)
throw new ArgumentOutOfRangeException("Row and Column count must be greater than zero.");
Table t = base.InsertTable(index, rowCount, columnCount);
t.mainPart = mainPart;
return t;
}
}
}

Notiek ielāde…
Atcelt
Saglabāt