From afd50f8c19f3c3f383a3647d88ea9dfbab649c75 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 22 May 2014 19:30:43 +0000 Subject: [PATCH] Fixed ROs that contain hyphens in Tables when printed. --- PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs index 0c3aa652..49228ba7 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs @@ -510,18 +510,18 @@ namespace VEPROMS.CSLA.Library Match mg = Regex.Match(mmg.Value, lookForXml); if (mg != null && mg.Groups.Count > 1) { - int myIndex = mg.Groups[4].Index + mmg.Index; + int myIndex = mg.Groups[4].Index; int myLength = mg.Groups[4].Length; if (mg.Groups[3].Value != " ") { - myIndex = mg.Groups[3].Index + mmg.Index; + myIndex = mg.Groups[3].Index ; myLength += mg.Groups[3].Length; } - string gg = MyGrid.Data.Substring(myIndex, myLength); + string gg = MyGrid.Data.Substring(myIndex+ mmg.Index, myLength); if (newvalue.Contains(@"\u8209?")) { - Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); - if (m == null) + Match m = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); + if (m.Groups.Count < 3) newvalue = newvalue.Replace(@"\u8209?", "-"); else newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); @@ -529,7 +529,7 @@ namespace VEPROMS.CSLA.Library if (newvalue.Contains(@"\u8593?")) { Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); - if (m == null) + if (m.Groups.Count < 3) newvalue = newvalue.Replace(@"\u8593?", "^"); else newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);