[Libreoffice-commits] .: src/xlsrecord.py

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Nov 18 08:19:05 PST 2011


 src/xlsrecord.py |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 942b730aca24786d07f5bcd20455b1deae646b83
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Fri Nov 18 11:18:37 2011 -0500

    Correctly parse string data for AUTOFILTER.

diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 1fec69c..2cdb224 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -231,6 +231,9 @@ Like parseBytes(), the derived classes must overwrite this method."""
         cch = self.readUnsignedInt(1)
         return self.readUnicodeString(cch)
 
+    def readXLUnicodeStringNoCch (self, cch):
+        return self.readUnicodeString(cch)
+
     def readLongRGB (self):
         r = self.readUnsignedInt(1)
         g = self.readUnsignedInt(1)
@@ -412,11 +415,11 @@ class Autofilter(BaseRecordHandler):
         # pick up string(s)
         self.string1 = None
         if self.doper1.dataType == Autofilter.DoperType.String:
-            self.string1 = globals.getTextBytes(self.readBytes(self.doper1.strLen))
+            self.string1 = self.readXLUnicodeStringNoCch(self.doper1.strLen)
 
         self.string2 = None
         if self.doper2.dataType == Autofilter.DoperType.String:
-            self.string2 = globals.getTextBytes(self.readBytes(self.doper2.strLen))
+            self.string2 = self.readXLUnicodeStringNoCch(self.doper2.strLen)
 
     def parseBytes (self):
         self.__parseBytes()


More information about the Libreoffice-commits mailing list