Files
docx-js/ts/styles/defaults/index.ts

24 lines
917 B
TypeScript
Raw Normal View History

2016-04-09 02:04:53 +01:00
import {XmlComponent} from "../../docx/xml-components";
import {ParagraphPropertiesDefaults} from "./paragraph-properties";
import {RunPropertiesDefaults} from "./run-properties";
2016-04-09 20:16:35 +01:00
export class DocumentDefaults extends XmlComponent {
2016-05-26 15:08:34 +01:00
2016-05-10 00:32:00 +01:00
private runPropertiesDefaults: RunPropertiesDefaults;
private paragraphPropertiesDefaults: ParagraphPropertiesDefaults;
2016-05-26 15:08:34 +01:00
2016-05-10 00:32:00 +01:00
constructor() {
2016-04-09 20:16:35 +01:00
super("w:docDefaults");
2016-05-10 00:32:00 +01:00
this.runPropertiesDefaults = new RunPropertiesDefaults();
this.paragraphPropertiesDefaults = new ParagraphPropertiesDefaults();
this.root.push(this.runPropertiesDefaults);
this.root.push(this.paragraphPropertiesDefaults);
}
2016-05-26 15:08:34 +01:00
2016-05-10 00:32:00 +01:00
clearVariables(): void {
this.runPropertiesDefaults.clearVariables();
this.paragraphPropertiesDefaults.clearVariables();
delete this.runPropertiesDefaults;
delete this.paragraphPropertiesDefaults;
2016-04-09 02:04:53 +01:00
}
}