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

Bugfix: Alignment setter assumes default left-alignment #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicklausd
Copy link

The Paragraph.Alignment setter assumes that the default alignment of documents is left-aligned. As part of this assumption, it ignores attempts to align paragraphs to the left by removing any alignment markup. However, this does not work when modifying documents where the default style specifies a different alignment. For example, if the default style is Justify (also known as Alignment.both), trying to Alignment to Alignment.left will result in no markup causing the paragraph's alignment to remain Justify. This fix assumes that the user wants to force alignment markup to what they are specifying and does not assume a default alignment.

The Paragraph.Alignment setter assumes that the default alignment of documents is left-aligned. As part of this assumption, it ignores attempts to align paragraphs to the left by removing any alignment markup. However, this does not work when modifying documents where the default style specifies a different alignment. For example, if the default style is Justify (also known as Alignment.both), trying to Alignment to Alignment.left will result in no markup causing the paragraph's alignment to remain Justify. This fix assumes that the user wants to force alignment markup to what they are specifying and does not assume a default alignment.
@XceedBoucherS
Copy link
Collaborator

Hi,
Thank you for pointing this out.
The fix will be included in v1.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants