Compare commits
3 Commits
BNPP_Cover
...
Developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 014509ea30 | |||
| 1ce1a45ca6 | |||
| 604b4d1751 |
@@ -1400,15 +1400,25 @@ namespace Volian.Controls.Library
|
|||||||
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
||||||
int position = SelectionStart;
|
int position = SelectionStart;
|
||||||
SelectionLength = 0;
|
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
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
||||||
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
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(@"{", @"\{");
|
||||||
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 }";
|
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.SelectionLength = 0;
|
||||||
this.SelectionStart = position;
|
this.SelectionStart = position;
|
||||||
|
|||||||
Reference in New Issue
Block a user