diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs index fefbbad2..68b841fa 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs @@ -621,7 +621,7 @@ namespace VEPROMS.CSLA.Library string findLink = @""; MatchCollection ms = Regex.Matches(Text, findLink); //string lookFor = string.Format(@"", rousg.ROUsageID); - string lookFor = string.Format(@"^", tran.TranType, tran.TransitionID); + string lookFor = string.Format(@"^", tran.TranType, tran.TransitionID); foreach (Match mm in ms) { Match m = Regex.Match(mm.Value, lookFor, RegexOptions.Singleline); diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index d0dbb495..78aaae9b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -2337,7 +2337,7 @@ namespace VEPROMS.CSLA.Library retval = StripLinks(retval); retval = ReplaceSpecialCharacters(retval); retval = retval.Replace("\u2011", "-"); - retval = retval.Replace(@"\line ", ";"); + retval = Regex.Replace(retval, @"\\line ?", ";"); // better handing of hard returns - replace with semi-colon for use on tree view retval = retval.Replace("\r\n", ";"); retval = retval.Replace("\n", ";"); //added for consistency checking with approved version return retval; @@ -2357,8 +2357,8 @@ namespace VEPROMS.CSLA.Library //retval = Regex.Replace(retval, @"\\nosupersub ?", ""); retval = Regex.Replace(retval, @"\\up[320] ?", ""); retval = Regex.Replace(retval, @"\\dn[320] ?", ""); - retval = Regex.Replace(retval, @"\\li[0-9]* ?", ""); - retval = Regex.Replace(retval, @"\\fi-[0-9]* ?", ""); + retval = Regex.Replace(retval, @"\\li[0-9]+ ?", ""); // changed the * to a + to "\\line " for hard returns part of bug fix B2015-140 + retval = Regex.Replace(retval, @"\\fi-[0-9]+ ?", ""); return retval; } public static string StripLinks(string rtf) diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index ae7a555a..a2838a7e 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -307,10 +307,10 @@ namespace Volian.Controls.Library // as a precaution, convert any \~ to \u160?. This is for Hard spaces. see the commentary in the // save portion of this code for an explanation. text = text.Replace(@"\~", @"\u160?"); - text = text.Replace("\r\n", @"\par "); + text = text.Replace("\r\n", @"\line "); // replace a \r\n with a \line instead of a \par //if (text.IndexOf(@"\line") > -1) - // MessageBox.Show("Found rtf line"); - text = text.Replace(@"\line", @"\par"); + // MessageBox.Show("Found rtf line"); + //text = text.Replace(@"\line", @"\par"); // we don't want to replace the \line part of bug fix B2015-140 // Now put symbol (for fixed fonts) or unicode font (proportional) around symbols // These fonts are VESymbFix & Arial Unicode MS respectively, and the font table diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 9b5ba551..aaa34bd8 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -962,7 +962,7 @@ namespace Volian.Controls.Library // using rtf commands to fix various indent bugs including B2015-103). The following code // puts the rtf indent characters that are stored at beginning of string into correct location // of rtf header (have to be after the \pard). Otherwise the indents did not show up. - Match match = Regex.Match(txt,@"\\fi([-0-9]*) ?\\li([0-9]*)"); + Match match = Regex.Match(txt,@"\\fi([-0-9]+) ?\\li([0-9]+)"); if (match.Success) { string indentStr = @"\fi" + match.Groups[1].Value + @"\li" + match.Groups[2].Value;