From 9e33d021ebaf2566534976379ed8d0ff445a8c4a Mon Sep 17 00:00:00 2001 From: John Date: Tue, 10 Aug 2021 16:51:45 +0000 Subject: [PATCH] B2019-158 Added logic to support the format flag to turn off the bolding of the sub-section header. Used in the Barakah Single Column Format. --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 476d2daf..d74d00ab 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3033,10 +3033,17 @@ namespace VEPROMS.CSLA.Library font = format.PlantFormat.FormatData.Font; break; case 1: // section - if (format.PlantFormat.FormatData.SectData.SectionHeader.OnlyUnderlineTopSect && MyParent.IsSection) + // B2019-158 Added the OnlyBoldTopSect format flag to control whether the sub-section heading are bolded + // The following logic will turn off the Bolding and/or underlining of sub-section headings + // This logic assumes that the top section header is both bolded and underlined + if ((format.PlantFormat.FormatData.SectData.SectionHeader.OnlyUnderlineTopSect || format.PlantFormat.FormatData.SectData.SectionHeader.OnlyBoldTopSect) && MyParent.IsSection) { VE_Font hdrFont = format.PlantFormat.FormatData.SectData.SectionHeader.Font; - E_Style es = (E_Style)(hdrFont.Style & E_Style.Bold); + E_Style es = (E_Style)hdrFont.Style; + if (format.PlantFormat.FormatData.SectData.SectionHeader.OnlyUnderlineTopSect) + es = es & E_Style.Bold; // only keep the underline (turn off the bold) + if (format.PlantFormat.FormatData.SectData.SectionHeader.OnlyBoldTopSect) + es = es & E_Style.Underline; // only keep the bold (turn off underline) font = new VE_Font(hdrFont.Family, (int)hdrFont.Size, es, (float)hdrFont.CPI); } else