beagle r4773 - in trunk/beagle: Filters Util



Author: dbera
Date: Mon Jun  2 14:12:35 2008
New Revision: 4773
URL: http://svn.gnome.org/viewvc/beagle?rev=4773&view=rev

Log:
Since gnumeric svn r15294, ssindex writes the first two diagnostic lines when run as "ssindex -i" to stderr instead of stdout. As a result, ssindex based spreadsheet filter broke in Dec-06 !!!


Modified:
   trunk/beagle/Filters/FilterSpreadsheet.cs
   trunk/beagle/Util/SafeProcess.cs

Modified: trunk/beagle/Filters/FilterSpreadsheet.cs
==============================================================================
--- trunk/beagle/Filters/FilterSpreadsheet.cs	(original)
+++ trunk/beagle/Filters/FilterSpreadsheet.cs	Mon Jun  2 14:12:35 2008
@@ -37,7 +37,6 @@
 	public class FilterSpreadsheet : Filter {
 
 		XmlTextReader xmlReader;
-		bool ignoredFirst2lines = false;
 		public FilterSpreadsheet () 
 		{
 			SnippetMode = true;
@@ -72,17 +71,13 @@
 			}
 		}
 		
-		override protected void DoOpen (FileInfo info)
-		{
-			ignoredFirst2lines = false;
-		}
-
 		override protected void DoPull ()
 		{
 			// create new external process
 			SafeProcess pc = new SafeProcess ();
 			pc.Arguments = new string [] { "ssindex", "-i", FileInfo.FullName };
 			pc.RedirectStandardOutput = true;
+			pc.RedirectStandardError = false;
 			pc.UseLangC = true;
 
 			// Let ssindex run for 10 seconds, max.
@@ -98,12 +93,7 @@
 
 			// process ssindex output
 			StreamReader pout = new StreamReader (pc.StandardOutput);
-			if (!ignoredFirst2lines) {
-				pout.ReadLine ();
-				pout.ReadLine ();
-				xmlReader = new XmlTextReader (pout);
-				ignoredFirst2lines = true;
-			}
+			xmlReader = new XmlTextReader (pout);
 
 			try {
 				WalkContentNodes (xmlReader);

Modified: trunk/beagle/Util/SafeProcess.cs
==============================================================================
--- trunk/beagle/Util/SafeProcess.cs	(original)
+++ trunk/beagle/Util/SafeProcess.cs	Mon Jun  2 14:12:35 2008
@@ -35,7 +35,7 @@
 
 	public class SafeProcess {
 
-		private bool redirect_stdin, redirect_stdout, redirect_stderr;
+		private bool redirect_stdin = false, redirect_stdout = true, redirect_stderr = false;
 		private string[] args;
 		private UnixStream stdin_stream, stdout_stream, stderr_stream;
 		private int pid;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]