This commit is contained in:
parent
52feb8a711
commit
77e55dbb9c
@ -2543,9 +2543,9 @@ namespace fmtxml
|
||||
{
|
||||
if (Tabindx[i] == j)
|
||||
{
|
||||
fmtdata.StepData[i+1].TabData.IdentEdit = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 0]);
|
||||
fmtdata.StepData[i+1].TabData.IdentEdit = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 0], true);
|
||||
fmtdata.StepData[i+1].TabData.IdentEditWid = CalculateTabWid(tabstrings[j, 0]).ToString();
|
||||
fmtdata.StepData[i+1].TabData.Ident = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 1]);
|
||||
fmtdata.StepData[i + 1].TabData.Ident = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 1], true);
|
||||
fmtdata.StepData[i+1].TabData.IdentWid = CalculateTabWid(tabstrings[j, 1]).ToString();
|
||||
break;
|
||||
}
|
||||
@ -2582,8 +2582,33 @@ namespace fmtxml
|
||||
{
|
||||
indx = offset[arcnt];
|
||||
arcnt++;
|
||||
if (indx > 0) fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat + GetStringFromByte(input, indx);
|
||||
else fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = null;
|
||||
if (indx > 0)
|
||||
{
|
||||
string p = GetStringFromByte(input, indx);
|
||||
if (p != null)
|
||||
{
|
||||
if (p[0] == '+')
|
||||
{
|
||||
string tmp = null;
|
||||
if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat.IndexOf("{numeric}") > -1)
|
||||
tmp = p.Replace("+", "{numericWpar}");
|
||||
else if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat.IndexOf("{alpha}") > -1)
|
||||
tmp = p.Replace("+", "{alphaWpar}");
|
||||
else if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat.IndexOf("{ALPHA}") > -1)
|
||||
tmp = p.Replace("+", "{ALPHAWpar}");
|
||||
else
|
||||
tmp = p.Replace("+", "{UNKNOWNWpar}");
|
||||
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = tmp;
|
||||
}
|
||||
else
|
||||
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat + p;
|
||||
}
|
||||
else
|
||||
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = null;
|
||||
}
|
||||
else
|
||||
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = null;
|
||||
//if (indx > 0) fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat + GetStringFromByte(input, indx);
|
||||
}
|
||||
// replace word strings
|
||||
for (int i = 0; i < MAXREPLACE; i++)
|
||||
@ -2878,9 +2903,9 @@ namespace fmtxml
|
||||
{
|
||||
if (Tabindx[i] == j)
|
||||
{
|
||||
fmtdata.StepData[i + 1].TabData.RNOIdentEdit = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 0]);
|
||||
fmtdata.StepData[i + 1].TabData.RNOIdentEdit = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 0], fmtdata.StepData[i].StepNumberForHighLevel=="True");
|
||||
fmtdata.StepData[i + 1].TabData.RNOIdentEditWid = CalculateTabWid(tabstrings[j, 0]).ToString();
|
||||
fmtdata.StepData[i + 1].TabData.RNOIdent = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 1]);
|
||||
fmtdata.StepData[i + 1].TabData.RNOIdent = DoTabs(fmtdata.StepData[i].TabData.Font, fmtdata.PurchaseOptions, i, tabstrings[j, 1], fmtdata.StepData[i].StepNumberForHighLevel == "True");
|
||||
fmtdata.StepData[i + 1].TabData.RNOIdentWid = CalculateTabWid(tabstrings[j, 1]).ToString();
|
||||
break;
|
||||
}
|
||||
@ -4277,7 +4302,7 @@ namespace fmtxml
|
||||
try
|
||||
{
|
||||
// replace newline with {par}
|
||||
wkstr = wkstr.Replace("\n", "{par}");
|
||||
wkstr = wkstr.Replace("\n", @"{\par}");
|
||||
|
||||
// special change bar token (various cpl formats)
|
||||
wkstr = wkstr.Replace("\x08\x08\x08\x08\x08\x05", "{CHG_BAR with Backspace Token}");
|
||||
@ -4368,10 +4393,13 @@ namespace fmtxml
|
||||
if (tablen < 0) tablen = 0;
|
||||
return ColToPoints(tablen);
|
||||
}
|
||||
private string DoTabs(VE_Font vefont, string po, int i, string p)
|
||||
private string DoTabs(VE_Font vefont, string po, int i, string p, bool doNumeric)
|
||||
{
|
||||
if (p == null || p == "") return p;
|
||||
if ((p == null || p == "")&&i!=0) return p;
|
||||
|
||||
string wkstr = p;
|
||||
if (i==0 && p==null)
|
||||
return "{seq}";
|
||||
//Number Formatting
|
||||
// $ - Uppercase Alphabetical (IP2, GEN, CAL2, VLNCAS)
|
||||
// & - Roman Numeral - UpperCase
|
||||
@ -4401,8 +4429,17 @@ namespace fmtxml
|
||||
if (i == 0 && ((indx = wkstr.IndexOf("{")) < 0)) // sequential - put in "{seq}"
|
||||
wkstr = wkstr.Insert(0, "{seq}");
|
||||
// high, immediate, continuous, lossofac, high5 - put in " {numeric} "
|
||||
else if ((i == 1 || i == 2 || i == 8 || i == 17 || i == 40) && ((indx = wkstr.IndexOf("{")) < 0))
|
||||
else if ((i == 1 || i == 2 || i == 8 || i == 17 || i == 40) && ((indx = wkstr.IndexOf("{")) < 0) && doNumeric)
|
||||
{
|
||||
int indxColon = wkstr.IndexOf(":");
|
||||
int indxPercent = wkstr.IndexOf("%");
|
||||
if (indxColon>0)
|
||||
wkstr = wkstr.Insert(indxColon, "{numeric}");
|
||||
else if (indxPercent>0)
|
||||
wkstr = wkstr.Insert(indxPercent+1, "{numeric}"); // put numeric after section prefix
|
||||
else
|
||||
wkstr = wkstr.Insert(1, "{numeric}");
|
||||
}
|
||||
|
||||
//Section Numbers
|
||||
// % - Prefix with section number (works string in 16 bit, ie.e For 4.3 the prefix becomes 4.
|
||||
|
Loading…
x
Reference in New Issue
Block a user