This commit is contained in:
parent
3e2dfeb90f
commit
7e0da06b05
@ -419,7 +419,7 @@ public struct GeneralPrint
|
||||
public string AlternateFloatingFoldout;
|
||||
public string SectionLevelFoldouts;
|
||||
public string RevDateWithForwardSlash;
|
||||
public string SpecialStepsFoldout;
|
||||
//public string SpecialStepsFoldout;
|
||||
// Added AllowDuplex to eliminate hardcoded check for WEP2 and WPB formats
|
||||
// for the Disable Automatic Duplexing
|
||||
public string AllowDuplex;
|
||||
@ -595,10 +595,10 @@ public struct Section
|
||||
public string SectForeColor;
|
||||
public string SectBackColor;
|
||||
/* Format Flags moved here... */
|
||||
public string CancelSecTitlesOnS1;
|
||||
public string CancelSecTitlesOnS2;
|
||||
public string CancelSecTitlesOnE0;
|
||||
public string CancelSecTitlesOnE2;
|
||||
//public string CancelSecTitlesOnS1; // moved to docstyle
|
||||
//public string CancelSecTitlesOnS2;
|
||||
//public string CancelSecTitlesOnE0;
|
||||
//public string CancelSecTitlesOnE2;
|
||||
public string MetaSectEndMessage;
|
||||
public string ReadOnlyTypeInContMsg;
|
||||
public string ReplaceWordsInROs;
|
||||
@ -654,7 +654,7 @@ public struct StepSection
|
||||
public string ContinueSectionHeader;
|
||||
public string CompressHPSub;
|
||||
public string CompressHPSuper;
|
||||
public string UndSpecialStepsFoldout;
|
||||
//public string UndSpecialStepsFoldout;
|
||||
public string UnderlineAllMetaTitles;
|
||||
public string BoldOnlySectionZero;
|
||||
public string ImperfectStructure;
|
||||
@ -1523,6 +1523,8 @@ namespace fmtxml
|
||||
private static Dictionary<int, int> dicChar;
|
||||
#endregion
|
||||
public FormatData BaseFormat;
|
||||
public static List<Dictionary<string, Step>> StepParentList = new List<Dictionary<string,Step>>();
|
||||
public static List<Dictionary<string, Step>> StepList = new List<Dictionary<string, Step>>();
|
||||
public bool HasBase;
|
||||
public FormatData MyFormat;
|
||||
public string MyPath;
|
||||
@ -1536,6 +1538,7 @@ namespace fmtxml
|
||||
{
|
||||
HasBase = true;
|
||||
BaseFormat = gendata.MyFormat;
|
||||
|
||||
}
|
||||
BuildDictionaryText();
|
||||
fmtName = alias;
|
||||
@ -1756,7 +1759,7 @@ namespace fmtxml
|
||||
if (retstr.Substring(retstr.Length - 1, 1) == "\0") return retstr.Substring(0, retstr.Length - 1);
|
||||
return retstr;
|
||||
}
|
||||
private string GetStringUntilNull(BinaryReader br)
|
||||
static public string GetStringUntilNull(BinaryReader br)
|
||||
{
|
||||
StringBuilder inpstr = new StringBuilder();
|
||||
byte input = 0;
|
||||
@ -2685,7 +2688,11 @@ namespace fmtxml
|
||||
{
|
||||
indx = offset[arcnt];
|
||||
arcnt++;
|
||||
// differentiate between and empty string and null. An empty string is used to put out
|
||||
// blank lines. A null string means there is not any separator, thus use the string "{Null}"
|
||||
// so that inheritance tests can show a difference between having a separator and not having one.
|
||||
if (indx > 0) fmtdata.StepData[i].Sep = DoReplaceTokens(GetStringFromByte(input, indx));
|
||||
else fmtdata.StepData[i].Sep = "{Null}";
|
||||
}
|
||||
|
||||
// Step prefix & suffix
|
||||
@ -3733,7 +3740,7 @@ namespace fmtxml
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("here");
|
||||
Console.WriteLine("Error on step data");
|
||||
}
|
||||
#endregion
|
||||
#region StepStructLayout
|
||||
@ -3827,8 +3834,8 @@ namespace fmtxml
|
||||
else fmtdata.SectData.StepSectionData.CompressHPSub = "False";
|
||||
if (XtraFlags.CompressHPSuper == "True") fmtdata.SectData.StepSectionData.CompressHPSuper = "True";
|
||||
else fmtdata.SectData.StepSectionData.CompressHPSuper = "False";
|
||||
if (XtraFlags.UndSpecialStepsFoldout == "True") fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "True";
|
||||
else fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "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";
|
||||
else fmtdata.SectData.StepSectionData.UnderlineAllMetaTitles = "False";
|
||||
if (XtraFlags.BoldOnlySectionZero == "True") fmtdata.SectData.StepSectionData.BoldOnlySectionZero = "True";
|
||||
@ -3871,8 +3878,8 @@ namespace fmtxml
|
||||
else fmtdata.PrintData.SectionLevelFoldouts = "False";
|
||||
if (XtraFlags.RevDateWithForwardSlash == "True") fmtdata.PrintData.RevDateWithForwardSlash = "True";
|
||||
else fmtdata.PrintData.RevDateWithForwardSlash = "False";
|
||||
if (XtraFlags.SpecialStepsFoldout == "True") fmtdata.PrintData.SpecialStepsFoldout = "True";
|
||||
else fmtdata.PrintData.SpecialStepsFoldout = "False";
|
||||
//if (XtraFlags.SpecialStepsFoldout == "True") fmtdata.PrintData.SpecialStepsFoldout = "True";
|
||||
//else fmtdata.PrintData.SpecialStepsFoldout = "False";
|
||||
if (XtraFlags.AccessoryDocsInDuplex == "True") fmtdata.PrintData.AccessoryDocsInDuplex = "True";
|
||||
else fmtdata.PrintData.AccessoryDocsInDuplex = "False";
|
||||
if (XtraFlags.FoldoutsInDuplex == "True") fmtdata.PrintData.FoldoutsInDuplex = "True";
|
||||
@ -3894,14 +3901,14 @@ namespace fmtxml
|
||||
else fmtdata.ProcData.CountFoldoutPages = "True";
|
||||
#endregion
|
||||
#region Section
|
||||
if (XtraFlags.CancelSecTitlesOnS1 == "True") fmtdata.SectData.CancelSecTitlesOnS1 = "True";
|
||||
else fmtdata.SectData.CancelSecTitlesOnS1 = "False";
|
||||
if (XtraFlags.CancelSecTitlesOnS2 == "True") fmtdata.SectData.CancelSecTitlesOnS2 = "True";
|
||||
else fmtdata.SectData.CancelSecTitlesOnS2 = "False";
|
||||
if (XtraFlags.CancelSecTitlesOnE0 == "True") fmtdata.SectData.CancelSecTitlesOnE0 = "True";
|
||||
else fmtdata.SectData.CancelSecTitlesOnE0 = "False";
|
||||
if (XtraFlags.CancelSecTitlesOnE2 == "True") fmtdata.SectData.CancelSecTitlesOnE2 = "True";
|
||||
else fmtdata.SectData.CancelSecTitlesOnE2 = "False";
|
||||
//if (XtraFlags.CancelSecTitlesOnS1 == "True") fmtdata.SectData.CancelSecTitlesOnS1 = "True";
|
||||
//else fmtdata.SectData.CancelSecTitlesOnS1 = "False";
|
||||
//if (XtraFlags.CancelSecTitlesOnS2 == "True") fmtdata.SectData.CancelSecTitlesOnS2 = "True";
|
||||
//else fmtdata.SectData.CancelSecTitlesOnS2 = "False";
|
||||
//if (XtraFlags.CancelSecTitlesOnE0 == "True") fmtdata.SectData.CancelSecTitlesOnE0 = "True";
|
||||
//else fmtdata.SectData.CancelSecTitlesOnE0 = "False";
|
||||
//if (XtraFlags.CancelSecTitlesOnE2 == "True") fmtdata.SectData.CancelSecTitlesOnE2 = "True";
|
||||
//else fmtdata.SectData.CancelSecTitlesOnE2 = "False";
|
||||
if (XtraFlags.MetaSectEndMessage == "True") fmtdata.SectData.MetaSectEndMessage = "True";
|
||||
else fmtdata.SectData.MetaSectEndMessage = "False";
|
||||
if (XtraFlags.ReadOnlyTypeInContMsg == "True") fmtdata.SectData.ReadOnlyTypeInContMsg = "True";
|
||||
@ -4216,14 +4223,13 @@ namespace fmtxml
|
||||
FixInactiveForHigh(ref fmtdata);
|
||||
FixInactiveForSubStep(ref fmtdata);
|
||||
FixInactiveForText(ref fmtdata);
|
||||
//OutputStepFonts(fname, fmtdata);
|
||||
if (!HasBase) InitSymbols(ref fmtdata);
|
||||
else fmtdata.Symbols = null;
|
||||
|
||||
if (success)
|
||||
{
|
||||
//success = WriteOutXmlTmp(fmtdata, "beforeStep");
|
||||
PushStepLists(fmtdata.StepData);
|
||||
DoStepInheritance(ref fmtdata.StepData);
|
||||
//success = WriteOutXml(fmtdata);
|
||||
}
|
||||
brFmt.Close();
|
||||
|
||||
@ -4253,7 +4259,9 @@ namespace fmtxml
|
||||
//OutputStepFonts(fi.Name, subdata);
|
||||
if (success)
|
||||
{
|
||||
PushStepLists(subdata.StepData);
|
||||
DoStepInheritance(ref subdata.StepData);
|
||||
PopStepLists();
|
||||
}
|
||||
// Now do entire format inheritance - then write out.
|
||||
success = CompareParentSub(fmtdata, ref subdata);
|
||||
@ -4263,8 +4271,21 @@ namespace fmtxml
|
||||
}
|
||||
}
|
||||
MyFormat = fmtdata;
|
||||
if (HasBase) PopStepLists(); // leave the base format on 'stack', i.e. only pop if !base.
|
||||
}
|
||||
|
||||
private void PushStepLists(Step[] stpdata)
|
||||
{
|
||||
Dictionary<string, Step> dicSteps = BuildStepDic(stpdata);
|
||||
StepList.Insert(0, dicSteps);
|
||||
Dictionary<string, Step> dicParents = BuildParentDic(stpdata, dicSteps);
|
||||
StepParentList.Insert(0, dicParents);
|
||||
}
|
||||
private void PopStepLists()
|
||||
{
|
||||
StepList.RemoveAt(0);
|
||||
StepParentList.RemoveAt(0);
|
||||
}
|
||||
private static void OutputStepFonts1(string fname, FormatData fmtdata)
|
||||
{
|
||||
if (fname == "BASE.fmt")
|
||||
@ -4536,7 +4557,7 @@ namespace fmtxml
|
||||
}
|
||||
private string DoTabs(VE_Font vefont, string po, int i, string p, bool doNumeric)
|
||||
{
|
||||
if ((p == null || p == "")&&i!=0) return p;
|
||||
if ((p == null || p == "") && i != 0) return p ?? "";
|
||||
|
||||
string wkstr = p;
|
||||
if (i == 0 && p == null)
|
||||
@ -4635,105 +4656,12 @@ namespace fmtxml
|
||||
if (mainFmt.PrintData.AlternateFloatingFoldout != null && mainFmt.PrintData.AlternateFloatingFoldout == subFmt.PrintData.AlternateFloatingFoldout) subFmt.PrintData.AlternateFloatingFoldout = "null";
|
||||
if (mainFmt.PrintData.SectionLevelFoldouts != null && mainFmt.PrintData.SectionLevelFoldouts == subFmt.PrintData.SectionLevelFoldouts) subFmt.PrintData.SectionLevelFoldouts = "null";
|
||||
if (mainFmt.PrintData.RevDateWithForwardSlash != null && mainFmt.PrintData.RevDateWithForwardSlash == subFmt.PrintData.RevDateWithForwardSlash) subFmt.PrintData.RevDateWithForwardSlash = "null";
|
||||
if (mainFmt.PrintData.SpecialStepsFoldout != null && mainFmt.PrintData.SpecialStepsFoldout == subFmt.PrintData.SpecialStepsFoldout) subFmt.PrintData.SpecialStepsFoldout = "null";
|
||||
//if (mainFmt.PrintData.SpecialStepsFoldout != null && mainFmt.PrintData.SpecialStepsFoldout == subFmt.PrintData.SpecialStepsFoldout) subFmt.PrintData.SpecialStepsFoldout = "null";
|
||||
if (mainFmt.PrintData.AccessoryDocsInDuplex != null && mainFmt.PrintData.AccessoryDocsInDuplex == subFmt.PrintData.AccessoryDocsInDuplex) subFmt.PrintData.AccessoryDocsInDuplex = "null";
|
||||
if (mainFmt.PrintData.AllowDuplex != null && mainFmt.PrintData.AllowDuplex == subFmt.PrintData.AllowDuplex) subFmt.PrintData.AllowDuplex = "null";
|
||||
if (mainFmt.PrintData.FoldoutsInDuplex != null && mainFmt.PrintData.FoldoutsInDuplex == subFmt.PrintData.FoldoutsInDuplex) subFmt.PrintData.FoldoutsInDuplex = "null";
|
||||
if (mainFmt.PrintData.PagelistChangeIDsWithCommas != null && mainFmt.PrintData.PagelistChangeIDsWithCommas == subFmt.PrintData.PagelistChangeIDsWithCommas) subFmt.PrintData.PagelistChangeIDsWithCommas = "null";
|
||||
|
||||
// compare step data, step index by step index. This assumes that step data between
|
||||
// the two indices is the same.
|
||||
for (int i = 0; i < MAXSTEPS; i++)
|
||||
{
|
||||
Step mstp = mainFmt.StepData[i];
|
||||
Step sstp = subFmt.StepData[i];
|
||||
if (mstp.StepLayoutData.ForeColor == sstp.StepLayoutData.ForeColor) subFmt.StepData[i].StepLayoutData.ForeColor = null;
|
||||
if (mstp.StepLayoutData.BackColor == sstp.StepLayoutData.BackColor) subFmt.StepData[i].StepLayoutData.BackColor = null;
|
||||
if (mstp.StepLayoutData.STExtraSpace == sstp.StepLayoutData.STExtraSpace) subFmt.StepData[i].StepLayoutData.STExtraSpace = null;
|
||||
// don't inherit stboxindex because box definition may not be the same.
|
||||
//if (mstp.StepLayoutData.STBoxindex == sstp.StepLayoutData.STBoxindex) subFmt.StepData[i].StepLayoutData.STBoxindex = null;
|
||||
if (mstp.StepPrintData.PosAdjust == sstp.StepPrintData.PosAdjust) subFmt.StepData[i].StepPrintData.PosAdjust = null;
|
||||
if (mstp.StepEditData.AcTable == sstp.StepEditData.AcTable) subFmt.StepData[i].StepEditData.AcTable = null;
|
||||
if (mstp.StepLayoutData.EveryNLines == sstp.StepLayoutData.EveryNLines) subFmt.StepData[i].StepLayoutData.EveryNLines = null;
|
||||
if (mstp.StepLayoutData.SpaceBefore == sstp.StepLayoutData.SpaceBefore) subFmt.StepData[i].StepLayoutData.SpaceBefore = null;
|
||||
if (mstp.StepLayoutData.SpaceAfter == sstp.StepLayoutData.SpaceAfter) subFmt.StepData[i].StepLayoutData.SpaceAfter = null;
|
||||
if (mstp.StepLayoutData.AlwaysUpperCase == sstp.StepLayoutData.AlwaysUpperCase) subFmt.StepData[i].StepLayoutData.AlwaysUpperCase = null;
|
||||
if (mstp.StepLayoutData.PageBreakAtTypeChange == sstp.StepLayoutData.PageBreakAtTypeChange) subFmt.StepData[i].StepLayoutData.PageBreakAtTypeChange = null;
|
||||
if (mstp.StepLayoutData.AlignWithParentTab == sstp.StepLayoutData.AlignWithParentTab) subFmt.StepData[i].StepLayoutData.AlignWithParentTab = null;
|
||||
if (mstp.StepLayoutData.StepTypeWidthOverride == sstp.StepLayoutData.StepTypeWidthOverride) subFmt.StepData[i].StepLayoutData.StepTypeWidthOverride = null;
|
||||
if (mstp.VertPos == sstp.VertPos) subFmt.StepData[i].VertPos = null;
|
||||
if (mstp.DoubleSpace != null && mstp.DoubleSpace == sstp.DoubleSpace) subFmt.StepData[i].DoubleSpace = "null";
|
||||
if (mstp.EnhancedStepNumFromPrev != null && mstp.EnhancedStepNumFromPrev == sstp.EnhancedStepNumFromPrev) subFmt.StepData[i].EnhancedStepNumFromPrev = "null";
|
||||
if (mstp.UseSmartTemplate != null && mstp.UseSmartTemplate == sstp.UseSmartTemplate) subFmt.StepData[i].UseSmartTemplate = "null";
|
||||
if (mstp.AlwaysUseExtraLines != null && mstp.AlwaysUseExtraLines == sstp.AlwaysUseExtraLines) subFmt.StepData[i].AlwaysUseExtraLines = "null";
|
||||
if (mstp.SeparateBox != null && mstp.SeparateBox == sstp.SeparateBox) subFmt.StepData[i].SeparateBox = "null";
|
||||
if (mstp.SeparateBoxCautions != null && mstp.SeparateBoxCautions == sstp.SeparateBoxCautions) subFmt.StepData[i].SeparateBoxCautions = "null";
|
||||
if (mstp.SpaceDouble != null && mstp.SpaceDouble == sstp.SpaceDouble) subFmt.StepData[i].SpaceDouble = "null";
|
||||
if (mstp.ReduceLineAfter != null && mstp.ReduceLineAfter == sstp.ReduceLineAfter) subFmt.StepData[i].ReduceLineAfter = "null";
|
||||
if (mstp.SameLevel != null && mstp.SameLevel == sstp.SameLevel) subFmt.StepData[i].SameLevel = "null";
|
||||
if (mstp.BoldHighLevel != null && mstp.BoldHighLevel == sstp.BoldHighLevel) subFmt.StepData[i].BoldHighLevel = "null";
|
||||
if (mstp.OneLineBeforeTab != null && mstp.OneLineBeforeTab == sstp.OneLineBeforeTab) subFmt.StepData[i].OneLineBeforeTab = "null";
|
||||
if (mstp.BoxIt != null && mstp.BoxIt == sstp.BoxIt) subFmt.StepData[i].BoxIt = "null";
|
||||
if (mstp.Boxed != null && mstp.Boxed == sstp.Boxed) subFmt.StepData[i].Boxed = "null";
|
||||
if (mstp.XLines_StepFix != null && mstp.XLines_StepFix == sstp.XLines_StepFix) subFmt.StepData[i].XLines_StepFix = "null";
|
||||
if (mstp.Rebox != null && mstp.Rebox == sstp.Rebox) subFmt.StepData[i].Rebox = "null";
|
||||
if (mstp.SpcHdr != null && mstp.SpcHdr == sstp.SpcHdr) subFmt.StepData[i].SpcHdr = "null";
|
||||
if (mstp.ContinueOnly != null && mstp.ContinueOnly == sstp.ContinueOnly) subFmt.StepData[i].ContinueOnly = "null";
|
||||
if (mstp.SepAfterAER != null && mstp.SepAfterAER == sstp.SepAfterAER) subFmt.StepData[i].SepAfterAER = "null";
|
||||
if (mstp.UseAlternateStepBox != null && mstp.UseAlternateStepBox == sstp.UseAlternateStepBox) subFmt.StepData[i].UseAlternateStepBox = "null";
|
||||
if (mstp.UnderlineAfterDashSpace != null && mstp.UnderlineAfterDashSpace == sstp.UnderlineAfterDashSpace) subFmt.StepData[i].UnderlineAfterDashSpace = "null";
|
||||
if (mstp.SpaceIn != null && mstp.SpaceIn == sstp.SpaceIn) subFmt.StepData[i].SpaceIn = "null";
|
||||
if (mstp.PageBreakOnStep != null && mstp.PageBreakOnStep == sstp.PageBreakOnStep) subFmt.StepData[i].PageBreakOnStep = "null";
|
||||
if (mstp.AlignNullTabWSectHead != null && mstp.AlignNullTabWSectHead == sstp.AlignNullTabWSectHead) subFmt.StepData[i].AlignNullTabWSectHead = "null";
|
||||
if (mstp.TextSubFollowsTextStyle != null && mstp.TextSubFollowsTextStyle == sstp.TextSubFollowsTextStyle) subFmt.StepData[i].TextSubFollowsTextStyle = "null";
|
||||
if (mstp.TreatAsSequential != null && mstp.TreatAsSequential == sstp.TreatAsSequential) subFmt.StepData[i].TreatAsSequential = "null";
|
||||
if (mstp.MatchUpRNO != null && mstp.MatchUpRNO == sstp.MatchUpRNO) subFmt.StepData[i].MatchUpRNO = "null";
|
||||
if (mstp.InPageList != null && mstp.InPageList == sstp.InPageList) subFmt.StepData[i].InPageList = "null";
|
||||
if (mstp.CenterOneLineOnly != null && mstp.CenterOneLineOnly == sstp.CenterOneLineOnly) subFmt.StepData[i].CenterOneLineOnly = "null";
|
||||
if (mstp.SubTableGetsUp1Level != null && mstp.SubTableGetsUp1Level == sstp.SubTableGetsUp1Level) subFmt.StepData[i].SubTableGetsUp1Level = "null";
|
||||
if (mstp.Remember != null && mstp.Remember == sstp.Remember) subFmt.StepData[i].Remember = "null";
|
||||
if (mstp.CenterOneLineAdjust != null && mstp.CenterOneLineAdjust == sstp.CenterOneLineAdjust) subFmt.StepData[i].CenterOneLineAdjust = "null";
|
||||
if (mstp.Break != null && mstp.Break == sstp.Break) subFmt.StepData[i].Break = "null";
|
||||
if (mstp.BreakEquipmentList != null && mstp.BreakEquipmentList == sstp.BreakEquipmentList) subFmt.StepData[i].BreakEquipmentList = "null";
|
||||
if (mstp.BreakCautionsNotesOnSubstps != null && mstp.BreakCautionsNotesOnSubstps == sstp.BreakCautionsNotesOnSubstps) subFmt.StepData[i].BreakCautionsNotesOnSubstps = "null";
|
||||
if (mstp.CenterTextWithinWidth != null && mstp.CenterTextWithinWidth == sstp.CenterTextWithinWidth) subFmt.StepData[i].CenterTextWithinWidth = "null";
|
||||
if (mstp.NewlineAfter != null && mstp.NewlineAfter == sstp.NewlineAfter) subFmt.StepData[i].NewlineAfter = "null";
|
||||
if (mstp.StartLineWithDash != null && mstp.StartLineWithDash == sstp.StartLineWithDash) subFmt.StepData[i].StartLineWithDash = "null";
|
||||
if (mstp.BlankLineBeforeSubStep != null && mstp.BlankLineBeforeSubStep == sstp.BlankLineBeforeSubStep) subFmt.StepData[i].BlankLineBeforeSubStep = "null";
|
||||
if (mstp.AlwaysTab != null && mstp.AlwaysTab == sstp.AlwaysTab) subFmt.StepData[i].AlwaysTab = "null";
|
||||
if (mstp.MixCautionsAndNotes != null && mstp.MixCautionsAndNotes == sstp.MixCautionsAndNotes) subFmt.StepData[i].MixCautionsAndNotes = "null";
|
||||
if (mstp.NumberHighLevel != null && mstp.NumberHighLevel == sstp.NumberHighLevel) subFmt.StepData[i].NumberHighLevel = "null";
|
||||
if (mstp.OffsetTab != null && mstp.OffsetTab == sstp.OffsetTab) subFmt.StepData[i].OffsetTab = "null";
|
||||
if (mstp.LeftJustifyBorderless != null && mstp.LeftJustifyBorderless == sstp.LeftJustifyBorderless) subFmt.StepData[i].LeftJustifyBorderless = "null";
|
||||
if (mstp.StepNumIfOnlyOne != null && mstp.StepNumIfOnlyOne == sstp.StepNumIfOnlyOne) subFmt.StepData[i].StepNumIfOnlyOne = "null";
|
||||
if (mstp.LJTabs != null && mstp.LJTabs == sstp.LJTabs) subFmt.StepData[i].LJTabs = "null";
|
||||
if (mstp.NumberSubs != null && mstp.NumberSubs == sstp.NumberSubs) subFmt.StepData[i].NumberSubs = "null";
|
||||
if (mstp.Bullet != null && mstp.Bullet == sstp.Bullet) subFmt.StepData[i].Bullet = "null";
|
||||
if (mstp.StepNumberForHighLevel != null && mstp.StepNumberForHighLevel == sstp.StepNumberForHighLevel) subFmt.StepData[i].StepNumberForHighLevel = "null";
|
||||
if (mstp.SameRowAsParent != null && mstp.SameRowAsParent == sstp.SameRowAsParent) subFmt.StepData[i].SameRowAsParent = "null";
|
||||
if (mstp.CheckoffSameAsParent != null && mstp.CheckoffSameAsParent == sstp.CheckoffSameAsParent) subFmt.StepData[i].CheckoffSameAsParent = "null";
|
||||
if (mstp.AtLeastTwoDigits != null && mstp.AtLeastTwoDigits == sstp.AtLeastTwoDigits) subFmt.StepData[i].AtLeastTwoDigits = "null";
|
||||
if (mstp.UseInAcTable != null && mstp.UseInAcTable == sstp.UseInAcTable) subFmt.StepData[i].UseInAcTable = "null";
|
||||
if (mstp.Number != null && mstp.Number == sstp.Number) subFmt.StepData[i].Number = "null";
|
||||
if (mstp.ThreeBlanksAbove != null && mstp.ThreeBlanksAbove == sstp.ThreeBlanksAbove) subFmt.StepData[i].ThreeBlanksAbove = "null";
|
||||
if (mstp.CheckOffs != null && mstp.CheckOffs == sstp.CheckOffs) subFmt.StepData[i].CheckOffs = "null";
|
||||
if (mstp.Quoted != null && mstp.Quoted == sstp.Quoted) subFmt.StepData[i].Quoted = "null";
|
||||
if (mstp.Sep == sstp.Sep) subFmt.StepData[i].Sep =null;
|
||||
if (mstp.Prefix == sstp.Prefix) subFmt.StepData[i].Prefix =null;
|
||||
if (mstp.Suffix == sstp.Suffix) subFmt.StepData[i].Suffix =null;
|
||||
// KBR TODO if (mstp.AlternateName == sstp.AlternateName) subFmt.StepData[i].AlternateName = null;
|
||||
if (mstp.UnderlineTheseChar == sstp.UnderlineTheseChar) subFmt.StepData[i].UnderlineTheseChar = null;
|
||||
//subFmt.StepData[i].TabData.Font = FixInheritedFont(sstp.TabData.Font, mstp.TabData.Font);// Phase 2
|
||||
if (mstp.TabData.IdentEdit == sstp.TabData.IdentEdit) subFmt.StepData[i].TabData.IdentEdit = null;
|
||||
if (mstp.TabData.Ident == sstp.TabData.Ident) subFmt.StepData[i].TabData.Ident = null;
|
||||
if (mstp.TabData.RNOIdentEdit == sstp.TabData.RNOIdentEdit) subFmt.StepData[i].TabData.RNOIdentEdit = null;
|
||||
if (mstp.TabData.RNOIdent == sstp.TabData.RNOIdent) subFmt.StepData[i].TabData.RNOIdent = null;
|
||||
if (mstp.TabData.IdentEditWid == sstp.TabData.IdentEditWid) subFmt.StepData[i].TabData.IdentEditWid = null;
|
||||
if (mstp.TabData.IdentWid == sstp.TabData.IdentWid) subFmt.StepData[i].TabData.IdentWid = null;
|
||||
if (mstp.TabData.RNOIdentEditWid == sstp.TabData.RNOIdentEditWid) subFmt.StepData[i].TabData.RNOIdentEditWid = null;
|
||||
if (mstp.TabData.RNOIdentWid == sstp.TabData.RNOIdentWid) subFmt.StepData[i].TabData.RNOIdentWid = null;
|
||||
if (mstp.TabData.Justify == sstp.TabData.Justify) subFmt.StepData[i].TabData.Justify = null;
|
||||
}
|
||||
// box data...
|
||||
for (int i = 0; i < MAXBOXES + 1; i++)
|
||||
{
|
||||
@ -4868,7 +4796,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.UndSpecialStepsFoldout != null && msctstp.UndSpecialStepsFoldout == ssctstp.UndSpecialStepsFoldout) subFmt.SectData.StepSectionData.UndSpecialStepsFoldout = "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";
|
||||
if (msctstp.ImperfectStructure != null && msctstp.ImperfectStructure == ssctstp.ImperfectStructure) subFmt.SectData.StepSectionData.ImperfectStructure = "null";
|
||||
@ -4895,10 +4823,10 @@ namespace fmtxml
|
||||
if (mainFmt.SectData.SectionTitleLength == subFmt.SectData.SectionTitleLength) subFmt.SectData.SectionTitleLength = 0;
|
||||
if (mainFmt.SectData.SectForeColor == subFmt.SectData.SectForeColor) subFmt.SectData.SectForeColor = null;
|
||||
if (mainFmt.SectData.SectBackColor == subFmt.SectData.SectBackColor) subFmt.SectData.SectBackColor = null;
|
||||
if (mainFmt.SectData.CancelSecTitlesOnS1 != null && mainFmt.SectData.CancelSecTitlesOnS1 == subFmt.SectData.CancelSecTitlesOnS1) subFmt.SectData.CancelSecTitlesOnS1 = "null";
|
||||
if (mainFmt.SectData.CancelSecTitlesOnS2 != null && mainFmt.SectData.CancelSecTitlesOnS2 == subFmt.SectData.CancelSecTitlesOnS2) subFmt.SectData.CancelSecTitlesOnS2 = "null";
|
||||
if (mainFmt.SectData.CancelSecTitlesOnE0 != null && mainFmt.SectData.CancelSecTitlesOnE0 == subFmt.SectData.CancelSecTitlesOnE0) subFmt.SectData.CancelSecTitlesOnE0 = "null";
|
||||
if (mainFmt.SectData.CancelSecTitlesOnE2 != null && mainFmt.SectData.CancelSecTitlesOnE2 == subFmt.SectData.CancelSecTitlesOnE2) subFmt.SectData.CancelSecTitlesOnE2 = "null";
|
||||
//if (mainFmt.SectData.CancelSecTitlesOnS1 != null && mainFmt.SectData.CancelSecTitlesOnS1 == subFmt.SectData.CancelSecTitlesOnS1) subFmt.SectData.CancelSecTitlesOnS1 = "null";
|
||||
//if (mainFmt.SectData.CancelSecTitlesOnS2 != null && mainFmt.SectData.CancelSecTitlesOnS2 == subFmt.SectData.CancelSecTitlesOnS2) subFmt.SectData.CancelSecTitlesOnS2 = "null";
|
||||
//if (mainFmt.SectData.CancelSecTitlesOnE0 != null && mainFmt.SectData.CancelSecTitlesOnE0 == subFmt.SectData.CancelSecTitlesOnE0) subFmt.SectData.CancelSecTitlesOnE0 = "null";
|
||||
//if (mainFmt.SectData.CancelSecTitlesOnE2 != null && mainFmt.SectData.CancelSecTitlesOnE2 == subFmt.SectData.CancelSecTitlesOnE2) subFmt.SectData.CancelSecTitlesOnE2 = "null";
|
||||
if (mainFmt.SectData.MetaSectEndMessage != null && mainFmt.SectData.MetaSectEndMessage == subFmt.SectData.MetaSectEndMessage) subFmt.SectData.MetaSectEndMessage = "null";
|
||||
if (mainFmt.SectData.ReadOnlyTypeInContMsg != null && mainFmt.SectData.ReadOnlyTypeInContMsg == subFmt.SectData.ReadOnlyTypeInContMsg) subFmt.SectData.ReadOnlyTypeInContMsg = "null";
|
||||
if (mainFmt.SectData.ReplaceWordsInROs != null && mainFmt.SectData.ReplaceWordsInROs == subFmt.SectData.ReplaceWordsInROs) subFmt.SectData.ReplaceWordsInROs = "null";
|
||||
@ -5206,6 +5134,65 @@ namespace fmtxml
|
||||
private string StepPartTabRNOIdentEditWid(Step stp) { return stp.TabData.RNOIdentEditWid; }
|
||||
private string StepPartTabRNOIdentWid(Step stp) { return stp.TabData.RNOIdentWid; }
|
||||
private string StepPartTabJustify(Step stp) { return stp.TabData.Justify; }
|
||||
|
||||
// Do the flags:
|
||||
private string StepPartDoubleSpace(Step stp) { return stp.DoubleSpace; }
|
||||
private string StepPartEnhancedStepNumFromPrev(Step stp) { return stp.EnhancedStepNumFromPrev; }
|
||||
private string StepPartUseSmartTemplate(Step stp) { return stp.UseSmartTemplate; }
|
||||
private string StepPartAlwaysUseExtraLines(Step stp) { return stp.AlwaysUseExtraLines; }
|
||||
private string StepPartSeparateBox(Step stp) { return stp.SeparateBox; }
|
||||
private string StepPartSeparateBoxCautions(Step stp) { return stp.SeparateBoxCautions; }
|
||||
private string StepPartSpaceDouble(Step stp) { return stp.SpaceDouble; }
|
||||
private string StepPartReduceLineAfter(Step stp) { return stp.ReduceLineAfter; }
|
||||
private string StepPartSameLevel(Step stp) { return stp.SameLevel; }
|
||||
private string StepPartBoldHighLevel(Step stp) { return stp.BoldHighLevel; }
|
||||
private string StepPartOneLineBeforeTab(Step stp) { return stp.OneLineBeforeTab; }
|
||||
private string StepPartBoxIt(Step stp) { return stp.BoxIt; }
|
||||
private string StepPartBoxed(Step stp) { return stp.Boxed; }
|
||||
private string StepPartXLines_StepFix(Step stp) { return stp.XLines_StepFix; }
|
||||
private string StepPartRebox(Step stp) { return stp.Rebox; }
|
||||
private string StepPartSpcHdr(Step stp) { return stp.SpcHdr; }
|
||||
private string StepPartContinueOnly(Step stp) { return stp.ContinueOnly; }
|
||||
private string StepPartSepAfterAER(Step stp) { return stp.SepAfterAER; }
|
||||
private string StepPartUseAlternateStepBox(Step stp) { return stp.UseAlternateStepBox; }
|
||||
private string StepPartUnderlineAfterDashSpace(Step stp) { return stp.UnderlineAfterDashSpace; }
|
||||
private string StepPartSpaceIn(Step stp) { return stp.SpaceIn; }
|
||||
private string StepPartPageBreakOnStep(Step stp) { return stp.PageBreakOnStep; }
|
||||
private string StepPartAlignNullTabWSectHead(Step stp) { return stp.AlignNullTabWSectHead; }
|
||||
private string StepPartTextSubFollowsTextStyle(Step stp) { return stp.TextSubFollowsTextStyle; }
|
||||
private string StepPartTreatAsSequential(Step stp) { return stp.TreatAsSequential; }
|
||||
private string StepPartMatchUpRNO(Step stp) { return stp.MatchUpRNO; }
|
||||
private string StepPartInPageList(Step stp) { return stp.InPageList; }
|
||||
private string StepPartCenterOneLineOnly(Step stp) { return stp.CenterOneLineOnly; }
|
||||
private string StepPartSubTableGetsUp1Level(Step stp) { return stp.SubTableGetsUp1Level; }
|
||||
private string StepPartRemember(Step stp) { return stp.Remember; }
|
||||
private string StepPartCenterOneLineAdjust(Step stp) { return stp.CenterOneLineAdjust; }
|
||||
private string StepPartBreak(Step stp) { return stp.Break; }
|
||||
private string StepPartBreakEquipmentList(Step stp) { return stp.BreakEquipmentList; }
|
||||
private string StepPartBreakCautionsNotesOnSubstps(Step stp) { return stp.BreakCautionsNotesOnSubstps; }
|
||||
private string StepPartCenterTextWithinWidth(Step stp) { return stp.CenterTextWithinWidth; }
|
||||
private string StepPartNewlineAfter(Step stp) { return stp.NewlineAfter; }
|
||||
private string StepPartStartLineWithDash(Step stp) { return stp.StartLineWithDash; }
|
||||
private string StepPartBlankLineBeforeSubStep(Step stp) { return stp.BlankLineBeforeSubStep; }
|
||||
private string StepPartAlwaysTab(Step stp) { return stp.AlwaysTab; }
|
||||
private string StepPartMixCautionsAndNotes(Step stp) { return stp.MixCautionsAndNotes; }
|
||||
private string StepPartNumberHighLevel(Step stp) { return stp.NumberHighLevel; }
|
||||
private string StepPartOffsetTab(Step stp) { return stp.OffsetTab; }
|
||||
private string StepPartLeftJustifyBorderless(Step stp) { return stp.LeftJustifyBorderless; }
|
||||
private string StepPartStepNumIfOnlyOne(Step stp) { return stp.StepNumIfOnlyOne; }
|
||||
private string StepPartLJTabs(Step stp) { return stp.LJTabs; }
|
||||
private string StepPartNumberSubs(Step stp) { return stp.NumberSubs; }
|
||||
private string StepPartBullet(Step stp) { return stp.Bullet; }
|
||||
private string StepPartStepNumberForHighLevel(Step stp) { return stp.StepNumberForHighLevel; }
|
||||
private string StepPartSameRowAsParent(Step stp) { return stp.SameRowAsParent; }
|
||||
private string StepPartCheckoffSameAsParent(Step stp) { return stp.CheckoffSameAsParent; }
|
||||
private string StepPartAtLeastTwoDigits(Step stp) { return stp.AtLeastTwoDigits; }
|
||||
private string StepPartUseInAcTable(Step stp) { return stp.UseInAcTable; }
|
||||
private string StepPartNumber(Step stp) { return stp.Number; }
|
||||
private string StepPartThreeBlanksAbove(Step stp) { return stp.ThreeBlanksAbove; }
|
||||
private string StepPartCheckOffs(Step stp) { return stp.CheckOffs; }
|
||||
private string StepPartQuoted(Step stp) { return stp.Quoted; }
|
||||
|
||||
//private string StepPartTabCheckOff(Step stp) { return stp.TabData.CheckOff; }
|
||||
private string StepPartTabFontFamily(Step stp)
|
||||
{
|
||||
@ -5262,7 +5249,7 @@ namespace fmtxml
|
||||
{
|
||||
Dictionary<string, Step> dicSteps = BuildStepDic(stpdata);
|
||||
Dictionary<string, Step> dicParents = BuildParentDic(stpdata, dicSteps);
|
||||
for (int i = 1; i < MAXSTEPS; i++)
|
||||
for (int i = 0; i < MAXSTEPS; i++)
|
||||
{
|
||||
FixInheritance(ref stpdata[i], dicParents);
|
||||
}
|
||||
@ -5321,6 +5308,8 @@ namespace fmtxml
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartPrintBackColor), step, dicParents)) step.StepPrintData.BackColor = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartPrintPosAdjust), step, dicParents)) step.StepPrintData.PosAdjust = null;
|
||||
// substructure - TabData
|
||||
|
||||
//RHM/KBR added this - not sure: if (mstp.TabData.IdentEdit == sstp.TabData.IdentEdit) subFmt.StepData[i].TabData.IdentEdit = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartTabIdentEdit), step, dicParents)) step.TabData.IdentEdit = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartTabIdent), step, dicParents)) step.TabData.Ident = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartTabRNOIdentEdit), step, dicParents)) step.TabData.RNOIdentEdit = null;
|
||||
@ -5361,18 +5350,109 @@ namespace fmtxml
|
||||
step.TabData.MacroList[0].NotInRNO = null;
|
||||
}
|
||||
}
|
||||
|
||||
// flags:
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartDoubleSpace), step, dicParents)) step.DoubleSpace = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartEnhancedStepNumFromPrev), step, dicParents)) step.EnhancedStepNumFromPrev = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartUseSmartTemplate), step, dicParents)) step.UseSmartTemplate = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartAlwaysUseExtraLines), step, dicParents)) step.AlwaysUseExtraLines = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSeparateBox), step, dicParents)) step.SeparateBox = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSeparateBoxCautions), step, dicParents)) step.SeparateBoxCautions = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSpaceDouble), step, dicParents)) step.SpaceDouble = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartReduceLineAfter), step, dicParents)) step.ReduceLineAfter = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSameLevel), step, dicParents)) step.SameLevel = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBoldHighLevel), step, dicParents)) step.BoldHighLevel = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartOneLineBeforeTab), step, dicParents)) step.OneLineBeforeTab = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBoxIt), step, dicParents)) step.BoxIt = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBoxed), step, dicParents)) step.Boxed = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartXLines_StepFix), step, dicParents)) step.XLines_StepFix = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartRebox), step, dicParents)) step.Rebox = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSpcHdr), step, dicParents)) step.SpcHdr = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartContinueOnly), step, dicParents)) step.ContinueOnly = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSepAfterAER), step, dicParents)) step.SepAfterAER = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartUseAlternateStepBox), step, dicParents)) step.UseAlternateStepBox = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartUnderlineAfterDashSpace), step, dicParents)) step.UnderlineAfterDashSpace = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSpaceIn), step, dicParents)) step.SpaceIn = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartPageBreakOnStep), step, dicParents)) step.PageBreakOnStep = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartAlignNullTabWSectHead), step, dicParents)) step.AlignNullTabWSectHead = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartTextSubFollowsTextStyle), step, dicParents)) step.TextSubFollowsTextStyle = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartTreatAsSequential), step, dicParents)) step.TreatAsSequential = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartMatchUpRNO), step, dicParents)) step.MatchUpRNO = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartInPageList), step, dicParents)) step.InPageList = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartCenterOneLineOnly), step, dicParents)) step.CenterOneLineOnly = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSubTableGetsUp1Level), step, dicParents)) step.SubTableGetsUp1Level = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartRemember), step, dicParents)) step.Remember = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartCenterOneLineAdjust), step, dicParents)) step.CenterOneLineAdjust = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBreak), step, dicParents)) step.Break = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBreakEquipmentList), step, dicParents)) step.BreakEquipmentList = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBreakCautionsNotesOnSubstps), step, dicParents)) step.BreakCautionsNotesOnSubstps = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartCenterTextWithinWidth), step, dicParents)) step.CenterTextWithinWidth = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartNewlineAfter), step, dicParents)) step.NewlineAfter = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartStartLineWithDash), step, dicParents)) step.StartLineWithDash = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBlankLineBeforeSubStep), step, dicParents)) step.BlankLineBeforeSubStep = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartAlwaysTab), step, dicParents)) step.AlwaysTab = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartMixCautionsAndNotes), step, dicParents)) step.MixCautionsAndNotes = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartNumberHighLevel), step, dicParents)) step.NumberHighLevel = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartOffsetTab), step, dicParents)) step.OffsetTab = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartLeftJustifyBorderless), step, dicParents)) step.LeftJustifyBorderless = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartStepNumIfOnlyOne), step, dicParents)) step.StepNumIfOnlyOne = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartLJTabs), step, dicParents)) step.LJTabs = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartNumberSubs), step, dicParents)) step.NumberSubs = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartBullet), step, dicParents)) step.Bullet = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartStepNumberForHighLevel), step, dicParents)) step.StepNumberForHighLevel = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartSameRowAsParent), step, dicParents)) step.SameRowAsParent = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartCheckoffSameAsParent), step, dicParents)) step.CheckoffSameAsParent = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartAtLeastTwoDigits), step, dicParents)) step.AtLeastTwoDigits = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartUseInAcTable), step, dicParents)) step.UseInAcTable = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartNumber), step, dicParents)) step.Number = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartThreeBlanksAbove), step, dicParents)) step.ThreeBlanksAbove = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartCheckOffs), step, dicParents)) step.CheckOffs = null;
|
||||
if (CheckInheritedStr(new StepPartStr(StepPartQuoted), step, dicParents)) step.Quoted = null;
|
||||
|
||||
}
|
||||
|
||||
private bool CheckInheritedStr(StepPartStr stepPartStr, Step step, Dictionary<string, Step> dicParents)
|
||||
{
|
||||
Step parent = step;
|
||||
while ((stepPartStr(parent) == null) || (step.Type == parent.Type))
|
||||
{
|
||||
if (!dicParents.ContainsKey(parent.Type)) return false;
|
||||
parent = dicParents[parent.Type];
|
||||
if (stepPartStr(step) == stepPartStr(parent)) return true;
|
||||
|
||||
string inheritedValue = GetStepInherited(stepPartStr, step.Type, 0);
|
||||
string stepValue = stepPartStr(step);
|
||||
return inheritedValue == stepValue;
|
||||
//Step parent = step;
|
||||
//while ((stepPartStr(parent) == null) || (step.Type == parent.Type))
|
||||
//{
|
||||
// if (!dicParents.ContainsKey(parent.Type))
|
||||
// {
|
||||
// if (BaseFormat.StepData != null)
|
||||
// {
|
||||
// Step mstp = BaseFormat.StepData[step.Index];
|
||||
// if (stepPartStr(mstp) == stepPartStr(step)) return true;
|
||||
// }
|
||||
// return false;// No non-null parent value found
|
||||
// }
|
||||
// parent = dicParents[parent.Type];
|
||||
// if (stepPartStr(step) == stepPartStr(parent))
|
||||
// return true; // step value same as parent.
|
||||
//}
|
||||
//return false; // parent value different from step value
|
||||
}
|
||||
return false;
|
||||
|
||||
private string GetStepInherited(StepPartStr stepPartStr, string stepType, int level)
|
||||
{
|
||||
string typ = stepType;
|
||||
// spin through the step inheritance looking for a value
|
||||
while (StepParentList[level].ContainsKey(typ))
|
||||
{
|
||||
Step parent = StepParentList[level][typ];
|
||||
string parentVal = stepPartStr(parent);
|
||||
if (parentVal != null) return parentVal;
|
||||
typ = parent.Type;
|
||||
}
|
||||
// no more parent formats to look at:
|
||||
if (level >= (StepParentList.Count - 1)) return null;
|
||||
Step stp = StepList[level + 1][stepType];
|
||||
string stpVal = stepPartStr(stp);
|
||||
if (stpVal != null) return stpVal;
|
||||
return GetStepInherited(stepPartStr, stepType, level + 1);
|
||||
}
|
||||
private Dictionary<string, Step> BuildStepDic(Step[] stpdata)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ public struct DocStyle
|
||||
public short Index;
|
||||
public short pagestyle; // Index into page style array
|
||||
public VE_Font dstyle; // 'Printer driver styles' for the entire document
|
||||
public float PTopRow; // First 'document text' row on printed page
|
||||
public float TopMargin; // First 'document text' row on printed page/ renamed to TopMargin
|
||||
public float FooterLen; // Number of lines required for footer
|
||||
public float LeftMargin; // Size of left margin
|
||||
public float PageLength;
|
||||
@ -63,6 +63,9 @@ public struct DocStyle
|
||||
public bool UseCheckOffs; // This was originally in fmt. Load fmt to get
|
||||
public int oldtonew; // Bits for converting from old to new
|
||||
// document style
|
||||
public bool CancelSectTitle; // Was format flags CancelSecTitlesOnS1 & CancelSecTitlesOnS2
|
||||
public bool SpecialStepsFoldout; // Was format flag SpecialStepsFoldout - but put on E2 (was in 16bit code)
|
||||
public bool UndSpecialStepsFoldout; // Was format flag UndSpecialStepsFoldout - but put here on E2 only.
|
||||
public short ContTopHLS; // Flag for including High Level step
|
||||
// as part of top continue message.
|
||||
public float CTMargin; // Margin for top message
|
||||
@ -481,6 +484,7 @@ namespace fmtxml
|
||||
{
|
||||
MyPath = path;
|
||||
fmtName = nm;
|
||||
//if (fmtName.ToUpper() != "OHLP" && fmtName.ToUpper() != "BASE" && fmtName.ToUpper() != "WCN2") return;
|
||||
try
|
||||
{
|
||||
// get the default base & plant files to use when figuring out inheritance.
|
||||
@ -754,6 +758,17 @@ namespace fmtxml
|
||||
|
||||
// read in title.
|
||||
string fnm = MyPath + @"\" + fname;
|
||||
// construct format file name from this path.\
|
||||
string fmtFileName = fname;
|
||||
if (fname.Contains(".Y"))
|
||||
{
|
||||
// subformat - replace .Y with .X
|
||||
fmtFileName = MyPath + @"\" + fname.Replace(".Y", ".X");
|
||||
}
|
||||
else
|
||||
{
|
||||
fmtFileName = MyPath + @"\" + fname.Substring(0, fname.IndexOf(".")) + ".FMT";
|
||||
}
|
||||
if (fname == "CPL.Y01") Console.WriteLine(fname);
|
||||
brFmt = new BinaryReader(File.Open(fnm,System.IO.FileMode.Open,System.IO.FileAccess.ReadWrite,FileShare.ReadWrite));
|
||||
dcstyles.Name = GetAsciiString(brFmt);
|
||||
@ -784,7 +799,7 @@ namespace fmtxml
|
||||
dcs[1].dstyle = dcs[0].dstyle.Copy();
|
||||
dcs[2].dstyle = dcs[0].dstyle.Copy();
|
||||
dcs[3].dstyle = dcs[0].dstyle.Copy();
|
||||
dcs[0].PTopRow = dcs[1].PTopRow = dcs[2].PTopRow = dcs[3].PTopRow = brFmt.ReadInt16();
|
||||
dcs[0].TopMargin = dcs[1].TopMargin = dcs[2].TopMargin = dcs[3].TopMargin = brFmt.ReadInt16();
|
||||
dcs[0].LeftMargin = dcs[1].LeftMargin = dcs[2].LeftMargin = dcs[3].LeftMargin = brFmt.ReadInt16();
|
||||
dcs[0].PageLength = brFmt.ReadInt16();
|
||||
dcs[1].PageLength = brFmt.ReadInt16();
|
||||
@ -820,13 +835,14 @@ namespace fmtxml
|
||||
dc.pagestyle = brFmt.ReadInt16();
|
||||
uint tmpstyle = brFmt.ReadUInt32();
|
||||
dc.dstyle = new VE_Font(tmpstyle);
|
||||
dc.PTopRow = RowToPoints(brFmt.ReadInt16());
|
||||
dc.TopMargin = RowToPoints(brFmt.ReadInt16());
|
||||
dc.FooterLen = RowToPoints(brFmt.ReadInt16());
|
||||
dc.LeftMargin = ColToPoints(brFmt.ReadInt16(), tmpstyle);
|
||||
dc.PageLength = RowToPoints(brFmt.ReadInt16());
|
||||
dc.PageWidth = ColToPoints(brFmt.ReadInt16(), tmpstyle);
|
||||
dc.numberingsequence = brFmt.ReadInt16();
|
||||
dc.oldtonew = brFmt.ReadInt32();
|
||||
SetupDocStyleFromFmtFlags(ref dc, fmtFileName);
|
||||
dc.IsStepSection = ConvertToSectType(dc.oldtonew);
|
||||
dc.ContTopHLS = brFmt.ReadInt16();
|
||||
dc.CTMargin = RowToPoints(brFmt.ReadInt16());
|
||||
@ -849,6 +865,11 @@ namespace fmtxml
|
||||
else dc.ContBottom = null;
|
||||
if (offst[2] != 0) dc.EndString = DoReplaceTokens(GetAsciiStringUntilNull(brFmt));
|
||||
else dc.EndString = null;
|
||||
if (dc.EndString == "")
|
||||
{
|
||||
dc.EndString = null;
|
||||
dc.EndFlag = 0;
|
||||
}
|
||||
if (offst[3] != 0) dc.FinalMsg = DoReplaceTokens(GetAsciiStringUntilNull(brFmt));
|
||||
else dc.FinalMsg = null;
|
||||
if (dc.ContTop == null && dc.ContBottom == null) dc.ContStyle = null;
|
||||
@ -921,6 +942,63 @@ namespace fmtxml
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private void SetupDocStyleFromFmtFlags(ref DocStyle dc, string fmtFileName)
|
||||
{
|
||||
int oldToNew = dc.oldtonew;
|
||||
BinaryReader brFmt = new BinaryReader(File.Open(fmtFileName, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite, FileShare.ReadWrite));
|
||||
int[] tmpshort3 = new int[3];
|
||||
ArrayList stringoffsets = new ArrayList();
|
||||
byte tmpbyte;
|
||||
Int16 tmpshort;
|
||||
string tmpstr;
|
||||
try
|
||||
{
|
||||
tmpshort = brFmt.ReadInt16();
|
||||
tmpstr = fmtxml.FmtFileToXml.GetStringUntilNull(brFmt);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
tmpshort = brFmt.ReadInt16();
|
||||
tmpstr = fmtxml.FmtFileToXml.GetStringUntilNull(brFmt);
|
||||
}
|
||||
|
||||
short vnum = brFmt.ReadInt16(); // number of ints, etc.
|
||||
long posatints = brFmt.BaseStream.Position;
|
||||
long tstloc = vnum + posatints;
|
||||
tmpbyte = brFmt.ReadByte(); // FirstChar
|
||||
Int16[] xtraflag = new Int16[19];
|
||||
for (int i = 0; i < 19; i++)
|
||||
{
|
||||
xtraflag[i] = brFmt.ReadInt16();
|
||||
}
|
||||
dc.CancelSectTitle = CheckSectType(oldToNew, xtraflag);
|
||||
dc.SpecialStepsFoldout = GetSpecialStepsFoldout(oldToNew, xtraflag);
|
||||
dc.UndSpecialStepsFoldout = GetUndSpecialStepsFoldout(oldToNew, xtraflag);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Console.WriteLine("Didn't process docstyle");
|
||||
}
|
||||
}
|
||||
|
||||
private bool GetUndSpecialStepsFoldout(int oldToNew, Int16[] flg)
|
||||
{
|
||||
if (((oldToNew & (int)E_OldToNewSteps.E2) != 0) && ((flg[10] & fmtxml.FmtFileToXml.UNDSPECIALSTEPSFOLDOUT) > 0)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool GetSpecialStepsFoldout(int oldToNew, Int16[] flg)
|
||||
{
|
||||
if (((oldToNew & (int)E_OldToNewSteps.E2) != 0) && ((flg[7] & fmtxml.FmtFileToXml.SPECIALSTEPSFOLDOUT) > 0)) return true;
|
||||
return false;
|
||||
}
|
||||
private bool CheckSectType(int oldToNew, Int16[] flg)
|
||||
{
|
||||
if (((oldToNew & (int)E_OldToNewSteps.S2) != 0) && ((flg[6] & fmtxml.FmtFileToXml.CANCELSECTITLESONS2) > 0)) return true;
|
||||
if (((oldToNew & (int)E_OldToNewSteps.S1) != 0) && ((flg[7] & fmtxml.FmtFileToXml.CANCELSECTITLESONS1) > 0)) return true;
|
||||
if (((oldToNew & (int)E_OldToNewSteps.E0) != 0) && ((flg[11] & fmtxml.FmtFileToXml.CANCELSECTITLESONE0) > 0)) return true;
|
||||
if (((oldToNew & (int)E_OldToNewSteps.E2) != 0) && ((flg[11] & fmtxml.FmtFileToXml.CANCELSECTITLESONE2) > 0)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool ConvertToSectType(int p)
|
||||
{
|
||||
|
@ -170,12 +170,12 @@ namespace fmtxml
|
||||
* The following svg group must be added for WCN2 for its box on the cover page:
|
||||
*
|
||||
<g id="B9">
|
||||
<rect x="25" y="-3" width="353" height="123" fill="none" stroke="black" stroke-width="1.2" />
|
||||
<line x1="25" y1="20" x2="378" y2="20" stroke-width="1.2" />
|
||||
<line x1="25" y1="45" x2="378" y2="45" stroke-width="1.2" />
|
||||
<line x1="25" y1="69" x2="378" y2="69" stroke-width="1.2" />
|
||||
<line x1="25" y1="93" x2="378" y2="93" stroke-width="1.2" />
|
||||
<line x1="285" y1="-5" x2="285" y2="118" stroke-width="1.2" />
|
||||
<rect x="4" y="-3" width="352.5" height="120" fill="none" stroke="black" stroke-width="1.2" />
|
||||
<line x1="4" y1="21" x2="355.5" y2="21" stroke-width="1.2" />
|
||||
<line x1="4" y1="45" x2="355.5" y2="45" stroke-width="1.2" />
|
||||
<line x1="4" y1="69" x2="355.5" y2="69" stroke-width="1.2" />
|
||||
<line x1="4" y1="93" x2="355.5" y2="93" stroke-width="1.2" />
|
||||
<line x1="263" y1="-3" x2="263" y2="118" stroke-width="1.2" />
|
||||
</g>
|
||||
*/
|
||||
public GenXmlToSvg(string nm, string resPath)
|
||||
|
@ -20,8 +20,11 @@
|
||||
<xsl:apply-templates select="IsStepSection"/>
|
||||
<xsl:apply-templates select="UseCheckOffs"/>
|
||||
<xsl:apply-templates select="oldtonew"/>
|
||||
<xsl:apply-templates select="CancelSectTitle"/>
|
||||
<xsl:apply-templates select="SpecialStepsFoldout"/>
|
||||
<xsl:apply-templates select="UndSpecialStepsFoldout"/>
|
||||
<xsl:apply-templates select="pagestyle"/>
|
||||
<xsl:apply-templates select="dstyle|DocStructStyle|PTopRow|ContStyle|EndStyle|FinalMsg"/>
|
||||
<xsl:apply-templates select="dstyle|DocStructStyle|TopMargin|ContStyle|EndStyle|FinalMsg"/>
|
||||
</DocStyle>
|
||||
</xsl:template>
|
||||
<xsl:template match="numberingsequence">
|
||||
@ -39,6 +42,21 @@
|
||||
<xsl:template match="oldtonew">
|
||||
<xsl:attribute name="OldToNew"><xsl:value-of select="."/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="CancelSectTitle">
|
||||
<xsl:attribute name="CancelSectTitle">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="SpecialStepsFoldout">
|
||||
<xsl:attribute name="SpecialStepsFoldout">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="UndSpecialStepsFoldout">
|
||||
<xsl:attribute name="UndSpecialStepsFoldout">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="dstyle">
|
||||
<xsl:if test="string-length(./FontFamily)+string-length(./FontSize)+string-length(./FontStyle)>0">
|
||||
<Font>
|
||||
@ -60,9 +78,9 @@
|
||||
</Font>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template match="PTopRow">
|
||||
<xsl:template match="TopMargin">
|
||||
<Layout>
|
||||
<xsl:attribute name="TopRow"><xsl:value-of select="."/></xsl:attribute>
|
||||
<xsl:attribute name="TopMargin"><xsl:value-of select="."/></xsl:attribute>
|
||||
<xsl:attribute name="FooterLength"><xsl:value-of select="..//FooterLen"/></xsl:attribute>
|
||||
<xsl:attribute name="PageLength"><xsl:value-of select="..//PageLength"/></xsl:attribute>
|
||||
<xsl:attribute name="PageWidth"><xsl:value-of select="..//PageWidth"/></xsl:attribute>
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user