Compare commits
2 Commits
BNPP_Cover
...
General_De
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ce1a45ca6 | |||
| 604b4d1751 |
@@ -1400,15 +1400,25 @@ namespace Volian.Controls.Library
|
||||
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
||||
int position = SelectionStart;
|
||||
SelectionLength = 0;
|
||||
// B2026-036 fixed issue where numbers after a dash character (in an RO return value) were trucated
|
||||
// Needed to add a space after the \f0 in the string replace below. RTF was getting confused
|
||||
// when there are number right after the \f0. Note also remove the space charcter after
|
||||
// the \f1 command, as it is not needed since the \u commdn follows it.
|
||||
// Here is the old code prior to when the foreach loop was added to handle symbols in RO value:
|
||||
//
|
||||
// linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 "); // dash character
|
||||
// linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
|
||||
// linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 "); // delta symbol
|
||||
|
||||
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
||||
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
||||
{
|
||||
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + "\\f0");
|
||||
linkValue = linkValue.Replace(match.Value, "\\f1" + match.Value + "\\f0 ");
|
||||
}
|
||||
|
||||
linkValue = linkValue.Replace(@"{", @"\{");
|
||||
linkValue = linkValue.Replace(@"}", @"\}");
|
||||
|
||||
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
|
||||
this.SelectionLength = 0;
|
||||
this.SelectionStart = position;
|
||||
|
||||
Reference in New Issue
Block a user