From 90f5b01067d8f7cb420be7b36bff164e621bfb8c Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 11 Jul 2016 14:12:03 +0000 Subject: [PATCH] =?UTF-8?q?fixes=20B2016-157=20&=20B2015-211=20(this=20bug?= =?UTF-8?q?=20fix=20caused=20B2016-157=20=E2=80=93=20fix=20put=20on=20for?= =?UTF-8?q?=20it=20was=20removed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Print.Library/Pagination.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 28ea64f4..5288cc03 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -778,6 +778,9 @@ namespace Volian.Print.Library string myTopMsg = docstyle.Continue.Top.Message; float myTopMsgSpace = ((myTopMsg ?? "") != "") ? 2 * SixLinesPerInch : 0; + // For B2016-157 & B2015-211: myTopMsgSpace is 1 line, not 2. Note that this may be a more generic solution, but + // it was found during print testing for BGE and flag is used to minimize impact on other formats + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertPagination) myTopMsgSpace = ((myTopMsg ?? "") != "") ? SixLinesPerInch : 0; if (myTopMsgSpace > 0 && doSectionTitleContinued) { vlnParagraph parSection = this.MyParent; @@ -818,6 +821,10 @@ namespace Volian.Print.Library // 8 `88b.8 888ooo888 Y888' 888 888 `88b 888 888ooo888 .oP"888 888888. // 8 `888 888 .o .o8"'88b 888 . 888 .88P 888 888 .o d8( 888 888 `88b. // o8o `8 `Y8bod8P' o88' 888o "888" o888bood8P' d888b `Y8bod8P' `Y888""8o o888o o888o + + // For B2016-157 & B2015-211. Note that this may be a more generic solution, but + // it was found during print testing for BGE and flag is used to minimize impact on other formats + float yAccountForBottomMsg = (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertPagination) ? myBottomMsgSpace : 0; while (((YSize - yTop) > (ySpaceOnCurPage - (accountForCalvertAlarmConditionResponseFooter + yEndMsg))) || PageBreakOnStepList.Count > 0) { float ySpaceOnCurPageSave = ySpaceOnCurPage; @@ -828,9 +835,10 @@ namespace Volian.Print.Library if (PageBreakOnStepList.Count > 0 && (PageBreakOnStepList[0].YTop - (lastBreak == null ? 0 : lastBreak.YTop) <= ySpaceOnCurPage)) paraBreak = PageBreakOnStepList[0]; else - paraBreak = FindPageBreak(yStart, ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter, yLowerLimit, + paraBreak = FindPageBreak(yStart, ySpaceOnCurPage - accountForCalvertAlarmConditionResponseFooter - yAccountForBottomMsg, yLowerLimit, myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace, myBottomMsgSpace, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly); + 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 //if (lastBreak != null && lastBreak.MyItemInfo.InList(80091, 1985)) @@ -1194,8 +1202,6 @@ namespace Volian.Print.Library yAddForBtmMsg = myBottomMsgSpace; else yAddForBtmMsg = 0; - // The following was added to fix B2015-211: step text was overlapping bottom continue message - if (myPara.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertPagination) yAddForBtmMsg = -myBottomMsgSpace; spaceOnPage += yAddForBtmMsg; if (!IsIP3Format) {