diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index 66ce8053..3f019bb3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1685,6 +1685,18 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _ConvertCaretToDelta, "@ConvertCaretToDelta"); } } + // This format flag turns off the Replace Words functionality. + // in 16-bit proms, this was done simply by having an empty Replace Words list. + // in 32-bit the inheiradence logic finds a replace words list in the base format + // if the plant format does not have one. Thus the need of this format flag. + private LazyLoad _TurnOffReplaceWords; + public bool TurnOffReplaceWords + { + get + { + return LazyLoad(ref _TurnOffReplaceWords, "@TurnOffReplaceWords"); + } + } } #endregion #region SectionNumber diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 96fedd6a..35e468e2 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -215,7 +215,8 @@ namespace Volian.Controls.Library } // if in print mode, view mode, or non-active richtextbox do replace words. Only if in // actual edit mode are replace words left as is. - if (wordsShouldBeReplaced) + // But don't do ReplaceWords if the TurnOffReplaceWords format flag is set + if (wordsShouldBeReplaced && !_MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.TurnOffReplaceWords) text = DoReplaceWords2(text); if (_MyItemInfo != null) { diff --git a/PROMS/fmtxml/FmtFileToXml.cs b/PROMS/fmtxml/FmtFileToXml.cs index 251dbfc4..a2c0cb3e 100644 --- a/PROMS/fmtxml/FmtFileToXml.cs +++ b/PROMS/fmtxml/FmtFileToXml.cs @@ -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; diff --git a/PROMS/fmtxml/FmtToXml.cs b/PROMS/fmtxml/FmtToXml.cs index 0a49dfae..aa7b2e0c 100644 --- a/PROMS/fmtxml/FmtToXml.cs +++ b/PROMS/fmtxml/FmtToXml.cs @@ -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"); diff --git a/PROMS/fmtxml/TranslateFMT.XSL b/PROMS/fmtxml/TranslateFMT.XSL index 739581ca..66ee45cd 100644 Binary files a/PROMS/fmtxml/TranslateFMT.XSL and b/PROMS/fmtxml/TranslateFMT.XSL differ