From b874d9e92e0767ca11b1e2e5698a6b2ad39a94ea Mon Sep 17 00:00:00 2001 From: John Date: Mon, 21 Jan 2019 18:19:41 +0000 Subject: [PATCH] B2019-011 Better align the First level sub step tab with the high level step tab --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 14 ++++++++------ PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs | 8 ++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 43bddd0b..140344e4 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -4007,7 +4007,7 @@ namespace VEPROMS.CSLA.Library tbformat = (lv == 0) ? "{numeric}." : "{alpha}."; } bool trimTabStart = false; - + bool dontTrimParentTabBeforeAppending = false; // B2019-011 for Barakah Alarm format if (useSubStepTabs || tbformat.IndexOf("{seq}") > -1) { // If the document style has the flag DSS_UnNumLikeRoman, don't do the normal tab, change to alpha @@ -4037,10 +4037,12 @@ namespace VEPROMS.CSLA.Library itmp = (localPrintLevel + PrintBias + OffsetTab) % seqtabs.MaxIndex; } } - if (!tbformat.Contains(@"{!C")) - tbformat = seqtabs[itmp].PrintTabFormat; // seqtab in 16bit, i.e. '. or )' etc. - else - tbformat = tbformat.Replace("{seq}", seqtabs[itmp].PrintTabFormat); + if (!tbformat.Contains(@"{!C")) + tbformat = seqtabs[itmp].PrintTabFormat; // seqtab in 16bit, i.e. '. or )' etc. + else + tbformat = tbformat.Replace("{seq}", seqtabs[itmp].PrintTabFormat); + dontTrimParentTabBeforeAppending = seqtabs[itmp].DontTrimParentTabBeforeAppending; // B2019-011 put in for Barakah Alarm format to better align the first level sub step with the high level step + string tbtoken = seqtabs[localPrintLevel % seqtabs.MaxIndex].TabToken; // seqstart in 16bit, number/letter // if the tab has a character before the token, trim the front of tab: @@ -4076,7 +4078,7 @@ namespace VEPROMS.CSLA.Library } else if (myparent.IsSection || myparent.IsHigh || myparent.IsSequential || (myparent.IsRNOPart && myparent.FormatStepData.NumberHighLevel && tbformat.ToUpper().Contains("WPAR"))) { - parentTab = myparent.MyTab.CleanText.Trim(); + parentTab = (dontTrimParentTabBeforeAppending) ? myparent.MyTab.CleanText : myparent.MyTab.CleanText.Trim(); // B2019-011 for Barakah Alarm format adde the don't trim flag if ((((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_AddDotZeroStdHLS) == E_DocStructStyle.DSS_AddDotZeroStdHLS) && myparent.MyContent.Type == 20002) || (myparent.IsStepPart && myparent.FormatStepData.AppendDotZero)) // F2018-022 Added step type flag to append a ".0" to the end of the high level step - put in for Westinghouse single column format (wst1), B2018-119 only do this for steps parentTab = parentTab.Replace(".0", ""); // this was added in, remove for substeps. diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index 45a5eb9a..5a2b1cf3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -4324,6 +4324,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _TabFormat, "@PrintTabFormat"); } } + private LazyLoad _DontTrimParentTabBeforeAppending; // B2019-011 for Barakah Alarm format + public bool DontTrimParentTabBeforeAppending + { + get + { + return LazyLoad(ref _DontTrimParentTabBeforeAppending, "@DontTrimParentTabBeforeAppending"); + } + } public override string GetPDDisplayName() { return string.Format("Index [{0}]",Index); } public override string GetPDDescription()