From c0d8d17a91066de77f8cec4f08eadb121685c8db Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 30 Sep 2021 13:32:45 +0000 Subject: [PATCH] F2021-042: BNPP1 Order of Notes, Cautions, Warnings, etc --- PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs | 9 +++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index ad21f05f..d3933be3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -5243,6 +5243,15 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _CenterOneLineOnly, "@CenterOneLineOnly"); } } + // F2021-042: Added FormatStepData.AlwaysCenter for BNPP1 - Critical Step text always must be centered + private LazyLoad _AlwaysCenter; + public bool AlwaysCenter + { + get + { + return LazyLoad(ref _AlwaysCenter, "@AlwaysCenter"); + } + } private LazyLoad _SubTableGetsUp1Level; public bool SubTableGetsUp1Level { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index f363f54c..690cade4 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1019,7 +1019,9 @@ namespace Volian.Print.Library // Check if only one line, i.e. "Height < (1.2F * IParagraph.Leading". The Leading can be for six or seven lines per inch, so the 1.2 // multiplier accounts for both. // B2021-091 added a null reference check - MyItemInfo was a section and didn't have FormatStepData - if (!MyItemInfo.IsStepSection && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.CenterOneLineOnly && ((MyItemInfo.MyPrevious == null && MyItemInfo.NextItem == null) || MyItemInfo.FormatStepData.SeparateBox || doAlign) && Height < (1.2F * IParagraph.Leading)) + // F2021-042: Added FormatStepData.AlwaysCenter for BNPP1 - Critical Step text always must be centered + if (!MyItemInfo.IsStepSection && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.CenterOneLineOnly && ((MyItemInfo.MyPrevious == null && MyItemInfo.NextItem == null) + || MyItemInfo.FormatStepData.SeparateBox || doAlign || MyItemInfo.FormatStepData.AlwaysCenter) && Height < (1.2F * IParagraph.Leading)) IParagraph.Alignment = Element.ALIGN_CENTER; // if this step is centered, but not part of the checklist or valvelist format, use itextsharp to center it. // if it was part of the checklist or valvelist, then the centering is based on the column definitions for the table and