This commit is contained in:
Kathy Ruffing 2011-08-24 11:37:35 +00:00
parent ead5264fd6
commit b36347213b

View File

@ -786,6 +786,7 @@ public struct SeqTabFmt
{ {
public int Index; public int Index;
public int LeftJustify; public int LeftJustify;
public string TabToken;
public string TabFormat; public string TabFormat;
public string PrintTabFormat; public string PrintTabFormat;
} }
@ -2428,7 +2429,7 @@ namespace fmtxml
fmtdata.SectData.StepSectionData.SequentialTabFormat = new SeqTabFmt[MAXSEQ]; fmtdata.SectData.StepSectionData.SequentialTabFormat = new SeqTabFmt[MAXSEQ];
for (int i = 0; i < MAXSEQ; i++) for (int i = 0; i < MAXSEQ; i++)
{ {
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = ConvertSeqStart(brFmt.ReadByte()); fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken = ConvertSeqStart(brFmt.ReadByte());
} }
//fmtdata.SectData.StepSectionData.HighSeqStart = brFmt.ReadByte(); //fmtdata.SectData.StepSectionData.HighSeqStart = brFmt.ReadByte();
@ -2719,24 +2720,32 @@ namespace fmtxml
arcnt++; arcnt++;
if (indx > 0) if (indx > 0)
{ {
string p = GetStringFromByte(input, indx); string p = GetStringFromByte(input, indx); // seqtab.
if (p != null) if (p != null)
{ {
if (p[0] == '+') if (p[0] == '+')
{ {
string tmp = null; string tmp = null;
if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat.IndexOf("{numeric}") > -1) if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken.IndexOf("{numeric}") > -1)
tmp = p.Replace("+", "{numericWpar}"); {
else if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat.IndexOf("{alpha}") > -1) fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken = fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken.Replace("{numeric}", "{numericWpar}");
tmp = p.Replace("+", "{alphaWpar}"); fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = p.Replace("+", "{seq}");
else if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat.IndexOf("{ALPHA}") > -1) }
tmp = p.Replace("+", "{ALPHAWpar}"); else if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken.IndexOf("{alpha}") > -1)
else {
tmp = p.Replace("+", "{UNKNOWNWpar}"); fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken = fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken.Replace("{alpha}", "{alphaWpar}");
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = tmp; fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = p.Replace("+", "{seq}");
}
else if (fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken.IndexOf("{ALPHA}") > -1)
{
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken = fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabToken.Replace("{ALPHA}", "{ALPHAWpar}");
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = p.Replace("+", "{seq}");
} }
else else
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat + p; tmp = p.Replace("+", "{UNKNOWNWpar}");
}
else
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = "{seq}" + p;
} }
else else
fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = null; fmtdata.SectData.StepSectionData.SequentialTabFormat[i].TabFormat = null;
@ -3134,9 +3143,12 @@ namespace fmtxml
indx = offset[arcnt]; indx = offset[arcnt];
arcnt++; arcnt++;
if (indx > 0) fmtdata.TransData.TransTypeData[i].TransMenu = ConvertTransFormat(GetStringFromByteNoConvert(input, indx)); if (indx > 0) fmtdata.TransData.TransTypeData[i].TransMenu = ConvertTransFormat(GetStringFromByteNoConvert(input, indx));
else if (i < 6) fmtdata.TransData.TransTypeData[i].TransMenu = XtraFlags.DoSectionTrans == "True" ? DefaultSectionTransTokenStr[i] : DefaultTransStr[i]; else if (i < 6)
{
fmtdata.TransData.TransTypeData[i].TransMenu = XtraFlags.DoSectionTrans == "True" ? DefaultSectionTransTokenStr[i] : DefaultTransStr[i];
fmtdata.TransData.TransTypeData[i].TransType = (byte)i; // reset type fmtdata.TransData.TransTypeData[i].TransType = (byte)i; // reset type
} }
}
for (int i = 0; i < MAXTRANS; i++) for (int i = 0; i < MAXTRANS; i++)
{ {
if (fmtdata.TransData.TransTypeData[i].TransFormat != null && fmtdata.TransData.TransTypeData[i].TransMenu != null) fmtdata.TransData.TransTypeData[i].TransUI = GetTransUIEnum(fmtdata.TransData.TransTypeData[i].TransFormat, fmtdata.TransData.TransTypeData[i].TransMenu); if (fmtdata.TransData.TransTypeData[i].TransFormat != null && fmtdata.TransData.TransTypeData[i].TransMenu != null) fmtdata.TransData.TransTypeData[i].TransUI = GetTransUIEnum(fmtdata.TransData.TransTypeData[i].TransFormat, fmtdata.TransData.TransTypeData[i].TransMenu);
@ -4478,11 +4490,11 @@ namespace fmtxml
//sub on/off - stop at EOL, another token or a space. //sub on/off - stop at EOL, another token or a space.
wkstr = wkstr.Replace("\x19\x19", "\x19"); // replace double sub on with single wkstr = wkstr.Replace("\x19\x19", "\x19"); // replace double sub on with single
wkstr = wkstr.Replace("~~", "\x19"); wkstr = wkstr.Replace("~~", "\x19");
wkstr = Regex.Replace(wkstr, @"\x19([^\x19\x18 ]*?)(?:[\x19\x18]|(?= )|\Z)(.*?)", @"\sub $1\nosupersub $2"); wkstr = Regex.Replace(wkstr, @"\x19([^\x19\x18 ]*?)(?:[\x19\x18]|(?= )|\Z)(.*?)", @"\dn2 $1\up0 $2");
//super on/off //super on/off
//super on/off - stop at EOL, another token or a space. //super on/off - stop at EOL, another token or a space.
wkstr = Regex.Replace(wkstr, @"\x18([^\x19\x18 ]*?)(?:[\x19\x18]|(?= )|\Z)(.*?)", @"\super $1\nosupersub $2"); wkstr = Regex.Replace(wkstr, @"\x18([^\x19\x18 ]*?)(?:[\x19\x18]|(?= )|\Z)(.*?)", @"\up2 $1\up0 $2");
//bold on/off - stop at end of line or another token. //bold on/off - stop at end of line or another token.
wkstr = Regex.Replace(wkstr, @"\x01([^\x01]*?)(?:\x01|\Z)", @"\b $1\b0 "); wkstr = Regex.Replace(wkstr, @"\x01([^\x01]*?)(?:\x01|\Z)", @"\b $1\b0 ");