From c6122d5a95406dfd55d99826dee27a7fb2415ac4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 5 Aug 2014 12:51:19 +0000 Subject: [PATCH] =?UTF-8?q?Blank=20lines=20around=20Multiple=20Cautions/No?= =?UTF-8?q?tes=20Getting=20Template=20Item/compare=20text=20AND=20type=20(?= =?UTF-8?q?in=20code=20that=20only=20BGE=20Alarms=20uses)=20Blank=20lines?= =?UTF-8?q?=20around=20Multiple=20Cautions/Notes;=20Don=E2=80=99t=20do=20a?= =?UTF-8?q?larm=20box=20if=20box=20ended=20on=20previous=20page=20(only=20?= =?UTF-8?q?occurred=20when=20break=20was=20on=20substep=20of=20non-boxed?= =?UTF-8?q?=20step).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 3 ++- PROMS/Volian.Print.Library/vlnParagraph.cs | 12 ++++++++---- PROMS/fmtxml/PlantSpecific_Calvert.cs | 8 +++++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 106f5e1b..ab305b92 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3650,7 +3650,8 @@ namespace VEPROMS.CSLA.Library if (txt == null && formatData.Templates[indx].type == (MyContent.Type - 20001)) return indx; // now see if we're on the topType, if so, look under this one for the step type // that we're on, the TEXT ALSO NEEDS TO MATCH. If found return the index of it. - if (txt != null && formatData.Templates[indx].text!=null && (txt.Trim() == formatData.Templates[indx].text.Trim())) return indx; + if (txt != null && formatData.Templates[indx].text!=null && (txt.Trim() == formatData.Templates[indx].text.Trim()) + && ((MyContent.Type - 20001) == formatData.Templates[indx].type)) return indx; indx++; } return -1; // didn't find this step type in the template width override list. diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 554749f1..e74de300 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -994,16 +994,19 @@ namespace Volian.Print.Library { // if the first step in box is what broke to next page, then // don't print the box on this page, only print it on next page: + doAlarmBox = true; if (MyItemInfo.MyPrevious == null) MyPageHelper.AlarmYoffStart = 0; else if (MyPageHelper.AlarmYoffEnd == 0) { // doThreeContinues flags when continue messages are printed in the // bottom of the CONDITION/RESPONSE table columns. - doThreeContinues = MyItemInfo.StepLevel>1; + doThreeContinues = MyItemInfo.StepLevel > 1; MyPageHelper.AlarmYoffEnd = CalculateYLocation(yLocation, yTopMargin); } - doAlarmBox = true; + else if (MyPageHelper.AlarmYoffEnd > 0) + doAlarmBox = false; + } } } @@ -1059,10 +1062,10 @@ namespace Volian.Print.Library // For Calvert Alarms, if there was a page break and there is an box around the current // step, need to add the header for the box, which is stored in a macro. Also set the // 'AlarmYoffStart' value to where the vertical lines of the box start on this page. - if (doAlarmBox && MyItemInfo.StepLevel>1) + if (doAlarmBox && MyItemInfo.StepLevel > 1) { float alrmY = CalculateYOffset(yPageStart, yTopMargin); - PartsLeft.Add(new vlnMacro((float)docstyle.Layout.LeftMargin - 12, YOffset-(4*SixLinesPerInch), "H4")); // probably not the right paragraph? + PartsLeft.Add(new vlnMacro((float)docstyle.Layout.LeftMargin - 12, YOffset - (4 * SixLinesPerInch), "H4")); MyPageHelper.AlarmYoffStart = alrmY - SixLinesPerInch; yPageStart -= (4 * SixLinesPerInch); } @@ -2793,6 +2796,7 @@ namespace Volian.Print.Library if (MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Prefix != null && MyItemInfo.FormatStepData.Suffix != null && MyItemInfo.FormatStepData.UseSmartTemplate) return 0; int everyNLines = MyItemInfo.FormatStepData == null ? 1 : MyItemInfo.FormatStepData.StepLayoutData.EveryNLines ?? 1; if (everyNLines == -99) return 0; + if ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && !MyItemInfo.FormatStepData.SpaceIn && MyItemInfo.GetNextItem() == null) return 0; if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.GetNextItem() == null) return SixLinesPerInch; // Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet. //if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch; diff --git a/PROMS/fmtxml/PlantSpecific_Calvert.cs b/PROMS/fmtxml/PlantSpecific_Calvert.cs index 17054d57..e0ba1955 100644 --- a/PROMS/fmtxml/PlantSpecific_Calvert.cs +++ b/PROMS/fmtxml/PlantSpecific_Calvert.cs @@ -23,15 +23,17 @@ namespace fmtxml fmtdata.StepData[2].TabData.IdentEdit = "WINDOW "; fmtdata.StepData[2].TabData.Ident = "WINDOW "; fmtdata.StepData[2].UseOldTemplate = "True"; - fmtdata.StepData[6].StepLayoutData.EveryNLines = "-99"; - fmtdata.StepData[7].StepLayoutData.EveryNLines = "-99"; + //fmtdata.StepData[6].StepLayoutData.EveryNLines = "-99"; + //fmtdata.StepData[7].StepLayoutData.EveryNLines = "-99"; fmtdata.StepData[20].StepLayoutData.EveryNLines = "1"; - fmtdata.StepData[22].StepLayoutData.EveryNLines = "-99"; + //fmtdata.StepData[22].StepLayoutData.EveryNLines = "-99"; fmtdata.StepData[43].UseOldTemplate = "True"; fmtdata.StepData[14].StepLayoutData.EveryNLines = "-99"; fmtdata.StepData[31].StepLayoutData.EveryNLines = "-99"; // not sure if I need this - inheritance fmtdata.StepData[20].StepPrintData.Justify = "Center"; fmtdata.StepData[20].OneLineBeforeTab = "True"; + fmtdata.StepData[20].SpaceIn = "True"; + fmtdata.StepData[20].StepLayoutData.EveryNLines = "1"; fmtdata.BoxData[1].TxtStart = 356; fmtdata.BoxData[1].TxtWidth = 130; fmtdata.BoxData[1].BXMLS = null;