From 3534b9bca0bc4082d61f560d7aee7f7445427bce Mon Sep 17 00:00:00 2001 From: John Date: Fri, 5 Oct 2012 14:59:20 +0000 Subject: [PATCH] implemented the UsesSTExtraRealValue flag B2012-188 - added logic for the PREDELIMEOPNUM pagelist token. --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 10 ++++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 4bd7e8c2..14cc9a46 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -729,10 +729,20 @@ namespace Volian.Print.Library //SplitTitle(svgGroup, pageItem, section.MyProcedure.MyContent.Text, (int)section.ActiveFormat.PlantFormat.FormatData.ProcData.TitleLength, token); break; case "{EOPNUM}": + case "{PREDELIMEOPNUM}": string eopnum = section.MyProcedure.MyContent.Number; string unitnum = MySection.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber; if (unitnum.Length > 0) eopnum = unitnum.Replace("#", eopnum); + if (match.Value.Equals("{PREDELIMEOPNUM}")) + { + // only use up to the first non-alphanumeric character of the procedur number + // Prairie Island (NSP) Alarms use this token + int idx = 0; + while (idx < eopnum.Length && char.IsLetterOrDigit(eopnum[idx])) idx++; + if (idx < eopnum.Length) + eopnum = eopnum.Substring(0, idx); + } plstr = plstr.Replace(token, eopnum); //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, eopnum))); //svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.MyProcedure.MyContent.Number))); diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 3608ef92..68583317 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -962,7 +962,8 @@ namespace Volian.Print.Library float addExtraSpace = (MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0; // If a high level step, the 16bit code uses the value of the extra space // from the high level step format regardless of what type of high level step it is: - if (MyItemInfo.IsHigh) + // Added check for UseSTExtraRealValue, if set, we want to use what is set for the specific step type + if (!MyItemInfo.ActiveFormat.MyStepSectionLayoutData.UseSTExtraRealValue && MyItemInfo.IsHigh) addExtraSpace = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[2].StepLayoutData.STExtraSpace ?? 0; if (addExtraSpace > 0) this.PartsAbove.Add(new vlnText(cb, this, " ", " ", 0, yoff, MyItemInfo.FormatStepData.Font)); yoff += addExtraSpace;