diff --git a/PROMS/Formats/fmtall/BVPS1all.xml b/PROMS/Formats/fmtall/BVPS1all.xml index af860004..1eaecf8f 100644 Binary files a/PROMS/Formats/fmtall/BVPS1all.xml and b/PROMS/Formats/fmtall/BVPS1all.xml differ diff --git a/PROMS/Formats/fmtall/BVPS2all.xml b/PROMS/Formats/fmtall/BVPS2all.xml index db484426..4808f67d 100644 Binary files a/PROMS/Formats/fmtall/BVPS2all.xml and b/PROMS/Formats/fmtall/BVPS2all.xml differ diff --git a/PROMS/Formats/fmtall/BVPSAOPall.xml b/PROMS/Formats/fmtall/BVPSAOPall.xml index eb9702ca..a45ea4eb 100644 Binary files a/PROMS/Formats/fmtall/BVPSAOPall.xml and b/PROMS/Formats/fmtall/BVPSAOPall.xml differ diff --git a/PROMS/Formats/fmtall/BVPSAtchall.xml b/PROMS/Formats/fmtall/BVPSAtchall.xml index 0f62c455..e6d57503 100644 Binary files a/PROMS/Formats/fmtall/BVPSAtchall.xml and b/PROMS/Formats/fmtall/BVPSAtchall.xml differ diff --git a/PROMS/Formats/fmtall/BVPSSAMGall.xml b/PROMS/Formats/fmtall/BVPSSAMGall.xml index e9c68548..5ca7a9ec 100644 Binary files a/PROMS/Formats/fmtall/BVPSSAMGall.xml and b/PROMS/Formats/fmtall/BVPSSAMGall.xml differ diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index c586773b..4b57bcbc 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -6213,6 +6213,36 @@ public StepData Equation // equation has a parent of embedded object. } } + // F2024-078 adjusts the the spacing before the Note/Caution tab - the space betwee the top of the box and the tab text + private LazyLoad _AdjSpB4Tab; + public float? AdjSpB4Tab + { + get + { + return LazyLoad(ref _AdjSpB4Tab, "@AdjSpB4Tab"); + } + } + + // F2024-078 adjusts the the spacing after the Note/Caution tab - the space betwee the tab text and the first line of of Note/Caution text + private LazyLoad _AdjSpAftTab; + public float? AdjSpAftTab + { + get + { + return LazyLoad(ref _AdjSpAftTab, "@AdjSpAftTab"); + } + } + + // F2024-078 adjusts the the spacing after the last line of Note/Caution text - between the last line of text and the bottom of the box + private LazyLoad _AdjLastBlnkLn; + public float? AdjLastBlnkLn + { + get + { + return LazyLoad(ref _AdjLastBlnkLn, "@AdjLastBlnkLn"); + } + } + // this will adjust the line spacing when an extra thick line is used for a box, so that the text below the box doesn't hit up against the bottom of the box private LazyLoad _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings public bool ThickDouble diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 9c91303f..35d5d787 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -226,6 +226,8 @@ namespace Volian.Print.Library else yoff += vlnPrintObject.SixLinesPerInch; } + if (box.MyBox != null) + yoff += (float)(box.MyBox.AdjSpB4Tab ?? 0); // F2024-078 adjust space above the Note/Caution box tab } bxIndex = bxIndx; } @@ -273,6 +275,8 @@ namespace Volian.Print.Library box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch); if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++; yoff += ln * vlnPrintObject.SixLinesPerInch; + if (box.MyBox != null) + yoff += (float)(box.MyBox.AdjSpB4Tab ?? 0); // F2024-078 adjust space above the Note/Caution box tab } } bxIndex = bxIndx; @@ -5497,24 +5501,53 @@ namespace Volian.Print.Library // code looks up parents to see if they have next before returning a 0 (no blank line) // B2022-042: double Caution followed by Critical Step missing bullet // F2022-010: substeps in multiple notes, cautions, warning print differently - if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn && (MyItemInfo.IsInCautionOrNote)) + if (MyItemInfo.IsInCautionOrNote) { - if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.NextItem == null)) // there are no sub-steps, see if any parents have next + float adjLastBlankLineInNoteCautionWarning = 0; + // Get the box information for the Note, Caution, or Warning + ItemInfo tifo = (MyItemInfo.IsCaution || MyItemInfo.IsNote) ? MyItemInfo : MyItemInfo.ParentNoteOrCaution; + int typ = ((int)tifo.MyContent.Type) % 10000; + int? bxIndx = tifo.ActiveFormat.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex; + if (bxIndx != null) { - ItemInfo par = MyItemInfo.MyParent; - while (par.IsInCautionOrNote) // while in the caution or note, see if there is anything below this item - { - // if there is no next item, or content types are different, go up to see if the parent has any next item. If note - // keep going up tree, otherwise there is a next so don't return 0, i.e. continue on with code to determine - // whether there is a blank line - if ((par.NextItem == null) || (par.MyContent.Type != par.NextItem.MyContent.Type)) par = par.MyParent; - else break; - } - if (!par.IsInCautionOrNote || (par != null && par.MyContent.Type != par.NextItem.MyContent.Type)) return 0; + Box bx = tifo.ActiveFormat.PlantFormat.FormatData.BoxList[(int)bxIndx]; + // F2024-078 save the adjustment of the last blank line - this value will be added to the SixLinesPerInch value (a blank line) + adjLastBlankLineInNoteCautionWarning = (float)(bx.AdjLastBlnkLn ?? 0); + } + //} + // if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn && (MyItemInfo.IsInCautionOrNote)) + // F2024-078 added check for adjustment of the last blank line in the Note/Caution box + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn || adjLastBlankLineInNoteCautionWarning != 0) + { + if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.NextItem == null)) // there are no sub-steps, see if any parents have next + { + ItemInfo par = MyItemInfo.MyParent; + while (par.IsInCautionOrNote) // while in the caution or note, see if there is anything below this item + { + // if there is no next item, or content types are different, go up to see if the parent has any next item. If note + // keep going up tree, otherwise there is a next so don't return 0, i.e. continue on with code to determine + // whether there is a blank line + if ((par.NextItem == null) || (par.MyContent.Type != par.NextItem.MyContent.Type)) par = par.MyParent; + else break; + } + if (!par.IsInCautionOrNote || (par != null && par.MyContent.Type != par.NextItem.MyContent.Type)) + { + if (adjLastBlankLineInNoteCautionWarning != 0) + return SixLinesPerInch + adjLastBlankLineInNoteCautionWarning; // F2024-078 adjust the size of the last blank line of Note/Caution box + else + return 0; // no blank line after last text line of Note/Caution/Warning + } + } + if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && MyItemInfo.NextItem != null && MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type) + { + if (adjLastBlankLineInNoteCautionWarning != 0) + return SixLinesPerInch + adjLastBlankLineInNoteCautionWarning; + else + return 0; // no blank line after last text line of Note/Caution/Warning + } } - if ((MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && MyItemInfo.NextItem != null && MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type) return 0; } - if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; + if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; // B2022-003: BNPP Alarms (BNPPalr) - incorrect line spacing for substeps off substeps. Added a format flag so as not to affect other plants. if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepPrintData != null && MyItemInfo.FormatStepData.StepPrintData.BlankAfterSubWithSub && MyItemInfo.NextItem != null && MyItemInfo.HasChildren && MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0) return SixLinesPerInch; @@ -5797,6 +5830,7 @@ namespace Volian.Print.Library float hdrWidth = (itemInfo.MyHeader.CleanText == null) ? 0 : itemInfo.MyHeader.CleanText.Length * 6; int typ = ((int)itemInfo.MyContent.Type) % 10000; int? bxIndx = formatInfo.PlantFormat.FormatData.StepDataList[typ].StepLayoutData.STBoxindex; + float adjmentAfterBoxedNoteCautionTab = 0; // F2024-078 used to save the adjustment of the space after the Note/Caution tab if (itemInfo.MyHeader.Justify == System.Drawing.ContentAlignment.MiddleCenter) { @@ -5806,7 +5840,8 @@ namespace Volian.Print.Library if (bx.TabPos > 0) xoff += (float)bx.TabPos; // xoff starts as left margin else - xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin + xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin + adjmentAfterBoxedNoteCautionTab = (float) (bx.AdjSpAftTab ?? 0); // F2024-078 save the adjustment of the space (line) after the Note/Caution tab } else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && itemInfo.IsInRNO && (itemInfo.IsCaution || itemInfo.IsNote)) // C2014-009 xoff = XOffset + (para.Width / 2) - (hdrWidth / 2); @@ -5841,7 +5876,7 @@ namespace Volian.Print.Library // F2022-121 added SpecialStepsFoldoutKeepWhiteSpace flag to allow for all of the other special foldout formatting, but // not compress the page - this need to handle explicit OR and AND sub-steps to ensure there are blank lines before and after // the separator text. - return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.SpecialStepsFoldout && MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0); + return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.SpecialStepsFoldout && MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0) + adjmentAfterBoxedNoteCautionTab; // F2024-078 add adjustment to the space after the Note/Caution tab } private float AdjustToCharPosition(float position, float? CPI) {