diff --git a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs index 638029e7..10ea750c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs @@ -738,9 +738,13 @@ namespace VEPROMS.CSLA.Library { get { - // if null - return a "Y" + // westinghouse's single column was not indented, so added a flag for them + // so that default is "N". all other plants should default to "Y" + string auto = "Y"; + if ((_Section != null && _Section.MySectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.DefaultNoSubAutoIndent) + || (_SectionInfo != null && _SectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.DefaultNoSubAutoIndent)) auto = "N"; string tmp = _Xp["SubSection", "AutoIndent"]; - return tmp==null||tmp==""?"N":tmp; + return tmp == null || tmp == "" ? auto : tmp; } set { diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index 6d52595d..73a0930f 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -629,6 +629,9 @@ namespace VEPROMS.CSLA.Library _MyLog.Error("Could not Adjust Margins", ex); } LBSelection selxy = hasRos ? FindXyPlot() : null; + string pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png"; + if (File.Exists(pngFile)) File.Delete(pngFile); + int filecount = 1; while (selxy != null) { string xyplot = selxy.Text; @@ -655,7 +658,8 @@ namespace VEPROMS.CSLA.Library selxy.Text = ""; if (cnt>0)for (int icnt = 0; icnt < cnt; icnt++) selxy.Text = selxy.Text + "\r"; - string pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png"; + pngFile = VlnSettings.TemporaryFolder + @"\XYPlot" + filecount.ToString() + @".png"; //@"C:\Temp\XYPlot1.png"; + filecount++; RectangleF plotRect = CreatePlot(pngFile, xyplot, 600F, FormForPlotGraphics); float xAdjust = (float)-sect.MyDocStyle.Layout.LeftMargin; @@ -729,7 +733,7 @@ namespace VEPROMS.CSLA.Library val = val.Substring(pstart); // set val to the start of the plot commands //float width = 72 * Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) / 12.0F; //float height = 72 * lines / 6.0F; - string pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png"; + pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png"; RectangleF plotRect = CreatePlot(pngFile, val, 600F, FormForPlotGraphics); //LBShape shape = myDoc.Shapes.AddPicture(@"C:\Temp\XYPlot.png", 0, 0, sel.Range); float x = (float)sel.get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage); diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 6f27ff29..dc9c6a91 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1232,7 +1232,7 @@ namespace VEPROMS.CSLA.Library #endregion public int FoldoutIndex() { - if ((ActiveSection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) != 0) return 0; + if (ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (ActiveSection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) != 0) return 0; // now check for floating foldouts. If there is a floating foldout, also find which one it uses. // This is data off of the ? if (ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && ActiveSection.IsDefaultSection) @@ -2395,7 +2395,7 @@ namespace VEPROMS.CSLA.Library _MyTab.Text = ""; _MyTab.CleanText = ""; return; - } + } int stepType = (int)(MyContent.Type % 10000); string tbformat = IsInRNO ? FormatStepData.TabData.RNOIdentPrint : FormatStepData.TabData.IdentPrint; if (ActiveFormat.Name.ToUpper() == "WCNCKL" || ActiveFormat.Name.ToUpper() == "WSTCKL") @@ -2545,7 +2545,7 @@ namespace VEPROMS.CSLA.Library string roman = RomanNumbering(ordinal); tbformat = tbformat.Replace("{roman}", roman.ToLower()); tbformat = tbformat.Replace("{ROMAN}", roman); - tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : ordinal.ToString().PadLeft(2)); + tbformat = tbformat.Replace("{numeric}", trimTabStart ? ordinal.ToString() : FormatStepData.AtLeastTwoDigits ? ordinal.ToString().PadLeft(2,'0') : ordinal.ToString().PadLeft(2)); tbformat = tbformat.Replace("{numericWpar}", ordinal.ToString()); if (tbformat.Contains("{asterisk}")) { @@ -2713,9 +2713,14 @@ namespace VEPROMS.CSLA.Library { if (ii.DisplayNumber != null && ii.DisplayNumber != "") { - SectionConfig sc = ii.MyConfig as SectionConfig; - if (sc != null && sc.SubSection_AutoIndent == "Y") - countlev++; + SectionInfo si = SectionInfo.Get(ii.ItemID); + if (si != null) + { + SectionConfig sc = new SectionConfig(si); + //SectionConfig sc = ii.MyConfig as SectionConfig; + if (sc != null && sc.SubSection_AutoIndent == "Y") + countlev++; + } } ii = ii.MyParent; } diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index f16ad2ba..3eadfe3c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1629,6 +1629,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _UseMetaSections, "@UseMetaSections"); } } + private LazyLoad _DefaultNoSubAutoIndent; + public bool DefaultNoSubAutoIndent + { + get + { + return LazyLoad(ref _DefaultNoSubAutoIndent, "@DefaultNoSubAutoIndent"); + } + } private LazyLoad _NonEditableSteps; public bool NonEditableSteps { diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 9e49279e..1087284a 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -294,7 +294,7 @@ namespace Volian.Print.Library int cnt = 0; foreach (SectionInfo mySection in myProcedure.Sections) { - if (mySection.MyContent.Number.ToUpper() == "FOLDOUT" + if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && mySection.MyContent.Number.ToUpper() == "FOLDOUT") || (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT"))) { // if floating foldouts, need a list of sections & foldoutreaders. Just do first for now. @@ -371,7 +371,7 @@ namespace Volian.Print.Library int finalMessageSectionID = GetFinalMessageSectionID(myProcedure, doingFoldout); foreach (SectionInfo mySection in myProcedure.Sections) { - if ((mySection.MyContent.Number.ToUpper() == "FOLDOUT" + if (((mySection.MyContent.Number.ToUpper() == "FOLDOUT" && myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts) || (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT"))) != doingFoldout) continue; if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 17430458..9b5bda79 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -49,7 +49,7 @@ namespace Volian.Print.Library if (childItemInfo.Notes != null && (childItemInfo.IsCaution || childItemInfo.IsNote)) yoff = Add(cb, childItemInfo.Notes, xoff, yoff, yoffRight, rnoLevel, maxRNO, formatInfo); int? bxIndx = childItemInfo.FormatStepData==null?-1:childItemInfo.FormatStepData.StepLayoutData.STBoxindex; - if (bxIndx != -1 && (bxIndex != bxIndx || childItemInfo.FormatStepData.BoxIt)) + if (!childItemInfo.IsHigh && (bxIndx != -1 && (bxIndex != bxIndx || childItemInfo.FormatStepData.BoxIt))) { if (childItemInfo.FormatStepData.BoxIt) // this is a boxed HLS { @@ -76,14 +76,17 @@ namespace Volian.Print.Library } else // Change Box Style { - if (box != null) box.Height = yoff - box.YOffset; // new height, with children - box = new vlnBox(); - box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx]; - int ln = 1; // a format flag determines whether there is a space before the note/caution. - if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++; - if (childItemInfo.MixCautionNotesDiffType()) ln += 2; - box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch); - yoff += ln * vlnPrintObject.SixLinesPerInch; + if (bxIndx != null) + { + if (box != null) box.Height = yoff - box.YOffset; // new height, with children + box = new vlnBox(); + box.MyBox = formatInfo.PlantFormat.FormatData.BoxList[(int)bxIndx]; + int ln = 1; // a format flag determines whether there is a space before the note/caution. + if (childItemInfo.FormatStepData.OneLineBeforeTab) ln++; + if (childItemInfo.MixCautionNotesDiffType()) ln += 2; + box.YOffset = yoff + ((ln - 1) * vlnPrintObject.SixLinesPerInch); + yoff += ln * vlnPrintObject.SixLinesPerInch; + } } bxIndex = bxIndx; } diff --git a/PROMS/fmtxml/AppendPlantSpecific.cs b/PROMS/fmtxml/AppendPlantSpecific.cs index b0bf5a70..aede0ae6 100644 --- a/PROMS/fmtxml/AppendPlantSpecific.cs +++ b/PROMS/fmtxml/AppendPlantSpecific.cs @@ -60,9 +60,15 @@ namespace fmtxml case "SHESSD.FMT": AddSHESSDfmt(ref fmtdata); break; + case "CPLSSDD.FMT": + AddCPLSSDDfmt(ref fmtdata); + break; + case "IP3.X15": + AddIP3_15fmt(ref fmtdata); + break; } } - + private void AddWCNCKLFmt(ref FormatData fmtdata) { fmtdata.BoxData[3].End = 518; @@ -919,11 +925,25 @@ namespace fmtxml fmtdata.StepData[18].TabData.RNOIdent = null; fmtdata.StepData[23].MatchUpRNO = "True"; fmtdata.BoxData[2].TxtWidth = 432; + fmtdata.TransData.TransTypeData[6].TransFormat = ""; // not used and not supported in code + fmtdata.TransData.TransTypeData[7].TransFormat = ""; } private void AddSHESSDfmt(ref FormatData fmtdata) { fmtdata.StepData[24].StepLayoutData.STExtraSpace = null; } + private void AddCPLSSDDfmt(ref FormatData fmtdata) + { + fmtdata.SectData.StepSectionData.StpSectLayData.PMode = 0; + fmtdata.SectData.StepSectionData.StpSectLayData.RNOWidthAlt = "0,90,0"; + } + private void AddIP3_15fmt(ref FormatData fmtdata) + { + fmtdata.SectData.StepSectionData.StpSectLayData.ShowSectionTitles = "False"; + fmtdata.BoxData[4].TxtStart = 36; + fmtdata.BoxData[4].TxtWidth = 426; + + } } public partial class FmtToXml { @@ -1608,6 +1628,9 @@ namespace fmtxml case "SHESSD.DOC": AddSHESSDDOC(ref dcstyles); break; + case "CPLSSDD.DOC": + AddCPLSSDDDoc(ref dcstyles); + break; // in Wolf Creek single column, the Table Of Contents document style was not included in the // count of pages for the automatic Table Of Contents. This page should be counted in the // page count when doing the automatic ToC so that page numbers in Toc Match page numbers @@ -1628,11 +1651,15 @@ namespace fmtxml break; } } - + private void AddCPLSSDDDoc(ref DocStyles dcstyles) + { + dcstyles.DcStyles[2].PageWidth = 576; + } private void AddSHESSDDOC(ref DocStyles dcstyles) { dcstyles.DcStyles[0].CTMargin = 0; dcstyles.DcStyles[0].ContTop = ""; + dcstyles.DcStyles[0].PageLength = 618; dcstyles.DcStyles[5].CTMargin = 0; dcstyles.DcStyles[5].ContTop = ""; } @@ -1649,6 +1676,7 @@ namespace fmtxml dcstyles.DcStyles[6].dstyle = null; dcstyles.DcStyles[7].dstyle = null; dcstyles.DcStyles[8].dstyle = null; + dcstyles.DcStyles[1].PageLength = 564; } public void AddREGSam1DOC(ref DocStyles dcstyles) diff --git a/PROMS/fmtxml/WST1all.xml b/PROMS/fmtxml/WST1all.xml index 971a32f7..ffe1df5d 100644 Binary files a/PROMS/fmtxml/WST1all.xml and b/PROMS/fmtxml/WST1all.xml differ diff --git a/PROMS/fmtxml/WSTBCKall.xml b/PROMS/fmtxml/WSTBCKall.xml index 32428d9c..be612a26 100644 Binary files a/PROMS/fmtxml/WSTBCKall.xml and b/PROMS/fmtxml/WSTBCKall.xml differ