diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 035805b0..a28a5cf7 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -3852,16 +3852,29 @@ namespace Volian.Print.Library { int indxLevels = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel(); float tableftadj = GetLeftJustify(formatInfo, indxLevels); - // the order of this is important. First adjust the tab's xoffset for the width of - // the tab. The offset of text needs to be adjusted by the 'leftjustify' format variable - // if it existed for this level. - myTab.XOffset += tabWidth; - if (tableftadj != 0 && myTab.Width < tableftadj) - tabWidth = myTab.Width = tableftadj; - XOffset += tabWidth; - myTab.Rtf = myTab.Rtf.Replace(myTab.Text, myTab.Text.TrimStart(" ".ToCharArray())); - Width = MyParent.Width - myTab.Width; + if (tableftadj != 0) + { + // the order of this is important. First adjust the tab's xoffset for the width of + // the tab. The offset of text needs to be adjusted by the 'leftjustify' format variable + // if it existed for this level. + myTab.XOffset += tabWidth; + if (tableftadj != 0 && myTab.Width < tableftadj) + tabWidth = myTab.Width = tableftadj; + XOffset += tabWidth; + myTab.Rtf = myTab.Rtf.Replace(myTab.Text, myTab.Text.TrimStart(" ".ToCharArray())); + Width = MyParent.Width - myTab.Width; + } + else // if no left justify, right align the tab + { + XOffset += tabWidth - (myTab == null ? 0 : myTab.TabAlign); + if (myTab != null) + { + myTab.XOffset += tabWidth - myTab.TabAlign; + if (myTab.MyMacro != null && myTab.MyMacro.XOffset != 0) myTab.MyMacro.XOffset += tabWidth - myTab.TabAlign; + } + } } + //else if ((itemInfo.FormatStepData.ColOverride ?? 0) > 0) //{ // XOffset = (float)itemInfo.FormatStepData.ColOverride;