2017-09-21 14:56:46 +01:00
|
|
|
// http://officeopenxml.com/WPparagraphProperties.php
|
2019-04-09 05:27:18 -04:00
|
|
|
import { IgnoreIfEmptyXmlComponent, XmlComponent } from "file/xml-components";
|
2016-03-30 00:28:05 +01:00
|
|
|
|
2019-06-12 01:03:36 +01:00
|
|
|
import { Border, IBorderOptions } from "./formatting/border";
|
|
|
|
|
|
|
|
interface IParagraphPropertiesOptions {
|
|
|
|
readonly border?: IBorderOptions;
|
|
|
|
}
|
2018-08-19 19:37:36 -04:00
|
|
|
|
2019-06-12 01:03:36 +01:00
|
|
|
export class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
|
constructor(options: IParagraphPropertiesOptions) {
|
2016-05-09 03:44:16 +01:00
|
|
|
super("w:pPr");
|
2018-08-19 19:37:36 -04:00
|
|
|
|
2019-06-12 01:03:36 +01:00
|
|
|
if (options.border) {
|
|
|
|
this.push(new Border(options.border));
|
|
|
|
}
|
2016-03-30 00:28:05 +01:00
|
|
|
}
|
|
|
|
|
2017-03-08 21:36:09 +00:00
|
|
|
public push(item: XmlComponent): void {
|
2016-04-09 20:16:35 +01:00
|
|
|
this.root.push(item);
|
2016-03-30 00:28:05 +01:00
|
|
|
}
|
2017-03-08 21:36:09 +00:00
|
|
|
}
|