Rename to more readable names

This commit is contained in:
Dolan
2018-08-07 02:47:24 +01:00
parent cf0c2c7691
commit 92da93a160
9 changed files with 19 additions and 19 deletions

View File

@ -124,7 +124,7 @@ export class Size extends XmlComponent {
}
}
export class SizeCs extends XmlComponent {
export class SizeComplexScript extends XmlComponent {
constructor(size: number) {
super("w:szCs");
this.root.push(
@ -135,7 +135,7 @@ export class SizeCs extends XmlComponent {
}
}
export class RTL extends XmlComponent {
export class RightToLeft extends XmlComponent {
constructor() {
super("w:rtl");
this.root.push(

View File

@ -145,7 +145,7 @@ describe("Run", () => {
describe("#rtl", () => {
it("should set the run to the RTL mode", () => {
run.rtl();
run.rightToLeft();
const tree = new Formatter().format(run);
expect(tree).to.deep.equal({
"w:r": [{ "w:rPr": [{ "w:rtl": [{ _attr: { "w:val": true } }] }] }],

View File

@ -1,7 +1,7 @@
// http://officeopenxml.com/WPtext.php
import { Break } from "./break";
import { Caps, SmallCaps } from "./caps";
import { Bold, Color, DoubleStrike, Italics, RTL, Size, SizeCs, Strike } from "./formatting";
import { Bold, Color, DoubleStrike, Italics, RightToLeft, Size, SizeComplexScript, Strike } from "./formatting";
import { Begin, End, Page, Separate } from "./page-number";
import { RunProperties } from "./properties";
import { RunFonts } from "./run-fonts";
@ -43,12 +43,12 @@ export class Run extends XmlComponent {
public size(size: number): Run {
this.properties.push(new Size(size));
this.properties.push(new SizeCs(size));
this.properties.push(new SizeComplexScript(size));
return this;
}
public rtl(): Run {
this.properties.push(new RTL());
public rightToLeft(): Run {
this.properties.push(new RightToLeft());
return this;
}