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:
Rich
2018-03-02 18:57:57 +00:00
parent 09aa4e4ab0
commit 75124cd7e4
5 changed files with 85 additions and 14 deletions

View File

@@ -574,7 +574,7 @@ namespace Volian.Print.Library
}
if (MyItemInfo.MyContent.MyGrid != null)
{
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.DrawDrid");
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.DrawGrid");
// RHM20150507 Include Footer
retval = DrawGrid(cb, ref yPageStart, yTopMargin, yBottomMargin + (float)MyItemInfo.MyDocStyle.Layout.FooterLength, ref yLocation); // RHM20150429 - Table Scrunch
if (MyItemInfo.IsInSupInfo) _yPageStartForSupInfo = (float)MyPageHelper.BottomContent - SixLinesPerInch;
@@ -894,10 +894,12 @@ namespace Volian.Print.Library
//if (MyItemInfo.InList(11019,11024,111026)) // RHM20150507 Table Scrunch
// Console.WriteLine("here");
float heightBefore = MyGrid.Height + 4 * MyPageHelper.YMultiplier;
if (Rtf2Pdf.GetTableScrunchingStatus(TableScrunching.Phase1) && heightBefore > (yLocation - yBottomMargin))
// B2018-033 Account for bottom continue message when seeing if a scrunched table will fit
float ySizeBtmCtnMess = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
if (Rtf2Pdf.GetTableScrunchingStatus(TableScrunching.Phase1) && heightBefore > (yLocation - (yBottomMargin + ySizeBtmCtnMess)))
{
//MyGrid.TooBig = (MyItemInfo.MyDocStyle.Layout.FooterLength ?? 0) + SixLinesPerInch + MyGrid.Height - (yLocation - yBottomMargin);
MyGrid.TooBig = SixLinesPerInch + MyGrid.Height * MyPageHelper.YMultiplier - (yLocation - yBottomMargin);
MyGrid.TooBig = SixLinesPerInch + MyGrid.Height * MyPageHelper.YMultiplier - (yLocation - yBottomMargin - ySizeBtmCtnMess);
float heightAfter = MyGrid.Height + 4 * MyPageHelper.YMultiplier;
MyPageHelper.TableAdjustment += (heightBefore - heightAfter);
if (heightAfter < (yLocation - yBottomMargin))