Fix dashes when inserting transitions, fix replace selected with RO
This commit is contained in:
parent
641dbf945d
commit
f2360272a3
@ -675,12 +675,34 @@ namespace Volian.Controls.Library
|
||||
else
|
||||
AddLink20(linkUrl, linkValue);
|
||||
}
|
||||
private string FontTable
|
||||
{
|
||||
get
|
||||
{
|
||||
Match match = Regex.Match(Rtf, @"\{\\fonttbl\{.*?\}\}");
|
||||
return match.Value;
|
||||
}
|
||||
}
|
||||
private string FontSize
|
||||
{
|
||||
get
|
||||
{
|
||||
Match match = Regex.Match(Rtf, @"\\fs[0-9]*");
|
||||
return match.Value;
|
||||
}
|
||||
}
|
||||
private void AddLink20(string linkValue, string linkUrl)
|
||||
{
|
||||
string fonttab = FontTable;
|
||||
string fontsize = FontSize;
|
||||
this.DetectUrls = false;
|
||||
if (SelectionLength > 0) DeleteCurrentSelection(null);
|
||||
int position = SelectionStart;
|
||||
SelectionLength = 0;
|
||||
SelectedRtf = @"{\rtf1\ansi{\colortbl ;\red255\green0\blue0;}\v <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"\v0 \v [END>\v0 }";
|
||||
Console.WriteLine(this.Rtf);
|
||||
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
|
||||
SelectedRtf = @"{\rtf1\ansi"+FontTable+@"{\colortbl ;\red255\green0\blue0;}\v"+FontSize+@" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"\v0 \v [END>\v0 }";
|
||||
Console.WriteLine(this.Rtf);
|
||||
this.SelectionLength = 0;
|
||||
this.SelectionStart = position;
|
||||
FindAllLinks();
|
||||
|
Loading…
x
Reference in New Issue
Block a user