diff --git a/PROMS/DataLoader/Documents.cs b/PROMS/DataLoader/Documents.cs index b3b11613..5abcce60 100644 --- a/PROMS/DataLoader/Documents.cs +++ b/PROMS/DataLoader/Documents.cs @@ -162,31 +162,38 @@ namespace DataLoader private void LoadAndSaveRichTextBox41(string tmpName) { string rtf = LoadFileRaw(tmpName); - rtf = StripTokensFromFontTable(rtf); - // Parse for margins because the RTB will remove them - rtf = rtf.Replace("\x95", @"\bullet ");// Bullet - rtf = rtf.Replace("\x93", @"\'93");// Left Double Quote - rtf = rtf.Replace("\x94", @"\'94");// Right Double Quote - rtf = rtf.Replace("\x96", @"\u8211?");// - rtf = rtf.Replace("\x89", @"\u8240?");// - rtf = rtf.Replace("\x92", @"\u8217?");// - rtf = rtf.Replace("\x84", @"\u8222?");// - rtf = rtf.Replace("\x85", @"\u8230?");// - rtf = rtf.Replace("\x97", @"\u8212?");// - rtf = rtf.Replace("\x9C", @"\u339?");// - rtf = rtf.Replace("\x98", @"\u732?");// - Match match = Regex.Match(rtf, @"((\\marg[^\\]+)+)", RegexOptions.Singleline); - rtf = Regex.Replace(rtf, @"(? "); tmpForLink = Regex.Replace(tmpForLink, @"#Link:Transition:([0-9]+) [0-9]+ ", @"#Link:Transition:$1 "); tmpForLink = Regex.Replace(tmpForLink, @"#Link:TransitionRange:([0-9]+) [0-9]+ ", @"#Link:TransitionRange:$1 "); + 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))