B2018-033 - Set the default scrunching settings.
B2018-033 - Set the scrunching check box to checked by default B2018-033 - Base table scrunching on the last row of a range rather than the first row of a range B2018-033 - Added debug for table scrunching. B2018-033 - Fix pagination to account for table scrunching
This commit is contained in:
@@ -922,7 +922,12 @@ namespace Volian.Print.Library
|
||||
myList, lastBreak, yPageSize - (myTopMsgSpace + SixLinesPerInch) - myBottomMsgSpace,
|
||||
myBottomMsgSpace, MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].ContinueOnly);
|
||||
// B2017-109: for supplemental information, if there is a preferred page break, account for it.
|
||||
if (myPreferredBreaks != null && myPreferredBreaks.Count > 0 && myPreferredBreaks.Keys[0] < paraBreak.YOffset)
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Break after table if it's the only item left and there is enough space
|
||||
if (paraBreak != null && paraBreak.MyGrid != null && ItemsLeft(myList) == 1 &&
|
||||
((YSize - yTop) <= (paraBreak.MyGrid.SpaceAvailable + ySpaceOnCurPage - (accountForCalvertAlarmConditionResponseFooter + yEndMsg))))
|
||||
break;
|
||||
if (myPreferredBreaks != null && myPreferredBreaks.Count > 0 && myPreferredBreaks.Keys[0] < paraBreak.YOffset)
|
||||
{
|
||||
// B2017-122: don't use preferred break if the last break was before this break
|
||||
vlnParagraph prefBreak = myPreferredBreaks[myPreferredBreaks.Keys[0]];
|
||||
@@ -1268,7 +1273,16 @@ namespace Volian.Print.Library
|
||||
paraBreak.PageBreakReason = "Rest of Step fits at 6 LPI";
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
}
|
||||
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Howany items are left to be printed.
|
||||
private int ItemsLeft(StepLevelList myList)
|
||||
{
|
||||
int retval = 0;
|
||||
foreach (int stepLevel in myList.Keys) // loop thru StepLevels, starting with lowest.
|
||||
foreach (float yLocation in myList[stepLevel].Keys) // loop thru yLocation
|
||||
retval++;
|
||||
return retval;
|
||||
}
|
||||
// The following finds all of the preferred page breaks for this step & if found adds them to a
|
||||
// list of the location & the paragraph it is on. This is used so that pagination calculations
|
||||
// occur for steps following the preferred page break rather than starting on the page after
|
||||
@@ -1419,6 +1433,10 @@ namespace Volian.Print.Library
|
||||
else if (-yLocation > -yLocationMin2 && -yLocation <= yUpperLimit) // New location is larger and new location is less than limit
|
||||
{
|
||||
//minBuff.AppendLine(string.Format("NEW2B >>>>> '{0}',{1},{2}", myPara.MyItemInfo.ShortPath, -yLocation, yUpperLimit));
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Break at next step if going to break at table and there is room for scrunched table
|
||||
if (myPara.MyGrid != null && minPara != null && -yLocationMin <= (yUpperLimit + myPara.MyGrid.SpaceAvailable))
|
||||
return minPara;
|
||||
yLocationMin2 = yLocation;
|
||||
minPara2 = myPara;
|
||||
}
|
||||
@@ -1466,7 +1484,6 @@ namespace Volian.Print.Library
|
||||
// so that minPara2 is used.
|
||||
if (minPara != null && minPara2 != null && ((minPara2.MyItemInfo.IsCautionPart && minPara.MyItemInfo.IsCaution) || (minPara2.MyItemInfo.IsNotePart && minPara.MyItemInfo.IsNote))
|
||||
&& minPara.MyItemInfo.FirstSibling.ItemID == minPara2.MyItemInfo.ItemID) minPara = null;
|
||||
|
||||
//if (minPara != null) DebugPagination.WriteLine("### 111111 {0}", minPara);
|
||||
//if(minPara2 != null) DebugPagination.WriteLine("### n222222 {0}", minPara2);
|
||||
return minPara ?? minPara2;
|
||||
|
Reference in New Issue
Block a user