added #setNumbering method to paragraph

This commit is contained in:
felipe
2017-03-08 18:23:00 +01:00
parent 4b300e4def
commit 0e9532d835
2 changed files with 52 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import {ParagraphProperties} from "./properties";
import {MaxRightTabStop, LeftTabStop} from "./tab-stop";
import {Style} from "./style";
import {NumberProperties} from "./unordered-list";
import { Num } from "../../numbering/num";
class Alignment extends XmlComponent {
@ -109,4 +110,10 @@ export class Paragraph extends XmlComponent {
this.properties.push(new NumberProperties(1, 0));
return this;
}
}
public setNumbering(numbering: Num, indentLevel: number): Paragraph {
this.properties.push(new Style("ListParagraph"));
this.properties.push(new NumberProperties(numbering.id, indentLevel));
return this;
}
}