B2020-112: Pagination of complicated AER/RNO

B2020-123: Missing section continue message for Calvert OI & STP
This commit is contained in:
2020-09-03 16:50:54 +00:00
parent eb2fe58740
commit a4395852b6
2 changed files with 53 additions and 12 deletions

View File

@@ -416,6 +416,8 @@ namespace Volian.Print.Library
float yExtra2 = (SixLinesPerInch - MyItemInfo.MyDocStyle.Layout.FooterLength) ?? 0;
if (KeepStepsOnPage && !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PaginateOnLowerStepLevel && ySizeIncludingFirst > yWithinMargins)
KeepStepsOnPage = false;
// B2020-123: Missing section continue message
if (MyParent.CalvertPrintedSubSectTitle) nearTheTop = true;
bool KeepWithHeader = isFirstChild && nearTheTop;
if (BreakHighLevelStepWithSection) KeepWithHeader = true;
// for a HLS that has an asterisk box with the rno separator IN the box, adjust the size by 2 lines to account for box.
@@ -511,8 +513,9 @@ namespace Volian.Print.Library
//yExtra2 -= sectionSpace; // This was removed for Calvert STP O-73H-2 Section 6.3.O.4 and 6.3.R.3
}
}
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && yPageSizeNextPage < yWithinMargins + 3*72 && MyItemInfo.MyPrevious == null)
KeepStepsOnPage = true;
// Added for section that was breaking from steps this code was removed to fix B2020-112
//if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && yPageSizeNextPage < yWithinMargins + 3 * 72 && MyItemInfo.MyPrevious == null)
// KeepStepsOnPage = true;
float mySize7LPI = mySize; // +SixLinesPerInch;
if (_Match16BitPagination) mySize7LPI += SixLinesPerInch;
float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch
@@ -621,6 +624,12 @@ namespace Volian.Print.Library
// (has to be on a new page to compress page). Use calculated value rather than always false in this case.
bool onnewpage = MyItemInfo.MyPrevious == null && (MyItemInfo.MyActiveSection as SectionInfo) != null
&& (MyItemInfo.MyActiveSection as SectionInfo).IsSeparatePagination();
// B2020-123: Missing section continue message, onnewpage needs to be set to true:
if (MyParent.CalvertPrintedSubSectTitle)
{
onnewpage = true;
MyParent.CalvertPrintedSubSectTitle = false;
}
BuildPageBreakList(ySpaceOnFirstPage, yPageSize + yExtra2 + MyPageHelper.PrintedSectionPage, KeepStepsOnPage, yEndMsg, doSectionTitleContinued & SectionShowTitles, onnewpage); // Case 5 - Determine items where page break(s) occur
// ooooo ooooo ooooo .oooooo..o .oooooo..o oooo o8o . .oooooo. .
// `888' `888' `888' d8P' `Y8 d8P' `Y8 `888 `"' .o8 d8P' `Y8b .o8
@@ -1242,7 +1251,8 @@ namespace Volian.Print.Library
//float yTopNew = paraBreak.YTopMost - YTopMost;
if (JustATableThatWillFit(paraBreak, yPageSize - (myTopMsgSpace + yEndMsg)))
paraBreak = paraBreak.ChildrenBelow[0];
float ySpaceOnNextPage1 = yPageSize - (myTopMsgSpace + (yEndMsg == 0 ? SixLinesPerInch : 0)); // Allow for continue message and blank line.
// B2020-112: complicated AER/RNO. yEndMsg was accounted for twice
float ySpaceOnNextPage1 = yPageSize - (myTopMsgSpace); // + (yEndMsg == 0 ? SixLinesPerInch : 0)); // Allow for continue message and blank line.
ySpaceOnNextPage1 -= accountForSmartTemplateHeader;
// This fixes B2016-174:
// Added the check to not go into this code if on a step that needs to break. If the conditions were met, this
@@ -1557,9 +1567,9 @@ namespace Volian.Print.Library
}
// The following lines were added for Comanche Peak ECA-0.1A.SProcedure Steps.S17 (Printed as Step 12)
vlnParagraph myParent = myPara.MyParent;
spaceOnPage = yAddForBtmMsg + yUpperLimit + myPara.YTop + yLocation - myParent.YTop;
if (spaceOnPage > 0 && myParent != lastBreak && myParent.YSize > fullPage && myParent.ChildrenRight != null && myParent.ChildrenRight.Count > 0
&& myParent.ChildrenRight[0].YSize <= fullPage && myParent.ChildrenRight[0].YSize > spaceOnPage
float spaceOnPage1 = yAddForBtmMsg + yUpperLimit + myPara.YTop + yLocation - myParent.YTop;
if (spaceOnPage1 > 0 && myParent != lastBreak && myParent.YSize > fullPage && myParent.ChildrenRight != null && myParent.ChildrenRight.Count > 0
&& myParent.ChildrenRight[0].YSize <= fullPage && myParent.ChildrenRight[0].YSize > spaceOnPage1
// Was not complete, i.e. caused other pagination problems and was put back in: B2019-170: VCS page break causes printing of step on top of next page.
// Note that this bug fix for WCN was commented out. Harry Julian wanted this on 11/15/19. A new bug will be written for the WCN error.
// B2019-173 reintroduced the 'IsHigh' portion and added IsRNOPart, the HLS & RNOPart print at same location on page so code needs