Fixed logic for Find/Replace of backslash and symbol characters B2016-156

Moved repeated logic to a static function RTFConvertedSymbolsToUnicode which is needed for Find/Replace. Used in DisplayText.cs, FindReplace.cs, and VlnFlexGrid  B2016-156
Fixed finding backslash and symbols B2016-156
Fixed finding backslash and symbols in tables (grids) B2016-156
This commit is contained in:
2016-07-06 15:23:30 +00:00
parent ebdfc812a3
commit b7e0e78ca9
4 changed files with 32 additions and 11 deletions

View File

@@ -1230,7 +1230,7 @@ namespace Volian.Controls.Library
// converting the unicode \u8482? to \'99, but once this is done, PROMS StepRTB (edit windows) do not show it
// Also convert \~ to a hard spece. Again RTF is automatically converting \u160? to \~ but will then convert
// the \~ to a regular space!
string rtfText = this.GetDataDisplay(e.Row, e.Col).Replace(@"\~", @"\u160?").Replace(@"\'99", @"\u8482?");
string rtfText = RtfTools.RTFConvertedSymbolsToUnicode(this.GetDataDisplay(e.Row, e.Col));//.Replace(@"\~", @"\u160?").Replace(@"\'99", @"\u8482?");
GridItem gi = Parent as GridItem;
if (gi != null)
{
@@ -4634,7 +4634,7 @@ namespace Volian.Controls.Library
// Also convert \~ to a hard spece. Again RTF is automatically converting \u160? to \~ but will then convert
// the \~ to a regular space!
if (tmp.StartsWith(@"{\rtf"))
Rtf = tmp.Replace(@"\~", @"\u160?").Replace(@"\'99", @"\u8482?");
Rtf = RtfTools.RTFConvertedSymbolsToUnicode(tmp);//.Replace(@"\~", @"\u160?").Replace(@"\'99", @"\u8482?");
else
Text = tmp;
}