put contents inside sectPr
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
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>;
|
||||||
|
|
||||||
xmlKeys = {
|
xmlKeys = {
|
||||||
sectPr: 'w:sectPr'
|
sectPr: 'w:sectPr'
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.sectPr = new Array<XmlComponent>();
|
this.sectPr = new Array<XmlComponent>();
|
||||||
this.sectPr.push(new Attributes({
|
this.sectPr.push(new Attributes({
|
||||||
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user