[ooo-build-commit] .: scratch/mso-dumper

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Mar 29 08:41:39 PDT 2010


 scratch/mso-dumper/src/xlsrecord.py |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit b6dd898bb237e1e915e22334c0c633ebbec141a8
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Mar 29 11:39:24 2010 -0400

    [mso-dumper] Fixed a bug in NAME record handler & put error recovery guard.
    
    * scratch/mso-dumper/src/xlsrecord.py: When the record handler throws
      an exception, just exit the record interpretation mode and continue
      on.

diff --git a/scratch/mso-dumper/src/xlsrecord.py b/scratch/mso-dumper/src/xlsrecord.py
index 806b1f4..feef0ba 100644
--- a/scratch/mso-dumper/src/xlsrecord.py
+++ b/scratch/mso-dumper/src/xlsrecord.py
@@ -89,10 +89,14 @@ Like parseBytes(), the derived classes must overwrite this method."""
         pass
 
     def output (self):
-        self.parseBytes()
         print("%4.4Xh: %s"%(self.header, "-"*61))
-        for line in self.lines:
-            print("%4.4Xh: %s"%(self.header, line))
+        try:
+            self.parseBytes()
+            for line in self.lines:
+                print("%4.4Xh: %s"%(self.header, line))
+        except:
+            print("%4.4Xh: Error interpreting the record!"%self.header)
+
 
     def appendLine (self, line):
         self.lines.append(line)
@@ -1098,7 +1102,7 @@ class Name(BaseRecordHandler):
                 self.appendLine("  function group: %d"%self.funcGrp)
             else:
                 self.appendLine("  command macro")
-            if isVBMacro:
+            if self.isVBMacro:
                 self.appendLine("  visual basic macro")
             else:
                 self.appendLine("  sheet macro")


More information about the ooo-build-commit mailing list