Files
docx-js/ts/docx/document/document-attributes.ts

65 lines
1.5 KiB
TypeScript
Raw Normal View History

2017-03-08 20:35:26 +00:00
import { XmlAttributeComponent } from "../xml-components";
2016-05-01 22:48:36 +01:00
2017-03-08 20:35:26 +00:00
interface IDocumentAttributesProperties {
2016-05-01 22:48:36 +01:00
wpc?: string;
mc?: string;
o?: string;
r?: string;
m?: string;
v?: string;
wp14?: string;
wp?: string;
w10?: string;
w?: string;
w14?: string;
w15?: string;
wpg?: string;
wpi?: string;
wne?: string;
wps?: string;
Ignorable?: string;
cp?: string;
dc?: string;
dcterms?: string;
dcmitype?: string;
xsi?: string;
type?: string;
}
export class DocumentAttributes extends XmlAttributeComponent {
2017-03-08 20:35:26 +00:00
constructor(properties?: IDocumentAttributesProperties) {
2016-05-01 22:48:36 +01:00
super({
2016-05-19 23:05:28 +01:00
wpc: "xmlns:wpc",
mc: "xmlns:mc",
o: "xmlns:o",
r: "xmlns:r",
m: "xmlns:m",
v: "xmlns:v",
wp14: "xmlns:wp14",
wp: "xmlns:wp",
w10: "xmlns:w10",
w: "xmlns:w",
w14: "xmlns:w14",
w15: "xmlns:w15",
wpg: "xmlns:wpg",
wpi: "xmlns:wpi",
wne: "xmlns:wne",
wps: "xmlns:wps",
Ignorable: "mc:Ignorable",
cp: "xmlns:cp",
dc: "xmlns:dc",
dcterms: "xmlns:dcterms",
dcmitype: "xmlns:dcmitype",
xsi: "xmlns:xsi",
2017-03-08 21:36:09 +00:00
type: "xsi:type",
2016-05-19 23:05:28 +01:00
}, properties);
2016-05-26 15:08:34 +01:00
this.root = properties;
2016-05-01 22:48:36 +01:00
if (!properties) {
this.root = {};
}
}
2017-03-08 20:35:26 +00:00
}