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

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Feb 13 14:47:50 PST 2012


 src/xlsrecord.py |   15 ++++++++++++---
 src/xlsstream.py |    2 +-
 2 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit e9fcd0b81eba3183ea3532ac2257fb3ad27743ed
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Mon Feb 13 17:47:57 2012 -0500

    Explain what the pivot field index of -2 means.

diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 3aa47e8..4a78e37 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -2725,7 +2725,13 @@ class SxIvd(BaseRecordHandler):
     def parseBytes (self):
         self.__parseBytes()
         for id in self.ids:
-            self.appendLine("field value: %d"%id)
+            if id == -2:
+                self.appendLine("pivot field index: %d (data layout field)"%id)
+            else:
+                self.appendLineInt("pivot field index", id)
+
+        self.appendLine("")
+        self.appendMultiLine("NOTE: The first one of this record is for row fields, whereas the second one is for column fields.")
 
 class SXViewEx9(BaseRecordHandler):
 
commit 3d267e63527ec784628148e6d370195d4d3cf4b8
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Mon Feb 13 17:43:11 2012 -0500

    SXIvd -> SxIvd. Make the casing as it appears in the spec.

diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index dfcb660..3aa47e8 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -2714,7 +2714,7 @@ class DConRef(BaseRecordHandler):
         self.appendLine("range: %s"%self.ref.toString())
         self.appendLine("sheet name: %s"%self.sheetName)
 
-class SXIvd(BaseRecordHandler):
+class SxIvd(BaseRecordHandler):
 
     def __parseBytes (self):
         self.ids = []
diff --git a/src/xlsstream.py b/src/xlsstream.py
index f936586..912bc25 100644
--- a/src/xlsstream.py
+++ b/src/xlsstream.py
@@ -123,7 +123,7 @@ recData = {
     0x00B0: ["SXVIEW", "View Definition", xlsrecord.SXView],
     0x00B1: ["SXVD", "View Fields", xlsrecord.SXViewFields],
     0x00B2: ["SXVI", "View Item", xlsrecord.SXVI],
-    0x00B4: ["SXIVD", "Row/Column Field IDs", xlsrecord.SXIvd],
+    0x00B4: ["SXIVD", "Row/Column Field IDs", xlsrecord.SxIvd],
     0x00B5: ["SXLI", "Line Item Array"],
     0x00B6: ["SXPI", "Page Item"],
     0x00B8: ["DOCROUTE", "Routing Slip Information"],
commit 100f5fe862fadcdda3d86e20847932a1382702cb
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Mon Feb 13 17:30:32 2012 -0500

    Be more specific when iCache == -1.

diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 729cd56..dfcb660 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -3424,7 +3424,10 @@ class SXVI(BaseRecordHandler):
         self.appendLineBoolean("collapsed", self.fHideDetail)
         self.appendLineBoolean("calcualted", self.fFormula)
         self.appendLineBoolean("missing in data source", self.fMissing)
-        self.appendLineInt("pivot cache index", self.iCache)
+        if self.iCache >= 0:
+            self.appendLineInt("cache item index", self.iCache)
+        else:
+            self.appendLine("cache item index: %d (no cache item is referenced)"%self.iCache)
         self.appendLineString("name", self.name)
 
 


More information about the Libreoffice-commits mailing list