C2024-003-print-sub-section

This commit is contained in:
Paul Larsen 2024-02-26 12:48:54 -05:00
parent 72457d956e
commit 9804cf0fce

View File

@ -1607,6 +1607,7 @@ namespace Volian.Print.Library
// if parent was continuous & this is separate, don't reset document style to subsection (next page) type
// this was putting incorrect pagelist item on parent section's page. This occurred in BGE/OI3 set/OI-7 procedure/10.0 Attachments.
// B2017-273 added a check for Farley format, we don't want the subsection pagelist infor to appear on the parent section page - works with Paginate() logic - (section has steps and a sub-section ex: FNP-2-EEP-0 Attachment 4)
// C2024-003 fixed a null exception bug by changing MyParent.MyItemInfo to MyItemInfo.MyParent.
if (!MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.WCNTraining && !MyItemInfo.ActiveFormat.Name.ToUpper().StartsWith("FNP") && (MyItemInfo.MyParent as SectionInfo).IsSeparatePagination() || !(MyItemInfo as SectionInfo).IsSeparatePagination())
{
MyPageHelper.MySection = MyItemInfo as SectionInfo;
@ -2156,8 +2157,8 @@ namespace Volian.Print.Library
{
vlnParagraph sectContPara;
string contMsg = (MyItemInfo.ActiveSection != null) ? MyItemInfo.ActiveSection.MyDocStyle.Continue.SectionTitle.AppendToTitle : ""; // C2018-003 fixed use of getting the active section
// For Calvert, the xoffset will be the highest level sections xoffset (there are metasections,
// don't use their xoffset or the continue message is indented too much)
// For Calvert, the xoffset will be the highest level sections xoffset (there are metasections,
// don't use their xoffset or the continue message is indented too much)
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
{
float secContinueTabXoff = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin;
@ -2176,7 +2177,7 @@ namespace Volian.Print.Library
}
// get to the correct section for the message, i.e. if on a section, the message should be the parent
// section (not the activesection which is myself); if on a step, the message should be the active section
ItemInfo sectForCont = MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection ? MyItemInfo.MyParent : MyItemInfo.ActiveSection;
ItemInfo sectForCont = MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection ? MyItemInfo.MyParent : MyItemInfo.ActiveSection; //
sectContPara = new vlnParagraph(MyParent.MyParent, cb, sectForCont, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false, MyPromsPrinter);
if (sectContPara.PartsLeft.Count > 0)
{
@ -2280,7 +2281,7 @@ namespace Volian.Print.Library
// is a single column section.
//bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
SectionInfo si = MyItemInfo.ActiveSection as SectionInfo; // C2018-003 fixed use of getting the active section
// B2017-201 if si is null we need to get it via the ItemID
// B2017-201 if si is null we need to get it via the ItemID
if (si == null)
si = SectionInfo.Get(MyItemInfo.MyActiveSection.ItemID); // MyActiveSection does not try to resolve anything - ActiveSection is call above and will resolve and set MyActiveSection
bool _skipEndMessage = (si == null || si.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One) && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
@ -2667,8 +2668,8 @@ namespace Volian.Print.Library
int istr = 0;
int Rsidx = 0;
MyPageHelper.TopMessageRs.Add(vpo as vlnText); // this appends a previous step designator associated with this sub-step (there may be more than one and/or might have multiple lines)
// we are processing the step designator on the top continue message in reverse order
// we therefore need to adjust the y location of multiple step designors attached tothe top continue message
// we are processing the step designator on the top continue message in reverse order
// we therefore need to adjust the y location of multiple step designors attached tothe top continue message
if (MyPageHelper.TopMessageRs.Count > 3)
{
Rsidx = MyPageHelper.TopMessageRs.Count - 1;
@ -2835,13 +2836,13 @@ namespace Volian.Print.Library
{
// Vogtle Alarms: Their alarms are set up differently than standard procedures - the HLS in Vogtle
// alarms is a section in other procedures. The top continue message is shown when a break occurs:
// • A continued message will appear on the top of the page ONLY if the pagination occurs anywhere
// A continued message will appear on the top of the page ONLY if the pagination occurs anywhere
// within the first level substep. If, for example, the page break occurs between substep 3 and substep
// 4 as in example 2, no continued message will appear on the top of the page.
// • If a continued message is needed, the continued message will include the first level substep number
// if it is a sequential substep, such as “5. (continued)”. If it is NOT a sequential substep, then only
// If a continued message is needed, the continued message will include the first level substep number
// if it is a sequential substep, such as “5. (continued)”. If it is NOT a sequential substep, then only
// the word “(continued)” will appear.
// • If a page break occurs between high level steps, such as before “Causes:”, then no continued message is needed.
// If a page break occurs between high level steps, such as before “Causes:”, then no continued message is needed.
bool doMessage = true;
if (MyItemInfo.IsHigh) doMessage = false; // at high, don't do message
if (MyItemInfo.MyParent.IsHigh) doMessage = false; // at first level, don't do message
@ -3032,12 +3033,12 @@ namespace Volian.Print.Library
}
switch (docstyle.Continue.Bottom.Location)
{
case E_ContBottomLoc.EndOfText: // place continue string at end of text
// msg_yLocation accounts for extra lines in message from docstyle; and BottomContent is the actual
// location of the last line of text on page.
//msg_yLocation = ((float)(MyPageHelper.BottomContent??0) - (SixLinesPerInch * MyPageHelper.YMultiplier)); // B2018-080 null reference check added
// B2019-079 changed yLocaton - msg_yLocation to '+'. The msg_ylocation has an adjustment for adding an extra line by moving down the page, this was moving
// the line up the page (double negative).
case E_ContBottomLoc.EndOfText: // place continue string at end of text
// msg_yLocation accounts for extra lines in message from docstyle; and BottomContent is the actual
// location of the last line of text on page.
//msg_yLocation = ((float)(MyPageHelper.BottomContent??0) - (SixLinesPerInch * MyPageHelper.YMultiplier)); // B2018-080 null reference check added
// B2019-079 changed yLocaton - msg_yLocation to '+'. The msg_ylocation has an adjustment for adding an extra line by moving down the page, this was moving
// the line up the page (double negative).
msg_yLocation = yLocation + msg_yLocation - (SixLinesPerInch * MyPageHelper.YMultiplier); //B2019-021 yLocation accounts for checkoffs
if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation)
{ // Adjusted Continue Message Y Offset
@ -5646,8 +5647,8 @@ namespace Volian.Print.Library
}
// if this is a caution or note, put the change bar to the right of the text:
//if ((paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote) && fixedChgCol < -10) return -fixedChgCol;
if ((fixedChgCol == 0))// && paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
//if ((fixedChgCol==0) || paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
if ((fixedChgCol == 0)) // && paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
//if ((fixedChgCol==0) || paragraph.MyItemInfo.IsCaution || paragraph.MyItemInfo.IsNote)
{
float rightEdge = (paragraph.XOffset + paragraph.Width + 5);
rightEdge -= (float)paragraph.MyItemInfo.MyDocStyle.Layout.LeftMargin;
@ -6175,8 +6176,8 @@ namespace Volian.Print.Library
}
}
XOffset += (itemInfo.FormatStepData.Font.CharsToTwips * adj); // indent 2 characters for background steps
// B2018-146 Adjust the width to match the HLS Right Margin.
//if (itemInfo.ActiveFormat.Name.StartsWith("WCN")) -- Not needed since IsBackgroundStep
// B2018-146 Adjust the width to match the HLS Right Margin.
//if (itemInfo.ActiveFormat.Name.StartsWith("WCN")) -- Not needed since IsBackgroundStep
Width = this.MyHighLevelParagraph.Width + this.MyHighLevelParagraph.XOffset - this.XOffset;
//else
// Width -= (itemInfo.FormatStepData.Font.CharsToTwips * adj); // Adjust width by 2 characters
@ -6755,7 +6756,7 @@ namespace Volian.Print.Library
else
{
float oldWidth = _WidthAdjustBox + (float)bx.TxtWidth - tabWidth; // add 1 to get it to wrap like 16Bit
// B2018-096 AEP 082.002CD Note Box overlapping Step Box
// B2018-096 AEP 082.002CD Note Box overlapping Step Box
if (MyParent.MyItemInfo.FormatStepData != null && MyParent.MyItemInfo.FormatStepData.BoxIt) // B2018-100 not for parents that are sections // B2018-098 only adjust width if parent has Boxit turned on
{
Width = Math.Min(MyParent.Width + MyParent.XOffset - XOffset, oldWidth);