This commit is contained in:
amitm02
2018-07-25 15:02:58 +03:00
parent 0689489985
commit 696b5daf5c
211 changed files with 252 additions and 84025 deletions

View File

@ -1,5 +1,5 @@
import { XmlComponent } from "file/xml-components";
import { Size } from "../../paragraph/run/formatting";
import { Size, SizeCs } from "../../paragraph/run/formatting";
import { RunProperties } from "../../paragraph/run/properties";
import { RunFonts } from "../../paragraph/run/run-fonts";
@ -14,6 +14,7 @@ export class RunPropertiesDefaults extends XmlComponent {
public size(size: number): RunPropertiesDefaults {
this.properties.push(new Size(size));
this.properties.push(new SizeCs(size));
return this;
}

View File

@ -74,6 +74,7 @@ export class ParagraphStyle extends Style {
public size(twips: number): ParagraphStyle {
this.addRunProperty(new formatting.Size(twips));
this.addRunProperty(new formatting.SizeCs(twips));
return this;
}
@ -282,6 +283,7 @@ export class CharacterStyle extends Style {
public size(twips: number): CharacterStyle {
this.addRunProperty(new formatting.Size(twips));
this.addRunProperty(new formatting.SizeCs(twips));
return this;
}
}

View File

@ -362,7 +362,7 @@ describe("ParagraphStyle", () => {
{ _attr: { "w:type": "paragraph", "w:styleId": "myStyleId" } },
{ "w:pPr": [] },
{
"w:rPr": [{ "w:sz": [{ _attr: { "w:val": 24 } }] }],
"w:rPr": [{ "w:sz": [{ _attr: { "w:val": 24 } }] }, { "w:szCs": [{ _attr: { "w:val": 24 } }] }],
},
],
});