Skip to content

Allow to set "autoHyphenation" setting #1282

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

Merged
merged 24 commits into from
Mar 6, 2018
Merged

Allow to set "autoHyphenation" setting #1282

merged 24 commits into from
Mar 6, 2018

Conversation

Trainmaster
Copy link
Contributor

Description

Added support for automatically hyphenating document contents.

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 update the documentation to describe the changes

@troosan
Copy link
Contributor

troosan commented Feb 16, 2018

shouldn't we not also directly implement the following hyphenation options?

  • w:consecutiveHyphenLimit
  • w:hyphenationZone
  • w:doNotHyphenateCaps

@Trainmaster
Copy link
Contributor Author

@troosan And maybe:

<w:pPr>
  <w:suppressAutoHyphens />
</w:pPr>

I'll give it a shot.

@Trainmaster
Copy link
Contributor Author

@troosan Please review :)

'pageBreakBefore' => array(self::READ_TRUE, 'w:pageBreakBefore'),
'contextualSpacing' => array(self::READ_TRUE, 'w:contextualSpacing'),
'bidi' => array(self::READ_TRUE, 'w:bidi'),
'suppressAutoHyphens' => array(self::READ_TRUE, 'w:suppressAutoHyphens'),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@troosan Would you mind changing the phpcs align_double_arrow setting? Imho this is a good example what this rule can cause.

Copy link
Contributor

Choose a reason for hiding this comment

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

indeed, it's more difficult to view what changed, but it's easier to read the code, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not always easier to read the code. Just think of one key with a very long name (doNotUseMarginsForDrawingGridOrigin in document settings, for example). This will cause a lot spaces which makes readability worse because tracking a line with many whitespaces can get exhausting,

But like many other things it's also a matter of personal preference.

@troosan troosan added this to the v0.15.0 milestone Feb 28, 2018
troosan and others added 16 commits March 2, 2018 07:17
to make sure directory is unique [ci skip]
* Improve Title parsing
- Title should be able to contain TextRun
- Style 'Title' should be treated the same with as Heading
- Add tests for Heading/Title reader

* update the documentation and the changelog
* PHP 7.2 build should not fail anymore
* reduce dependencies versions
* fix parsing of footnotes and endnotes
* add method to remove an element from a section
* Added support for Vertically Raised or Lowered Text (w:position). Note that only docx writing is implemented for now.
* Add tests + changelog
* add reader + tests + doc
@troosan troosan merged commit 6a64979 into PHPOffice:develop Mar 6, 2018
@Trainmaster Trainmaster deleted the feature-allow-auto-hyphenation-setting branch May 16, 2018 20:28
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.

2 participants