From 0804ecc7ee8be09683c5709fc6f5f2f0b21d7433 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 9 Aug 2016 11:37:12 +0000 Subject: [PATCH] B2016-174: PartialStepCompression does not work correctly for Background formats (those steps that use PageBreakOnStep format flag) --- PROMS/Volian.Print.Library/Pagination.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 99b4f9e8..d0136d67 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -1031,7 +1031,10 @@ namespace Volian.Print.Library paraBreak = paraBreak.ChildrenBelow[0]; float ySpaceOnNextPage1 = yPageSize - (myTopMsgSpace + (yEndMsg == 0 ? SixLinesPerInch : 0)); // Allow for continue message and blank line. ySpaceOnNextPage1 -= accountForSmartTemplateHeader; - if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PartialStepCompression && onNewPage) // ySpaceOnNextPage1 == ySpaceOnCurPage+myBottomMsgSpace) + // 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 + // code was not putting a page break on a step that needed to break, i.e. PageBreakOnStep = true. + if ((MyItemInfo.IsStep && !MyItemInfo.FormatStepData.PageBreakOnStep) && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PartialStepCompression && onNewPage) // ySpaceOnNextPage1 == ySpaceOnCurPage+myBottomMsgSpace) { float ySpaceAt7LPI = ((ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter) * SixLinesPerInch / _SevenLinesPerInch) - _SevenLinesPerInch; vlnParagraph paraBreak7 = FindPageBreak(yStart, ySpaceAt7LPI, yLowerLimit, @@ -1115,7 +1118,10 @@ namespace Volian.Print.Library yLowerLimit = ySpaceOnCurPage / 2; if (_Match16BitPagination) yLowerLimit -= 1.5F * SixLinesPerInch; // 276 for HLP yStart = 0; - if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PartialStepCompression) + // 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 + // code was not putting a page break on a step that needed to break, i.e. PageBreakOnStep = true. + if ((MyItemInfo.IsStep && !MyItemInfo.FormatStepData.PageBreakOnStep) && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.PartialStepCompression) { float ySpaceAt7LPI = (ySpaceOnCurPage - (accountForCalvertAlarmConditionResponseFooter + yEndMsg)) * SixLinesPerInch / _SevenLinesPerInch; if ((YSize - yTop) > (ySpaceOnCurPage - (accountForCalvertAlarmConditionResponseFooter + yEndMsg))