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:
@@ -200,7 +200,7 @@ namespace Volian.Print.Library
|
||||
//_Adjustment = Math.Min(1F, (_TooBig / (RowTop.Length - 1)) / 12);
|
||||
//if (ShowDetails) Console.WriteLine("TooBig\t{0}\t{1}", value, _Adjustment);
|
||||
//if(ShowDetails) Console.WriteLine("Before RowTop={0}", RowTop[RowTop.Length-1] );
|
||||
float extra=(TooBig < SpaceAvailable)?(SpaceAvailable - TooBig) / HContents.Length:0;
|
||||
float extra = (_TooBig < SpaceAvailable) ? (SpaceAvailable - _TooBig) / HContents.Length:0;
|
||||
for (int r = 0; r < RowTop.Length - 1; r++)
|
||||
RowTop[r + 1] = RowTop[r] + HContents[r] + extra;
|
||||
//if(ShowDetails) Console.WriteLine("After RowTop={0}", RowTop[RowTop.Length-1] );
|
||||
@@ -393,7 +393,11 @@ namespace Volian.Print.Library
|
||||
for (int c = 0; c < MyFlexGrid.Cols.Count; c++)
|
||||
{
|
||||
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
|
||||
if (cr.r1 == r && cr.c1 == c)
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Tables not being scrunched properly
|
||||
// Merged cells should be adjusted based upon the bottom most cell of the range
|
||||
MyTable.HContents[r] = 12;
|
||||
if (cr.r2 == r && cr.c1 == c)// Use last Row
|
||||
{
|
||||
float w = MyTable.ColLeft[cr.c2 + 1] - MyTable.ColLeft[cr.c1];
|
||||
float h = MyTable.RowTop[cr.r2 + 1] - MyTable.RowTop[cr.r1];
|
||||
@@ -488,6 +492,11 @@ namespace Volian.Print.Library
|
||||
//if(ShowDetails) Console.WriteLine("{0}\t{1}\t{2}",r,c, hContent/12);
|
||||
if (cr.r1 == cr.r2)
|
||||
hMax = Math.Max(hMax, hContent);
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Tables not being scrunched properly
|
||||
// Merged cells should be adjusted based upon the bottom most cell of the range
|
||||
else if(cr.r2 == r)
|
||||
hMax = Math.Max(hMax, hContent- MyTable.HContents[r-1]);
|
||||
else
|
||||
hMax = Math.Max(hMax, hContent - (cr.r2 - cr.r1) * _SixLinesPerInch);
|
||||
if (hContent > h)
|
||||
@@ -506,6 +515,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// B2017-105 if a symbol character was set to a bigger font size, then the positioning of the larger symbol character was printing too high on the line
|
||||
@@ -1268,9 +1278,17 @@ namespace Volian.Print.Library
|
||||
if (mult != 1F) adjustTextLocation=1;
|
||||
}
|
||||
myColumnText1.SetSimpleColumn(1 + left + x, top - y - h , left + x + w - 2, 1 + top - y - hAdjust - adjustTextLocation); // 2 == Default Padding
|
||||
if (ShowDetails) Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t\"{9}\""
|
||||
, r1, c1, hAdjust, adjustTextLocation, y, h, top, 1 + top - y - hAdjust - adjustTextLocation,
|
||||
_MyPageHelper.YMultiplier, MyPara.Content.Substring(0, Math.Min(20, MyPara.Content.Length)));
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Added Header to debug output
|
||||
if (ShowDetails)
|
||||
{
|
||||
if(FirstTime)
|
||||
Console.WriteLine("\"r1\"\t\"c1\"\t\"hAdjust\"\t\"adjustTextLocation\"\t\"y\"\t\"h\"\t\"top\"\t\"1 + top - y - hAdjust - adjustTextLocation\"\t\""+
|
||||
"_MyPageHelper.YMultiplier\"\t\"Text\"");
|
||||
Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t\"{9}\""
|
||||
, r1, c1, hAdjust, adjustTextLocation, y, h, top, 1 + top - y - hAdjust - adjustTextLocation,
|
||||
_MyPageHelper.YMultiplier, ShowText(MyPara.Content.Substring(0, Math.Min(20, MyPara.Content.Length))));
|
||||
}
|
||||
MyPara.MultipliedLeading *= _MyPageHelper.YMultiplier;
|
||||
vlnCells.FixHyphens(MyPara, MyTable);
|
||||
vlnCells.FixBackslashes(MyPara, MyTable);
|
||||
@@ -1289,10 +1307,39 @@ namespace Volian.Print.Library
|
||||
float posBefore = myColumnText1.YLine; // RHM20150429 - Table Scrunch
|
||||
myColumnText1.Go();
|
||||
float posAfter = myColumnText1.YLine; // RHM20150429 - Table Scrunch
|
||||
if(ShowDetails)Console.WriteLine("ToPDF posBefore,posAfter,difference={0},{1},{2},{3}",
|
||||
posBefore, posAfter, posBefore - posAfter,w);
|
||||
// B2018-033 Removed debug printout
|
||||
//if(ShowDetails)Console.WriteLine("ToPDF posBefore,posAfter,difference={0},{1},{2},{3}",
|
||||
// posBefore, posAfter, posBefore - posAfter,w);
|
||||
myColumnText.Canvas.RestoreState();
|
||||
}
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Added Header to debug output
|
||||
private static bool _FirstTime = true;
|
||||
public static bool FirstTime
|
||||
{
|
||||
get
|
||||
{
|
||||
bool retval = _FirstTime;
|
||||
_FirstTime = false;
|
||||
return retval;
|
||||
}
|
||||
set { _FirstTime = value; }
|
||||
}
|
||||
|
||||
// B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13
|
||||
// Added Header to debug output
|
||||
private string ShowText(string str)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (char c in str)
|
||||
{
|
||||
if(c<32 || c>126)
|
||||
sb.Append(string.Format("[{0:X}]", (int) c));
|
||||
else
|
||||
sb.Append(c);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
private static float _SixLinesPerInch = 12; // twips
|
||||
public bool IsRangeStyleNull = false;
|
||||
private TextAlignEnum? _TextAlign = null;
|
||||
|
Reference in New Issue
Block a user