diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index f153e19d..700702a4 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -214,7 +214,7 @@ namespace VEPROMS.CSLA.Library while (indx < Templates.Count) { // level of 0 starts a new group. - if (Templates[indx].level == 0) TopTemplateTypes[Templates[indx + 1].type] = indx+1; + if (Templates[indx].level == 0) TopTemplateTypes[Templates[indx + 1].type] = indx + 1; indx++; } } @@ -2139,6 +2139,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _CompressHPSuper, "@CompressHPSuper"); } } + private LazyLoad _CompressPropSubSup; + public bool CompressPropSubSup + { + get + { + return LazyLoad(ref _CompressPropSubSup, "@CompressPropSubSup"); + } + } private LazyLoad _UndSpecialStepsFoldout; public bool UndSpecialStepsFoldout { diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index ddbeb938..ff064b6a 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -433,6 +433,8 @@ namespace Volian.Print.Library if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue; PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper; PrintOverride.CompressSub = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSub; + PrintOverride.CompressPropSubSup = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressPropSubSup; + OnStatusChanged((mySection.DisplayNumber ?? "") == "" ? mySection.DisplayText : mySection.DisplayNumber, PromsPrinterStatusType.Progress, progress++); // Set up Helper for the particular Section if (_MyHelper == null) diff --git a/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs b/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs index 3a22fb54..6fe24be8 100644 --- a/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs +++ b/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs @@ -17,6 +17,7 @@ namespace Volian.Print.Library { public static bool CompressSub = false; public static bool CompressSuper = false; + public static bool CompressPropSubSup = false; private static System.Drawing.Color _TextColor = System.Drawing.Color.Empty; public static System.Drawing.Color TextColor { @@ -205,13 +206,27 @@ namespace Volian.Print.Library chk.SetUnderline(font.Color, 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size if (visualText.Format.SuperScript > 0) { - chk.SetTextRise(.25F * chk.Font.Size); - if (PrintOverride.CompressSuper) chk.Font.Size = 9; + if (PrintOverride.CompressPropSubSup) + { + chk.SetTextRise(.33F * chk.Font.Size); + chk.Font.Size *= .5f; + } + else + { + chk.SetTextRise(.25F * chk.Font.Size); + if (PrintOverride.CompressSuper) chk.Font.Size = 9; + } + } else if (visualText.Format.SuperScript < 0) { - chk.SetTextRise(-.25F * chk.Font.Size); - if (PrintOverride.CompressSub) chk.Font.Size = 9; + if (PrintOverride.CompressPropSubSup) + chk.Font.Size *= .5f; + else + { + chk.SetTextRise(-.25F * chk.Font.Size); + if (PrintOverride.CompressSub) chk.Font.Size = 9; + } } else chk.SetTextRise(0); diff --git a/PROMS/fmtxml/FmtFileToXml.cs b/PROMS/fmtxml/FmtFileToXml.cs index 5e023c4b..a22959d2 100644 --- a/PROMS/fmtxml/FmtFileToXml.cs +++ b/PROMS/fmtxml/FmtFileToXml.cs @@ -674,6 +674,7 @@ public struct StepSection public string ContinueSectionHeader; public string CompressHPSub; public string CompressHPSuper; + public string CompressPropSubSup; //public string UndSpecialStepsFoldout; public string UnderlineAllMetaTitles; public string BoldOnlySectionZero; @@ -4017,6 +4018,7 @@ namespace fmtxml else fmtdata.SectData.StepSectionData.CompressHPSub = "False"; if (XtraFlags.CompressHPSuper == "True") fmtdata.SectData.StepSectionData.CompressHPSuper = "True"; else fmtdata.SectData.StepSectionData.CompressHPSuper = "False"; + fmtdata.SectData.StepSectionData.CompressPropSubSup = "False"; //if (XtraFlags.UndSpecialStepsFoldout == "True") fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "True"; //else fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "False"; if (XtraFlags.UnderlineAllMetaTitles == "True") fmtdata.SectData.StepSectionData.UnderlineAllMetaTitles = "True"; @@ -5061,6 +5063,7 @@ namespace fmtxml if (msctstp.ContinueSectionHeader != null && msctstp.ContinueSectionHeader == ssctstp.ContinueSectionHeader) subFmt.SectData.StepSectionData.ContinueSectionHeader = "null"; if (msctstp.CompressHPSub != null && msctstp.CompressHPSub == ssctstp.CompressHPSub) subFmt.SectData.StepSectionData.CompressHPSub = "null"; if (msctstp.CompressHPSuper != null && msctstp.CompressHPSuper == ssctstp.CompressHPSuper) subFmt.SectData.StepSectionData.CompressHPSuper = "null"; + if (msctstp.CompressPropSubSup != null && msctstp.CompressPropSubSup == ssctstp.CompressPropSubSup) subFmt.SectData.StepSectionData.CompressPropSubSup = "null"; //if (msctstp.UndSpecialStepsFoldout != null && msctstp.UndSpecialStepsFoldout == ssctstp.UndSpecialStepsFoldout) subFmt.SectData.StepSectionData.UndSpecialStepsFoldout = "null"; if (msctstp.UnderlineAllMetaTitles != null && msctstp.UnderlineAllMetaTitles == ssctstp.UnderlineAllMetaTitles) subFmt.SectData.StepSectionData.UnderlineAllMetaTitles = "null"; if (msctstp.BoldOnlySectionZero != null && msctstp.BoldOnlySectionZero == ssctstp.BoldOnlySectionZero) subFmt.SectData.StepSectionData.BoldOnlySectionZero = "null"; diff --git a/PROMS/fmtxml/PlantSpecific_Calvert.cs b/PROMS/fmtxml/PlantSpecific_Calvert.cs index 18155039..aebe28aa 100644 --- a/PROMS/fmtxml/PlantSpecific_Calvert.cs +++ b/PROMS/fmtxml/PlantSpecific_Calvert.cs @@ -7,8 +7,19 @@ namespace fmtxml { public partial class FmtFileToXml { + private void AddBGEALNfmt(ref FormatData fmtdata) + { + fmtdata.SectData.StepSectionData.CompressHPSub = "False"; + fmtdata.SectData.StepSectionData.CompressPropSubSup = "True"; + fmtdata.PrintData.SpecialCaseCalvert = "True"; + fmtdata.StepData[2].TabData.IdentEdit = "WINDOW "; + fmtdata.StepData[2].TabData.Ident = "WINDOW "; + fmtdata.StepData[42].UseOldTemplate = "True"; + } private void AddBGEEOPfmt(ref FormatData fmtdata) { + fmtdata.SectData.StepSectionData.CompressHPSub = "False"; + fmtdata.SectData.StepSectionData.CompressPropSubSup = "True"; fmtdata.PrintData.UnitNumber = "True"; fmtdata.PrintData.SpecialCaseCalvert = "True"; fmtdata.SectData.SectionNumber.Level0Big = "True"; diff --git a/PROMS/fmtxml/TranslateFMT.XSL b/PROMS/fmtxml/TranslateFMT.XSL index ce459ca3..022b86f6 100644 Binary files a/PROMS/fmtxml/TranslateFMT.XSL and b/PROMS/fmtxml/TranslateFMT.XSL differ