F2022-121 added flag SpecialStepsFoldoutKeepWhiteSpace to prevent the compression of a SpecialStepsFoldout section

F2022-121 added logic to support SpecialStepsFoldoutKeepWhiteSpace to prevent the compression of a SpecialStepsFoldout section
This commit is contained in:
John Jenko 2022-12-12 18:55:05 +00:00
parent f07fedd3ee
commit 78937b719a
3 changed files with 25 additions and 2 deletions

View File

@ -339,6 +339,16 @@ namespace VEPROMS.CSLA.Library
}
}
[Category("Miscellaneous")]
[Description("Section Special Steps Foldout with white space")]
private LazyLoad<bool> _SpecialStepsFoldoutKeepWhiteSpace;
public bool SpecialStepsFoldoutKeepWhiteSpace
{
get
{
return LazyLoad(ref _SpecialStepsFoldoutKeepWhiteSpace, "@SpecialStepsFoldoutKeepWhiteSpace");
}
}
[Category("Miscellaneous")]
[Description("Section Extra Line Header")]
private LazyLoad<bool> _ExtraLineHeader;
public bool ExtraLineHeader

View File

@ -1332,6 +1332,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _SpecialStepsFoldout, "@SpecialStepsFoldout");
}
}
private LazyLoad<bool> _SpecialStepsFoldoutKeepWhiteSpace;
public bool SpecialStepsFoldoutKeepWhiteSpace
{
get
{
return LazyLoad(ref _SpecialStepsFoldoutKeepWhiteSpace, "@SpecialStepsFoldoutKeepWhiteSpace");
}
}
private LazyLoad<bool> _AllowDuplex;
public bool AllowDuplex
{

View File

@ -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)
{