updated clone deep dependency and make fields dirty to be updated when word is opened

This commit is contained in:
Sergio Mendonça
2018-09-21 10:26:28 -03:00
parent 17d696e33a
commit 8b463b3bb6
9 changed files with 56 additions and 30 deletions

View File

@ -1,4 +1,6 @@
// http://officeopenxml.com/WPparagraph.php
import * as cloneDeep from "lodash.clonedeep";
import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
import { Image } from "file/media";
import { Num } from "file/numbering/num";
@ -30,6 +32,10 @@ export class Paragraph extends XmlComponent {
}
}
public get paragraphProperties(): ParagraphProperties {
return this.properties;
}
public get Borders(): Border {
return this.properties.paragraphBorder;
}
@ -155,8 +161,8 @@ export class Paragraph extends XmlComponent {
return this;
}
public maxRightTabStop(): Paragraph {
this.properties.push(new MaxRightTabStop());
public maxRightTabStop(leader?: LeaderType): Paragraph {
this.properties.push(new MaxRightTabStop(leader));
return this;
}
@ -246,4 +252,8 @@ export class Paragraph extends XmlComponent {
this.properties.clearPageBreaks();
return this;
}
public clone(): Paragraph {
return cloneDeep(this, false);
}
}