Fixed the centering of tables in Prairie Island Alarms, fixed the placement of Note/Cautions off of a high level RNO, when it starts at the top of a new page, in Catawba EOPs

This commit is contained in:
John Jenko 2014-02-26 21:48:52 +00:00
parent 1c8e2e86d5
commit e6703e88a1

View File

@ -323,7 +323,15 @@ namespace Volian.Print.Library
// extra blank line at the top of the page.
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CustomSpacing &&
PartsAbove[0].YOffset + yTopMargin == yPageStart && PartsAbove[0].IParagraph.Content == " ")
yPageStart = yTopMargin + YOffset;
{
if (MyItemInfo.IsHigh && ((YOffset - YTopMost) > SixLinesPerInch))
{
//Console.WriteLine("==> {0} {1} MOST {2} DIF {3}", MyItemInfo.ShortPath, YOffset, YTopMost, YOffset - YTopMost);
yPageStart = yTopMargin + YTopMost;
}
else
yPageStart = yTopMargin + YOffset;
}
else
yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
}
@ -2265,6 +2273,12 @@ namespace Volian.Print.Library
XOffset -= (XOffset - (XOffset * (float)MyItemInfo.FormatStepData.Font.CPI / 12));
}
XOffset -= 12; // This makes the 16bit & 32bit align very closely.
// if outside of the page margins then center within the page margins
float xOffset2 = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
float xWidth2 = (float)itemInfo.MyDocStyle.Layout.PageWidth;
if (XOffset + Width > xOffset2 + xWidth2)
XOffset = xOffset2 / 2 + xWidth2 / 2 - Width / 2;
}
// 05/14/12 - The PosAdjust is a format flag from 16bit. For WCN2, it appears that this amount equals
// the amount of difference from a 10 CPI to a 12 CPI font. See comment above.