[Libreoffice-commits] .: xls-dump.py

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Sep 8 07:11:55 PDT 2011


 xls-dump.py |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 55452187d9de3c2640c7b6bac448b74e319f583b
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Thu Sep 8 10:11:42 2011 -0400

    Fixed the entry point to get the xml and cxml mode to work again.

diff --git a/xls-dump.py b/xls-dump.py
index 0bb9ef3..11a1196 100755
--- a/xls-dump.py
+++ b/xls-dump.py
@@ -81,27 +81,29 @@ class XLDumper(object):
 
     def dumpXML (self):
         self.__parseFile()
-        dirnames = self.strm.getDirectoryNames()
-        for dirname in dirnames:
+        dirEntries = self.strm.getDirectoryEntries()
+        for entry in dirEntries:
+            dirname = entry.Name
             if dirname != "Workbook":
                 # for now, we only dump the Workbook directory stream.
                 continue
 
-            dirstrm = self.strm.getDirectoryStreamByName(dirname)
+            dirstrm = self.strm.getDirectoryStream(entry)
             self.__readSubStreamXML(dirstrm)
 
     def dumpCanonicalXML (self):
         self.__parseFile()
-        dirnames = self.strm.getDirectoryNames()
         docroot = node.Root()
         root = docroot.appendElement('xls-dump')
 
-        for dirname in dirnames:
+        dirEntries = self.strm.getDirectoryEntries()
+        for entry in dirEntries:
+            dirname = entry.Name
             if dirname != "Workbook":
                 # for now, we only dump the Workbook directory stream.
                 continue
 
-            dirstrm = self.strm.getDirectoryStreamByName(dirname)
+            dirstrm = self.strm.getDirectoryStream(entry)
             wbmodel = self.__buildWorkbookModel(dirstrm)
             wbmodel.encrypted = self.strmData.encrypted
             root.appendChild(wbmodel.createDOM())


More information about the Libreoffice-commits mailing list