[ooo-build-commit] scratch/mso-dumper
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Dec 30 20:15:00 PST 2009
scratch/mso-dumper/src/xlsrecord.py | 10 ++++++++--
scratch/mso-dumper/src/xlsstream.py | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 464b3fc2cb121f623dd6d99a977b09bd6dfdc7b1
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Dec 30 23:14:19 2009 -0500
[xls-dump] Add handler for FILTERMODE.
* 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 ed32de9..ca5f474 100644
--- a/scratch/mso-dumper/src/xlsrecord.py
+++ b/scratch/mso-dumper/src/xlsrecord.py
@@ -261,7 +261,7 @@ class Autofilter(BaseRecordHandler):
return doper
def __parseBytes (self):
- self.filterIndex = self.readUnsignedInt(2)
+ self.filterIndex = self.readUnsignedInt(2) # column ID?
flag = self.readUnsignedInt(2)
self.join = (flag & 0x0003) # 1 = ANDed 0 = ORed
self.simple1 = (flag & 0x0004) # 1st condition is simple equality (for optimization)
@@ -284,7 +284,7 @@ class Autofilter(BaseRecordHandler):
def parseBytes (self):
self.__parseBytes()
- self.appendLine("autofilter ID: %d"%self.filterIndex)
+ self.appendLine("filter index (= column ID): %d"%self.filterIndex)
self.appendLine("joining: %s"%self.getBoolVal(self.join, "AND", "OR"))
self.appendLineBoolean("1st condition is simple equality", self.simple1)
self.appendLineBoolean("2nd condition is simple equality", self.simple2)
@@ -470,6 +470,12 @@ class FilePass(BaseRecordHandler):
self.appendMultiLine("NOTE: Since this document appears to be encrypted, the dumper will not parse the record contents from this point forward.")
+class FilterMode(BaseRecordHandler):
+
+ def parseBytes (self):
+ self.appendMultiLine("NOTE: The presence of this record indicates that the sheet has a filtered list.")
+
+
class Formula(BaseRecordHandler):
def __parseBytes (self):
diff --git a/scratch/mso-dumper/src/xlsstream.py b/scratch/mso-dumper/src/xlsstream.py
index 8e3ee92..8f40d1a 100644
--- a/scratch/mso-dumper/src/xlsstream.py
+++ b/scratch/mso-dumper/src/xlsstream.py
@@ -81,7 +81,7 @@ recData = {
0x0098: ["LPR", "Sheet Was Printed Using LINE.PRINT()"],
0x0099: ["STANDARDWIDTH", "Standard Column Width"],
0x009A: ["FNGROUPNAME", "Function Group Name"],
- 0x009B: ["FILTERMODE", "Sheet Contains Filtered List"],
+ 0x009B: ["FILTERMODE", "Sheet Contains Filtered List", xlsrecord.FilterMode],
0x009C: ["FNGROUPCOUNT", "Built-in Function Group Count"],
0x009D: ["AUTOFILTERINFO", "Drop-Down Arrow Count", xlsrecord.AutofilterInfo],
0x009E: ["AUTOFILTER", "AutoFilter Data", xlsrecord.Autofilter],
More information about the ooo-build-commit
mailing list