Commit Graph

20 Commits

Author SHA1 Message Date
816cb54b14 Optimize XML output by properly constructing objects to send to the xml library so that it can produce proper empty elements.
Rework the way attributes are stored in ImportedXmlComponent to match elsewhere (required allowing for a null xmlKeys in the XmlAttributeComponent interface).
Rework the way paragraphs get added to the end of table cells if needed.
The goal in both reworks is to not mess around with the objects output from `prepForXml` if we can avoid it.
Made the output of RunProperties, ParagraphProperties, TableCellProperties, TableRowProperties, and TableProperties all optional based on whether they contain any attributes or children.  Changed code in PageBorders, TableCellMargin, and TableCellBorders that implemented this same thing by overriding `prepForXml` so that it uses the new XmlComponent subclass instead.
Removed commented out code that attempted to fix-up XML output and make proper empty elements.
Fixed all affected tests.
Turn off `no-null-keyword` in the linter as we need to use null to signal to the `xml` library to create an empty element with no attributes (`undefined` will not work in its place).

Fixes #306
2019-04-09 05:27:18 -04:00
7980f14efb Introduce some functional programming techniques 2018-11-02 02:51:57 +00:00
4742cf0f3f Clean imports 2018-10-26 01:04:07 +01:00
96d81873d8 forgot to fix the test 2018-10-21 19:56:31 -02:00
b6f431e14d fixed TOC instruction that was missing quotes for some switches 2018-10-20 09:17:37 -03:00
c140d2c37c ITableOfContentsProperties to ITableOfContentsOptions 2018-09-25 21:09:30 +01:00
3a42f2a2f0 Make API simplier with interfaces 2018-09-25 20:05:35 +01:00
00efedaa09 Fix spelling and linting and improve readme 2018-09-25 19:49:44 +01:00
808c5b00a0 table of contents with all the options 2018-09-25 01:18:47 -03:00
8b463b3bb6 updated clone deep dependency and make fields dirty to be updated when word is opened 2018-09-21 10:26:28 -03:00
1cff104bae correct sdt objects of table of contents 2018-09-20 10:47:10 -03:00
146d0ad9e5 Moved addTableOfContents to File and creating a settings.xml and applying updateFields=true when there is a table of contents 2018-09-10 10:01:26 -03:00
aedfca377f elements need to be inside runs 2018-09-04 18:22:08 -03:00
7926f6c189 escape bars 2018-09-04 17:29:24 -03:00
e9a007d446 create default properties for table-of-contents instruction 2018-09-04 12:05:41 -03:00
b1711ae293 first simple version of TOC working 2018-09-03 11:20:36 -03:00
c55f82c425 test improvment 2018-09-03 10:48:50 -03:00
d1044d262e table of contents extending paragraph 2018-08-31 10:22:40 -03:00
8d83219bb6 wrote some initial code 2018-08-29 12:06:01 -03:00
a6a8012b39 wrote some inital code 2018-08-22 10:30:19 -03:00