From 06fbfc488f62d13a63125d679df068af81c8b333 Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 14 Nov 2017 20:01:30 +0000 Subject: [PATCH] B2017-252 Added logic to break at title rather tan breaking at first content under title. Expanded Pagination fix for WCN Expanded Pagination fix for RNP --- PROMS/Volian.Print.Library/Pagination.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index a9e9e450..abf77cad 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -921,6 +921,9 @@ namespace Volian.Print.Library myPreferredBreaks.RemoveAt(0); } } + // B2017-252 Pagination Fix - Break at title rather than title content + if (paraBreak.MyItemInfo.ShortPath.EndsWith(".S1.") && (paraBreak.MyItemInfo.ActiveParent as ItemInfo).IsTitle) + paraBreak = paraBreak.MyParent; yAccountForBottomMsg = 0; // Do Not Remove: The following is used for debug - useful place to debug //if (paraBreak.MyItemInfo.InList(207, 211, 214, 219, 221, 216, 197)) Console.WriteLine("BUILD2: Break at {0}", paraBreak.MyItemInfo.ShortPath);//Comment Out before release @@ -1179,7 +1182,8 @@ namespace Volian.Print.Library // Added the IF condition to fix the problem // B2017-161: unnecessary PageBreak for background documents: use the 'usedPageBreakOnStepList' flag when using the PageBreakOnStepList, don't adjust space on page to account // for continue message, if there is not one. - if (paraBreak != PageBreakOnStepList[0]) usedPageBreakOnStepList = true; + // B2017-252 Pagination Fix - WCN was not paginating correctly. Reverted to orginal code. + usedPageBreakOnStepList = true; paraBreak = PageBreakOnStepList[0]; PageBreakOnStepList.RemoveAt(0); yTopNew = paraBreak.YTop - YTopMost; @@ -1209,7 +1213,8 @@ namespace Volian.Print.Library if (doSectionTitleContinued1) ySpaceOnNextPage1 -= 2 * SixLinesPerInch; // B2016-195: Account for Section Continue Message // B2017-161: unnecessary PageBreak for background documents: use the 'usedPageBreakOnStepList' flag when using the PageBreakOnStepList, don't adjust space on page to account // for continue message, if there is not one. - if (!usedPageBreakOnStepList) ySpaceOnCurPage = ySpaceOnNextPage1; + // B2017-252 Pagination Fix - RNP was not paginating correctly. Added logic to set ySPaceOnCurPage if ySpaceOnNextPage was larger + if (!usedPageBreakOnStepList || ySpaceOnNextPage1 > ySpaceOnCurPage) ySpaceOnCurPage = ySpaceOnNextPage1; //ySpaceOnCurPage = yPageSize - (myTopMsgSpace + SixLinesPerInch); // Allow for continue message and blank line. //if (paraBreak.YTopMost != paraBreak.YVeryTop && MyPageHelper.TopMessage == null && MyPageHelper.BottomMessage == null)