B2018-080 Don't break if HLS and High Level RNO each have one line of text and there are substeps (keep single line HSL and High Level RNO with their substeps)

B2018-080 NULL reference fix (was preventing a procedure from being printed)
This commit is contained in:
John Jenko 2018-05-24 14:50:22 +00:00
parent a252b4da5b
commit 6967c42baf
2 changed files with 5 additions and 4 deletions

View File

@ -199,7 +199,7 @@ namespace Volian.Print.Library
} }
// B2018-015 Pagination Issue VCS EOP-15.0 Step 15 - Handle when RNO is exactly aligned with the AER column // B2018-015 Pagination Issue VCS EOP-15.0 Step 15 - Handle when RNO is exactly aligned with the AER column
// B2018-065 Calvert's continue message was not including the substep number in AOP-1A Attachment 1, added AERandRNO check // B2018-065 Calvert's continue message was not including the substep number in AOP-1A Attachment 1, added AERandRNO check
else if (!MyPageHelper.ParaBreaks[0].PageBreakOnStep && this.YTopMost >= MyPageHelper.ParaBreaks[0].YTopMost && AERandRNO(this.MyItemInfo,MyPageHelper.ParaBreaks[0].MyItemInfo)) else if (!MyPageHelper.ParaBreaks[0].PageBreakOnStep && this.YTopMost >= MyPageHelper.ParaBreaks[0].YTopMost && AERandRNO(this.MyItemInfo, MyPageHelper.ParaBreaks[0].MyItemInfo))
{ {
MyPageHelper.ParaBreaks.RemoveAt(0); MyPageHelper.ParaBreaks.RemoveAt(0);
reason = AddReason("Partial Step - Case 4"); reason = AddReason("Partial Step - Case 4");
@ -570,8 +570,9 @@ namespace Volian.Print.Library
//} //}
//float yWithinMarginsCM = yWithinMargins - myBottomMsgSpace; //float yWithinMarginsCM = yWithinMargins - myBottomMsgSpace;
//// **** Adjust yWithinMargins for the bottom continue message //// **** Adjust yWithinMargins for the bottom continue message
if (KeepWithHeader ||( !ManualPageBreak && ((MyItemInfo.ActiveFormat.MyStepSectionLayoutData.SpecialPageBreakFlag && yWithinMargins > yPageSize / 2 && // B2018-080 Don't break if HLS and High Level RNO each have one line of text and there are substeps (keep single line HSL and High Level RNO with their substeps) AEP AOP Unit 1 016-004 steps 36 & 74
myFirstPieceSize < yWithinMargins) || KeepStepsOnPage))) if (myFirstPieceSize > 2 * SixLinesPerInch && (KeepWithHeader || (!ManualPageBreak && ((MyItemInfo.ActiveFormat.MyStepSectionLayoutData.SpecialPageBreakFlag && yWithinMargins > yPageSize / 2 &&
myFirstPieceSize < yWithinMargins) || KeepStepsOnPage))))
{ {
//Console.WriteLine("'PageBreak',4,'No','HLS will have to split anyway',{0},{1},{2}, {3}, {4},'{5}'", MyItemInfo.ItemID, YSize, yPageSize, yWithinMargins, (int)(100 * yWithinMargins / yPageSize), MyItemInfo.ShortPath); //Console.WriteLine("'PageBreak',4,'No','HLS will have to split anyway',{0},{1},{2}, {3}, {4},'{5}'", MyItemInfo.ItemID, YSize, yPageSize, yWithinMargins, (int)(100 * yWithinMargins / yPageSize), MyItemInfo.ShortPath);
// yPageSize is space on next page. This may be different if the format flag 'UseOnAllButFirst' is // yPageSize is space on next page. This may be different if the format flag 'UseOnAllButFirst' is

View File

@ -2820,7 +2820,7 @@ namespace Volian.Print.Library
case E_ContBottomLoc.EndOfText: // place continue string at end of text case E_ContBottomLoc.EndOfText: // place continue string at end of text
// msg_yLocation accounts for extra lines in message from docstyle; and BottomContent is the actual // msg_yLocation accounts for extra lines in message from docstyle; and BottomContent is the actual
// location of the last line of text on page. // location of the last line of text on page.
msg_yLocation = msg_yLocation + ((float)MyPageHelper.BottomContent - (SixLinesPerInch * MyPageHelper.YMultiplier)); msg_yLocation = msg_yLocation + ((float)(MyPageHelper.BottomContent??0) - (SixLinesPerInch * MyPageHelper.YMultiplier)); // B2018-080 null reference check added
float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch
if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation) if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation)
{ // Adjusted Continue Message Y Offset { // Adjusted Continue Message Y Offset