From d7a93e0a734f27ab102a59daa2dc2418271cb157 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 14 Oct 2011 10:18:48 +0000 Subject: [PATCH] --- PROMS/fmtxml/RtfToSvg.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/PROMS/fmtxml/RtfToSvg.cs b/PROMS/fmtxml/RtfToSvg.cs index 3022fad2..759f5be0 100644 --- a/PROMS/fmtxml/RtfToSvg.cs +++ b/PROMS/fmtxml/RtfToSvg.cs @@ -199,7 +199,7 @@ namespace fmtxml } private static void AddAbsolute(StringBuilder sb, string text) { - // May need to do something with this + sb.Append(" ABSOLUTE"); } private static void AddRtfAdj(StringBuilder sb, string text) { @@ -226,11 +226,7 @@ namespace fmtxml private static void AddText(StringBuilder sb, string text) { Match textMatch = regText.Match(text); - //if (!_FontStyles.Contains(textMatch.Groups[5].Value)) - //{ - // Console.WriteLine("{0} - {1}", textMatch.Groups[5].Value, file.Name); - // _FontStyles.Add(textMatch.Groups[5].Value); - //} + sb.Append(string.Format(" {5}\r\n", TwipsToPoints(textMatch.Groups[1].Value), TwipsToPoints(textMatch.Groups[2].Value), @@ -334,7 +330,14 @@ namespace fmtxml FileInfo outFile = new FileInfo(svgFileName); if (outFile.Exists) outFile.Delete(); XmlDocument xDoc = new XmlDocument(); - xDoc.LoadXml(Svg); + try + { + xDoc.LoadXml(Svg); + } + catch (Exception ex) + { + Console.WriteLine("ex = {0}", ex); + } AppendPlantSpecific(svgFileName, xDoc); xDoc.Save(outFile.FullName); }