2018-10-26 01:04:07 +01:00
|
|
|
import { Size, SizeComplexScript } from "file/paragraph/run/formatting";
|
|
|
|
import { RunProperties } from "file/paragraph/run/properties";
|
2020-06-07 12:38:03 +08:00
|
|
|
import { IFontAttributesProperties, RunFonts } from "file/paragraph/run/run-fonts";
|
2017-12-30 20:25:16 +00:00
|
|
|
import { XmlComponent } from "file/xml-components";
|
2016-04-09 02:04:53 +01:00
|
|
|
|
2016-04-09 20:16:35 +01:00
|
|
|
export class RunPropertiesDefaults extends XmlComponent {
|
2018-01-29 01:55:25 +00:00
|
|
|
private readonly properties: RunProperties;
|
2016-04-09 20:16:35 +01:00
|
|
|
|
2016-04-09 02:04:53 +01:00
|
|
|
constructor() {
|
2016-04-09 20:16:35 +01:00
|
|
|
super("w:rPrDefault");
|
2017-09-16 08:24:15 -06:00
|
|
|
this.properties = new RunProperties();
|
|
|
|
this.root.push(this.properties);
|
|
|
|
}
|
|
|
|
|
|
|
|
public size(size: number): RunPropertiesDefaults {
|
|
|
|
this.properties.push(new Size(size));
|
2018-08-07 02:47:24 +01:00
|
|
|
this.properties.push(new SizeComplexScript(size));
|
2017-09-16 08:24:15 -06:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2020-06-07 12:38:03 +08:00
|
|
|
public font(font: string | IFontAttributesProperties): RunPropertiesDefaults {
|
|
|
|
this.properties.push(new RunFonts(font));
|
2017-09-16 08:24:15 -06:00
|
|
|
return this;
|
2016-04-09 02:04:53 +01:00
|
|
|
}
|
2017-03-09 09:45:01 +01:00
|
|
|
}
|