[Libreoffice-commits] .: xls-dump.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Apr 7 21:31:05 PDT 2011
xls-dump.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 3bfa0b29d6aeddf840df80f860c543aceb2186b4
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Apr 8 00:29:24 2011 -0400
Directory header should say whether it's a storage or stream.
diff --git a/xls-dump.py b/xls-dump.py
index f47f260..42e3a73 100755
--- a/xls-dump.py
+++ b/xls-dump.py
@@ -40,11 +40,15 @@ class XLDumper(object):
self.strm = None
self.strmData = None
- def __printDirHeader (self, dirname, byteLen):
+ def __printDirHeader (self, direntry, byteLen):
+ dirname = direntry.Name
dirname = globals.encodeName(dirname)
print("")
print("="*68)
- print("%s (size: %d bytes)"%(dirname, byteLen))
+ if direntry.isStorage():
+ print("%s (storage)"%dirname)
+ else:
+ print("%s (stream, size: %d bytes)"%(dirname, byteLen))
print("-"*68)
def __parseFile (self):
@@ -97,7 +101,7 @@ class XLDumper(object):
continue
dirstrm = self.strm.getDirectoryStream(entry)
- self.__printDirHeader(dirname, len(dirstrm.bytes))
+ self.__printDirHeader(entry, len(dirstrm.bytes))
if entry.isStorage():
continue
More information about the Libreoffice-commits
mailing list