[Libreoffice-commits] .: scratch/mso-dumper
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Jan 20 11:48:09 PST 2011
scratch/mso-dumper/src/xlsrecord.py | 18 ++++++++++++++++++
scratch/mso-dumper/src/xlsstream.py | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
New commits:
commit f9503b87261553e37b8beb89edec85b6575af581
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Thu Jan 20 14:46:31 2011 -0500
[xls-dump] Parse DCONNAME record.
This record contains the defined name used as a data pilot source.
diff --git a/scratch/mso-dumper/src/xlsrecord.py b/scratch/mso-dumper/src/xlsrecord.py
index e5b0599..32c692a 100644
--- a/scratch/mso-dumper/src/xlsrecord.py
+++ b/scratch/mso-dumper/src/xlsrecord.py
@@ -2201,6 +2201,24 @@ class FeatureHeader(BaseRecordHandler):
# -------------------------------------------------------------------
# SX - Pivot Table
+class DConName(BaseRecordHandler):
+
+ def __parseBytes (self):
+ self.rangeName = self.readUnicodeString()
+ self.flag = self.readUnsignedInt(2)
+
+ def parseBytes (self):
+ self.__parseBytes()
+ self.appendLine("defined name: %s"%self.rangeName)
+ if self.flag == 0:
+ self.appendMultiLine("This defined name has a workbook scope and is contained in this file.")
+ else:
+ # The additional bytes contain info about the workbook and
+ # worksheet where the defined name is located. We don't handle
+ # this yet.
+ pass
+
+
class SXViewEx9(BaseRecordHandler):
def parseBytes (self):
diff --git a/scratch/mso-dumper/src/xlsstream.py b/scratch/mso-dumper/src/xlsstream.py
index bc11785..61d7d35 100644
--- a/scratch/mso-dumper/src/xlsstream.py
+++ b/scratch/mso-dumper/src/xlsstream.py
@@ -73,7 +73,7 @@ recData = {
0x004D: ["PLS", "Environment-Specific Print Record"],
0x0050: ["DCON", "Data Consolidation Information"],
0x0051: ["DCONREF", "Data Consolidation References"],
- 0x0052: ["DCONNAME", "Data Consolidation Named References"],
+ 0x0052: ["DCONNAME", "Data Consolidation Named References", xlsrecord.DConName],
0x0055: ["DEFCOLWIDTH", "Default Width for Columns", xlsrecord.DefColWidth],
0x0059: ["XCT", "CRN Record Count", xlsrecord.Xct],
0x005A: ["CRN", "Nonresident Operands", xlsrecord.Crn],
More information about the Libreoffice-commits
mailing list