From adcf098de06bdddbe524e234328c1180e00d32b4 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 19 Mar 2015 16:09:54 +0000 Subject: [PATCH] Shutoff some logic used for Comanche Peak which was causing problems for IP3 --- PROMS/Volian.Print.Library/Pagination.cs | 38 ++++++++++++++---------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 3b662c2f..52d2a70f 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -748,6 +748,7 @@ namespace Volian.Print.Library // The following code determines space required by the Checklist header (Wolf Creek) if a break occurs // Their 2 HLS that define the checklists have 'UseSmartTemplate'. float accountForSmartTemplateHeader = 0; + //if (MyItemInfo.InList(878)) Console.WriteLine("Here"); if (MyItemInfo.FormatStepData.UseSmartTemplate) { if (((MyItemInfo.MyDocStyle.End.Message ?? "") == "") || MyItemInfo.MyHLS.NextItem != null) @@ -786,6 +787,7 @@ namespace Volian.Print.Library //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)) // Console.WriteLine("After 80091 {0}",paraBreak.ToString()); + //if (paraBreak.MyItemInfo.InList(981,996)) Console.WriteLine("Here"); if (paraBreak == null) { if (DebugPagination.IsOpen) DebugPagination.WriteLine("<<< ERROR >>> Cannot find a place to break ==>,{0},'{1}','{2}',{3},{4}" @@ -1102,6 +1104,7 @@ namespace Volian.Print.Library { float spaceOnPage = yUpperLimit + yLocation; vlnParagraph myPara = myList[stepLevel][yLocation]; + bool IsIP3Format = myPara.MyItemInfo.ActiveFormat.Name.StartsWith("IP3"); int maxLev = stepLevel; if (spaceOnPage > 0 && (maxLev = MaxBreakLevel(yLocation, myList, stepLevel, myPara)) > stepLevel) { @@ -1115,23 +1118,26 @@ namespace Volian.Print.Library else yAddForBtmMsg = 0; spaceOnPage += yAddForBtmMsg; - // The following lines were added for Comanche Peak ECA-TP-11-001A.SProcedure Steps.S17 (Printed as Step 12) - if (spaceOnPage > 0 && myPara.YSize > fullPage && myPara.ChildrenRight != null && myPara.ChildrenRight.Count > 0 - && myPara.ChildrenRight[0].YSize <= fullPage && myPara.ChildrenRight[0].YSize > spaceOnPage) + if (!IsIP3Format) { - //_MyLog.WarnFormat("\r\nMyParaBreak {0},{1},{2},{3},{4}", myPara, myPara.YSize, yUpperLimit, myPara.ChildrenRight[0].YSize, spaceOnPage); - if (myPara != lastBreak) - return myPara; - } - // The following lines were added for Comanche Peak ECA-0.1A.SProcedure Steps.S17 (Printed as Step 12) - vlnParagraph myParent = myPara.MyParent; - spaceOnPage = yAddForBtmMsg + yUpperLimit + myPara.YTop + yLocation - myParent.YTop; - if (spaceOnPage > 0 && myParent != lastBreak && myParent.YSize > fullPage && myParent.ChildrenRight != null && myParent.ChildrenRight.Count > 0 - && myParent.ChildrenRight[0].YSize <= fullPage && myParent.ChildrenRight[0].YSize > spaceOnPage) - { - //_MyLog.WarnFormat("\r\nMyParentBreak {0},{1},{2},{3},{4}", myParent, myParent.YSize, yUpperLimit, myParent.ChildrenRight[0].YSize, spaceOnPage); - if (myParent != lastBreak) - return myParent; + // The following lines were added for Comanche Peak ECA-TP-11-001A.SProcedure Steps.S17 (Printed as Step 12) + if (spaceOnPage > 0 && myPara.YSize > fullPage && myPara.ChildrenRight != null && myPara.ChildrenRight.Count > 0 + && myPara.ChildrenRight[0].YSize <= fullPage && myPara.ChildrenRight[0].YSize > spaceOnPage) + { + //_MyLog.WarnFormat("\r\nMyParaBreak {0},{1},{2},{3},{4}", myPara, myPara.YSize, yUpperLimit, myPara.ChildrenRight[0].YSize, spaceOnPage); + if (myPara != lastBreak) + return myPara; + } + // The following lines were added for Comanche Peak ECA-0.1A.SProcedure Steps.S17 (Printed as Step 12) + vlnParagraph myParent = myPara.MyParent; + spaceOnPage = yAddForBtmMsg + yUpperLimit + myPara.YTop + yLocation - myParent.YTop; + if (spaceOnPage > 0 && myParent != lastBreak && myParent.YSize > fullPage && myParent.ChildrenRight != null && myParent.ChildrenRight.Count > 0 + && myParent.ChildrenRight[0].YSize <= fullPage && myParent.ChildrenRight[0].YSize > spaceOnPage) + { + //_MyLog.WarnFormat("\r\nMyParentBreak {0},{1},{2},{3},{4}", myParent, myParent.YSize, yUpperLimit, myParent.ChildrenRight[0].YSize, spaceOnPage); + if (myParent != lastBreak) + return myParent; + } } // The top of this step will fit onto page (-yLocation < yWithinMargins) float wcnChkLstBorder = myPara.MyItemInfo.MyHLS != null && myPara.MyItemInfo.MyHLS.FormatStepData.UseSmartTemplate &&