C2023-015: Pagination on sub-step (currently only for Vogtle 3_4)

This commit is contained in:
2023-09-12 06:56:48 -04:00
parent 3a6b1adc47
commit e4af381d0c
4 changed files with 63 additions and 6 deletions

View File

@@ -99,13 +99,15 @@ namespace Volian.Print.Library
}
return retval;
}
else if (MyItemInfo.MyDocStyle.SupplementalInformation && MyItemInfo.IsStep)
// C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination
else if ((MyItemInfo.MyDocStyle.SupplementalInformation || MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination) && MyItemInfo.IsStep)
{
// if this is the first caution or note from a substep, if the substep has preferred page break, break at the first caution or note:
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && MyItemInfo.MyParent.IsSubStep)
{
StepConfig scs = MyItemInfo.MyParent.MyConfig as StepConfig;
if (MyItemInfo.MyPrevious == null && scs.Step_PreferredPagebreak)
// C2023-015: Pagination on a sub-step added on this check
if (MyItemInfo.MyPrevious == null && (scs.Step_PreferredPagebreak || scs.Step_SubStepPagebreak))
{
// B2018-103: The following flags a break within the step. Before returning a '2' (flags break within step), clear it out of the
// ParaBreaks. Without the 'RemoveAt', a page break will occur after this step also.
@@ -120,7 +122,7 @@ namespace Volian.Print.Library
}
// Now see if there is a preferred page break on this step.
StepConfig sci = MyItemInfo.MyConfig as StepConfig;
if (sci.Step_PreferredPagebreak)
if (sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak)
{
if (MyItemInfo.IsHigh) return 1;
// if this is the top caution/note return 1 also. Cautions always are first, that is why the check does not need to know if on a
@@ -1472,7 +1474,8 @@ namespace Volian.Print.Library
// substep with preferred page break (B2017-109)
private SortedList<float, vlnParagraph> GetMyPreferredBreaks(StepLevelList myList)
{
if (!MyItemInfo.MyDocStyle.SupplementalInformation) return null;
// C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination
if (!MyItemInfo.MyDocStyle.SupplementalInformation && !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination) return null;
SortedList<float, vlnParagraph> sdpara = null;
foreach (int stepLevel in myList.Keys) // loop thru StepLevels, starting with lowest.
{
@@ -1480,7 +1483,7 @@ namespace Volian.Print.Library
{
vlnParagraph myPara = myList[stepLevel][yLocation];
StepConfig sci = myPara.MyItemInfo.MyConfig as StepConfig;
if (sci != null && sci.Step_PreferredPagebreak)
if (sci != null && sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak)
{
if (sdpara == null) sdpara = new SortedList<float, vlnParagraph>();
if (myPara.ChildrenAbove != null && myPara.ChildrenAbove.Count > 0) sdpara.Add(-yLocation, myPara.ChildrenAbove[0]);