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 wordwrap for paragraph #1688

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

Conversation

netmou
Copy link

@netmou netmou commented Aug 7, 2019

Description

add support wordwrap for paragraph to fixes
#1687

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

* @see \PhpOffice\PhpWord\SimpleType\JcTable For table alignment modes available since ISO/IEC-29500:2008.
* @see http:https://www.datypic.com/sc/ooxml/t-w_ST_Jc.html
*/
final class WordWrap extends AbstractEnum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be renamed to OnOff, see documentation http:https://www.datypic.com/sc/ooxml/t-w_ST_OnOff.html

/**
* @since 0.17.0
*/
class ParagraphWordWrap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this, WordWrap is just a simple on/off, there are no other attributes possible (see http:https://www.datypic.com/sc/ooxml/e-w_wordWrap-1.html)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry ,my English is not well ,so i have some trouble to talk with you ,but i think you can add the wordwrap future to phpword after you resolve it by yourself .

oleibman and others added 24 commits February 2, 2020 19:42
Implement a number of features implemented in PhpWord,
but not yet supported in PhpWord HTML Writer.

    1. Use css @page and page declarations for sections.
    2. Wrap sections in div, with page break before each (except first).
    3. Add ability to specify generic fallback font for html (documentation change).
    4. Add ability to specify handling of whitespace in html (documentation change).
       Currently, Word writer preserves space but HTML writer does not.
    5. Support for Language, both for document overall and individual text elements.
    6. Support for PageBreak for HTML (currently only PDF is supported).
    7. Support for Table Border style, color, and size.
    8. Support for empty paragraphs (Word writer permits, browsers generally suppress).
    9. Default paragraph style should apply to all paragraphs, as well as class Normal.
    10. Paragraph style should support line-height.
    11. Paragraph style should support indentation.
    12. Paragraph style should support page-break-before.
    13. Paragraph style should not specify margin-top/bottom when spacing is null.

Testing change from Pull Request 1771 is included here, but was
merged after my fork.
Mostly docblock changes, specifying that members can be null if so.
Hopefully this clears 3 remaining issues.
Reaction to Coveralls report.
I had been overriding some "false positive" Scrutinizer messages
with annotations. Seeing if an alternate approach also works.
New issue after removing annotations.
Zend/Escaper is no longer maintained. However, everything that
it does can be handled perfectly well by htmlspecialchars.
This change removes the dependency on it, and changes code which used it.

Also add additional tests. Coverage of Writer/HTML is now 100%
Scrutinizer reported a problem because Title->getText() was annotated to return a string,
but it can actually return either a string or a TextTun.
Change one statement in Writer/HMTL/Title
See issue PHPOffice#1993. The code currently defines the same method twice; this edit fixes that.
This member was NOT part of my change, yet Travis failed my PR because of use of spaces on a blank line. Even though this is easy to correct, it seems very unreasonable (failing PR because of unchanged member).
@PowerKiKi PowerKiKi changed the base branch from develop to master November 16, 2022 21:11
@Progi1984 Progi1984 force-pushed the master branch 2 times, most recently from 2d9f999 to e458249 Compare August 30, 2023 11:56
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.

None yet

3 participants