NSP format support (NotesToFootnotes, NullBox, StepTypeColOverride, StepTypeWidthOverride

Adjusted the position of the default circle (ellipse)
This commit is contained in:
John Jenko 2011-11-21 20:57:49 +00:00
parent 1ebcd90f48
commit edf0fc82e5
3 changed files with 42 additions and 11 deletions

View File

@ -250,7 +250,7 @@ public struct XtraFlgs
public string DontPrintNoTitle; public string DontPrintNoTitle;
// public string PRINTCAUTION1CONTINUED // not migrated: used in bgeal // public string PRINTCAUTION1CONTINUED // not migrated: used in bgeal
// public string USECHECKOFFSINS2 // not used // 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 UndSpecialStepsFoldout;
// public string DONTAUTOENDFORMATTING // not migrated: used in various bge // public string DONTAUTOENDFORMATTING // not migrated: used in various bge
// public string REMOVEBASISFROMTRANS // 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 NoRNO;
// public string ALTWFORWARNINGS // not migrated: used in ata, some bge & some rbnd // public string ALTWFORWARNINGS // not migrated: used in ata, some bge & some rbnd
public string OnlySingleColumn; public string OnlySingleColumn;
// public string NULLBOX // not migrated: used in bgeeop public string NullBox; // used in bgeeop and NSP
public string XChngTranSpForHard; public string XChngTranSpForHard;
public string WolfcreekCKLBackgndFormat; public string WolfcreekCKLBackgndFormat;
#endregion #endregion
@ -456,6 +456,7 @@ public struct Procedure
public string CapitalizeTitle; public string CapitalizeTitle;
public string ChangeStyleForEverySection; public string ChangeStyleForEverySection;
public string PrintNoTitle; public string PrintNoTitle;
public string NotesToFootnotes;
public string CountFoldoutPages; public string CountFoldoutPages;
/* End of Format flags */ /* End of Format flags */
public string[] ProcedureSuffix; public string[] ProcedureSuffix;
@ -757,6 +758,7 @@ public struct StepSectionLayout
public string OverrideEnhancedTabs; public string OverrideEnhancedTabs;
public string RNO; public string RNO;
public string OnlySingleColumn; public string OnlySingleColumn;
public string NullBox;
/* End of format flags */ /* End of format flags */
public VE_Font VertStyle; public VE_Font VertStyle;
public TopOfPg TopOfPage; public TopOfPg TopOfPage;
@ -858,7 +860,10 @@ public struct Step
public string ParentType; public string ParentType;
public string Inactive; public string Inactive;
public string StepTypeColOverride; public string StepTypeColOverride;
public string Sep; public string StepTypeColOverrideEdit;
public string StepTypeWidthOverride;
public string StepTypeWidthOverrideEdit;
public string Sep;
public string Prefix; public string Prefix;
public string Suffix; public string Suffix;
public string UnderlineTheseChar; public string UnderlineTheseChar;
@ -987,7 +992,6 @@ public struct Layout
public string PageBreakAtTypeChange; public string PageBreakAtTypeChange;
public string AlignWithParentTab; public string AlignWithParentTab;
//public string RtCheckOffGroups; //public string RtCheckOffGroups;
public string StepTypeWidthOverride;
} }
[Serializable] [Serializable]
public struct Tab public struct Tab
@ -1279,6 +1283,7 @@ namespace fmtxml
public static int USEMULTILINESECTIONTITLE = 0x0010; public static int USEMULTILINESECTIONTITLE = 0x0010;
public static int PAGEBREAKONFIRSTBLANKLINE = 0x0040; public static int PAGEBREAKONFIRSTBLANKLINE = 0x0040;
public static int DONTPRINTNOTITLE = 0x0080; public static int DONTPRINTNOTITLE = 0x0080;
public static int NOTESTOFOOTNOTES = 0x0400;
public static int UNDSPECIALSTEPSFOLDOUT = 0x0800; public static int UNDSPECIALSTEPSFOLDOUT = 0x0800;
public static int PUTONPAGEBYITSELF = 0x4000; public static int PUTONPAGEBYITSELF = 0x4000;
@ -1368,6 +1373,7 @@ namespace fmtxml
// XtraFlag[18] (was VEAIRFLAG) from 16-bit... // XtraFlag[18] (was VEAIRFLAG) from 16-bit...
public static int NORNO = 0x0002; public static int NORNO = 0x0002;
public static int ONLYSINGLECOLUMN = 0x0008; public static int ONLYSINGLECOLUMN = 0x0008;
public static int NULLBOX = 0x0010;
public static int XCHNGTRANSPFORHARD = 0x0020; public static int XCHNGTRANSPFORHARD = 0x0020;
public static int WOLFCREEKCKLBACKGNDFORMAT = 0x0040; public static int WOLFCREEKCKLBACKGNDFORMAT = 0x0040;
#endregion #endregion
@ -1999,6 +2005,7 @@ namespace fmtxml
if ((flg & USEMULTILINESECTIONTITLE) > 0) XtraFlags.UseMultiLineSectionTitle = true.ToString(); if ((flg & USEMULTILINESECTIONTITLE) > 0) XtraFlags.UseMultiLineSectionTitle = true.ToString();
if ((flg & PAGEBREAKONFIRSTBLANKLINE) > 0) XtraFlags.PageBreakOnFirstBlankLine = true.ToString(); if ((flg & PAGEBREAKONFIRSTBLANKLINE) > 0) XtraFlags.PageBreakOnFirstBlankLine = true.ToString();
if ((flg & DONTPRINTNOTITLE) > 0) XtraFlags.DontPrintNoTitle = 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 & UNDSPECIALSTEPSFOLDOUT) > 0) XtraFlags.UndSpecialStepsFoldout = true.ToString();
if ((flg & PUTONPAGEBYITSELF) > 0) XtraFlags.PutOnPageByItself = 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 & NORNO) > 0) XtraFlags.NoRNO = true.ToString();
if ((flg & ONLYSINGLECOLUMN) > 0) XtraFlags.OnlySingleColumn = 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 & XCHNGTRANSPFORHARD) > 0) XtraFlags.XChngTranSpForHard = true.ToString();
if ((flg & WOLFCREEKCKLBACKGNDFORMAT) > 0) XtraFlags.WolfcreekCKLBackgndFormat = 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(); // TransMode
for (int i = 0; i < MAXTRANS; i++) tmpbyte = brFmt.ReadByte(); // OutsideTransType 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 // auto table of contents data
AccSection accsec = new AccSection(); 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++) fmtdata.BoxData[i].TxtRowAdj = brFmt.ReadSByte();
for (int i = 1; i < MAXBOXES + 1; i++) tmpshort = brFmt.ReadByte(); 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(); fmtdata.SectData.StepSectionData.NumberOfSubStepTypes = brFmt.ReadByte();
@ -3838,6 +3859,8 @@ namespace fmtxml
else fmtdata.SectData.StepSectionData.StpSectLayData.RNO = "True"; else fmtdata.SectData.StepSectionData.StpSectLayData.RNO = "True";
if (XtraFlags.OnlySingleColumn == "True") fmtdata.SectData.StepSectionData.StpSectLayData.OnlySingleColumn = "True"; if (XtraFlags.OnlySingleColumn == "True") fmtdata.SectData.StepSectionData.StpSectLayData.OnlySingleColumn = "True";
else fmtdata.SectData.StepSectionData.StpSectLayData.OnlySingleColumn = "False"; 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 #endregion
#region StepSection #region StepSection
if (XtraFlags.WolfCreekBackgroundFormat == "True") fmtdata.SectData.StepSectionData.WolfCreekBackgroundFormat = "True"; if (XtraFlags.WolfCreekBackgroundFormat == "True") fmtdata.SectData.StepSectionData.WolfCreekBackgroundFormat = "True";
@ -3923,6 +3946,8 @@ namespace fmtxml
else fmtdata.ProcData.ChangeStyleForEverySection = "False"; else fmtdata.ProcData.ChangeStyleForEverySection = "False";
if (XtraFlags.DontPrintNoTitle == "True") fmtdata.ProcData.PrintNoTitle = "False"; if (XtraFlags.DontPrintNoTitle == "True") fmtdata.ProcData.PrintNoTitle = "False";
else fmtdata.ProcData.PrintNoTitle = "True"; 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"; if (XtraFlags.DontCountFoldoutPages == "True") fmtdata.ProcData.CountFoldoutPages = "False";
else fmtdata.ProcData.CountFoldoutPages = "True"; else fmtdata.ProcData.CountFoldoutPages = "True";
#endregion #endregion
@ -5109,7 +5134,10 @@ namespace fmtxml
#region DoStepInherit #region DoStepInherit
delegate string StepPartStr(Step stp); 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 StepPartInactive(Step stp) { return stp.Inactive; }
private string StepPartSep(Step stp) { return stp.Sep; } private string StepPartSep(Step stp) { return stp.Sep; }
private string StepPartPrefix(Step stp) { return stp.Prefix; } 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 StepPartLayoutPageBreakAtTypeChange(Step stp) { return stp.StepLayoutData.PageBreakAtTypeChange; }
private string StepPartLayoutAlignWithParentTab(Step stp) { return stp.StepLayoutData.AlignWithParentTab; } private string StepPartLayoutAlignWithParentTab(Step stp) { return stp.StepLayoutData.AlignWithParentTab; }
//private string StepPartLayoutRtCheckOffGroups(Step stp) { return stp.StepLayoutData.RtCheckOffGroups; } //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 StepPartEditForeColor(Step stp) { return stp.StepEditData.ForeColor; }
private string StepPartEditBackColor(Step stp) { return stp.StepEditData.BackColor; } private string StepPartEditBackColor(Step stp) { return stp.StepEditData.BackColor; }
@ -5308,7 +5336,10 @@ namespace fmtxml
private void FixInheritance(ref Step step, Dictionary<string, Step> dicParents) private void FixInheritance(ref Step step, Dictionary<string, Step> dicParents)
{ {
if (CheckInheritedStr(new StepPartStr(StepPartInactive), step, dicParents)) step.Inactive = null; 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(StepPartSep), step, dicParents)) step.Sep = null;
if (CheckInheritedStr(new StepPartStr(StepPartPrefix), step, dicParents)) step.Prefix = null; if (CheckInheritedStr(new StepPartStr(StepPartPrefix), step, dicParents)) step.Prefix = null;
if (CheckInheritedStr(new StepPartStr(StepPartSuffix), step, dicParents)) step.Suffix = 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(StepPartLayoutPageBreakAtTypeChange), step, dicParents)) step.StepLayoutData.PageBreakAtTypeChange = null;
if (CheckInheritedStr(new StepPartStr(StepPartLayoutAlignWithParentTab), step, dicParents)) step.StepLayoutData.AlignWithParentTab = 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(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 // substructure - StepEditData
if (CheckInheritedStr(new StepPartStr(StepPartEditForeColor), step, dicParents)) step.StepEditData.ForeColor = null; if (CheckInheritedStr(new StepPartStr(StepPartEditForeColor), step, dicParents)) step.StepEditData.ForeColor = null;
if (CheckInheritedStr(new StepPartStr(StepPartEditBackColor), step, dicParents)) step.StepEditData.BackColor = null; if (CheckInheritedStr(new StepPartStr(StepPartEditBackColor), step, dicParents)) step.StepEditData.BackColor = null;

View File

@ -142,7 +142,7 @@ namespace fmtxml
private static void AddC0(StringBuilder sb) private static void AddC0(StringBuilder sb)
{ {
sb.Append(" <g id=\"C0\">\r\n"); sb.Append(" <g id=\"C0\">\r\n");
sb.Append(" <ellipse cx=\"-3.8\" cy=\"-15.3\" rx=\"25.2\" ry=\"25.2\" fill=\"none\" stroke=\"black\" stroke-width=\"1.95\" />\r\n"); sb.Append(" <ellipse cx=\"57.2\" cy=\"-3.2\" rx=\"11.1\" ry=\"11.1\" fill=\"none\" stroke=\"black\" stroke-width=\"1.9\" />\r\n");
sb.Append(" </g>\r\n"); sb.Append(" </g>\r\n");
} }
private static bool AddSvgPrefix(FileInfo file, StringBuilder sb, bool svg) private static bool AddSvgPrefix(FileInfo file, StringBuilder sb, bool svg)

Binary file not shown.