Przeglądaj źródła

Added a TableLook class, which contains the attributes of the table's tblLook element

Addition provided by Carko

More information:
http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tablelook.aspx
master
MadBoy_cp 13 lat temu
rodzic
commit
17186d13a5
1 zmienionych plików z 25 dodań i 0 usunięć
  1. 25
    0
      DocX/Table.cs

+ 25
- 0
DocX/Table.cs Wyświetl plik

else else
design = TableDesign.None; design = TableDesign.None;
XElement tableLook = properties.Element(XName.Get("tblLook", DocX.w.NamespaceName));
if (tableLook != null)
{
TableLook = new TableLook();
TableLook.FirstRow = tableLook.GetAttribute(XName.Get("firstRow", DocX.w.NamespaceName)) == "1";
TableLook.LastRow = tableLook.GetAttribute(XName.Get("lastRow", DocX.w.NamespaceName)) == "1";
TableLook.FirstColumn = tableLook.GetAttribute(XName.Get("firstColumn", DocX.w.NamespaceName)) == "1";
TableLook.LastColumn = tableLook.GetAttribute(XName.Get("lastColumn", DocX.w.NamespaceName)) == "1";
TableLook.NoHorizontalBanding = tableLook.GetAttribute(XName.Get("noHBand", DocX.w.NamespaceName)) == "1";
TableLook.NoVerticalBanding = tableLook.GetAttribute(XName.Get("noVBand", DocX.w.NamespaceName)) == "1";
}
} }
public TableLook TableLook { get; set; }
public Alignment Alignment public Alignment Alignment
{ {
get { return alignment; } get { return alignment; }
return table; return table;
} }
} }
public class TableLook
{
public bool FirstRow { get; set; }
public bool LastRow { get; set; }
public bool FirstColumn { get; set; }
public bool LastColumn { get; set; }
public bool NoHorizontalBanding { get; set; }
public bool NoVerticalBanding { get; set; }
}
} }

Ładowanie…
Anuluj
Zapisz