Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for several features for the RTF writer #1775

Merged
merged 7 commits into from
Jul 6, 2020
Merged

Add support for several features for the RTF writer #1775

merged 7 commits into from
Jul 6, 2020

Conversation

oleibman
Copy link
Contributor

@oleibman oleibman commented Dec 6, 2019

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.

Fixes # (issue)

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
    No documentation changes required.

Otherwise, colors will not be as expected for RTF and ODT.
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.
@coveralls
Copy link

coveralls commented Dec 6, 2019

Coverage Status

Coverage decreased (-0.1%) to 94.495% when pulling c52c7ab on oleibman:rtfchanges into 733f845 on PHPOffice:develop.

Changes to doc-blocks and code suggested by Scrutinizer.
Some more editorial changes.
Fix PHPUnit tests on develop branch
@oleibman
Copy link
Contributor Author

oleibman commented Dec 9, 2019

I'm not sure if I need to do something about "resolve conflicts". Tests weren't working because fixes were required to AbstractWebServerEmbeddedTest.php, for which there was a pull request for a change which had not yet been merged, so I borrowed the code from that change. Now that it has been merged, it no longer needs to be part of this change, but I'm not sure how to disentangle it. Please let me know what I should be doing, if anything.

@troosan
Copy link
Contributor

troosan commented Dec 9, 2019

The best is to have a separate branch per implemented feature. You can of course have your own develop branch with everything merged.

@troosan troosan added this to the v0.18.0 milestone Dec 14, 2019
@troosan troosan changed the title Rtfchanges Add support for several features for the RTF writer Dec 15, 2019
@troosan troosan merged commit 250e206 into PHPOffice:develop Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants