summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2009-07-13 12:50:12 -0400
committerKohei Yoshida <kyoshida@novell.com>2009-07-13 13:01:25 -0400
commit0795fcd89aa34c603ad0eed1f4d6f7fffc6e340f (patch)
treef74d4cb8970e1b29348267e3c0c627a2c609fa66
parentc070de2c1f6f6f1ff7acfebe8f242420fcb8790e (diff)
[xls-dump] Added handler for Hyperlink records.
* scratch/mso-dumper/src/xlsrecord.py: * scratch/mso-dumper/src/xlsstream.py:
-rw-r--r--scratch/mso-dumper/src/xlsrecord.py17
-rw-r--r--scratch/mso-dumper/src/xlsstream.py2
2 files changed, 18 insertions, 1 deletions
diff --git a/scratch/mso-dumper/src/xlsrecord.py b/scratch/mso-dumper/src/xlsrecord.py
index 04fb24879..f4e457eae 100644
--- a/scratch/mso-dumper/src/xlsrecord.py
+++ b/scratch/mso-dumper/src/xlsrecord.py
@@ -635,6 +635,23 @@ class RefreshAll(BaseRecordHandler):
self.appendLine("refresh all external data ranges and pivot tables: %s"%strVal)
+class Hyperlink(BaseRecordHandler):
+
+ def parseBytes (self):
+ rowFirst = self.readUnsignedInt(2)
+ rowLast = self.readUnsignedInt(2)
+ colFirst = self.readUnsignedInt(2)
+ colLast = self.readUnsignedInt(2)
+ # Rest of the stream stores undocumented hyperlink stream. Refer to
+ # page 128 of MS Excel binary format spec.
+ self.appendLine("rows: %d - %d"%(rowFirst, rowLast))
+ self.appendLine("columns: %d - %d"%(colFirst, colLast))
+ msg = "NOTE: The stream after the first 8 bytes stores undocumented hyperlink stream. "
+ msg += "Refer to page 128 of the MS Excel binary format spec."
+ self.appendLine('')
+ self.appendMultiLine(msg)
+
+
# -------------------------------------------------------------------
# SX - Pivot Table
diff --git a/scratch/mso-dumper/src/xlsstream.py b/scratch/mso-dumper/src/xlsstream.py
index ef0cddc0c..c30ba6187 100644
--- a/scratch/mso-dumper/src/xlsstream.py
+++ b/scratch/mso-dumper/src/xlsstream.py
@@ -166,7 +166,7 @@ recData = {
0x01B5: ["DCONBIN", "Data Consolidation Information"],
0x01B6: ["TXO", "Text Object"],
0x01B7: ["REFRESHALL", "Refresh Flag", xlsrecord.RefreshAll],
- 0x01B8: ["HLINK", "Hyperlink"],
+ 0x01B8: ["HLINK", "Hyperlink", xlsrecord.Hyperlink],
0x01BB: ["SXFDBTYPE", "SQL Datatype Identifier"],
0x01BC: ["PROT4REVPASS", "Shared Workbook Protection Password"],
0x01BE: ["DV", "Data Validation Criteria"],