[Libreoffice-commits] .: src/xlsrecord.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Nov 18 08:43:30 PST 2011
src/xlsrecord.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
New commits:
commit f4244440f9653023b9fb427941c38ec929daf90e
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Fri Nov 18 11:42:54 2011 -0500
Read exactly 10 bytes in doper. I was reading 11 bytes for unknown type.
diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 2cdb224..6927836 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -396,7 +396,7 @@ class Autofilter(BaseRecordHandler):
self.readBytes(6) # ignore 6 bytes
else:
doper = Autofilter.Doper()
- self.readBytes(10) # ignore the entire 10 bytes
+ self.readBytes(9) # ignore the entire 10 bytes
return doper
def __parseBytes (self):
@@ -414,16 +414,19 @@ class Autofilter(BaseRecordHandler):
# pick up string(s)
self.string1 = None
- if self.doper1.dataType == Autofilter.DoperType.String:
- self.string1 = self.readXLUnicodeStringNoCch(self.doper1.strLen)
-
self.string2 = None
- if self.doper2.dataType == Autofilter.DoperType.String:
- self.string2 = self.readXLUnicodeStringNoCch(self.doper2.strLen)
+ try:
+ if self.doper1.dataType == Autofilter.DoperType.String:
+ self.string1 = self.readXLUnicodeStringNoCch(self.doper1.strLen)
+
+ if self.doper2.dataType == Autofilter.DoperType.String:
+ self.string2 = self.readXLUnicodeStringNoCch(self.doper2.strLen)
+ except:
+ pass
def parseBytes (self):
self.__parseBytes()
- self.appendLine("filter index (= column ID): %d"%self.filterIndex)
+ self.appendLine("filter index (relative 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)
More information about the Libreoffice-commits
mailing list