Skip to content

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