When there is a bold and underline command remove the space between the two commands.
Logic to consider underline and bold command between a hard space a word when determining if replace words should be done.
This commit is contained in:
@@ -664,14 +664,16 @@ namespace Volian.Print.Library
|
||||
_StatRTB.Width = (int)w;
|
||||
_StatRTB.Font = MyFlexGrid.Font;
|
||||
if (str.StartsWith(@"{\rtf"))
|
||||
// The 'Replace(@" \ulnone", @"\u160?\ulnone")' was added so that data in VEWCN SUR_WTC
|
||||
// tables would print. There were a number of tables, for example in STN NB-106/8.1.6,
|
||||
{
|
||||
// The 'Replace(@" \ulnone", @"\u160?\ulnone")' was added so that data in VEWCNSUR_MTC
|
||||
// tables would print. There were a number of tables, for example in STN NB-115/8.1.6,
|
||||
// that had a series of spaces underlined and these spaces were not underlined in the
|
||||
// generated pdf. It seems that there is a problem somewhere in the rtb -> itextsharp
|
||||
// level. This fixed the immediate problem. If there is 'b0' (bold off) after the
|
||||
// space before the 'ulnone' the following won't work. Also, this change was not
|
||||
// made in the non-table code. If the problem occurs there, it should be added.
|
||||
_StatRTB.Rtf = str.Replace(@"\~", @"\u160?").Replace(@" \ulnone", @"\u160?\ulnone");
|
||||
_StatRTB.Rtf = Regex.Replace(str.Replace(@"\~", @"\u160?"), @"(?<!\\[a-z0-9]+) \\ulnone", @"\u160?\ulnone");
|
||||
}
|
||||
else
|
||||
_StatRTB.Text = str;
|
||||
_StatRTB.SelectAll();
|
||||
|
Reference in New Issue
Block a user