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:
@@ -6,6 +6,7 @@ using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using Volian.Base.Library;
|
||||
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
@@ -179,7 +180,7 @@ namespace Volian.Controls.Library
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (char c in str)
|
||||
{
|
||||
if (c > 0xff)
|
||||
if (c > 0xff || c == 0xA9 || c == 0xAE) // xA9 is Copyright, xAE is Registered
|
||||
sb.Append(string.Format(@"\u{0}?", (int)c));
|
||||
else
|
||||
sb.Append(c);
|
||||
@@ -195,7 +196,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
ItemInfo next = (cbxReverse.Checked) ? MyEditItem.MyItemInfo.SearchPrev : MyEditItem.MyItemInfo.SearchNext;
|
||||
|
||||
while ((next != null) && !next.IsSection && !next.MyContent.Text.Contains(fndStr))
|
||||
while ((next != null) && !next.IsSection && !RtfTools.RTFConvertedSymbolsToUnicode(next.MyContent.Text).Contains(fndStr))
|
||||
{
|
||||
next = (cbxReverse.Checked) ? next.SearchPrev : next.SearchNext;
|
||||
}
|
||||
|
Reference in New Issue
Block a user