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

Word Export: LT-22006: RTL - Fix indentation and clipping #233

Merged
merged 1 commit into from
Dec 11, 2024
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
12 changes: 2 additions & 10 deletions Src/xWorks/WordStylesGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,7 @@ internal static Style GenerateWordStyleFromLcmStyleSheet(string styleName, int w
if (exportStyleInfo.HasLeadingIndent || hangingIndent < 0.0f)
{
var leadingIndent = CalculateMarginLeft(exportStyleInfo, hangingIndent);

if (exportStyleInfo.DirectionIsRightToLeft == TriStateBool.triTrue)
parProps.Append(new Indentation() { Right = leadingIndent.ToString() });
else
parProps.Append(new Indentation() { Left = leadingIndent.ToString() });
parProps.Append(new Indentation() { Left = leadingIndent.ToString() });
}

if (exportStyleInfo.HasLineSpacing)
Expand Down Expand Up @@ -309,11 +305,7 @@ internal static Style GenerateWordStyleFromLcmStyleSheet(string styleName, int w

if (exportStyleInfo.HasTrailingIndent)
{
// Check bidirectional flag to determine correct orientation for indent
if (exportStyleInfo.DirectionIsRightToLeft == TriStateBool.triTrue)
parProps.Append(new Indentation() { Left = MilliPtToTwentiPt(exportStyleInfo.TrailingIndent).ToString() });
else
parProps.Append(new Indentation() { Right = MilliPtToTwentiPt(exportStyleInfo.TrailingIndent).ToString() });
parProps.Append(new Indentation() { Right = MilliPtToTwentiPt(exportStyleInfo.TrailingIndent).ToString() });
}

// If text direction is right to left, add BiDi property to the paragraph.
Expand Down
Loading