From 858bf4a7a703c43de3cdfec4ba15c29004609c8f Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 1 Dec 2011 12:51:20 +0000 Subject: [PATCH] --- PROMS/Volian.Print.Library/vlnParagraph.cs | 37 +++++++++++----------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 1e930f1f..102b4ada 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -876,8 +876,6 @@ namespace Volian.Print.Library MyItemInfo = itemInfo; XOffset = xoff; int extra = (MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0; - //if (extra > 0) - // Console.WriteLine("here"); yoff += extra; YTopMost = YOffset = yoff; vlnTab mytab = null; @@ -1480,24 +1478,14 @@ namespace Volian.Print.Library } int typ = ((int)itemInfo.MyContent.Type) % 10000; int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex; - float? colOvrd = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepTypeColOverride; - //if (colOvrd != null) - //{ - // XOffset = (float)colOvrd -(float)itemInfo.MyDocStyle.Layout.LeftMargin;// 16-bit code subtracted the left margin - // //XOffset += tabWidth; - // //float x = (float)(colOvrd) - (float)itemInfo.MyDocStyle.Layout.LeftMargin;// 16-bit code subtracted the left margin - // //float xoff = x - XOffset; - // //XOffset = x; - // //if (myTab != null) myTab.XOffset += xoff; - // //return; - //} + float? colOvrd = formatInfo.PlantFormat.FormatData.StepDataList[typ].ColOverride; if (bxIndx != null) { Box bx = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx]; if (bx == null) { //float xoff = 0; - if (colOvrd != null) + if ((colOvrd??0)!=0) { // 16-bit code subtracted the left margin //xoff = ((float)colOvrd - (float)itemInfo.MyDocStyle.Layout.LeftMargin) - XOffset; @@ -1525,7 +1513,7 @@ namespace Volian.Print.Library { float x = 0; float xoff = 0; - if (colOvrd != null) + if ((colOvrd??0)!=0) { x = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)colOvrd; //xoff = (float)colOvrd; @@ -1585,8 +1573,19 @@ namespace Volian.Print.Library { int indxLevels = itemInfo.PrintLevel + itemInfo.CurrentSectionLevel(); LeftJustifyList jstlst = formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionPrintData.LeftJustifyList; - float tableftadj = (jstlst[indxLevels >= jstlst.Count ? jstlst.Count - 1 : indxLevels].Size) ?? 0; - if (tableftadj != 0) tabWidth = myTab.Width = (jstlst[indxLevels >= jstlst.Count ? jstlst.Count - 1 : indxLevels].Size) ?? 0; + bool foundleftj = false; + float tableftadj = 0; + foreach (LeftJustify lj in jstlst) + { + if (lj.Index == indxLevels) + { + foundleftj = true; + tableftadj = lj.Size ?? 0; + break; + } + } + //float tableftadj = (jstlst[indxLevels >= jstlst.Count ? jstlst.Count - 1 : indxLevels].Size) ?? 0; + if (tableftadj != 0) tabWidth = myTab.Width = tableftadj; // (jstlst[indxLevels >= jstlst.Count ? jstlst.Count - 1 : indxLevels].Size) ?? 0; XOffset += tabWidth; myTab.XOffset += tabWidth; myTab.Rtf = myTab.Rtf.Replace(myTab.Text, myTab.Text.TrimStart(" ".ToCharArray())); @@ -1617,8 +1616,8 @@ namespace Volian.Print.Library } public void AdjustWidth(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo, vlnTab myTab) { - float? widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.StepTypeWidthOverride; - if (widOvrd != null) + float? widOvrd = itemInfo.FormatStepData == null ? null : itemInfo.FormatStepData.WidthOverride; + if ((widOvrd??0) != 0) { Width = (float)widOvrd; return;