Added logic to override bolding of tables when the font has a bold setting.

This commit is contained in:
Rich 2014-02-11 15:05:33 +00:00
parent e45307bce2
commit b94fd1d833

View File

@ -191,6 +191,15 @@ namespace Volian.Controls.Library
text = CreateRtf(colorLinks, text, false, wordsShouldBeReplaced, numbersShouldBeFormated, false, ROsShouldBeAdjusted); text = CreateRtf(colorLinks, text, false, wordsShouldBeReplaced, numbersShouldBeFormated, false, ROsShouldBeAdjusted);
StartText = text; 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) private string CreateRtf(bool colorLinks, string text, bool tableShouldBeOutlined, bool wordsShouldBeReplaced, bool numbersShouldBeFormated, bool tableHasBorder, bool ROsShouldBeAdjusted)
{ {