Adjustments needed to support McGuire, Catawba, and Shearon Harris formats.

This commit is contained in:
John Jenko 2013-12-13 04:02:32 +00:00
parent bea71aac2b
commit 7a29757f87
2 changed files with 30 additions and 8 deletions

View File

@ -69,7 +69,7 @@ namespace Volian.Print.Library
string lastHeader = null;
bool didComponentTableRow = false;
float tableBottomMost = 0;
float xoffBase = xoff;
foreach (ItemInfo iChildItemInfo in itemInfoList)
{
if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO)
@ -81,7 +81,8 @@ namespace Volian.Print.Library
if (((bxIndx ?? -1) == -1) && (childItemInfo.IsCaution || childItemInfo.IsNote) && !childItemInfo.IsInRNO &&
!childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.Dev_Format &&
!IsEnhancedBackgroundFormat(childItemInfo) && !IsEnhancedDeviationFormat(childItemInfo))
xoff += (float)childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColT;
//xoff += (float)childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColT;
xoff = xoffBase + (float)childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColT;
// if in a ComponentTableFormat (FNP sub format 1, component list), column headers are defined
// by the first level of children. The data for the column is the child of the column header.
@ -296,7 +297,17 @@ namespace Volian.Print.Library
if (Processed) return yPageStart;
//float localYPageStart = yPageStart;
Processed = true;
if (_PartsAbove != null && _PartsAbove.Count > 0) yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
if (_PartsAbove != null && _PartsAbove.Count > 0)
{
// For McGuire and Catawba, they use CustomSpacing which inserts a blank line before high level steps
// if we paginate on one of these blank lines, we want to skip that blank line so that there isn't an
// 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;
else
yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
}
if (MyItemInfo.IsHigh && MyItemInfo.MyDocStyle.SpecialStepsFoldout) yPageStart -= SixLinesPerInch;
if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
{
@ -1458,6 +1469,13 @@ namespace Volian.Print.Library
XOffset += diff;
adjustAgain = false;
}
else
{
float adjusttab = (itemInfo.MyParent.IsHigh) ? itemInfo.FormatStepData.AdjHighLevelTab ?? 0 : 0;
mytab.XOffset += (mytab.Width + adjusttab);
XOffset = mytab.XOffset + mytab.Width;
if (adjusttab != 0) Width += (mytab.Width);
}
}
if(adjustAgain)
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
@ -1511,6 +1529,8 @@ namespace Volian.Print.Library
// handle this by using the 'PartsAbove' structure. By using the parts above, the extra
// space above will be done regardless of where page breaks fall.
float addExtraSpace = 0;
if (MyItemInfo.FormatStepData != null && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CustomSpacing)
addExtraSpace = MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0;
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.FormatStepData != null &&
MyItemInfo.MyParent.FormatStepData.Type != "TitleWithTextRight")
addExtraSpace = (MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0;
@ -1527,7 +1547,8 @@ namespace Volian.Print.Library
//if (YOffset != 0 && MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CustomSpacing)
if (YOffset != 0 && MyItemInfo.IsSection && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CustomSpacing)
addExtraSpace = (float)MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[25].StepLayoutData.STExtraSpace;
if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.ThreeBlanksAbove)
if (YOffset != 0 && MyItemInfo.FormatStepData != null &&
MyItemInfo.MyPrevious == null && MyItemInfo.FormatStepData.ThreeBlanksAbove)
addExtraSpace = 24; // already has one blank line above, added two more
//if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0)
// addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace;
@ -1538,8 +1559,8 @@ namespace Volian.Print.Library
if ((itemInfo.Cautions != null && itemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (itemInfo.Notes != null && itemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines))
addExtraSpace = 0;
}
if (addExtraSpace > 0 && MyItemInfo.FormatStepData != null && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CustomSpacing)
this.PartsAbove.Add(new vlnText(cb, this, " ", " ", 0, yoff, MyItemInfo.FormatStepData.Font));
if (addExtraSpace > 0 && MyItemInfo.FormatStepData != null)
this.PartsAbove.Add(new vlnText(cb, this, " ", " ", 72, yoff, MyItemInfo.FormatStepData.Font));
yoff += addExtraSpace;

View File

@ -193,7 +193,8 @@ namespace Volian.Print.Library
if (removedUnderline)
{
int sep = origTab.IndexOfAny(". ".ToCharArray());
origTab = @"\ul " + origTab.Substring(0, sep-1) + @"\ulnone" + origTab.Substring(sep-1);
//origTab = @"\ul " + origTab.Substring(0, sep-1) + @"\ulnone" + origTab.Substring(sep-1);
origTab = @"\ul " + origTab.Substring(0, sep) + @"\ulnone" + origTab.Substring(sep);
}
UnderlineTerminateList utl = myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.UnderlineTerminateList;
@ -211,7 +212,7 @@ namespace Volian.Print.Library
int indxC = origTab.IndexOf(":");
origTab = @"\ul " + origTab.Substring(0, indxC) + @"\ulnone" + origTab.Substring(indxC);
}
else if (utl != null && ((vFont.Style & E_Style.Underline) > 0))
else if (utl != null && utl.Count > 0 && ((vFont.Style & E_Style.Underline) > 0))
{
foreach (UnderlineTerminate ut in utl)
{