31 Oct 2018 07:53
RichTextBox: Implement contextual paragraph spacing - "Don't add space between paragraphs of the same style"
Add Paragraph property controlling whether SpacingBefore / SpacingAfter is applied between paragraphs with the same style.
In MS Word, the corresponding option is controlled with "Don't add space between paragraphs of the same style" checkbox in the font properties dialog - and the paragraph spacing after will not be applied.
In OOXML, it is described with the w:contextualSpacing element. We don't respect this property on import of such files, and the paragraph spacing is bigger.
Common use case for this feature is that when list is applied to multiple paragraphs, Paragraph List style is applied to the items, and this style has "Don't add space between paragraphs of the same style" applied, so the vertical spacing between the items is smaller.