From 37269da828a6cd2ef54053181d2c58376390d2cc Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 13 Aug 2013 12:06:28 +0000 Subject: [PATCH] --- .../Volian.Print.Library/VlnSvgPageHelper.cs | 21 +++++++++++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 23 ++++++++++++++----- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index d3b57ea5..ad7215e8 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -1062,6 +1062,27 @@ namespace Volian.Print.Library DidHLSText = true; plstr = plstr.Replace(token, HLSText); break; + case "{PROCDES}": + ProcDescrList pdl = section.ActiveFormat.PlantFormat.FormatData.PrintData.ProcDescrList; + if (pdl != null && pdl.Count > 0) + { + string procnum = section.MyProcedure.MyContent.Number; + foreach (ProcDescr pd in pdl) + { + string matchStr = (pd.MatchProcNumber.StartsWith("*}"))?pd.MatchProcNumber.Substring(2):pd.MatchProcNumber; + if (procnum.Contains(matchStr)) + { + plstr = pd.ProcDescr1; + break; + } + if (pd.MatchProcNumber == "@") + { + plstr = pd.ProcDescr1; + break; + } + } + } + break; default: if (token.Contains(@"RO-")) { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 9d62bbbf..e8035ce8 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1187,7 +1187,7 @@ namespace Volian.Print.Library // if this is the High Level RNO step (MyTopRNO) and we are numbering the RNO, adjust the xoffset to start the tab // at the x location rather than starting the text at the x location: AdjustWidth(itemInfo, maxRNO, formatInfo, mytab); - bool adjustAgain = true; + bool adjustAgain = itemInfo.MyTab.Position == 0 ? true : false; if (!itemInfo.IsSection && itemInfo.FormatStepData.NumberHighLevel && itemInfo.IsRNOPart && (MyTopRNO == null || itemInfo.ItemID == MyTopRNO.MyItemInfo.ItemID)) { // adjust the x-offset of the RNO to include the tab. @@ -1207,11 +1207,11 @@ namespace Volian.Print.Library XOffset += inc; adjustAgain = false; } - else + else if (mytab != null) { - mytab.XOffset += mytab.Width; - XOffset = mytab.XOffset + mytab.Width; - } + mytab.XOffset += mytab.Width; + XOffset = mytab.XOffset + mytab.Width; + } } if(adjustAgain) AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj); @@ -1787,6 +1787,7 @@ namespace Volian.Print.Library if (MyItemInfo.MyDocStyle.SpecialStepsFoldout) return 0; if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Prefix != null && MyItemInfo.FormatStepData.Suffix != null && MyItemInfo.FormatStepData.UseSmartTemplate) return 0; int everyNLines = MyItemInfo.FormatStepData == null ? 1 : MyItemInfo.FormatStepData.StepLayoutData.EveryNLines ?? 1; + if (everyNLines == -99) return 0; if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; // Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet. //if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; @@ -2255,6 +2256,11 @@ namespace Volian.Print.Library if (myTab.MyMacro != null) myTab.MyMacro.XOffset += xoff; } } + else + { + if (itemInfo.MyDocStyle.AlignHLSTabWithSect) + XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos; + } } } else if (((colOvrd ?? 0) != 0) && formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.NullBox) @@ -2342,7 +2348,12 @@ namespace Volian.Print.Library } } } - // FNP tabbing '#2#' and '#1#', not fully tested: XOffset -= itemInfo.MyTab.Offset; + if (itemInfo.MyTab != null && itemInfo.MyTab.Offset != 0) + { + myTab.XOffset -= itemInfo.MyTab.Offset; + XOffset -= itemInfo.MyTab.Offset; + Width += itemInfo.MyTab.Offset; + } } private static float GetLeftJustify(FormatInfo formatInfo, int indxLevels)