Ver código fonte

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

master
MadBoy_cp 12 anos atrás
pai
commit
ad172a21a5
2 arquivos alterados com 61 adições e 0 exclusões
  1. 30
    0
      DocX/Footer.cs
  2. 31
    0
      DocX/Header.cs

+ 30
- 0
DocX/Footer.cs Ver arquivo

@@ -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 Ver arquivo

@@ -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;
}
}
}

Carregando…
Cancelar
Salvar