This commit is contained in:
parent
883a21891d
commit
216960bce8
@ -1545,7 +1545,7 @@ namespace fmtxml
|
||||
fmtName = alias;
|
||||
//if (fmtName.ToUpper() != "CPLS" && fmtName.ToUpper() != "BASE") return;
|
||||
//if (fmtName.ToUpper() != "OHLP" && fmtName.ToUpper() != "BASE" && fmtName.ToUpper() != "WCN2") return;
|
||||
//if (fmtName.ToUpper() != "AEP" && fmtName.ToUpper() != "BASE") return;
|
||||
//if (fmtName.ToUpper() != "WCN2" && fmtName.ToUpper() != "BASE") return;
|
||||
try
|
||||
{
|
||||
LoadFormatFile(nm + ".fmt", ref SubXtraFlags);
|
||||
@ -2669,6 +2669,7 @@ namespace fmtxml
|
||||
arcnt++;
|
||||
if (indx > 0) tabstrings[i, 1] = GetStringFromByte(input, indx);
|
||||
}
|
||||
NBRSub = fmtdata.SectData.StepSectionData.NumberOfSubStepTypes != 0 ? fmtdata.SectData.StepSectionData.NumberOfSubStepTypes : NBRSub;
|
||||
for (int i = 0; i < MAXSTEPS; i++)
|
||||
{
|
||||
for (int j = 0; j < MAXTABS; j++)
|
||||
@ -4567,12 +4568,18 @@ namespace fmtxml
|
||||
if (tablen < 0) tablen = 0;
|
||||
return ColToPoints(tablen, _PlantDefaultFontStyle);
|
||||
}
|
||||
private int NBRSub = 16;
|
||||
// STANDARD,AND,OR,EQUIPMENTLIST,EQUIPMENTWBLANK,EXPLICITAND,IMPLICITOR,PARAGRAPH,
|
||||
// EQUIPMENTOPT,EQUIPMENTOPTWBLANK,CONTACSEQUENTIAL,CONTACAND,CONTACOR,CONTACPARAGRAPH,TITLEWITHTEXTRIGHT,TITLEWITHTEXTBELOW
|
||||
private int[] SubTypeValue ={0,3,4,10,13,18,34,23,29,30,43,44,45,46,41,42};
|
||||
private string DoTabs(VE_Font vefont, string po, int i, string p, bool doNumeric)
|
||||
{
|
||||
if ((p == null || p == "") && i != 0) return p ?? "";
|
||||
// subtypes were defined as the list of types in the comment above from 16bit. These types, if a tab
|
||||
// string is not defined, should get a {seq}
|
||||
if ((p == null || p == "") && !IsSubType(i)) return p ?? "";
|
||||
|
||||
string wkstr = p;
|
||||
if (i == 0 && p == null)
|
||||
if (p == null)
|
||||
return "{seq}";
|
||||
//Number Formatting
|
||||
// $ - Uppercase Alphabetical (IP2, GEN, CAL2, VLNCAS)
|
||||
@ -4650,6 +4657,11 @@ namespace fmtxml
|
||||
wkstr = ConvertText(wkstr);
|
||||
return wkstr;
|
||||
}
|
||||
private bool IsSubType(int indx)
|
||||
{
|
||||
for (int i = 0; i < NBRSub; i++) if (indx == SubTypeValue[i]) return true;
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
#region DoEntireInherit
|
||||
private bool CompareParentSub(FormatData mainFmt, ref FormatData subFmt)
|
||||
@ -5264,6 +5276,13 @@ namespace fmtxml
|
||||
for (int i = 0; i < MAXSTEPS; i++)
|
||||
{
|
||||
FixInheritance(ref stpdata[i], dicParents);
|
||||
// Since 'Step' is a structure, the StepParentList (dictionary) needs to be updated each time
|
||||
// the stpdata is updated. Each instance of Step, because it is a structure, will be a separate copy
|
||||
// so the dictionary had a distinct copy of the step's format data from what gets passed in by reference.
|
||||
for (int j = 0; j < MAXSTEPS; j++)
|
||||
{
|
||||
if (stpdata[i].Type == stpdata[j].ParentType) StepParentList[0][stpdata[j].Type] = stpdata[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
private void FixInheritance(ref Step step, Dictionary<string, Step> dicParents)
|
||||
|
Loading…
x
Reference in New Issue
Block a user