diff --git a/PROMS/fmtxml/FmtFileToXml.cs b/PROMS/fmtxml/FmtFileToXml.cs index 77071632..9f9926b1 100644 --- a/PROMS/fmtxml/FmtFileToXml.cs +++ b/PROMS/fmtxml/FmtFileToXml.cs @@ -250,7 +250,7 @@ public struct XtraFlgs public string DontPrintNoTitle; // public string PRINTCAUTION1CONTINUED // not migrated: used in bgeal // public string USECHECKOFFSINS2 // not used - // public string NOTESTOFOOTNOTES // not migrated: used in ano2vlv, some bge, many rbnd + public string NotesToFootnotes; // used in ano2vlv, some bge, many rbnd, NSPF00.in public string UndSpecialStepsFoldout; // public string DONTAUTOENDFORMATTING // not migrated: used in various bge // public string REMOVEBASISFROMTRANS // not migrated: used in various bge @@ -389,7 +389,7 @@ public struct XtraFlgs public string NoRNO; // public string ALTWFORWARNINGS // not migrated: used in ata, some bge & some rbnd public string OnlySingleColumn; - // public string NULLBOX // not migrated: used in bgeeop + public string NullBox; // used in bgeeop and NSP public string XChngTranSpForHard; public string WolfcreekCKLBackgndFormat; #endregion @@ -456,6 +456,7 @@ public struct Procedure public string CapitalizeTitle; public string ChangeStyleForEverySection; public string PrintNoTitle; + public string NotesToFootnotes; public string CountFoldoutPages; /* End of Format flags */ public string[] ProcedureSuffix; @@ -757,6 +758,7 @@ public struct StepSectionLayout public string OverrideEnhancedTabs; public string RNO; public string OnlySingleColumn; + public string NullBox; /* End of format flags */ public VE_Font VertStyle; public TopOfPg TopOfPage; @@ -858,7 +860,10 @@ public struct Step public string ParentType; public string Inactive; public string StepTypeColOverride; - public string Sep; + public string StepTypeColOverrideEdit; + public string StepTypeWidthOverride; + public string StepTypeWidthOverrideEdit; + public string Sep; public string Prefix; public string Suffix; public string UnderlineTheseChar; @@ -987,7 +992,6 @@ public struct Layout public string PageBreakAtTypeChange; public string AlignWithParentTab; //public string RtCheckOffGroups; - public string StepTypeWidthOverride; } [Serializable] public struct Tab @@ -1279,6 +1283,7 @@ namespace fmtxml public static int USEMULTILINESECTIONTITLE = 0x0010; public static int PAGEBREAKONFIRSTBLANKLINE = 0x0040; public static int DONTPRINTNOTITLE = 0x0080; + public static int NOTESTOFOOTNOTES = 0x0400; public static int UNDSPECIALSTEPSFOLDOUT = 0x0800; public static int PUTONPAGEBYITSELF = 0x4000; @@ -1368,6 +1373,7 @@ namespace fmtxml // XtraFlag[18] (was VEAIRFLAG) from 16-bit... public static int NORNO = 0x0002; public static int ONLYSINGLECOLUMN = 0x0008; + public static int NULLBOX = 0x0010; public static int XCHNGTRANSPFORHARD = 0x0020; public static int WOLFCREEKCKLBACKGNDFORMAT = 0x0040; #endregion @@ -1999,6 +2005,7 @@ namespace fmtxml if ((flg & USEMULTILINESECTIONTITLE) > 0) XtraFlags.UseMultiLineSectionTitle = true.ToString(); if ((flg & PAGEBREAKONFIRSTBLANKLINE) > 0) XtraFlags.PageBreakOnFirstBlankLine = true.ToString(); if ((flg & DONTPRINTNOTITLE) > 0) XtraFlags.DontPrintNoTitle = true.ToString(); + if ((flg & NOTESTOFOOTNOTES) > 0) XtraFlags.NotesToFootnotes = true.ToString(); if ((flg & UNDSPECIALSTEPSFOLDOUT) > 0) XtraFlags.UndSpecialStepsFoldout = true.ToString(); if ((flg & PUTONPAGEBYITSELF) > 0) XtraFlags.PutOnPageByItself = true.ToString(); } @@ -2090,6 +2097,7 @@ namespace fmtxml { if ((flg & NORNO) > 0) XtraFlags.NoRNO = true.ToString(); if ((flg & ONLYSINGLECOLUMN) > 0) XtraFlags.OnlySingleColumn = true.ToString(); + if ((flg & NULLBOX) > 0) XtraFlags.NullBox = true.ToString(); if ((flg & XCHNGTRANSPFORHARD) > 0) XtraFlags.XChngTranSpForHard = true.ToString(); if ((flg & WOLFCREEKCKLBACKGNDFORMAT) > 0) XtraFlags.WolfcreekCKLBackgndFormat = true.ToString(); } @@ -2511,7 +2519,14 @@ namespace fmtxml for (int i = 0; i < MAXTRANS; i++) tmpbyte = brFmt.ReadByte(); // TransMode for (int i = 0; i < MAXTRANS; i++) tmpbyte = brFmt.ReadByte(); // OutsideTransType - for (int i = 0; i < MAXSTEPS; i++) fmtdata.StepData[i].StepLayoutData.StepTypeWidthOverride = (ColToPoints(brFmt.ReadInt16(), _PlantDefaultFontStyle)).ToString(); + //for (int i = 0; i < MAXSTEPS; i++) fmtdata.StepData[i].StepLayoutData.StepTypeWidthOverride = (ColToPoints(brFmt.ReadInt16(), _PlantDefaultFontStyle)).ToString(); + for (int i = 1; i < MAXSTEPS+1; i++) + { + tmpshort = brFmt.ReadInt16(); + fmtdata.StepData[i].StepTypeWidthOverride = (ColToPoints((tmpshort & 0x00FF), _PlantDefaultFontStyle)).ToString(); + fmtdata.StepData[i].StepTypeWidthOverrideEdit = (ColToPoints(((tmpshort & 0xFF00) >> 8), _PlantDefaultFontStyle)).ToString(); + } + // auto table of contents data AccSection accsec = new AccSection(); @@ -2585,7 +2600,13 @@ namespace fmtxml for (int i = 1; i < MAXBOXES + 1; i++) fmtdata.BoxData[i].TxtRowAdj = brFmt.ReadSByte(); for (int i = 1; i < MAXBOXES + 1; i++) tmpshort = brFmt.ReadByte(); - for (int i = 1; i < MAXSTEPS + 1; i++) fmtdata.StepData[i].StepTypeColOverride = (ColToPoints(brFmt.ReadInt16(), _PlantDefaultFontStyle)).ToString(); + //for (int i = 1; i < MAXSTEPS + 1; i++) fmtdata.StepData[i].StepTypeColOverride = (ColToPoints(brFmt.ReadInt16(), _PlantDefaultFontStyle)).ToString(); + for (int i = 1; i < MAXSTEPS+1; i++) + { + tmpshort = brFmt.ReadInt16(); + fmtdata.StepData[i].StepTypeColOverride = (ColToPoints((tmpshort & 0x00FF), _PlantDefaultFontStyle)).ToString(); + fmtdata.StepData[i].StepTypeColOverrideEdit = (ColToPoints(((tmpshort & 0xFF00)>>8), _PlantDefaultFontStyle)).ToString(); + } fmtdata.SectData.StepSectionData.NumberOfSubStepTypes = brFmt.ReadByte(); @@ -3838,6 +3859,8 @@ namespace fmtxml else fmtdata.SectData.StepSectionData.StpSectLayData.RNO = "True"; if (XtraFlags.OnlySingleColumn == "True") fmtdata.SectData.StepSectionData.StpSectLayData.OnlySingleColumn = "True"; else fmtdata.SectData.StepSectionData.StpSectLayData.OnlySingleColumn = "False"; + if (XtraFlags.NullBox == "True") fmtdata.SectData.StepSectionData.StpSectLayData.NullBox = "True"; + else fmtdata.SectData.StepSectionData.StpSectLayData.NullBox = "False"; #endregion #region StepSection if (XtraFlags.WolfCreekBackgroundFormat == "True") fmtdata.SectData.StepSectionData.WolfCreekBackgroundFormat = "True"; @@ -3923,6 +3946,8 @@ namespace fmtxml else fmtdata.ProcData.ChangeStyleForEverySection = "False"; if (XtraFlags.DontPrintNoTitle == "True") fmtdata.ProcData.PrintNoTitle = "False"; else fmtdata.ProcData.PrintNoTitle = "True"; + if (XtraFlags.NotesToFootnotes == "True") fmtdata.ProcData.NotesToFootnotes = "True"; + else fmtdata.ProcData.NotesToFootnotes = "False"; if (XtraFlags.DontCountFoldoutPages == "True") fmtdata.ProcData.CountFoldoutPages = "False"; else fmtdata.ProcData.CountFoldoutPages = "True"; #endregion @@ -5109,7 +5134,10 @@ namespace fmtxml #region DoStepInherit delegate string StepPartStr(Step stp); - private string StepPartColOverride(Step stp) { return stp.StepTypeColOverride; } + //private string StepPartColOverride(Step stp) { return stp.StepTypeColOverride; } + //private string StepPartColOverrideEdit(Step stp) { return stp.StepTypeColOverrideEdit; } + //private string StepPartWidthOverride(Step stp) { return stp.StepTypeWidthOverride; } + //private string StepPartWidthOverrideEdit(Step stp) { return stp.StepTypeWidthOverrideEdit; } private string StepPartInactive(Step stp) { return stp.Inactive; } private string StepPartSep(Step stp) { return stp.Sep; } private string StepPartPrefix(Step stp) { return stp.Prefix; } @@ -5158,7 +5186,7 @@ namespace fmtxml private string StepPartLayoutPageBreakAtTypeChange(Step stp) { return stp.StepLayoutData.PageBreakAtTypeChange; } private string StepPartLayoutAlignWithParentTab(Step stp) { return stp.StepLayoutData.AlignWithParentTab; } //private string StepPartLayoutRtCheckOffGroups(Step stp) { return stp.StepLayoutData.RtCheckOffGroups; } - private string StepPartLayoutStepTypeWidthOverride(Step stp) { return stp.StepLayoutData.StepTypeWidthOverride; } + //private string StepPartLayoutStepTypeWidthOverride(Step stp) { return stp.StepLayoutData.StepTypeWidthOverride; } private string StepPartEditForeColor(Step stp) { return stp.StepEditData.ForeColor; } private string StepPartEditBackColor(Step stp) { return stp.StepEditData.BackColor; } @@ -5308,7 +5336,10 @@ namespace fmtxml private void FixInheritance(ref Step step, Dictionary dicParents) { if (CheckInheritedStr(new StepPartStr(StepPartInactive), step, dicParents)) step.Inactive = null; - if (CheckInheritedStr(new StepPartStr(StepPartColOverride), step, dicParents)) step.StepTypeColOverride = null; + //if (CheckInheritedStr(new StepPartStr(StepPartColOverride), step, dicParents)) step.StepTypeColOverride = null; + //if (CheckInheritedStr(new StepPartStr(StepPartColOverrideEdit), step, dicParents)) step.StepTypeColOverrideEdit = null; + //if (CheckInheritedStr(new StepPartStr(StepPartWidthOverride), step, dicParents)) step.StepTypeWidthOverride = null; + //if (CheckInheritedStr(new StepPartStr(StepPartWidthOverrideEdit), step, dicParents)) step.StepTypeWidthOverrideEdit = null; if (CheckInheritedStr(new StepPartStr(StepPartSep), step, dicParents)) step.Sep = null; if (CheckInheritedStr(new StepPartStr(StepPartPrefix), step, dicParents)) step.Prefix = null; if (CheckInheritedStr(new StepPartStr(StepPartSuffix), step, dicParents)) step.Suffix = null; @@ -5341,7 +5372,7 @@ namespace fmtxml if (CheckInheritedStr(new StepPartStr(StepPartLayoutPageBreakAtTypeChange), step, dicParents)) step.StepLayoutData.PageBreakAtTypeChange = null; if (CheckInheritedStr(new StepPartStr(StepPartLayoutAlignWithParentTab), step, dicParents)) step.StepLayoutData.AlignWithParentTab = null; //if (CheckInheritedStr(new StepPartStr(StepPartLayoutRtCheckOffGroups), step, dicParents)) step.StepLayoutData.RtCheckOffGroups = null; - if (CheckInheritedStr(new StepPartStr(StepPartLayoutStepTypeWidthOverride), step, dicParents)) step.StepLayoutData.StepTypeWidthOverride = null; + //if (CheckInheritedStr(new StepPartStr(StepPartLayoutStepTypeWidthOverride), step, dicParents)) step.StepLayoutData.StepTypeWidthOverride = null; // substructure - StepEditData if (CheckInheritedStr(new StepPartStr(StepPartEditForeColor), step, dicParents)) step.StepEditData.ForeColor = null; if (CheckInheritedStr(new StepPartStr(StepPartEditBackColor), step, dicParents)) step.StepEditData.BackColor = null; diff --git a/PROMS/fmtxml/RtfToSvg.cs b/PROMS/fmtxml/RtfToSvg.cs index 5acc3544..79ae2402 100644 --- a/PROMS/fmtxml/RtfToSvg.cs +++ b/PROMS/fmtxml/RtfToSvg.cs @@ -142,7 +142,7 @@ namespace fmtxml private static void AddC0(StringBuilder sb) { sb.Append(" \r\n"); - sb.Append(" \r\n"); + sb.Append(" \r\n"); sb.Append(" \r\n"); } private static bool AddSvgPrefix(FileInfo file, StringBuilder sb, bool svg) diff --git a/PROMS/fmtxml/TranslateFMT.XSL b/PROMS/fmtxml/TranslateFMT.XSL index 9740faa6..866a1e0b 100644 Binary files a/PROMS/fmtxml/TranslateFMT.XSL and b/PROMS/fmtxml/TranslateFMT.XSL differ