added place holders for style and properties

This commit is contained in:
Dolan Miu
2016-04-01 04:09:24 +01:00
parent 620f275cf5
commit a70e82a7d0
5 changed files with 13 additions and 4 deletions

View File

@ -16,4 +16,8 @@ export class Body {
this.body.push(new Columns());
this.body.push(new DocumentGrid());
}
push(component: XmlComponent) {
this.body.push(component);
}
}

View File

@ -1,16 +1,19 @@
import {XmlComponent, Attributes} from "../xml-components";
import {Body} from "./body";
import {Paragraph} from "../paragraph";
export class Document {
private document: Array<XmlComponent>;
private body: Body;
constructor() {
this.document = new Array<XmlComponent>();
this.document.push(new Attributes({}));
this.document.push(new Body());
this.body = new Body();
this.document.push(this.body);
}
test() {
return "hello";
addParagraph(paragraph: Paragraph) {
this.body.push(paragraph);
}
}

View File

@ -2,13 +2,15 @@ import * as archiver from "archiver";
import * as fs from "fs";
import {Formatter} from "../formatter";
import {Document} from "../../docx";
import {Style} from "../../style";
import {Properties} from "../../properties";
export abstract class Packer {
protected archive: any;
private formatter: Formatter;
protected document: Document;
constructor(document: Document) {
constructor(document: Document, style: Style, properties: Properties) {
this.formatter = new Formatter();
this.document = document;
this.archive = archiver.create("zip", {});

0
ts/properties/index.ts Normal file
View File

0
ts/style/index.ts Normal file
View File