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

Spacing:after in float value #199

Open
flaminestone opened this issue Sep 5, 2016 · 6 comments
Open

Spacing:after in float value #199

flaminestone opened this issue Sep 5, 2016 · 6 comments
Labels
Milestone

Comments

@flaminestone
Copy link

SetSpacingAfter.docx
docx.elements.first.spacing.after = 2.54 its wrong

@flaminestone
Copy link
Author

SetSpacingLine.docx
second example
docx.elements.first.spacing.line its too wrong

@ShockwaveNN
Copy link
Collaborator

Implemented #202

@flaminestone
Copy link
Author

SetSpacingBefore.docx
docx.elements[1].spacing.before is float again

@flaminestone flaminestone reopened this Sep 5, 2016
@ShockwaveNN
Copy link
Collaborator

Use docx.elements[1].paragraph_properties.spacing.before
not docx.elements[1].spacing.before

@flaminestone
Copy link
Author

I think, you keep spacing in element objects for save compatibility. In this case, all properties in elements[1].paragraph_properties.spacing to be equal elements[1].spacing, but i have example, where its wrong
ApiParagraph.docx
docx.elements.first.spacing.after = 2.54 (not OoxmlSize object, but it is other history)
docx.elements.first.paragraph_properties.spacing.after = 0 (not OoxmlSize object too)
Maybe i missed something?

@flaminestone flaminestone reopened this Sep 8, 2016
@ShockwaveNN
Copy link
Collaborator

Actually in your example docx.elements.first.paragraph_properties.spacing.after is 1440 dxa
But generally speaking - DocxParagraph#spacing and DocxParagraph#paragraph_properties#spacing is not the same.
DocxParagraph#spacing use default values, so it always set, and other do not use default values, so if there is no spacing in document.xml second spacing will be nil. Need to parse spacing from styles.xml. Wait for implementation #140

@ShockwaveNN ShockwaveNN added this to the p2 milestone Sep 8, 2016
@ShockwaveNN ShockwaveNN self-assigned this Jul 10, 2017
@ShockwaveNN ShockwaveNN removed their assignment Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants