Commit Graph

7 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
d19cdcae0c Rename methods 2019-01-11 01:45:57 +00:00
3355a6f472 Added back tests and method 2018-10-31 21:57:10 +00:00
9d9dd62f00 c 2018-10-16 11:28:25 +03:00
5f594a822f Fix and enable linting on tests 2018-08-09 23:29:40 +01:00
97e976a184 import: add support to import any xml tab element to XmlComponent (#8)
- make method to import/convert to XmlComponent
 - expose method to add childElement to Header/Footer
 - add tests
2018-05-28 09:15:44 +02:00
5242f7d55c styles: support for external styles. parsing external styles. 2018-03-28 14:54:07 +02:00