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

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Aug 8 14:19:38 PDT 2011


 src/xlsrecord.py |   32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

New commits:
commit 724fde7b23a8ac5ada6baa430bad531f854389d8
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Mon Aug 8 17:19:57 2011 -0400

    Fixed the handler for SERIES - chart data series properties.

diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 05432ea..8dc4d9d 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -3306,21 +3306,25 @@ class Series(BaseRecordHandler):
             r = CHSeries.seriesTypes[idx]
         return r
 
-    def parseBytes (self):
-        catType     = self.readUnsignedInt(2)
-        valType     = self.readUnsignedInt(2)
-        catCount    = self.readUnsignedInt(2)
-        valCount    = self.readUnsignedInt(2)
-        bubbleType  = self.readUnsignedInt(2)
-        bubbleCount = self.readUnsignedInt(2)
-
-        self.appendLine("category type: %s (count: %d)"%
-            (CHSeries.getSeriesType(catType), catCount))
-        self.appendLine("value type: %s (count: %d)"%
-            (CHSeries.getSeriesType(valType), valCount))
-        self.appendLine("bubble type: %s (count: %d)"%
-            (CHSeries.getSeriesType(bubbleType), bubbleCount))
+    def __parseBytes (self):
+        self.catType     = self.readUnsignedInt(2)
+        self.valType     = self.readUnsignedInt(2) # must be 1 (ignored)
+        self.catCount    = self.readUnsignedInt(2)
+        self.valCount    = self.readUnsignedInt(2)
+        self.bubbleType  = self.readUnsignedInt(2) # must be 1 (ignored)
+        self.bubbleCount = self.readUnsignedInt(2)
 
+    def parseBytes (self):
+        self.__parseBytes()
+        s = "unknown"
+        if self.catType == 1:
+            s = "numeric"
+        elif self.catType == 3:
+            s = "text"
+        self.appendLine("data type: %s"%s)
+        self.appendLine("category or horizontal value count: %d"%self.catCount)
+        self.appendLine("value or vertical value count: %d"%self.valCount)
+        self.appendLine("bubble size value count: %d"%self.bubbleCount)
 
 class CHAxis(BaseRecordHandler):
 


More information about the Libreoffice-commits mailing list