diff --git a/PROMS/Volian.Print.Library/Pagination.cs b/PROMS/Volian.Print.Library/Pagination.cs index 08130f74..879ee0b0 100644 --- a/PROMS/Volian.Print.Library/Pagination.cs +++ b/PROMS/Volian.Print.Library/Pagination.cs @@ -54,7 +54,7 @@ namespace Volian.Print.Library // The 3 was changed to 2 for the end line & the line below. The blank line below the step gives the blank // line above the end message, thus 2 not 3. This change was made on July 20, 2011 by RHM & KBR. The // procedure in questions was VEWCNEMG\EMGAPP.PRC, ES-01, Step 8. - float yEndMsg = !_skipEndMessage && !MyItemInfo.IsSection && MyItemInfo.MyHLS != null && MyItemInfo.MyHLS.NextItem == null && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? 2 * SixLinesPerInch : 0; + float yEndMsg = !_skipEndMessage && !MyItemInfo.IsSection && MyItemInfo.MyHLS != null && MyItemInfo.MyHLS.GetNextItem() == null && (MyItemInfo.MyDocStyle.End.Message ?? "") != "" ? 2 * SixLinesPerInch : 0; // also consider if there is a phone list at the bottom of the page, add the amount of space the phone // list requires onto yEndMsg to make it easier to figure out pagination. diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 923b69ae..5f4d3d0e 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -109,7 +109,7 @@ namespace Volian.Print.Library { if ((childItemInfo.IsCaution || childItemInfo.IsNote) && childItemInfo.MyPrevious != null && childItemInfo.MyPrevious.MyContent.Type != childItemInfo.MyContent.Type && - childItemInfo.NextItemCount > 0 && childItemInfo.MyContent.Type == childItemInfo.NextItem.MyContent.Type) + childItemInfo.NextItemCount > 0 && childItemInfo.MyContent.Type == childItemInfo.GetNextItem().MyContent.Type) childItemInfo.SetupTags(); // added for V.C. Summer Transition caution in EOP-15.0 step 5.4 if (lastHeader != null) { @@ -588,8 +588,8 @@ namespace Volian.Print.Library { // This section of code draws the lines around the substeps (the actual table part) Paragraph horzLine = new Paragraph(ii.ActiveFormat.PlantFormat.FormatData.BoxList[0].BXHorz, iSymblFont); - bool bottomOfTable = (ii.NextItem == null || ii.NextItemCount == 0) || - (MyPageHelper.ParaBreaks.Count > 0 && MyPageHelper.ParaBreaks[0].MyItemInfo.ItemID == ii.NextItem.ItemID); + bool bottomOfTable = (ii.GetNextItem() == null || ii.NextItemCount == 0) || + (MyPageHelper.ParaBreaks.Count > 0 && MyPageHelper.ParaBreaks[0].MyItemInfo.ItemID == ii.GetNextItem().ItemID); // if bottom of table use different cross/beg/end chars than if in middle of table. Paragraph leftLine = new Paragraph(bottomOfTable ? bx.BXLLC : bx.BXMLS, iSymblFont); Paragraph rightLine = new Paragraph(bottomOfTable ? bx.BXLRC : bx.BXMRS, iSymblFont); @@ -634,7 +634,7 @@ namespace Volian.Print.Library // Now handle middle parts of the table. For whatever sub level we're at, draw the cross character // and the horizontal. This is case where the component number may have multiple descriptions,positions, etc. associated // with it. - if (!ii.MyParent.IsHigh && ii.NextItem != null && ii.NextItemCount > 0) + if (!ii.MyParent.IsHigh && ii.GetNextItem() != null && ii.NextItemCount > 0) { // draw horizontally from this sublevel to the end. int sublev = 0; @@ -683,7 +683,7 @@ namespace Volian.Print.Library float retval = yLocation; // Check if only one line, i.e. "Height < (1.2F * IParagraph.Leading". The Leading can be for six or seven lines per inch, so the 1.2 // multiplier accounts for both. - if (!MyItemInfo.IsStepSection && MyItemInfo.FormatStepData.CenterOneLineOnly && ((MyItemInfo.MyPrevious == null && MyItemInfo.NextItem == null) || MyItemInfo.FormatStepData.SeparateBox) && Height < (1.2F * IParagraph.Leading)) + if (!MyItemInfo.IsStepSection && MyItemInfo.FormatStepData.CenterOneLineOnly && ((MyItemInfo.MyPrevious == null && MyItemInfo.GetNextItem() == null) || MyItemInfo.FormatStepData.SeparateBox) && Height < (1.2F * IParagraph.Leading)) IParagraph.Alignment = Element.ALIGN_CENTER; // if this step is centered, but not part of the checklist or valvelist format, use itextsharp to center it. // if it was part of the checklist or valvelist, then the centering is based on the column definitions for the table and @@ -1173,7 +1173,7 @@ namespace Volian.Print.Library yPageStart = yPageStartRNO; yPageStart = ChildrenBelow.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin); - if (MyItemInfo.IsHigh && MyItemInfo.NextItem == null) // last hls, add the 'end' message, if there is one + if (MyItemInfo.IsHigh && MyItemInfo.GetNextItem() == null) // last hls, add the 'end' message, if there is one { DocStyle docstyle = MyItemInfo.MyDocStyle; // if the EndForSingle format flag is set to false, then we do not print an End message if the section diff --git a/PROMS/Volian.Print.Library/vlnTab.cs b/PROMS/Volian.Print.Library/vlnTab.cs index a44fd1ef..233826da 100644 --- a/PROMS/Volian.Print.Library/vlnTab.cs +++ b/PROMS/Volian.Print.Library/vlnTab.cs @@ -151,7 +151,7 @@ namespace Volian.Print.Library // Because of the different font sizes, when the Caution/Note did have have a bullet, the positioning // was off by the lenght of IdentB (the bullet string), thus the "alignAsIfBulleted" bool if ((myparent.MyItemInfo.FormatStepData != null) && myparent.MyItemInfo.FormatStepData.TabData.Bullet.Separate) - if (myparent.MyItemInfo.MyPrevious != null || myparent.MyItemInfo.NextItem != null) + if (myparent.MyItemInfo.MyPrevious != null || myparent.MyItemInfo.GetNextItem() != null) SeparateBullet = true; else alignAsIfBulleted = true; @@ -247,7 +247,7 @@ namespace Volian.Print.Library Rtf = Rtf.Replace("Caution ", @"\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?"); else { - if (myparent.MyItemInfo.FormatStepData != null && !myparent.MyItemInfo.FormatStepData.AlwaysTab && myparent.MyItemInfo.NextItem == null) + if (myparent.MyItemInfo.FormatStepData != null && !myparent.MyItemInfo.FormatStepData.AlwaysTab && myparent.MyItemInfo.GetNextItem() == null) Rtf = Rtf.Replace(@"\u9679?", ""); Rtf = Rtf.Replace("Caution ", @"\u61507?\u61537?\u61557?\u61556?\u61545?\u61551?\u61550?\u61472?\u61472?"); }