From be2d538f99bcdd316c6214b9ae46a7da0eba24f4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 7 Oct 2010 12:50:32 +0000 Subject: [PATCH] --- PROMS/Volian.Svg.Library/DisplayText.cs | 31 ------------------------- 1 file changed, 31 deletions(-) diff --git a/PROMS/Volian.Svg.Library/DisplayText.cs b/PROMS/Volian.Svg.Library/DisplayText.cs index 40715380..47bdb311 100644 --- a/PROMS/Volian.Svg.Library/DisplayText.cs +++ b/PROMS/Volian.Svg.Library/DisplayText.cs @@ -335,36 +335,6 @@ namespace Volian.Svg.Library } return unicodeFont; } - private string RemoveRtfStyles(string rtf) - { - string retval = rtf; - // remove rtf commands for any styles that were added. Note that if - // the entire item has a style, and also contains 'pieces' of text with - // the same style, the underlying rtf box removes the embedded rtf commands, - // for example, if the entire step is bolded, and 'THEN' has bold on/off - // surrounding it, the rtf box removes the bold around the 'THEN' - // These remove the command with a following space or the command alone, - // either case may exist, because if there are rtf commands following the - // style command, there will be no space character following the style command. - if ((TextFont.Style & FontStyle.Bold) > 0) - { - retval = Regex.Replace(retval, @"\\ulnone\\b0 ?", "\\ulnone"); - retval = Regex.Replace(retval, @"\\b0 ?", ""); - retval = Regex.Replace(retval, @"\\ul\\b ?", "\\ul"); - retval = Regex.Replace(retval, @"\\b ?", ""); - } - if ((TextFont.Style & FontStyle.Underline) > 0) - { - retval = Regex.Replace(retval, @"\\ul0 ?", ""); - retval = Regex.Replace(retval, @"\\ul ?", ""); - } - if ((TextFont.Style & FontStyle.Italic) > 0) - { - retval = Regex.Replace(retval, @"\\i0 ?", ""); - retval = Regex.Replace(retval, @"\\i ?", ""); - } - return retval; - } public static string ReplaceRTFClause(Match m) { switch (m.Value[1]) @@ -415,7 +385,6 @@ namespace Volian.Svg.Library if (retval[0] == ' ') retval = retval.Remove(0, 1); // remove \r\n at end of string - this was added with the \par at the end of string by the rtf box if (retval.Substring(retval.Length - 2, 2) == "\r\n") retval = retval.Remove(retval.Length - 2, 2); - // TODO: retval = RemoveRtfStyles(retval); return retval; }