Merge branch 'master' into refactoring-exporter
This commit is contained in:
@ -3,30 +3,12 @@ import * as fs from "fs";
|
|||||||
import * as express from "express";
|
import * as express from "express";
|
||||||
import {Document} from "../../docx/document";
|
import {Document} from "../../docx/document";
|
||||||
import {Properties} from "../../properties";
|
import {Properties} from "../../properties";
|
||||||
import {DefaultStylesFactory} from "../../styles/factory";
|
|
||||||
import {Numbering} from "../../numbering";
|
import {Numbering} from "../../numbering";
|
||||||
|
|
||||||
export class ExpressPacker extends Packer {
|
export class ExpressPacker extends Packer {
|
||||||
private res: express.Response;
|
private res: express.Response;
|
||||||
|
|
||||||
constructor(document: Document, res: express.Response, styles?: any, properties?: Properties, numbering?: Numbering) {
|
constructor(document: Document, res: express.Response, styles?: any, properties?: Properties, numbering?: Numbering) {
|
||||||
if (!styles) {
|
|
||||||
let stylesFactory = new DefaultStylesFactory();
|
|
||||||
styles = stylesFactory.newInstance();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!properties) {
|
|
||||||
properties = new Properties({
|
|
||||||
creator: "Shan Fu",
|
|
||||||
revision: "1",
|
|
||||||
lastModifiedBy: "Shan Fu"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!numbering) {
|
|
||||||
numbering = new Numbering();
|
|
||||||
}
|
|
||||||
|
|
||||||
super(document, styles, properties, numbering);
|
super(document, styles, properties, numbering);
|
||||||
this.res = res;
|
this.res = res;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user