Adjustments needed to support McGuire, Catawba, and Shearon Harris formats.
This commit is contained in:
parent
bea71aac2b
commit
7a29757f87
@ -69,7 +69,7 @@ namespace Volian.Print.Library
|
|||||||
string lastHeader = null;
|
string lastHeader = null;
|
||||||
bool didComponentTableRow = false;
|
bool didComponentTableRow = false;
|
||||||
float tableBottomMost = 0;
|
float tableBottomMost = 0;
|
||||||
|
float xoffBase = xoff;
|
||||||
foreach (ItemInfo iChildItemInfo in itemInfoList)
|
foreach (ItemInfo iChildItemInfo in itemInfoList)
|
||||||
{
|
{
|
||||||
if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO)
|
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 &&
|
if (((bxIndx ?? -1) == -1) && (childItemInfo.IsCaution || childItemInfo.IsNote) && !childItemInfo.IsInRNO &&
|
||||||
!childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.Dev_Format &&
|
!childItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.Dev_Format &&
|
||||||
!IsEnhancedBackgroundFormat(childItemInfo) && !IsEnhancedDeviationFormat(childItemInfo))
|
!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
|
// 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.
|
// 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;
|
if (Processed) return yPageStart;
|
||||||
//float localYPageStart = yPageStart;
|
//float localYPageStart = yPageStart;
|
||||||
Processed = true;
|
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.MyDocStyle.SpecialStepsFoldout) yPageStart -= SixLinesPerInch;
|
||||||
if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
|
if (MyItemInfo.IsHigh && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.DoSTExtraAtTop && (yPageStart - YTopMost == yTopMargin))
|
||||||
{
|
{
|
||||||
@ -1458,6 +1469,13 @@ namespace Volian.Print.Library
|
|||||||
XOffset += diff;
|
XOffset += diff;
|
||||||
adjustAgain = false;
|
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)
|
if(adjustAgain)
|
||||||
AdjustXOffsetForTab(itemInfo, maxRNO, formatInfo, mytab, xMetaAdj);
|
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
|
// 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.
|
// space above will be done regardless of where page breaks fall.
|
||||||
float addExtraSpace = 0;
|
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 &&
|
if (MyItemInfo.MyParent != null && MyItemInfo.MyParent.FormatStepData != null &&
|
||||||
MyItemInfo.MyParent.FormatStepData.Type != "TitleWithTextRight")
|
MyItemInfo.MyParent.FormatStepData.Type != "TitleWithTextRight")
|
||||||
addExtraSpace = (MyItemInfo.FormatStepData == null) ? 0 : MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace ?? 0;
|
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.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CustomSpacing)
|
||||||
if (YOffset != 0 && MyItemInfo.IsSection && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CustomSpacing)
|
if (YOffset != 0 && MyItemInfo.IsSection && MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CustomSpacing)
|
||||||
addExtraSpace = (float)MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[25].StepLayoutData.STExtraSpace;
|
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
|
addExtraSpace = 24; // already has one blank line above, added two more
|
||||||
//if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0)
|
//if (YOffset != 0 && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace > 0)
|
||||||
// addExtraSpace = (float)MyItemInfo.FormatStepData.StepLayoutData.STExtraSpace;
|
// 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))
|
if ((itemInfo.Cautions != null && itemInfo.Cautions[0].FormatStepData.AlwaysUseExtraLines) || (itemInfo.Notes != null && itemInfo.Notes[0].FormatStepData.AlwaysUseExtraLines))
|
||||||
addExtraSpace = 0;
|
addExtraSpace = 0;
|
||||||
}
|
}
|
||||||
if (addExtraSpace > 0 && MyItemInfo.FormatStepData != null && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.CustomSpacing)
|
if (addExtraSpace > 0 && MyItemInfo.FormatStepData != null)
|
||||||
this.PartsAbove.Add(new vlnText(cb, this, " ", " ", 0, yoff, MyItemInfo.FormatStepData.Font));
|
this.PartsAbove.Add(new vlnText(cb, this, " ", " ", 72, yoff, MyItemInfo.FormatStepData.Font));
|
||||||
|
|
||||||
yoff += addExtraSpace;
|
yoff += addExtraSpace;
|
||||||
|
|
||||||
|
@ -193,7 +193,8 @@ namespace Volian.Print.Library
|
|||||||
if (removedUnderline)
|
if (removedUnderline)
|
||||||
{
|
{
|
||||||
int sep = origTab.IndexOfAny(". ".ToCharArray());
|
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;
|
UnderlineTerminateList utl = myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.UnderlineTerminateList;
|
||||||
@ -211,7 +212,7 @@ namespace Volian.Print.Library
|
|||||||
int indxC = origTab.IndexOf(":");
|
int indxC = origTab.IndexOf(":");
|
||||||
origTab = @"\ul " + origTab.Substring(0, indxC) + @"\ulnone" + origTab.Substring(indxC);
|
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)
|
foreach (UnderlineTerminate ut in utl)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user