put contents inside sectPr

This commit is contained in:
Dolan Miu
2016-04-06 01:08:53 +01:00
parent 7d8bac54dc
commit 98ecc5c53f
2 changed files with 12 additions and 12 deletions

View File

@ -1,9 +1,5 @@
import {XmlComponent, Attributes} from "../../xml-components"; import {XmlComponent, Attributes} from "../../xml-components";
import {SectionProperties} from "./section-properties"; import {SectionProperties} from "./section-properties";
import {PageSize} from "./page-size";
import {PageMargin} from "./page-margin";
import {Columns} from "./columns";
import {DocumentGrid} from "./doc-grid";
export class Body implements XmlComponent { export class Body implements XmlComponent {
private body: Array<XmlComponent>; private body: Array<XmlComponent>;
@ -14,14 +10,10 @@ export class Body implements XmlComponent {
constructor() { constructor() {
this.body = new Array<XmlComponent>(); this.body = new Array<XmlComponent>();
this.body.push(new SectionProperties()); //this.body.push(new SectionProperties());
this.body.push(new PageSize());
this.body.push(new PageMargin());
this.body.push(new Columns());
this.body.push(new DocumentGrid());
} }
push(component: XmlComponent) { push(component: XmlComponent) {
this.body.push(component); this.body.splice(this.body.length - 1, 0, component);
} }
} }

View File

@ -1,4 +1,8 @@
import {XmlComponent, Attributes} from "../../xml-components"; import {XmlComponent, Attributes} from "../../xml-components";
import {PageSize} from "./page-size";
import {PageMargin} from "./page-margin";
import {Columns} from "./columns";
import {DocumentGrid} from "./doc-grid";
export class SectionProperties implements XmlComponent { export class SectionProperties implements XmlComponent {
private sectPr: Array<XmlComponent>; private sectPr: Array<XmlComponent>;
@ -14,5 +18,9 @@ export class SectionProperties implements XmlComponent {
rsidRPr: "00D842E4", rsidRPr: "00D842E4",
rsidSect: "000A6AD0" rsidSect: "000A6AD0"
})); }));
this.sectPr.push(new PageSize());
this.sectPr.push(new PageMargin());
this.sectPr.push(new Columns());
this.sectPr.push(new DocumentGrid());
} }
} }