B2020-116: Pagination of WCN single column

This commit is contained in:
Kathy Ruffing 2020-09-16 13:48:08 +00:00
parent 377788c314
commit 1136071e14
2 changed files with 18 additions and 9 deletions

View File

@ -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

View File

@ -6646,7 +6646,9 @@ namespace Volian.Print.Library
this.Add(stepLevel, new SortedDictionary<float, vlnParagraph>());
// 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