From e8ff2663502f7aaaf886eb6db54e102e120de161 Mon Sep 17 00:00:00 2001 From: mark-sil Date: Wed, 11 Dec 2024 11:59:17 -0500 Subject: [PATCH] Word Export: LT-22006: RTL - Fix indentation and clipping Word does not expect the indentation direction (left/right) to be flipped for right to left output. Removed the extra code and output the same indentation direction for both LTR and RTL. This problem also existed with the single column output, but became more obvious when we switched to double column output. Change-Id: Id86359ec0524f0eca8ef3c6e4aaa176efcac5122 --- Src/xWorks/WordStylesGenerator.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Src/xWorks/WordStylesGenerator.cs b/Src/xWorks/WordStylesGenerator.cs index cb353273f1..cf3579ad1a 100644 --- a/Src/xWorks/WordStylesGenerator.cs +++ b/Src/xWorks/WordStylesGenerator.cs @@ -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) @@ -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.