From 61ef1d4b4003e06576bcbfba996e4458e55a7a95 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 30 Oct 2019 15:08:54 +0000 Subject: [PATCH] C2019-040 added a format flag to adjust text width when a checkoff is used but not a checkoff header. C2019-040 added a format flag to existing logic that will adjust text width when a checkoff is used on at least one step element, but a checkoff header is not being used --- PROMS/Formats/fmtall/WCN1all.xml | Bin 95512 -> 95572 bytes .../Format/PlantFormat.cs | 10 ++++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 11 +++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/PROMS/Formats/fmtall/WCN1all.xml b/PROMS/Formats/fmtall/WCN1all.xml index 1d438930f62dd63b0559c5923c7b2670e0bee802..f269d1414fb17ed2da0481de38df3d5b6c42c66e 100644 GIT binary patch delta 80 zcmbR7iuKAX)(zMACtL9IDCRSy0bwyiI722w2}1@$K0_&x_Fzb5NMuL>l0}mjM$1o@ h5s;buOHgcbLJ-U31p+#gCj_!J`w49K6JR`*0s!Fj7-j$f delta 34 qcmcceigm^-)(zMAC$DQ2nCvGcFj-EJV{(B2OS7H8b~^z^u~Y#4Tnp>~ diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index 4a7c3b70..b8f63e86 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1891,6 +1891,16 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _CheckoffOnSubStepsOnly, "@CheckoffOnSubStepsOnly"); } } + // C2019-040 This will adjust the right margin (making room for the checkoff) without the need of selecting a checkoff header + // the flag allows us to use existing coding that prior to this was restricted by format file name + private LazyLoad _CheckoffsWithoutHeader; + public bool CheckoffsWithoutHeader + { + get + { + return LazyLoad(ref _CheckoffsWithoutHeader, "@CheckoffsWithoutHeader"); + } + } } #endregion #region CheckOff diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 328490a8..f9525e35 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -6227,7 +6227,8 @@ namespace Volian.Print.Library { float CheckOffAdj = 0; bool ChkOff = itemInfo.MyDocStyle.UseCheckOffs; - if (itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert || itemInfo.ActiveFormat.Name.ToUpper().StartsWith("VCB")) + // C2019-040 use format flag to see if any of the steps in this section have a checkoff set - previously we check if the format file name starts with VCB (VCB no longer a customer) + if (itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert || itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckoffsWithoutHeader) { SectionInfo si = itemInfo.ActiveSection.GetSectionInfo(); ChkOff = si.HasInitials; // this determines if any steps within the section have checkoffs. @@ -6240,7 +6241,8 @@ namespace Volian.Print.Library FmtHasAdj = true; CheckOffAdj = -(float)formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffAdjustment; } - if (!itemInfo.ActiveFormat.Name.ToUpper().StartsWith("VCB")) // Don't do the following if in a vcb format (part of fix F2016-039) + // C2019-040 use format flag to not readjust the CheckOffAdj value - previously we check if the format file name starts with VCB (VCB no longer a customer) + if (!itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckoffsWithoutHeader) // Don't do the following if in a vcb format (part of fix F2016-039) { if (!HasCheckOffHeading(itemInfo, formatInfo) && CheckOffAdj < 0) CheckOffAdj += (float)(9 * 7.2); // 9 is the size of the SIGNOFF adjustment @@ -6421,8 +6423,9 @@ namespace Volian.Print.Library SectData sd = formatInfo.PlantFormat.FormatData.SectData; if (((itemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_SameXOffSubsections) == E_DocStructStyle.DSS_SameXOffSubsections)) { - // don't adjust the width if there already was an adjustment for checkoffs - for VCB only (F2016-039) - if (!(itemInfo.ActiveFormat.Name.ToUpper().StartsWith("VCB") && coadj)) + // don't adjust the width if there already was an adjustment for checkoffs - for VCB only (F2016-039) - VCB no longer a customer + // C2019-040 use format flag to adjust the width (was already don for checkoffs) - previously we check if the format file name starts with VCB (VCB no longer a customer) + if (!(itemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckoffsWithoutHeader && coadj)) adjwidth = MyTab != null ? -MyTab.Width : 0; } else if (sd.UseMetaSections)