소스 검색

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

master
MadBoy_cp 12 년 전
부모
커밋
ad172a21a5
2개의 변경된 파일61개의 추가작업 그리고 0개의 파일을 삭제
  1. 30
    0
      DocX/Footer.cs
  2. 31
    0
      DocX/Header.cs

+ 30
- 0
DocX/Footer.cs 파일 보기

@@ -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 파일 보기

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

Loading…
취소
저장