From b3ff49c635b5e1632979ca856021db62c488caec Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 16 Sep 2021 11:37:41 +0000 Subject: [PATCH] F2021-026: Double thick line box around Warning Message F2021-025: Remove blank line between last Note/Caution/Warning & bottom box F2021-033: No blank line between HLS and its first sub-step and fix sub-step tabs Add format flags for Barakah (F2021-026, 025 & 033) F2021-026: Draw double thick line box (for Barakah) F2021-025: Remove blank line between last Note/Caution/Warning & bottom box (BNPP1) --- PROMS/Formats/fmtall/BNPP1all.xml | Bin 180690 -> 180984 bytes PROMS/Formats/fmtall/BNPPalrall.xml | Bin 174026 -> 174268 bytes .../Format/PlantFormat.cs | 24 +++++++++++++ PROMS/Volian.Print.Library/vlnBox.cs | 34 +++++++++++++++++- PROMS/Volian.Print.Library/vlnParagraph.cs | 11 ++++++ 5 files changed, 68 insertions(+), 1 deletion(-) diff --git a/PROMS/Formats/fmtall/BNPP1all.xml b/PROMS/Formats/fmtall/BNPP1all.xml index d18ff6cacac30bfcfb13cf251201764898abea34..e6da568395b33e976d019c6db1254d2edcb81e3b 100644 GIT binary patch delta 190 zcmccA%>AR4djlWqqFIlh4JnO?SJ=s5Sl1UPguOKOQmaSxo=1 zg^^|Y2T>-m=?S|S*`|M!Wa67HCC1bs9m0?SG&vb)uM5!pQidd;J5nL0Prj%jJb4{E Z2d52#K7$ibwqkms5tHb47ip%xWdKa%Gv)vQ delta 43 zcmey-%6+MsdjlWqWI0Wq$#N`g%}K1=lUNx$?oQ|1#~85P>M^69#daSVrZvj|OGOVI diff --git a/PROMS/Formats/fmtall/BNPPalrall.xml b/PROMS/Formats/fmtall/BNPPalrall.xml index 638b0fe3531f35c177722831c3f0efbcc156a542..974ca180511070c4b82ad0316abb5e6b715aacae 100644 GIT binary patch delta 142 zcmX?go@>uVt_=Y^=6($M3{DI=42cYR4A~4GKvpq>BaofK;Kq>2Pz22cgVJVyp1H1!3X=ofBquurDovZs$T8U{sA==IATdUS@bsJoKyjgvzUd3* cGqQjbPW{6KQmE8y5YlcC!noZaglSeV0Eiwa9smFU delta 66 zcmdmUk?YiXt_=Y^)7z#n@ok>Q)8{(*TrkIEwh*()2|-;T_T~>k0*p|>Gt&>OVq|Nc Q5!yZ@lyUovP$rdN0I(Pv9{>OV diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index e860c23a..ad21f05f 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1224,6 +1224,22 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _PrintCommonForZeroUnit, "@PrintCommonForZeroUnit"); } } + private LazyLoad _NoBlankHlsAndFirstSub; // F2021-033: Barakah Alarm: no blank line between HLS & first substep + public bool NoBlankHlsAndFirstSub + { + get + { + return LazyLoad(ref _NoBlankHlsAndFirstSub, "@NoBlankHlsAndFirstSub"); + } + } + private LazyLoad _NoBlankLastNoteCautionWarn; // F2021-025: Barakah Alarm: no blank line between last Note/Caution/Warn & box line + public bool NoBlankLastNoteCautionWarn + { + get + { + return LazyLoad(ref _NoBlankLastNoteCautionWarn, "@NoBlankLastNoteCautionWarn"); + } + } } #endregion #region VersionIdText @@ -6409,6 +6425,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _TxtRowAdj, "@TxtRowAdj"); } } + private LazyLoad _ThickDouble; // F2021-026: Barakah single column 2 thick double lines around Warnings + public bool ThickDouble + { + get + { + return LazyLoad(ref _ThickDouble, "@ThickDouble"); + } + } private LazyLoad _BXURC; public string BXURC { diff --git a/PROMS/Volian.Print.Library/vlnBox.cs b/PROMS/Volian.Print.Library/vlnBox.cs index cabc54b8..c5afe49e 100644 --- a/PROMS/Volian.Print.Library/vlnBox.cs +++ b/PROMS/Volian.Print.Library/vlnBox.cs @@ -125,7 +125,13 @@ namespace Volian.Print.Library gapBottomBox -= 3.2f; } if (MyParent.MyItemInfo.MyDocStyle.CenterLineYTop!=null)_MyPageHelper.MyGaps.Add(gapTopBox, gapBottomBox); - if (DefBox != null && DefBox != vlnBox.DOUBLEboxHLS) + // F2021-026: Barakah single column thick double box around Warnings + if (DefBox == null && MyBox.ThickDouble) + { + Volian.Base.Library.BaselineMetaFile.WriteLine("BXDblThick Lf={0} Rt={1} Tp={2} Bt={3}", left, (float)MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth, top, bottom); + DrawDoubleHlsBoxThick(cb, top, bottom, left, (float)MyParent.MyItemInfo.MyDocStyle.Layout.PageWidth); + } + else if (DefBox != null && DefBox != vlnBox.DOUBLEboxHLS) { cb.SetLineWidth(.6F); float lheight = Height; @@ -281,6 +287,32 @@ namespace Volian.Print.Library cb.MoveTo(right - 3.6f, top + lnOff - 3); cb.LineTo(right - 3.6f, bottom +1f); } + // F2021-026: Barakah single column thick double box around Warnings + private static void DrawDoubleHlsBoxThick(PdfContentByte cb, float top, float bottom, float left, float right) + { + float lineThickness = 3; + float lnOff = 1f * vlnPrintObject.SixLinesPerInch; + cb.SetLineWidth(lineThickness); + // top (double line) + cb.MoveTo(left, top + lnOff-4); + cb.LineTo(right, top + lnOff-4); + cb.MoveTo(left + 4.5f, top + lnOff - 8); + cb.LineTo(right - 4.5f, top + lnOff - 8); + // bottom (double line) + cb.MoveTo(left, bottom - 3); + cb.LineTo(right, bottom - 3); + cb.MoveTo(left + 4.5f, bottom+ 1); + cb.LineTo(right - 4.5f, bottom+ 1); + // sides + cb.MoveTo(left + 4.5f, top + lnOff - 6.5f); // inner box + cb.LineTo(left + 4.5f, bottom - 0.5f); + cb.MoveTo(right - 4.5f, top + lnOff - 6.5f); + cb.LineTo(right - 4.5f, bottom - 0.5f); + cb.MoveTo(left, top + lnOff - 2.5f); // outer box + cb.LineTo(left, bottom - 4.5f); + cb.MoveTo(right, top + lnOff - 2.5f); + cb.LineTo(right, bottom - 4.5f); + } private void DrawAsteriskTopBottom(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin, ref float top, ref float bottom, float left, VE_Font vef) { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 2dfa021c..f363f54c 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -5280,6 +5280,17 @@ namespace Volian.Print.Library ItemInfo chld = MyItemInfo.FirstChild(E_FromType.Step); if (chld != null && chld.MyContent.Type == MyItemInfo.MyContent.Type) return 0; } + // F2021-033: No blank line between hls and its first substep: + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankHlsAndFirstSub && MyItemInfo.IsHigh) + { + if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0) return 0; + } + // F2021-025: Barakah single column no blank line between last Note/Caution/Warning text and bottom line of box + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.NoBlankLastNoteCautionWarn && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) + { + if ((MyItemInfo.NextItem == null) || (MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)) return 0; + } + if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; // If the next table child is a figure, equation or a visio drawing add a blank line if (MyItemInfo.Tables != null && MyItemInfo.Tables.Count > 0 && MyItemInfo.Tables[0].MyContent.MyGrid == null) return SixLinesPerInch;