diff --git a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs index 3e6bb315..a89e9835 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs @@ -339,6 +339,16 @@ namespace VEPROMS.CSLA.Library } } [Category("Miscellaneous")] + [Description("Section Special Steps Foldout with white space")] + private LazyLoad _SpecialStepsFoldoutKeepWhiteSpace; + public bool SpecialStepsFoldoutKeepWhiteSpace + { + get + { + return LazyLoad(ref _SpecialStepsFoldoutKeepWhiteSpace, "@SpecialStepsFoldoutKeepWhiteSpace"); + } + } + [Category("Miscellaneous")] [Description("Section Extra Line Header")] private LazyLoad _ExtraLineHeader; public bool ExtraLineHeader diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index f3e055bd..82a246fb 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1332,6 +1332,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _SpecialStepsFoldout, "@SpecialStepsFoldout"); } } + private LazyLoad _SpecialStepsFoldoutKeepWhiteSpace; + public bool SpecialStepsFoldoutKeepWhiteSpace + { + get + { + return LazyLoad(ref _SpecialStepsFoldoutKeepWhiteSpace, "@SpecialStepsFoldoutKeepWhiteSpace"); + } + } private LazyLoad _AllowDuplex; public bool AllowDuplex { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 74335284..953591d1 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -5366,7 +5366,9 @@ namespace Volian.Print.Library private float AdjustForBlankLines() { if (MyParent != null && MyParent.MyItemInfo.FormatStepData != null && MyParent.MyItemInfo.FormatStepData.Type == "TitleWithTextRight") return 0; - if (MyItemInfo.MyDocStyle.SpecialStepsFoldout) return 0; + // F2022-121 added SpecialStepsFoldoutKeepWhiteSpace flag to allow for all of the other special foldout formatting, but + // not compress the page + if (MyItemInfo.MyDocStyle.SpecialStepsFoldout && !MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) return 0; if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Prefix != null && MyItemInfo.FormatStepData.Suffix != null && MyItemInfo.FormatStepData.UseSmartTemplate) return 0; int everyNLines = MyItemInfo.FormatStepData == null ? 1 : MyItemInfo.FormatStepData.StepLayoutData.EveryNLines ?? 1; if (everyNLines == -99) return 0; @@ -5750,7 +5752,10 @@ namespace Volian.Print.Library //return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? SixLinesPerInch : 0); // Only use SpaceIn property for Cautions or Notes bool bSpaceIn = (MyItemInfo.IsCaution || MyItemInfo.IsNote) ? MyItemInfo.FormatStepData.SpaceIn : true; - return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0); + // F2022-121 added SpecialStepsFoldoutKeepWhiteSpace flag to allow for all of the other special foldout formatting, but + // not compress the page - this need to handle explicit OR and AND sub-steps to ensure there are blank lines before and after + // the separator text. + return myHeader.Height + (!MyItemInfo.MyDocStyle.SpecialStepsFoldout || (MyItemInfo.MyDocStyle.SpecialStepsFoldout && MyItemInfo.MyDocStyle.SpecialStepsFoldoutKeepWhiteSpace) || (MyItemInfo.MyDocStyle.ExtraLineHeader && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) ? bSpaceIn ? SixLinesPerInch : 0 : 0); } private float AdjustToCharPosition(float position, float? CPI) {