Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Src/xWorks/WordStylesGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,15 @@ internal static Style GenerateWordStyleFromLcmStyleSheet(bool paragraphData, str
parProps.Append(new SpacingBetweenLines() { Line = lineHeight.ToString(), LineRule = LineSpacingRuleValues.Exact });
}
}
if (exportStyleInfo.HasSpaceAfter)
{
parProps.Append(new SpacingBetweenLines() { After = MilliPtToTwentiPt(exportStyleInfo.SpaceAfter).ToString() });
}
if (exportStyleInfo.HasSpaceBefore)
{
parProps.Append(new SpacingBetweenLines() { Before = MilliPtToTwentiPt(exportStyleInfo.SpaceBefore).ToString() });
}
}

// Set the space before and after the line, even if the value is zero. If we do not set the value
// then Word generates a value, sometimes 8 or 24 point.
int spaceAfter = exportStyleInfo.HasSpaceAfter ? exportStyleInfo.SpaceAfter : 0;
int spaceBefore = exportStyleInfo.HasSpaceBefore ? exportStyleInfo.SpaceBefore : 0;
parProps.Append(new SpacingBetweenLines() { After = MilliPtToTwentiPt(spaceAfter).ToString() });
parProps.Append(new SpacingBetweenLines() { Before = MilliPtToTwentiPt(spaceBefore).ToString() });

if (exportStyleInfo.HasTrailingIndent)
{
parProps.Append(new Indentation() { Right = MilliPtToTwentiPt(exportStyleInfo.TrailingIndent).ToString() });
Expand Down
Loading