Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

Add setCellVerticalAlignment() & allow setShouldWrapText() to be explicitly set as false#869

Open
jonnott wants to merge 1 commit into
box:masterfrom
jonnott:vertical-alignment-wraptext
Open

Add setCellVerticalAlignment() & allow setShouldWrapText() to be explicitly set as false#869
jonnott wants to merge 1 commit into
box:masterfrom
jonnott:vertical-alignment-wraptext

Conversation

@jonnott

@jonnott jonnott commented Feb 10, 2022

Copy link
Copy Markdown

Fixes issues:
#829
#737

  • add Common\Entity\Style\CellVerticalAlignment
  • duplicate get/set/hasSet/shouldApply methods for CellAlignment in Common\Entity\Style\Style for CellVerticalAlignment instead, plus corresponding properties
  • add setCellVerticalAlignment method to Common\Creator\Style\StyleBuilder
  • add vertical alignment to StyleMerger:: mergeCellProperties()
  • adjust wrapText logic in mergeCellProperties() to fix issue Default style with no text wrap is ignored #829
  • apply vertical cell styling for both XLSX and ODS, via corresponding StyleManager classes
  • transform vertical alignment ‘center’ to ‘middle’ for ODS
  • fix logic around wrapText such that the choice whether to include wrapping styles depends on hasSetWrapText() being true, and then use shouldWrapText() thereafter to either set wrapping or no wrapping (for XLSX, wrapText=“1” or wrapText=“0”, for ODS, wrap-option=wrap or wrap-option=no-wrap). previously there was no way to set wrapping to be OFF, only to set it to be ON.
  • add new tests to ensure shouldWrapText(false) results in the correct negated wrapText (XLSX) / wrap-option (ODS) styles
  • add new tests to StyleBuilderTest for vertical alignment
  • add vertical alignment to documentation.md

@CLAassistant

CLAassistant commented Feb 10, 2022

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jonnott

jonnott commented Feb 10, 2022

Copy link
Copy Markdown
Author

@adrilo @PeteAUK @fwwarr

@jonnott jonnott force-pushed the vertical-alignment-wraptext branch from f8d8296 to a0dceef Compare February 11, 2022 13:12

@adrilo adrilo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @jonnott for your contribution! It looks good overall. I just left 2 minor comments that should be addressed before I can merge.

Comment thread src/Spout/Writer/ODS/Manager/Style/StyleManager.php Outdated
Comment thread src/Spout/Common/Entity/Style/CellVerticalAlignment.php
…icitly set as false

- add Common\Entity\Style\CellVerticalAlignment
- duplicate get/set/hasSet/shouldApply methods for CellAlignment in Common\Entity\Style\Style for CellVerticalAlignment instead, plus corresponding properties
- add setCellVerticalAlignment method to Common\Creator\Style\StyleBuilder
- add vertical alignment to StyleMerger:: mergeCellProperties()
- adjust wrapText logic in mergeCellProperties() to fix issue box#829
- apply vertical cell styling for both XLSX and ODS, via corresponding StyleManager classes
- transform vertical alignment  ‘center’ to ‘middle’ for ODS
- fix logic around wrapText such that the choice whether to include wrapping styles depends on hasSetWrapText() being true, and then use shouldWrapText() thereafter to either set wrapping or no wrapping (for XLSX, wrapText=“1” or wrapText=“0”, for ODS, wrap-option=wrap or wrap-option=no-wrap). previously there was no way to set wrapping to be OFF, only to set it to be ON.
- add new tests to ensure shouldWrapText(false) results in the correct negated wrapText (XLSX) / wrap-option (ODS) styles
- add new tests to StyleBuilderTest for vertical alignment
- add vertical alignment to documentation.md
@jonnott jonnott force-pushed the vertical-alignment-wraptext branch from a0dceef to 887d6ef Compare February 12, 2022 19:37
@jonnott

jonnott commented Feb 12, 2022

Copy link
Copy Markdown
Author

Thanks @jonnott for your contribution! It looks good overall. I just left 2 minor comments that should be addressed before I can merge.

Hi @adrilo, I've force-pushed an amended version of my commit to this PR with the changes as discussed above. Please let me know your thoughts..

@jonnott

jonnott commented Feb 28, 2022

Copy link
Copy Markdown
Author

@adrilo Do you see any outstanding issues with this still preventing a merge?

@jonnott

jonnott commented Mar 25, 2022

Copy link
Copy Markdown
Author

Anyone know if there's any likelihood that this will get merged any time soon? Or do I need to submit this PR to openspout/openspout and look to use that in my project instead?

@adrilo

@Slamdunk

Copy link
Copy Markdown

Merged in openspout/openspout#63 tnx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants