2018-10-23 23:44:50 +01:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
|
|
|
|
2021-05-24 12:00:04 +03:00
|
|
|
// <xsd:simpleType name="ST_TblLayoutType">
|
|
|
|
// <xsd:restriction base="xsd:string">
|
|
|
|
// <xsd:enumeration value="fixed"/>
|
|
|
|
// <xsd:enumeration value="autofit"/>
|
|
|
|
// </xsd:restriction>
|
|
|
|
// </xsd:simpleType>
|
2018-10-23 23:44:50 +01:00
|
|
|
export enum TableLayoutType {
|
|
|
|
AUTOFIT = "autofit",
|
|
|
|
FIXED = "fixed",
|
|
|
|
}
|
|
|
|
|
2018-11-02 02:51:57 +00:00
|
|
|
class TableLayoutAttributes extends XmlAttributeComponent<{ readonly type: TableLayoutType }> {
|
|
|
|
protected readonly xmlKeys = { type: "w:type" };
|
2018-10-23 23:44:50 +01:00
|
|
|
}
|
|
|
|
|
2021-05-24 11:28:10 +03:00
|
|
|
// <xsd:complexType name="CT_TblLayoutType">
|
|
|
|
// <xsd:attribute name="type" type="ST_TblLayoutType"/>
|
|
|
|
// </xsd:complexType>
|
2018-10-23 23:44:50 +01:00
|
|
|
export class TableLayout extends XmlComponent {
|
|
|
|
constructor(type: TableLayoutType) {
|
|
|
|
super("w:tblLayout");
|
|
|
|
this.root.push(new TableLayoutAttributes({ type }));
|
|
|
|
}
|
|
|
|
}
|