From bf656d60d97e35b63970ea61d36234a53e86c3ca Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sun, 1 May 2016 22:48:36 +0100 Subject: [PATCH] moved to new folder --- ts/docx/document/document-attributes.ts | 64 ++++++++++++++++++ ts/docx/xml-components/document-attributes.ts | 67 ------------------- 2 files changed, 64 insertions(+), 67 deletions(-) create mode 100644 ts/docx/document/document-attributes.ts delete mode 100644 ts/docx/xml-components/document-attributes.ts diff --git a/ts/docx/document/document-attributes.ts b/ts/docx/document/document-attributes.ts new file mode 100644 index 0000000000..014c45f57c --- /dev/null +++ b/ts/docx/document/document-attributes.ts @@ -0,0 +1,64 @@ +import {XmlAttributeComponent} from "../xml-components"; + +interface DocumentAttributesProperties { + 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 { + + constructor(properties?: DocumentAttributesProperties) { + super({ + 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', + type: 'xsi:type' + }); + + this.root = properties + + if (!properties) { + this.root = {}; + } + } +} \ No newline at end of file diff --git a/ts/docx/xml-components/document-attributes.ts b/ts/docx/xml-components/document-attributes.ts deleted file mode 100644 index 40603ed8d8..0000000000 --- a/ts/docx/xml-components/document-attributes.ts +++ /dev/null @@ -1,67 +0,0 @@ -import {XmlComponent} from "./"; - -interface DocumentAttributesProperties { - 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 XmlComponent { - private _attr: Object; - - xmlKeys = { - 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', - type: 'xsi:type' - }; - - constructor(properties?: DocumentAttributesProperties) { - super("_attr"); - this._attr = properties - - if (!properties) { - this._attr = {}; - } - this._attr["xmlKeys"] = this.xmlKeys; - } -} \ No newline at end of file