B2020-112: Pagination of complicated AER/RNO
B2020-123: Missing section continue message for Calvert OI & STP
This commit is contained in:
@@ -164,7 +164,10 @@ namespace Volian.Print.Library
|
||||
if (childItemInfo.FormatStepData != null && childItemInfo.FormatStepData.MatchUpRNO)
|
||||
{
|
||||
if (childItemInfo.MyParent != null && childItemInfo.MyParent.MyParent != null && !childItemInfo.MyParent.MyParent.IsHigh)
|
||||
{
|
||||
yoff += vlnPrintObject.SixLinesPerInch;
|
||||
Parent.AdjustForMatchUpRNO = vlnPrintObject.SixLinesPerInch; // B2020-112
|
||||
}
|
||||
}
|
||||
// if this is a caution/note and it has a caution/note substep, do it before this caution/note, so that
|
||||
// it comes above it.
|
||||
@@ -282,6 +285,7 @@ namespace Volian.Print.Library
|
||||
box.DefBox = vlnBox.DOUBLEboxHLS;
|
||||
bxHlsDraw = true;
|
||||
}
|
||||
vlnParagraph para = null;
|
||||
// Comanche peak or WCN bck Step designator
|
||||
if (childItemInfo.IsCaution2 && childItemInfo.SameRowAsParent ||
|
||||
childItemInfo.IsCaution1 && childItemInfo.SameRowAsParent)
|
||||
@@ -305,7 +309,7 @@ namespace Volian.Print.Library
|
||||
box = null;
|
||||
yoff += 1 * vlnPrintObject.SixLinesPerInch;
|
||||
}
|
||||
vlnParagraph para = new vlnParagraph(Parent, cb, childItemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null, yoffRight, true, pp);
|
||||
para = new vlnParagraph(Parent, cb, childItemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null, yoffRight, true, pp);
|
||||
|
||||
// if doing the component list (FNP), keep track of the bottom most columns' data
|
||||
// so this can be returned after the row is done.
|
||||
@@ -392,7 +396,10 @@ namespace Volian.Print.Library
|
||||
yoff += (nxtIsBoxed * vlnPrintObject.SixLinesPerInch);
|
||||
}
|
||||
if (childItemInfo.IsSequential && childItemInfo.NextItem != null && childItemInfo.MyParent.IsHigh && ((childItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.XBlankW1stLevSub) == E_DocStructStyle.XBlankW1stLevSub))
|
||||
{
|
||||
yoff += vlnPrintObject.SixLinesPerInch;
|
||||
if (para != null) para.AdjustForXBlankW1stLevSub = vlnPrintObject.SixLinesPerInch; // B2020-112
|
||||
}
|
||||
boxHLS = false;
|
||||
lastChild = childItemInfo;
|
||||
}
|
||||
@@ -1196,6 +1203,7 @@ namespace Volian.Print.Library
|
||||
get { return _PrintHeader; }
|
||||
set { _PrintHeader = value; }
|
||||
}
|
||||
private bool CalvertPrintedSubSectTitle = false; // B2020-123
|
||||
private static List<string> myAttributes = new List<string>();
|
||||
private static void AddAttribute(string attr)
|
||||
{
|
||||
@@ -1490,7 +1498,9 @@ namespace Volian.Print.Library
|
||||
}
|
||||
return (prTab + thisTab.Trim()).TrimEnd(".".ToCharArray());
|
||||
}
|
||||
private static bool DoSubs = true; // flag whether to print substeps (don't if doing continued checklist header)
|
||||
private static bool DoSubs = true; // flag whether to print substeps (don't if doing continued checklist header)
|
||||
public float AdjustForXBlankW1stLevSub = 0; // B2020-112 this & next line
|
||||
public float AdjustForMatchUpRNO = 0;
|
||||
protected float _ContinueHeight = 0;
|
||||
public virtual float ContinueHeight
|
||||
{
|
||||
@@ -1783,8 +1793,9 @@ namespace Volian.Print.Library
|
||||
if (MyPageHelper.CreatingSupInfoPage) yPageStart -= (2 * SixLinesPerInch);
|
||||
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, null);
|
||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection))
|
||||
if ((!MyItemInfo.IsSection || MyItemInfo.IsSubsection) && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection))
|
||||
{
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert ) CalvertPrintedSubSectTitle = true; // B2020-123
|
||||
SectionConfig sch = MyItemInfo.ActiveSection.MyConfig as SectionConfig;
|
||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||
}
|
||||
@@ -2183,6 +2194,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
int profileDepth2 = ProfileTimer.Push(">>>> vlnParagraph.ParagraphToPdf");
|
||||
if (MyItemInfo.IsSubsection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert) CalvertPrintedSubSectTitle = true; // B2020-123
|
||||
yPageStart = ParagraphToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
|
||||
ProfileTimer.Pop(profileDepth2);
|
||||
// If the yPageStart changes by more than a small amount (pagination) in the RNO (right column), then update
|
||||
@@ -2632,7 +2644,7 @@ namespace Volian.Print.Library
|
||||
// the second, third, etc background Caution/Note pages begin printing two additional lines from the top of the page
|
||||
// to fix, added a check to see the the item we are printing has the PageBrrakOnStep flag set, if it's set,
|
||||
// then DON'T add two lines to the yPageStart (for the top conitnue message)
|
||||
if (myMsg != null && myMsg != "" && !MyItemInfo.FormatStepData.PageBreakOnStep)
|
||||
if (myMsg != null && myMsg != "" && !MyItemInfo.IsSection && !MyItemInfo.FormatStepData.PageBreakOnStep) // B2020-123
|
||||
{
|
||||
yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message
|
||||
if (myMsg.IndexOf(@"%sR") > -1)
|
||||
@@ -6630,8 +6642,27 @@ namespace Volian.Print.Library
|
||||
if (!this.ContainsKey(stepLevel))
|
||||
this.Add(stepLevel, new SortedDictionary<float, vlnParagraph>());
|
||||
// using a negative for yLocation so that its in descending order:
|
||||
if (!this[stepLevel].ContainsKey(-yLocation))
|
||||
this[stepLevel].Add(-yLocation, para);
|
||||
// B2020-112: Make various adjustments to location if there are format flags used
|
||||
float adjust = para.YVeryTop - para.YTop;
|
||||
if (para.MyItemInfo.MyParent.IsHigh && (para.ChildrenAbove == null || para.ChildrenAbove.Count == 0))
|
||||
{
|
||||
//Console.WriteLine("Adjust Add extra Line (flag) = '{0}'", para);
|
||||
adjust -= para.AdjustForXBlankW1stLevSub;
|
||||
}
|
||||
else if (para.MyParent.MyItemInfo.IsHigh && (para.MyParent.ChildrenAbove != null && para.MyParent.ChildrenAbove.Count > 0)
|
||||
&& para.MyParent.ChildrenAbove[0] == para)
|
||||
{
|
||||
//Console.WriteLine("Adjust Add extra Line (flag) = '{0}'", para);
|
||||
adjust -= para.MyParent.AdjustForXBlankW1stLevSub;
|
||||
}
|
||||
if (para.AdjustForMatchUpRNO != 0 && (para.ChildrenAbove == null || para.ChildrenAbove.Count == 0))
|
||||
adjust -= para.AdjustForMatchUpRNO;
|
||||
else if (para.MyParent.AdjustForMatchUpRNO != 0 && (para.MyParent.ChildrenAbove != null && para.MyParent.ChildrenAbove.Count > 0)
|
||||
&& para.MyParent.ChildrenAbove[0] == para)
|
||||
adjust -= para.MyParent.AdjustForMatchUpRNO;
|
||||
|
||||
if (!this[stepLevel].ContainsKey(-(yLocation + adjust)))
|
||||
this[stepLevel].Add(-(yLocation + adjust), para);
|
||||
}
|
||||
}
|
||||
public class ParagraphLocations : List<ParagraphLocation>
|
||||
|
Reference in New Issue
Block a user