B2020-064 – for Farley, take into account doc style flag DSS_PrintSectOnFirst when breaking a step onto pages other than the first page.

This commit is contained in:
John Jenko 2020-05-04 19:36:09 +00:00
parent 6f42f911f7
commit b8e688c14a

View File

@ -1352,8 +1352,11 @@ namespace Volian.Print.Library
// 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))
float adjustedCurPageYSpace = ySpaceOnCurPage;
if (MyPageHelper.PrintedSectionPage > 0 && MyItemInfo.ActiveSection != null && (MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst)
adjustedCurPageYSpace -= MyPageHelper.PrintedSectionPage; //B2020-064 FNP-1-ECP-0.0 Attachment 6 not enough room for end message
float ySpaceAt7LPI = (adjustedCurPageYSpace - (accountForCalvertAlarmConditionResponseFooter + yEndMsg)) * SixLinesPerInch / _SevenLinesPerInch;
if ((YSize - yTop) > (adjustedCurPageYSpace - (accountForCalvertAlarmConditionResponseFooter + yEndMsg))
&& (YSize - yTop) < ySpaceAt7LPI )
{
// Compress Rest of Step