changed to xml component
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
export interface P {
|
||||
export interface XmlComponent {
|
||||
|
||||
}
|
||||
|
||||
@ -9,42 +9,42 @@ interface AttributesProperties {
|
||||
sz?: string;
|
||||
}
|
||||
|
||||
export class Attributes implements P {
|
||||
export class Attributes implements XmlComponent {
|
||||
private _attrs: Object;
|
||||
|
||||
constructor(properties?: AttributesProperties) {
|
||||
this._attrs = properties
|
||||
|
||||
|
||||
if (!properties) {
|
||||
this._attrs = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class ParagraphProperties implements P {
|
||||
private pPr: Array<P>;
|
||||
export class ParagraphProperties implements XmlComponent {
|
||||
private pPr: Array<XmlComponent>;
|
||||
|
||||
constructor() {
|
||||
this.pPr = new Array<P>();
|
||||
this.pPr = new Array<XmlComponent>();
|
||||
this.pPr.push(new Attributes());
|
||||
}
|
||||
|
||||
push(item: P) {
|
||||
push(item: XmlComponent) {
|
||||
this.pPr.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
export class Run implements P {
|
||||
private r: Array<P>;
|
||||
export class Run implements XmlComponent {
|
||||
private r: Array<XmlComponent>;
|
||||
|
||||
constructor(text: string) {
|
||||
this.r = new Array<P>();
|
||||
this.r = new Array<XmlComponent>();
|
||||
this.r.push(new ParagraphProperties());
|
||||
this.r.push(new Text(text));
|
||||
}
|
||||
}
|
||||
|
||||
export class Text implements P {
|
||||
export class Text implements XmlComponent {
|
||||
private t: string;
|
||||
|
||||
constructor(text: string) {
|
||||
|
Reference in New Issue
Block a user