Skip to content
This repository has been 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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonnott
Copy link

@jonnott jonnott commented Feb 10, 2022

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
Copy link

CLAassistant commented Feb 10, 2022

CLA assistant check
All committers have signed the CLA.

@jonnott
Copy link
Author

jonnott commented Feb 10, 2022

@adrilo @PeteAUK @fwwarr

Copy link
Collaborator

@adrilo adrilo left a comment

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.

…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
Copy link
Author

jonnott commented Feb 12, 2022

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
Copy link
Author

jonnott commented Feb 28, 2022

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

@jonnott
Copy link
Author

jonnott commented Mar 25, 2022

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

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.

None yet

4 participants