Skip to content

Commit efc026d

Browse files
authored
Merge pull request #212 from jessica-jordan/master
Fix "Unexpected xml node in parseOpen" bug in LibreOffice documents for attributes dc:language and cp:revision
2 parents d0f51cd + 405c374 commit efc026d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/xlsx/xform/core/core-xform.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var props = {
3333
title: 'Title',
3434
subject: 'Subject',
3535
description: 'Comments',
36+
language: 'Language',
3637
keywords: 'Tags',
3738
category: 'Categories'
3839
};
@@ -43,10 +44,12 @@ var CoreXform = module.exports = function() {
4344
'dc:title': new StringXform({tag: 'dc:title'}),
4445
'dc:subject': new StringXform({tag: 'dc:subject'}),
4546
'dc:description': new StringXform({tag: 'dc:description'}),
47+
'dc:language': new StringXform({tag: 'dc:language'}),
4648
'cp:keywords': new StringXform({tag: 'cp:keywords'}),
4749
'cp:category': new StringXform({tag: 'cp:category'}),
4850
'cp:lastModifiedBy': new StringXform({tag: 'cp:lastModifiedBy'}),
4951
'cp:lastPrinted': new DateXform({tag: 'cp:lastPrinted', format: CoreXform.DateFormat}),
52+
'cp:revision': new DateXform({tag: 'cp:revision'}),
5053
'dcterms:created': new DateXform({tag: 'dcterms:created', attrs: CoreXform.DateAttrs, format: CoreXform.DateFormat}),
5154
'dcterms:modified': new DateXform({tag: 'dcterms:modified', attrs: CoreXform.DateAttrs, format: CoreXform.DateFormat})
5255
}
@@ -75,10 +78,12 @@ utils.inherits(CoreXform, BaseXform, {
7578
this.map['dc:title'].render(xmlStream, model.title);
7679
this.map['dc:subject'].render(xmlStream, model.subject);
7780
this.map['dc:description'].render(xmlStream, model.description);
81+
this.map['dc:language'].render(xmlStream, model.language);
7882
this.map['cp:keywords'].render(xmlStream, model.keywords);
7983
this.map['cp:category'].render(xmlStream, model.category);
8084
this.map['cp:lastModifiedBy'].render(xmlStream, model.lastModifiedBy);
8185
this.map['cp:lastPrinted'].render(xmlStream, model.lastPrinted);
86+
this.map['cp:revision'].render(xmlStream, model.revision);
8287
this.map['dcterms:created'].render(xmlStream, model.created);
8388
this.map['dcterms:modified'].render(xmlStream, model.modified);
8489

@@ -122,10 +127,12 @@ utils.inherits(CoreXform, BaseXform, {
122127
title: this.map['dc:title'].model,
123128
subject: this.map['dc:subject'].model,
124129
description: this.map['dc:description'].model,
130+
language: this.map['dc:language'].model,
125131
keywords: this.map['cp:keywords'].model,
126132
category: this.map['cp:category'].model,
127133
lastModifiedBy: this.map['cp:lastModifiedBy'].model,
128134
lastPrinted: this.map['cp:lastPrinted'].model,
135+
Revision: this.map['cp:revision'].model,
129136
created: this.map['dcterms:created'].model,
130137
modified: this.map['dcterms:modified'].model
131138
};

0 commit comments

Comments
 (0)