Commit Graph

878 Commits

Author SHA1 Message Date
troosan e3732ef610
Merge pull request #1907 from SailorMax/patch-2
Allow to redefine TCPDF object
2020-12-29 23:19:47 +01:00
troosan b2335d2b73
Merge pull request #1796 from oleibman/odtchanges
ODT Changes
2020-12-29 23:18:23 +01:00
Libor M f2516b08b1 migrate from abandoned `Zend\Escaper` to `Laminas Escaper` 2020-10-18 13:16:43 +02:00
Libor M 4e4282a76e refixed "must not contain any null bytes" 2020-10-18 10:56:24 +02:00
Libor M b8ffe0477b fix cs issue: "Arguments with default values must be at the end of the argument list" 2020-10-18 08:54:12 +02:00
Libor M eaf2212aa8 fix format for coverage 2020-10-18 07:45:57 +02:00
Libor M 236c7c4499 fix code format 2020-10-17 17:34:51 +02:00
Libor M bf1bb2b7ca PHP 8.0 - fixed Error: Unknown named parameter $styles 2020-10-17 17:17:46 +02:00
Libor M a36a429128 rewrite check to local file 2020-10-17 17:08:23 +02:00
Libor M 9c6cf6fdb6 PHP 8.0 fix - ValueError: file_exists(): Argument #1 ($filename) must not contain any null bytes 2020-10-17 15:56:40 +02:00
Libor M 93978211a1 PHP 8.0 - depracated libxml_disable_entity_loader, is disabled by default 2020-10-17 15:48:39 +02:00
Libor M 9dad1d20e8 PHP 7.4 - fixed invalid value in hexdec
avoid notice: "Invalid characters passed for attempted conversion, these have been ignored"
2020-10-17 14:05:52 +02:00
Libor M e334ecf059 compatibility with phpmd 2.9 2020-10-17 13:39:22 +02:00
troosan ec1b3d35ee
Merge pull request #1818 from caugner/patch-1
Fixes PHPDoc @param and @return types for several Converter methods
2020-08-30 19:56:35 +02:00
Maxim d6260988bd
Allow to redefine TCPDF object
Sometimes we need create TCPDF object with modified initial arguments.
This change allow rewrite only createExternalWriterInstance() in user defined TCPDF class.
2020-07-23 18:49:25 +03:00
troosan 21f4bb3053
Merge pull request #1794 from ErnestStaug/image_conversion_support
Added support for "cloudConvert" images
2020-07-07 23:18:32 +02:00
troosan 250e206b59
Merge pull request #1775 from oleibman/rtfchanges
Add support for several features for the RTF writer
2020-07-06 08:36:38 +02:00
Owen Leibman ba3d616282 Improve Test Coverage
Coverage for Writer/ODText is now 100%.
2020-04-23 17:25:56 -07:00
Owen Leibman 677e042c3a Scrutinizer Workaroun
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).
2020-02-06 20:41:40 -08:00
Owen Leibman d5149b2867 Coveralls Changes
Changes to improve test coverage based on Coveralls report.
2020-02-06 19:20:13 -08:00
Claas Augner 1dee5f33cf
docs(Converter): fix @param allowing float 2020-02-04 20:36:03 +01:00
Owen Leibman 46c41c5ac1 More Scrutinizer Changes
Still one report that I don't understand at all, and one I'm not sure of.
2020-01-05 15:05:00 -08:00
Owen Leibman cfa29cc1c2 Applying Scrutinizer Suggestions
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.
2020-01-05 13:52:20 -08:00
Owen Leibman e24b2e1ba7 ODT Changes
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.
2020-01-05 10:27:45 -08:00
Ernestas Staugaitis fa0ba2e2ab Added support for cloud convert image inclusion 2020-01-02 00:34:30 +02:00
troosan 8b2e21b634
Merge branch 'develop' into fieldstyle 2019-12-09 22:56:08 +01:00
troosan c52c7abb65
Merge branch 'develop' into rtfchanges 2019-12-09 21:10:31 +01:00
Michaël Dupont 4852028743 fix: typo in getFootnoteProperties() method name
Was "getFootnotePropoperties()".
Former bogus spelling is still working, albeit deprecated.
2019-12-09 11:29:39 +01:00
troosan dfea4e12a6
Merge pull request #1766 from stefan-91/develop
Add support for ListItemRun in HTML writer
2019-12-08 20:38:03 +01:00
troosan 5940d18ab2
Merge pull request #1755 from oleibman/master
Improvements in RTF writer
2019-12-08 20:32:09 +01:00
owen 5e64b26451 Additional Scrutinizer Recommendations
Some more editorial changes.
2019-12-05 23:24:03 -08:00
owen 7657992a83 Scrutinizer-suggested changes
Changes to doc-blocks and code suggested by Scrutinizer.
2019-12-05 22:51:00 -08:00
Owen Leibman 30e3981ed2 Documentation Change
Changed 1 doc-block comment suggested by Scrutinizer.
2019-12-05 21:51:09 -08:00
Owen Leibman 11d82be21c Word2007 Writer - Field Style, RTL, noProof
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.
2019-12-05 21:04:12 -08:00
owen ecfafd7576 RTF Changes
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.
2019-12-03 07:46:16 -08:00
Michaël Dupont f51811b96b fix: documentation about paragraph indentation
Documentation contained the wrong unit for Paragraph indentation.
2019-12-02 16:40:58 +01:00
Bc. Štefan Kubini 1451fadc4a Add List for docx to html writer #1717 2019-11-28 23:33:10 +01:00
owen ebf5cf784f Convert named constant colors to RGB in Shared/Converter.
Otherwise, colors will not be as expected for RTF and ODT.
2019-11-19 14:24:29 -08:00
Owen Leibman a10fe823b2 Errors in RTF Escaping
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.
2019-11-16 21:37:57 -08:00
Bc. Štefan Kubini b230242127 fixed List item fail #1711 2019-11-05 10:46:24 +01:00
troosan 4f0d6f78ba
Merge pull request #1717 from Samuel-BF/rtf-basic-fields
Add support for basic fields in RTF writer.
2019-09-30 21:56:00 +02:00
Samuel BF 7628b41fdf Add support for basic fields in RTF writer. 2019-09-10 11:24:59 +02:00
František Maša 8f4f4dcd48 Added return type 2019-09-02 18:13:10 +02:00
troosan 85e9144822
Merge pull request #1329 from eweso/patch-1
Adding setNumId method for ListItem style
2019-08-08 07:13:03 +02:00
troosan 815bb52ebf
Merge pull request #1628 from waltertamboer/feature/fix-issue-1529
No nested w:pPr elements in ListItemRun.
2019-08-08 07:11:05 +02:00
troosan 24d120baf1
Merge pull request #1646 from SpinyMan/develop
Change private to protected to be able extending class Html
2019-08-08 07:09:35 +02:00
troosan 487622bb9e
Merge pull request #1637 from bhattnishant/master
To support PreserveText inside sub container
2019-08-08 07:08:13 +02:00
Andrew Busel 415bdb378d
Update Html.php 2019-07-03 19:25:29 +03:00
Andrew Busel 9e93d5eae5
Update Html.php 2019-07-03 19:24:15 +03:00
Mario 9abf4473b0
Update Wrong definition 2019-07-02 16:02:52 +02:00