diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index ea753924..0e76faa4 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -174,7 +174,7 @@ namespace Volian.Controls.Library text = text.Replace(@"\u8209?", "-"); } _MyStaticItemInfo = _MyItemInfo; - text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted, underlineAfterDashSpace); + text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted, underlineAfterDashSpace, epMode); _MyStaticItemInfo = null; StartText = text; ProfileTimer.Pop(profileDepth); @@ -199,7 +199,7 @@ namespace Volian.Controls.Library public DisplayText(string text, VE_Font vFont, bool colorLinks) { TextFont = vFont; - StartText = CreateRtf(colorLinks, text, false, false, false, false, false, false); + StartText = CreateRtf(colorLinks, text, false, false, false, false, false, false, E_EditPrintMode.Edit); } public DisplayText(ItemInfo itemInfo, string text, bool colorLinks) { @@ -215,7 +215,7 @@ namespace Volian.Controls.Library bool ROsShouldBeAdjusted = wordsShouldBeReplaced; // same logical value bool underlineAfterDashSpace = (itemInfo.FormatStepData == null) ? false : itemInfo.FormatStepData.UnderlineAfterDashSpace; - text = CreateRtf(colorLinks, text, false, wordsShouldBeReplaced, numbersShouldBeFormated, false, ROsShouldBeAdjusted, underlineAfterDashSpace); + text = CreateRtf(colorLinks, text, false, wordsShouldBeReplaced, numbersShouldBeFormated, false, ROsShouldBeAdjusted, underlineAfterDashSpace,E_EditPrintMode.Edit); StartText = text; // Shearon Harris Tables are Bold if (itemInfo.IsTable && (TextFont.Style & E_Style.Bold) == E_Style.Bold) @@ -235,7 +235,7 @@ namespace Volian.Controls.Library if (m.Index < idx && m.Index + m.Length > idx) return true; return (false); } - private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted, bool underlineAfterDashSpace) + private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted, bool underlineAfterDashSpace, E_EditPrintMode epMode) { int profileDepth = ProfileTimer.Push(">>>> CreateRtf"); // Adjust RO display @@ -337,7 +337,10 @@ namespace Volian.Controls.Library } if (underlineAfterDashSpace) { - MatchCollection mc = Regex.Matches(text, @"\\u8209\?\\f[0-9]+ "); + // Bug fix: B2015-110 - currently used in Byron and Braidwood formats + // for the screen we need to look for the unicode dash + // for printing we need to look for the keyboard dash character + MatchCollection mc = Regex.Matches(text,((epMode == E_EditPrintMode.Edit)? @"\\u8209\?\\f[0-9]+ " : "- ")); if (mc.Count > 0) { Match m = mc[0];