From b94fd1d833b68d6e5158f73104e653465e8ee91f Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 11 Feb 2014 15:05:33 +0000 Subject: [PATCH] Added logic to override bolding of tables when the font has a bold setting. --- PROMS/Volian.Controls.Library/DisplayText.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 4e9646da..3350610a 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -191,6 +191,15 @@ namespace Volian.Controls.Library text = CreateRtf(colorLinks, text, false, wordsShouldBeReplaced, numbersShouldBeFormated, false, ROsShouldBeAdjusted); StartText = text; + // Shearon Harris Tables are Bold + if (itemInfo.IsTable && (TextFont.Style & E_Style.Bold) == E_Style.Bold) + { + // Strip out Bold OFF commands + text = text.Replace(@"\b0 "," "); + text = text.Replace(@"\b0", ""); + // Insert a Bold ON command at the beginning of the printable text. + StartText = Regex.Replace(text, @"(\\viewkind.*?)(?= |\\u[0-9]+?|\\'[0-9A-F])", @"$1\b"); + } } private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted) {