From 738a726e6b856b14052383cbb9cf4903cd42bb7a Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 24 Aug 2022 16:10:05 +0000 Subject: [PATCH] F2021-038: Lessen line spacing around Notes/Cautions; widen Caution box to make it consistent with Note F2021-038: SHE/SHEA Lessen line spacing around Notes/Cautions; widen Caution box to make it consistent with Note --- PROMS/Formats/fmtall/SHEAall.xml | Bin 78396 -> 78500 bytes PROMS/Formats/fmtall/SHEall.xml | Bin 78390 -> 78496 bytes .../Format/PlantFormat.cs | 8 +++++ PROMS/Volian.Print.Library/vlnBox.cs | 5 ++- PROMS/Volian.Print.Library/vlnParagraph.cs | 33 ++++++++++++++---- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/PROMS/Formats/fmtall/SHEAall.xml b/PROMS/Formats/fmtall/SHEAall.xml index bceb48f7aafa0ec5e741ff8a19bcc41bb414f252..8e6d81cb58f87d11893e814ea7ee13ab54de3bb3 100644 GIT binary patch delta 380 zcmdnd2>=>BVW$89 delta 242 zcmZ4Tlx5EomJL6cCZEgX+w8@hrYz{lki$^UkjPNUP|Oet#HrI4N-_#hcFGcx4Pr=T zNMR^tNCwhA44DjhK-!TZjiCfc7frs%B|OAkRT9_a1xf!ldnH6&0sw9oOiTa( diff --git a/PROMS/Formats/fmtall/SHEall.xml b/PROMS/Formats/fmtall/SHEall.xml index cc1c297bfab09efa844d56b84ae8d0e2463a9d02..d7b0c19494511cc3d14c9f954c3160c9bce5adf9 100644 GIT binary patch delta 335 zcmdn?gk`}~mJN%Toc$Q`8Jrk$7!n!s7_u3BfOIiK2?I#9gdvr|8OSdMvND1EJce)} zuLwxnGAJ>G09mC#6-o>Wo98o?D^E7l)|wo~$EOI=8VNMAg29m?g&_;52xK6VmdOtV zgeUp(Y(AmJ#X_>K$tTp3CdY}eZGNM@fLB}r>`)BbCSP<2-F(S1g$b{M8XFD#3SQZL XW5i{`=8F!dvXeK&S8T3}+i@8H60lXo delta 245 zcmZ4Rlx5o!mJN%TCeQNc+5CkmLs`&~A%~%yA(5eyp_m~Qh*KvY{3Sd&iBCv9h#{3B zg`t!o8A$suWHRIdX-9@Mh7urM#9+&y#1I0cODA8~GMxO)Rci7DJ+8@iN>Y;xv^^&8 zaS@qZU}Q7-lu_2^59;rjsBg{Y0_}Ian_DbbF>Ma9$zz&a=Hj+l&;A?ZBsYOc>SmiK PI6jbJG}v4ir+) _NoYBxAdjust; // F2021-038: SHE/SHEA less space after top line & before bottom line + public bool NoYBxAdjust + { + get + { + return LazyLoad(ref _NoYBxAdjust, "@NoYBxAdjust"); + } + } //private LazyLoad _SeparateWarning; // KBR: To be used for Proms Express to separate out warnings from notes/cautions on ribbon, etc //public bool SeparateWarning //{ diff --git a/PROMS/Volian.Print.Library/vlnBox.cs b/PROMS/Volian.Print.Library/vlnBox.cs index 4af282d1..4ea37c80 100644 --- a/PROMS/Volian.Print.Library/vlnBox.cs +++ b/PROMS/Volian.Print.Library/vlnBox.cs @@ -217,7 +217,10 @@ namespace Volian.Print.Library lineThickness = 3; cb.SetLineWidth(lineThickness); // use a Y adjustment (top & bottom) to make the caution box match the 16bit output. - float YbxAdjust = 6.5F; + + // F2021-038: SHE/SHEA format - Less space between text and bottom line of Caution Box + float YbxAdjust = (MyParent.MyItemInfo.IsStep && MyParent.MyItemInfo.FormatStepData.NoYBxAdjust) ? 0 : 6.5F; + // C2018-004 create meta file for baseline compares Volian.Base.Library.BaselineMetaFile.WriteLine("BXFPLCn Lf={0} Bt={1} W={2} H={3}", left + llxOffset, bottom - YbxAdjust + (lineThickness / 2), right - left, (Height - lineThickness + 2 * YbxAdjust) * MyPageHelper.YMultiplier); cb.Rectangle(left + llxOffset, bottom - YbxAdjust + (lineThickness / 2), right - left, (Height - lineThickness + 2*YbxAdjust) * MyPageHelper.YMultiplier); diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 6993ea23..c7a8b452 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -231,6 +231,7 @@ namespace Volian.Print.Library if (bxIndx != null && (handleSeparateBox || bxIndex != bxIndx || doSeparateBoxHdrChg)) { + bool didSeparateBoxChgYAdjust = false; if (box != null) { box.Height = yoff - box.YOffset; // new height, with children @@ -250,11 +251,16 @@ namespace Volian.Print.Library // to add an extra line after note box. else if (formatInfo.Name.ToUpper().StartsWith("FNP") && childItemInfo.MyPrevious != null && childItemInfo.MyPrevious.IsNote && childItemInfo.IsCaution) yoff += vlnPrintObject.SixLinesPerInch * 2; - else if (doSeparateBoxHdrChg) + else if (doSeparateBoxHdrChg) // F2021-038: SHE/SHEA format - Less space after boxes (removes it below) + { + didSeparateBoxChgYAdjust = true; yoff += vlnPrintObject.SixLinesPerInch * 2; + } } box = new vlnBox(); box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx]; + // F2021-038: SHE/SHEA format - Less space after boxes + if (didSeparateBoxChgYAdjust && childItemInfo.IsStep && childItemInfo.FormatStepData.NoYBxAdjust) yoff -= vlnPrintObject.SixLinesPerInch; int ln = 1; // a format flag determines whether there is a space before the note/caution. //if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++; if (childItemInfo.MixCautionNotesDiffType()) ln += 2; @@ -552,7 +558,9 @@ namespace Volian.Print.Library if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin)) { yPageStart += ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0); - if ((MyItemInfo.Cautions != null && MyItemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (MyItemInfo.Notes != null && MyItemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines)) + // F2021-038: SHE/SHEA format - Less space after boxes: the AlwaysUseExtyraLines was removed in SHE/SHEA format, but the + // following adjustment to the y location of HLS when AT TOP of page is still needed, i.e. added the NoYBxAdjust check which is SHE/SHEA specific + if ((MyItemInfo.Cautions != null && (MyItemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines || MyItemInfo.Cautions[0].FormatStepData.NoYBxAdjust)) || (MyItemInfo.Notes != null && (MyItemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines || MyItemInfo.Notes[0].FormatStepData.NoYBxAdjust))) yPageStart -= ((MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0); } // Save the HLS & RNO string in case the pagelist item uses it (some of the backgrounds): @@ -3927,14 +3935,27 @@ namespace Volian.Print.Library if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove && (!MyItemInfo.IsNote || MyItemInfo.MyParent.Cautions == null)) addExtraSpace = 24; // already has one blank line above, added two more - //if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0) - // addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace; - // if this plant has the AlwaysUseExtraLines and there are notes/cautions above the hls, don't add in the - // extra space: + //if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0) + // addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace; + // if this plant has the AlwaysUseExtraLines and there are notes/cautions above the hls, don't add in the + // extra space: if (itemInfo.IsHigh && (itemInfo.Cautions != null || itemInfo.Notes != null)) { if ((itemInfo.Cautions != null && itemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (itemInfo.Notes != null && itemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines)) addExtraSpace = 0; + // F2021-038: SHE/SHEA format - Less space after boxes + if (itemInfo.Cautions != null && itemInfo.Cautions[itemInfo.Cautions.Count - 1].FormatStepData.NoYBxAdjust) + addExtraSpace = 0; + if (itemInfo.Notes != null && itemInfo.Notes[itemInfo.Notes.Count - 1].FormatStepData.NoYBxAdjust) + addExtraSpace = 0; + } + // F2021-038: SHE/SHEA format - Less space after boxes. The following is for when a HLS has an RNO that has Cautions/Notes + if (itemInfo.IsHigh && itemInfo.RNOs != null) + { + if (itemInfo.RNOs[0].Notes != null && itemInfo.RNOs[0].Notes[0].FormatStepData.NoYBxAdjust) + addExtraSpace = 0; + if (itemInfo.RNOs[0].Cautions != null && itemInfo.RNOs[0].Cautions[0].FormatStepData.NoYBxAdjust) + addExtraSpace = 0; } if (addExtraSpace > 0 && MyItemInfo.FormatStepData != null) {