From c3f58a6df73a13f36423a37a2829c7e3bb5cf8e5 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 7 Aug 2015 14:31:28 +0000 Subject: [PATCH] Fixed B2015-005: Last bullet had inconsistent line spacing compared to previous bulleted sub-step --- PROMS/Volian.Print.Library/vlnParagraph.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 7e965360..1478a2f5 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -4127,14 +4127,21 @@ namespace Volian.Print.Library if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm || (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert && MyItemInfo.IsStep && MyItemInfo.FormatStepData.StepLayoutData.STBoxindex != null)) { - if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn - && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) - && (MyItemInfo.NextItem == null || MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)) return 0; + if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn + && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) + && (MyItemInfo.NextItem == null || MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)) return 0; if (everyNLines == 99 && MyItemInfo.NextItem == null) - { - if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0; - if (MyItemInfo.MyParent.NextItem != null && MyItemInfo.MyParent.NextItem.MyContent.Type == MyItemInfo.MyContent.Type) return 0; + { + if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0; + if (MyItemInfo.MyParent.NextItem != null && MyItemInfo.MyParent.NextItem.MyContent.Type == MyItemInfo.MyContent.Type) return 0; + } } + // B2015-005: if there isn't a blank line after this step && it has children, see if there shouldn't be + // a blank line, i.e. if the first substep child's type is the same as this. + if (!MyItemInfo.IsHigh && everyNLines == 99 && MyItemInfo.NextItem == null && MyItemInfo.HasChildren) + { + ItemInfo chld = MyItemInfo.FirstChild(E_FromType.Step); + if (chld != null && chld.MyContent.Type == MyItemInfo.MyContent.Type) return 0; } if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; // Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet.