After this change, Writer/Word2007 is 100% covered.
One source change is required. Writer/Word2007/Style/AbstractStyle
has incorrectly searched Measurement Array using
in_array (which searches values) rather than array_key_exists (keys).
There was no test for this, and now there is.
3 changes in tests/PhpWord/_includes are borrowed from "ODT Changes"
(pull request 1796, not yet merged)
and "Fix PHPUnit Tests" (pull request 1771,
merged after work on this change was started).
Writer/Word2007/ElementTest was becoming too unwieldy. Tests for
Chart and FormFields were moved to their own members.
Each section currently has a hard-coded default paper of A4.
It would make sense to allow the user to set this default,
and specify it in a configuration file, just as is done
with default font name and size.
Implement a number of features implemented in PhpWord,
but not yet supported in PhpWord ODT Writer.
1. Add default file to tests/PhpWord/_includes/XmlDocument.php to make it
considerably easier to test ODT changes (and Word2007 changes involving
files other that document.xml).
2. Page break before each section.
3. Page numbering start.
4. Font style for Headings.
5. Alignment for images.
6. Paragraph style for TextRun.
7. "Hide grammatical errors" for whole document.
8. Page layout for each section.
9. For each page layout, support user-specified page width, page height,
orientation, margin top, margin bottom, margin left, margin right.
10. Page header and footer.
11. Named colors.
12. NoProof font style.
13. Paragraph Style - spaceBefore, spaceAfter, lineHeight, pageBreakBefore,
indentation, text alignment.
14. Tab stops.
15. Basic support for some Fields (DATE, PAGE, NUMPAGES).
16. Link had an error in how it was handling internal links (needs leading #).
17. In addition to tests for all the above, added some tests for Tables.
Item 11 above needs 1 module from Pull Request 1775, which is targeted
for v0.18.0 but not yet merged, so the relevant module is also here.
Item 15 above needs 1 module from Pull Request 1774, which is targeted
for v0.18.0 but not yet merged, so the relevant module is also here.
Testing change from Pull Request 1771 is included here, but was
merged after my fork.