Commit Graph

21 Commits

Author SHA1 Message Date
3299c557a0 Make .addSection fully declarative 2021-03-19 20:53:56 +00:00
89c2e14979 Merge branch 'master' of github.com:dolanmiu/docx into feature/separator
# Conflicts:
#	src/file/document/body/section-properties/section-properties.ts
2021-03-09 22:37:37 +00:00
f3f65da207 #732 Add line between columns (separate) 2021-03-04 03:02:07 +00:00
96471ecb45 Fix for empty first paragraph
If there is only one section, remove the extraneous empty paragraph during XML creation.
2019-12-15 22:56:24 +02:00
a37c9d8f2f Revert "fix: try to remove unnecessary paragraph", which caused #418
This reverts commit cb74868247.
2019-10-03 22:12:23 -05:00
cb74868247 fix: try to remove unnecessary paragraph 2019-08-29 20:52:05 +09:00
ac5b15d0e3 Mandatory Sections 2019-07-31 08:48:02 +01:00
1dfc27ba08 Multiple columns in a section 2019-06-21 01:22:27 +05:30
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
5552f9d834 The page number type attribute of the sections was always been created, leading Word to always reset page numbers to zero in new sections.
The page number type DECIMAL is already the default in Word, there is no need to force this to be the default option in the default section, like it was.
2018-11-09 09:13:27 -02:00
61411fd0f3 Add tests 2018-11-01 02:22:32 +00:00
4742cf0f3f Clean imports 2018-10-26 01:04:07 +01:00
d63e6bf6b1 Revert back body test 2018-09-17 21:44:12 +01:00
980bc597e2 test fixes 2018-09-17 11:24:56 +03:00
0b963ec3b8 feature: add support to add mutiple sections to the document inc. headers and footers
- write missing tests
2018-06-21 12:03:34 +02:00
2f0ad3eeb2 Add and fix tests 2018-01-31 23:24:55 +00:00
4339f8cfc0 Add section properties 2018-01-25 01:21:03 +00:00
d0bd83d6c5 Fix tests 2018-01-24 13:08:22 +00:00
df197f73ea Create section properties section 2018-01-24 00:01:38 +00:00
e93d6799fd Made project Prettier compliant 2018-01-23 01:33:12 +00:00
2358139a6b Change docx folder to more appropriate "file" folder 2017-12-20 01:03:20 +00:00