B2019-028: Line spacing at the top of a page may be incorrect if a section contains subsections where a step section follows a Word section.

This commit is contained in:
Kathy Ruffing 2019-02-18 16:41:43 +00:00
parent c74d49791e
commit 0369a7f269

View File

@ -330,6 +330,8 @@ namespace Volian.Print.Library
// increment the y offset if not doing the ComponentTableFormat // increment the y offset if not doing the ComponentTableFormat
else if (!para.UseTemplateKeepOnCurLine(childItemInfo)) else if (!para.UseTemplateKeepOnCurLine(childItemInfo))
{ {
// B2019-028: These comments ARE NOT relevant and the code added, the if and the else/console.writeline
// are not correct (left in commented out so that change can be seen):
// Don't set to zero after a Word Section // Don't set to zero after a Word Section
// Otherwise the step section output will overlap previous step section output // Otherwise the step section output will overlap previous step section output
// if in a sub section. // if in a sub section.
@ -338,10 +340,10 @@ namespace Volian.Print.Library
// Second section a word section // Second section a word section
// Third section a step section // Third section a step section
// skip the logic in the next three lines. (if to else) // skip the logic in the next three lines. (if to else)
if (para.YBottomMost > 0) //if (para.YBottomMost > 0)
yoff = para.YBottomMost; yoff = para.YBottomMost;
else //else
Console.WriteLine("ERROR Would have changed yoff from {0} to zero",yoff); //Console.WriteLine("ERROR Would have changed yoff from {0} to zero",yoff);
} }
// don't adjust YBottomost until after yoff is set for the RNO Separator // don't adjust YBottomost until after yoff is set for the RNO Separator
para.YBottomMost += para.YBottomMostAdjust; para.YBottomMost += para.YBottomMostAdjust;
@ -3016,12 +3018,15 @@ namespace Volian.Print.Library
foreach (vlnParagraph vPara in MyPageHelper.MyParagraphs.Values) foreach (vlnParagraph vPara in MyPageHelper.MyParagraphs.Values)
{ {
if (!vPara.Processed && ((vPara.YOffset + vPara.Height) < YTopMost)) if (!vPara.Processed && ((vPara.YOffset + vPara.Height) < YTopMost))
if (this.MyItemInfo.ItemID != vPara.MyItemInfo.ItemID) // 20150701 Complicated RNO change // B2019-028: Added check for active section in next line so that following section text doesn't overlap or start too far down on page for case where there is a subsection
// with subsections of type Step/Word/Step
if (vPara.MyItemInfo.ActiveSection.ItemID == this.MyItemInfo.ActiveSection.ItemID && (this.MyItemInfo.ItemID != vPara.MyItemInfo.ItemID)) // 20150701 Complicated RNO change
process.Add(vPara); process.Add(vPara);
else // 20150701 Complicated RNO change else // 20150701 Complicated RNO change
_MyLog.WarnFormat("Less Than: Step Could Have Fit {0}, {1}", MyItemInfo.ItemID, MyItemInfo.ShortPath); _MyLog.WarnFormat("Less Than: Step Could Have Fit {0}, {1}", MyItemInfo.ItemID, MyItemInfo.ShortPath);
else if (!vPara.Processed && ((vPara.YOffset + vPara.Height) == YTopMost)) else if (!vPara.Processed && ((vPara.YOffset + vPara.Height) == YTopMost))
if (this.MyItemInfo.ItemID != vPara.MyItemInfo.ItemID) // RHM20150507 Table Scrunch // B2019-028: see above comment (same check was added)
if (vPara.MyItemInfo.ActiveSection.ItemID == this.MyItemInfo.ActiveSection.ItemID && (this.MyItemInfo.ItemID != vPara.MyItemInfo.ItemID)) // RHM20150507 Table Scrunch
{ {
process.Add(vPara); process.Add(vPara);
_MyLog.WarnFormat("New AerRno PageBreak Logic: Step Could Have Fit {0}, {1}", MyItemInfo.ItemID, MyItemInfo.ShortPath); _MyLog.WarnFormat("New AerRno PageBreak Logic: Step Could Have Fit {0}, {1}", MyItemInfo.ItemID, MyItemInfo.ShortPath);