From 1136071e14f53268c417e5f0818f594d6190e9c2 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 16 Sep 2020 13:48:08 +0000 Subject: [PATCH] B2020-116: Pagination of WCN single column --- PROMS/Volian.Print.Library/Pagination.cs | 6 ++++-- PROMS/Volian.Print.Library/vlnParagraph.cs | 21 ++++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index a2b15580..3d1de81b 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -1254,8 +1254,10 @@ namespace Volian.Print.Library //float yTopNew = paraBreak.YTopMost - YTopMost; if (JustATableThatWillFit(paraBreak, yPageSize - (myTopMsgSpace + yEndMsg))) paraBreak = paraBreak.ChildrenBelow[0]; - // B2020-112: complicated AER/RNO. yEndMsg was accounted for twice - float ySpaceOnNextPage1 = yPageSize - (myTopMsgSpace); // + (yEndMsg == 0 ? SixLinesPerInch : 0)); // Allow for continue message and blank line. + // B2020-112: complicated AER/RNO. yEndMsg was accounted for twice -> put endmsg part back in, it broke wcn and didn't affect bge + // B2020-116: the 112 change broke a WCN print of single column. The end message adjustment was added back in and retested for 112 also + // and had no negative impact. + float ySpaceOnNextPage1 = yPageSize - (myTopMsgSpace + (yEndMsg == 0 ? SixLinesPerInch : 0)); // Allow for continue message and blank line. ySpaceOnNextPage1 -= accountForSmartTemplateHeader; // 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 diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 843ef836..d7752f40 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -6646,7 +6646,9 @@ namespace Volian.Print.Library this.Add(stepLevel, new SortedDictionary()); // using a negative for yLocation so that its in descending order: // B2020-112: Make various adjustments to location if there are format flags used - float adjust = para.YVeryTop - para.YTop; + // B2020-116: Only make the 112 change for Calvert + float adjust = 0; + if (para.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert) adjust = para.YVeryTop - para.YTop; //if (para.MyItemInfo.MyParent.IsHigh && (para.ChildrenAbove == null || para.ChildrenAbove.Count == 0)) //{ // //Console.WriteLine("Adjust Add extra Line (flag) = '{0}'", para); @@ -6712,13 +6714,18 @@ namespace Volian.Print.Library foreach (ParagraphLocation paraLoc in this) { int level = paraLoc.StepLevel; - if (KeepStepsOnPage && paraLoc.MyParagraph.MyItemInfo.MyContent.Type == 20001) + if (KeepStepsOnPage) { - if (DontBreakHere(paraLoc)) - //if (paraLoc.MyParagraph.MyItemInfo.MyPrevious == null) // First substep - level = 0; - else - level = 1; + // B2020-116: change from checking for type 20001 to looking for a non-high sequential since some + // step types were sequential but not 20001 + if (!paraLoc.MyParagraph.MyItemInfo.IsHigh && paraLoc.MyParagraph.MyItemInfo.IsSequential) + { + if (DontBreakHere(paraLoc)) + //if (paraLoc.MyParagraph.MyItemInfo.MyPrevious == null) // First substep + level = 0; + else + level = 1; + } } // For B2015-014, some migrated data for background documents had the TitleWithTextBelow with associated paragraphs // as siblings rather than children. Pagination was sometimes putting the TitleWithTextBelow on one page and the