bug fix (demo29 corrupted)

This commit is contained in:
amitm02
2018-09-26 13:10:21 +03:00
parent 60dbb32e9e
commit fafa54e4c9

View File

@ -53,6 +53,10 @@ export class File {
this.footNotes = new FootNotes();
this.contentTypes = new ContentTypes();
if (fileProperties.template) {
this.currentRelationshipId = fileProperties.template.currentRelationshipId + 1;
}
if (options.externalStyles) {
const stylesFactory = new ExternalStylesFactory();
this.styles = stylesFactory.newInstance(options.externalStyles);
@ -63,10 +67,6 @@ export class File {
this.addDefaultRelationships();
if (fileProperties.template) {
this.currentRelationshipId = fileProperties.template.currentRelationshipId + 1;
}
if (fileProperties.template && fileProperties.template.headers) {
for (const templateHeader of fileProperties.template.headers) {
this.addHeaderToDocument(templateHeader.header, templateHeader.type);