Add back in removed side effect code for printing grids with merged cells / checking boundaries
This commit is contained in:
@@ -288,9 +288,21 @@ namespace Volian.Print.Library
|
|||||||
MyFlexGrid = myFlexGrid;
|
MyFlexGrid = myFlexGrid;
|
||||||
MyContentByte = myContentByte;
|
MyContentByte = myContentByte;
|
||||||
SetupCells();
|
SetupCells();
|
||||||
myTable.MyShading = VlnGridCellShading.Get(myFlexGrid.MyShading.ConvertToString()); // C2021-004 Table Cell Shading
|
//Note - this is done in case goes outside boundries to set bounds of cell
|
||||||
myTable.MyBorders = VlnBorders.Get(myFlexGrid.MyBorders.ConvertToString());
|
//loops through cells - side effect code checks for merged cells
|
||||||
}
|
foreach (vlnCell cell in this)
|
||||||
|
{
|
||||||
|
myTable.MyShading = VlnGridCellShading.Get(myFlexGrid.MyShading.ConvertToString()); // C2021-004 Table Cell Shading
|
||||||
|
myTable.MyBorders = VlnBorders.Get(myFlexGrid.MyBorders.ConvertToString());
|
||||||
|
_ = cell.AboveLeftSide;
|
||||||
|
_ = cell.AboveRightSide;
|
||||||
|
_ = cell.BelowLeftSide;
|
||||||
|
_ = cell.BelowRightSide;
|
||||||
|
_ = cell.RightOfBottomSide;
|
||||||
|
_ = cell.RightOfTopSide;
|
||||||
|
_ = cell.TextAlign;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
public float MyLeading { get; set; } = 13.5F;
|
public float MyLeading { get; set; } = 13.5F;
|
||||||
#region Private Methods
|
#region Private Methods
|
||||||
@@ -450,11 +462,11 @@ namespace Volian.Print.Library
|
|||||||
private bool ParaEndsWithNewLine(Paragraph myPara) => myPara[myPara.Count - 1] is Chunk chk && chk.Content == "\n";
|
private bool ParaEndsWithNewLine(Paragraph myPara) => myPara[myPara.Count - 1] is Chunk chk && chk.Content == "\n";
|
||||||
internal static void FixHyphens(Paragraph myPara, vlnTable myTable)
|
internal static void FixHyphens(Paragraph myPara, vlnTable myTable)
|
||||||
{
|
{
|
||||||
// Find chunk with hardhyphen
|
// Find chunk with hardhyphen
|
||||||
|
|
||||||
// If a hard hyphen is found, the remove it and add a dash (keyboard minus sign) to the beginning
|
// If a hard hyphen is found, the remove it and add a dash (keyboard minus sign) to the beginning
|
||||||
// of the text that follows it.
|
// of the text that follows it.
|
||||||
int hype=-1;
|
int hype;
|
||||||
while ((hype = GetHyphen(myPara)) > -1)
|
while ((hype = GetHyphen(myPara)) > -1)
|
||||||
{
|
{
|
||||||
Font fnt = null;
|
Font fnt = null;
|
||||||
@@ -546,11 +558,11 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
internal static void FixBackslashes(Paragraph myPara, vlnTable myTable)
|
internal static void FixBackslashes(Paragraph myPara, vlnTable myTable)
|
||||||
{
|
{
|
||||||
// Find chunk with backslash B2014-108 backslash in tables
|
// Find chunk with backslash B2014-108 backslash in tables
|
||||||
|
|
||||||
// If a backslash symbold is found, the remove it and add a backslash (keyboard char) to the beginning
|
// If a backslash symbold is found, the remove it and add a backslash (keyboard char) to the beginning
|
||||||
// of the text that follows it.
|
// of the text that follows it.
|
||||||
int bckSlsh = -1;
|
int bckSlsh;
|
||||||
while ((bckSlsh = GetBackslash(myPara)) > -1)
|
while ((bckSlsh = GetBackslash(myPara)) > -1)
|
||||||
{
|
{
|
||||||
Font fnt = null;
|
Font fnt = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user