Sometimes we need create TCPDF object with modified initial arguments.
This change allow rewrite only createExternalWriterInstance() in user defined TCPDF class.
Attempt to work around demonstrably incorrect Scrutinizer analysis
(flags code as bug because "condition is always false"
even though Coveralls reports that code which would be
executed only if condition is true is indeed executed).
I do not understand one suggestion, and I believe one is wrong.
I will add comments to my ticket once this is pushed.
One that I can discuss up front
PhpWord/Style/Paragraph indicates that Indentation must be of type
\PhpOffice\PhpWord\Style\Indentation, but it can also be null.
My test for instanceof ... is one of the Scrutinizer reports.
I did not change PhpWord/Style/Paragraph, but this commit does so
by updating @var for indentation.
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.
1. Add support for font styles for fields, and write those to Word docs.
2. Word seems to require explicit inline w:rtl tag even when rtl is specified
in a named style. Without this tag, words are placed in ltr order.
Allow PhpWord doc to specify rtl in named style and have it
display correctly in resulting doc.
3. A recent change incorrectly changed how noProof tag was generated,
omitting the third parameter of 4 parameters in the call. There was
no test case for this change. The call is now corrected, and a
test case has been added.
1. Converter is currently expecting colors as strings of hex digits,
but PhpWord allows specification of colors by named constant, so
result is random when one of those is used. This change handles
all the named colors.
2. Table needs \pard at end; formatting may be wrong without it.
3. RTF writer will no longer ignore paragraph style for TextRun.
4. RTF writer will no longer ignore paragraph and font style for Title.
5. Add support for RTF headers and footers.
6. Add support for right-to-left in font.
7. Add support for PageBreakBefore and LineHeight for paragraphs.
8. Add support for PageNumberingStart for sections.
There are test cases for all of these changes.
1. Codes meant to be in hex are specified in decimal.
Consequently characters which don't need escaping are escaped.
2. Special handling (prepend backslash) needed for {, }, and \.
RTF docs generated with those characters cannot be opened in Word.
3. Tab character needs to be escaped as \tab.
RTF docs drop these characters.
While running test suite, found that Writer/RTF/ElementTest was coded
only for Unix line endings, and fails on Windows. Changed so that it
would work on either.