Fixed logic to support text library documents
A couple more fixes to paste dashes from Adobe
This commit is contained in:
parent
fd983f616c
commit
414378e0f3
@ -162,6 +162,8 @@ namespace DataLoader
|
||||
private void LoadAndSaveRichTextBox41(string tmpName)
|
||||
{
|
||||
string rtf = LoadFileRaw(tmpName);
|
||||
if (rtf.StartsWith(@"{\rtf"))
|
||||
{
|
||||
rtf = StripTokensFromFontTable(rtf);
|
||||
// Parse for margins because the RTB will remove them
|
||||
rtf = rtf.Replace("\x95", @"\bullet ");// Bullet
|
||||
@ -186,7 +188,12 @@ namespace DataLoader
|
||||
rtf = MyRichTextBox41.Rtf; // Get the RTF back from the RichTextBox
|
||||
// Add the margins to the RTB output
|
||||
rtf = Regex.Replace(rtf, @"\\ansi(?=[ \\{])", @"\ansi" + match.Value);
|
||||
// Save the modified rtf to the temporary file
|
||||
}
|
||||
else
|
||||
{
|
||||
MyRichTextBox41.Text = rtf;
|
||||
rtf = MyRichTextBox41.Rtf;
|
||||
}
|
||||
SaveFile(rtf, tmpName);
|
||||
}
|
||||
private string _Prefix;
|
||||
|
@ -1067,6 +1067,10 @@ namespace Volian.Controls.Library
|
||||
tmpForLink = Regex.Replace(tmpForLink, @"#Link:ReferencedObject:[0-9]+ ", @"#Link:ReferencedObject:<NewID> ");
|
||||
tmpForLink = Regex.Replace(tmpForLink, @"#Link:Transition:([0-9]+) [0-9]+ ", @"#Link:Transition:$1 <NewID> ");
|
||||
tmpForLink = Regex.Replace(tmpForLink, @"#Link:TransitionRange:([0-9]+) [0-9]+ ", @"#Link:TransitionRange:$1 <NewID> ");
|
||||
tmpForLink = tmpForLink.Replace(@"\u8212 \'96", @"-"); // Replace EM Dash with hyphen
|
||||
tmpForLink = tmpForLink.Replace(@"\u8211 \'96", @"-"); // Replace EN Dash with hyphen
|
||||
tmpForLink = tmpForLink.Replace(@"\u8212 ", @"-"); // Replace EM Dash with hyphen
|
||||
tmpForLink = tmpForLink.Replace(@"\u8211 ", @"-"); // Replace EN Dash with hyphen
|
||||
myRtb.SelectedRtf = tmpForLink;
|
||||
}
|
||||
else if (myDO.GetDataPresent(DataFormats.Text))
|
||||
|
Loading…
x
Reference in New Issue
Block a user