[ooo-build-commit] scratch/mso-dumper
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Jan 21 21:24:10 PST 2010
scratch/mso-dumper/src/globals.py | 2 +-
scratch/mso-dumper/src/xlsrecord.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit c4354f062a6ab0d08581f3b31bc34187bb385e62
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Jan 22 00:20:45 2010 -0500
[xls-dump] Encode non-ascii range of shared strings in SST record.
You can't pipe output if the content contains non-ascii ranges. So,
let's encode bytes in non-ascii range so that at least we can dump
successfully.
* scratch/mso-dumper/src/globals.py:
* scratch/mso-dumper/src/xlsrecord.py:
diff --git a/scratch/mso-dumper/src/globals.py b/scratch/mso-dumper/src/globals.py
index b522d00..6cc0399 100644
--- a/scratch/mso-dumper/src/globals.py
+++ b/scratch/mso-dumper/src/globals.py
@@ -111,7 +111,7 @@ def encodeName (name):
newname = ''
for i in xrange(0, n):
- if ord(name[i]) <= 20:
+ if ord(name[i]) <= 20 or ord(name[i]) >= 127:
newname += "\\x%2.2X"%ord(name[i])
else:
newname += name[i]
diff --git a/scratch/mso-dumper/src/xlsrecord.py b/scratch/mso-dumper/src/xlsrecord.py
index 3e7d780..aaaf898 100644
--- a/scratch/mso-dumper/src/xlsrecord.py
+++ b/scratch/mso-dumper/src/xlsrecord.py
@@ -858,7 +858,7 @@ class SST(BaseRecordHandler):
self.appendLine("total number of unique strings: %d"%self.strCount)
i = 0
for s in self.sharedStrings:
- self.appendLine("s%d: %s"%(i, s.baseText))
+ self.appendLine("s%d: %s"%(i, globals.encodeName(s.baseText)))
i += 1
def fillModel (self, model):
More information about the ooo-build-commit
mailing list