[ooo-build-commit] scratch/mso-dumper

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Oct 8 17:27:24 PDT 2009


 scratch/mso-dumper/src/xlsrecord.py |   12 ++++++++++++
 scratch/mso-dumper/src/xlsstream.py |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 4a0c5db17b4527850618b3215770598010167465
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Oct 8 20:26:03 2009 -0400

    [xls-dump] Added handler for LABELSST record.
    
    LABELSST record contains a shared string ID for a cell to
    allow the actual string to be looked up in the SST (shared
    string) record.
    
    * scratch/mso-dumper/src/xlsrecord.py:
    * scratch/mso-dumper/src/xlsstream.py:

diff --git a/scratch/mso-dumper/src/xlsrecord.py b/scratch/mso-dumper/src/xlsrecord.py
index 5125204..b317ebd 100644
--- a/scratch/mso-dumper/src/xlsrecord.py
+++ b/scratch/mso-dumper/src/xlsrecord.py
@@ -347,6 +347,18 @@ class Label(BaseRecordHandler):
         self.appendLine("label text: %s"%text)
 
 
+class LabelSST(BaseRecordHandler):
+
+    def parseBytes (self):
+        col = self.readUnsignedInt(2)
+        row = self.readUnsignedInt(2)
+        xfIdx = self.readUnsignedInt(2)
+        strId = self.readUnsignedInt(4)
+        self.appendCellPosition(col, row)
+        self.appendLine("XF record ID: %d"%xfIdx)
+        self.appendLine("string ID in SST: %d"%strId)
+
+
 class Number(BaseRecordHandler):
 
     def parseBytes (self):
diff --git a/scratch/mso-dumper/src/xlsstream.py b/scratch/mso-dumper/src/xlsstream.py
index 0d263d3..78dc9d3 100644
--- a/scratch/mso-dumper/src/xlsstream.py
+++ b/scratch/mso-dumper/src/xlsstream.py
@@ -147,7 +147,7 @@ recData = {
     0x00F9: ["SXFMLA", "PivotTable Parsed Expression"],
     0x00FB: ["SXFORMAT", "PivotTable Format Record"],
     0x00FC: ["SST", "Shared String Table"],
-    0x00FD: ["LABELSST", "Cell Value"],
+    0x00FD: ["LABELSST", "Cell Value", xlsrecord.LabelSST],
     0x00FF: ["EXTSST", "Extended Shared String Table"],
     0x0100: ["SXVDEX", "Extended PivotTable View Fields", xlsrecord.SXViewFieldsEx],
     0x0103: ["SXFORMULA", "PivotTable Formula Record"],


More information about the ooo-build-commit mailing list