From 43a1df66d0935e9a7177aa59f321085b557611cb Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 12 Jan 2022 15:29:45 +0000 Subject: [PATCH] B2022-002: BNPP1new - Step and section text printing into the INITIAL column --- PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs | 9 +++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index e3a0a9ea..c15dfc36 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -2659,6 +2659,15 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _TurnOffReplaceWords, "@TurnOffReplaceWords"); } } + // B2022-002: Section text is printing into the INITIAL column (BNPP1new) + private LazyLoad _AdjWidthForCheckOff; + public bool AdjWidthForCheckOff + { + get + { + return LazyLoad(ref _AdjWidthForCheckOff, "@AdjWidthForCheckOff"); + } + } } #endregion #region SectionNumber diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 3190dee7..4629d79d 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -6507,6 +6507,15 @@ namespace Volian.Print.Library Width = Width + (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos; else if (itemInfo.MyDocStyle.AlignHLSTabWithSect) Width = Width - (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos; + + // B2022-002: Section text is printing into the INITIAL column (BNPP1new). If this flag is set adjust the width of the + // section text to that of the first hls (child) text and its tab. This is to prevent the very long section titles (that should have + // been steps) from extending into the INITIAL (checkoff) column. + if (formatInfo.PlantFormat.FormatData.SectData.AdjWidthForCheckOff && MyParent != null && MyParent.MyItemInfo.IsSection && ChkOff && CheckOffWidth != 0 && itemInfo.ItemID == itemInfo.FirstSibling.ItemID) + { + SectionInfo si = MyParent.MyItemInfo.GetSectionInfo(); + if (si.HasInitials) MyParent.Width = Width + ((myTab == null) ? 0 : myTab.Width); + } } else if (bxIndx != null) {