Added TurnOffReplaceWords format flag
Added space after UnderlineOn command when converting. Fixed the conversion of Top Continue Message, when not defined in 16-bit, set to an empty string so that it is not inherited from the Base format Added TurnOffReplaceWords flag Don’t do ReplaceWords if TurnOffReplaceWords is set to true
This commit is contained in:
@@ -613,6 +613,7 @@ public struct Section
|
||||
public string SearchAllReplaceWords;
|
||||
public string SecTitleContinue;
|
||||
public string ConvertCaretToDelta;
|
||||
public string TurnOffReplaceWords;
|
||||
/* end of Format flags */
|
||||
public SectionNum SectionNumber;
|
||||
public SectionHead SectionHeader;
|
||||
@@ -4094,6 +4095,11 @@ namespace fmtxml
|
||||
if (XtraFlags.CapFirstLetterInHighSP == "True") fmtdata.ROData.CapFirstLetterInHighRO = "True";
|
||||
else fmtdata.ROData.CapFirstLetterInHighRO = "False";
|
||||
#endregion
|
||||
#region New Format Flags
|
||||
// by default TurnOffReplaceWords should be False.
|
||||
// this will be overrided as needed (ex. NSP (Prairie Island) Deviations
|
||||
fmtdata.SectData.TurnOffReplaceWords = "False";
|
||||
#endregion
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4958,6 +4964,7 @@ namespace fmtxml
|
||||
if (mainFmt.SectData.SearchAllReplaceWords != null && mainFmt.SectData.SearchAllReplaceWords == subFmt.SectData.SearchAllReplaceWords) subFmt.SectData.SearchAllReplaceWords = "null";
|
||||
if (mainFmt.SectData.SecTitleContinue != null && mainFmt.SectData.SecTitleContinue == subFmt.SectData.SecTitleContinue) subFmt.SectData.SecTitleContinue = "null";
|
||||
if (mainFmt.SectData.ConvertCaretToDelta != null && mainFmt.SectData.ConvertCaretToDelta == subFmt.SectData.ConvertCaretToDelta) subFmt.SectData.ConvertCaretToDelta = "null";
|
||||
if (mainFmt.SectData.TurnOffReplaceWords != null && mainFmt.SectData.TurnOffReplaceWords == subFmt.SectData.TurnOffReplaceWords) subFmt.SectData.TurnOffReplaceWords = "null";
|
||||
|
||||
if (msctlay.SubPaginationWght == ssctlay.SubPaginationWght) subFmt.SectData.StepSectionData.StpSectLayData.SubPaginationWght = NullInt;
|
||||
if (msctlay.TextTitleAdjustment == ssctlay.TextTitleAdjustment) subFmt.SectData.StepSectionData.StpSectLayData.TextTitleAdjustment = NullInt;
|
||||
|
@@ -1056,7 +1056,10 @@ namespace fmtxml
|
||||
}
|
||||
dc.DocStructStyle = LoadVE_DocStyle();
|
||||
if (offst[0] != 0) dc.ContTop = DoReplaceTokens(GetAsciiStringUntilNull(brFmt));
|
||||
else dc.ContTop = null;
|
||||
//else dc.ContTop = null;
|
||||
// in 16-bit a null setting would prevent the Top Continue Message from printing
|
||||
// we need to set this to a blank string, else it will be inherited from the BASE format(BASEall.xml)
|
||||
else dc.ContTop = "";
|
||||
if (offst[1] != 0) dc.ContBottom = DoReplaceTokens(GetAsciiStringUntilNull(brFmt));
|
||||
else dc.ContBottom = null;
|
||||
if (offst[2] != 0) dc.EndString = DoReplaceTokens(GetAsciiStringUntilNull(brFmt));
|
||||
@@ -1306,8 +1309,8 @@ namespace fmtxml
|
||||
wkstr = Regex.Replace(wkstr, @"\x13([^\x13\xd6 ]*?)(?:[\x13\xd6]|(?= )|\Z)(.*?)", @"\b$1\b0$2");
|
||||
|
||||
//underline on/off
|
||||
//wkstr = Regex.Replace(wkstr, @"\x16([^\x16 ]*?)(?:[\x16]|(?= )|\Z)(.*?)", @"\ul$1\ul0$2");
|
||||
wkstr = Regex.Replace(wkstr, @"\x16([^\x16 ]*?)(?:[\x16]|(?= )|\Z)(.*?)", @"\ul$1\ulnone$2");
|
||||
//wkstr = Regex.Replace(wkstr, @"\x16([^\x16 ]*?)(?:[\x16]|(?= )|\Z)(.*?)", @"\ul$1\ul0$2");
|
||||
wkstr = Regex.Replace(wkstr, @"\x16([^\x16 ]*?)(?:[\x16]|(?= )|\Z)(.*?)", @"\ul $1\ulnone $2");
|
||||
|
||||
//narrator
|
||||
wkstr = Regex.Replace(wkstr, @"\x86([^\x86 ]*?)(?:[\x86]|(?= )|\Z)(.*?)", @"\f{Narrator}$1\f0$2");
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user