2019-04-09 05:27:18 -04:00
|
|
|
import { IgnoreIfEmptyXmlComponent, XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
2018-10-23 23:44:50 +01:00
|
|
|
|
2019-04-09 05:27:18 -04:00
|
|
|
export class TableRowProperties extends IgnoreIfEmptyXmlComponent {
|
2018-10-23 23:44:50 +01:00
|
|
|
constructor() {
|
|
|
|
super("w:trPr");
|
|
|
|
}
|
2019-02-05 15:47:09 +01:00
|
|
|
|
|
|
|
public setCantSplit(): TableRowProperties {
|
|
|
|
this.root.push(new CantSplit());
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public setTableHeader(): TableRowProperties {
|
|
|
|
this.root.push(new TableHeader());
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class CantSplitAttributes extends XmlAttributeComponent<{ readonly val: boolean }> {
|
|
|
|
protected readonly xmlKeys = { val: "w:val" };
|
|
|
|
}
|
|
|
|
|
|
|
|
export class CantSplit extends XmlComponent {
|
|
|
|
constructor() {
|
|
|
|
super("w:cantSplit");
|
|
|
|
this.root.push(new CantSplitAttributes({ val: true }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class TableHeaderAttributes extends XmlAttributeComponent<{ readonly val: boolean }> {
|
|
|
|
protected readonly xmlKeys = { val: "w:val" };
|
|
|
|
}
|
|
|
|
|
|
|
|
export class TableHeader extends XmlComponent {
|
|
|
|
constructor() {
|
|
|
|
super("w:tblHeader");
|
|
|
|
this.root.push(new TableHeaderAttributes({ val: true }));
|
|
|
|
}
|
2018-10-23 23:44:50 +01:00
|
|
|
}
|