clear out clearVariables! In comes toXml

This commit is contained in:
felipe
2017-03-09 20:49:14 +01:00
parent 879b9163a3
commit 11e918114d
13 changed files with 26 additions and 141 deletions

View File

@ -14,11 +14,4 @@ export class DocumentDefaults extends XmlComponent {
this.root.push(this.runPropertiesDefaults);
this.root.push(this.paragraphPropertiesDefaults);
}
public clearVariables(): void {
this.runPropertiesDefaults.clearVariables();
this.paragraphPropertiesDefaults.clearVariables();
delete this.runPropertiesDefaults;
delete this.paragraphPropertiesDefaults;
}
}

View File

@ -30,14 +30,6 @@ export class Styles extends XmlComponent {
return this;
}
public clearVariables(): void {
this.root.forEach((element) => {
if (element instanceof XmlComponent) {
element.clearVariables();
}
});
}
public createParagraphStyle(styleId: string, name?: string): ParagraphStyle {
const para = new ParagraphStyle(styleId, name);
this.push(para);

View File

@ -55,13 +55,6 @@ export class ParagraphStyle extends Style {
this.root.push(this.runProperties);
}
public clearVariables(): void {
this.paragraphProperties.clearVariables();
this.runProperties.clearVariables();
delete this.paragraphProperties;
delete this.runProperties;
}
public addParagraphProperty(property: XmlComponent): void {
this.paragraphProperties.push(property);
}