clear out clearVariables! In comes toXml
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user