[Libreoffice-commits] .: 2 commits - src/xlsrecord.py src/xlsstream.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Aug 8 12:51:04 PDT 2011
src/xlsrecord.py | 14 +++++++++++++-
src/xlsstream.py | 6 +++---
2 files changed, 16 insertions(+), 4 deletions(-)
New commits:
commit cf25d1a1b35e8ca03a4204cc21dcd5c8b332a6c0
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Mon Aug 8 15:50:43 2011 -0400
Handler for SCL.
SCL stores the zoom level of the current view in the window.
diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 29a238f..13a6a89 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -1317,6 +1317,18 @@ class RK(BaseRecordHandler):
self.appendLine("type: floating point")
self.appendLine("value: %g"%realVal)
+class Scl(BaseRecordHandler):
+
+ def __parseBytes (self):
+ self.numerator = self.readSignedInt(2)
+ self.denominator = self.readSignedInt(2)
+
+ def parseBytes (self):
+ self.__parseBytes()
+ val = 0.0 # force the value to be treated as double precision.
+ val += self.numerator
+ val /= self.denominator
+ self.appendLine("zoom level: %g"%val)
class String(BaseRecordHandler):
"""Cached string formula result for preceding formula record."""
@@ -3256,7 +3268,7 @@ class CTCellContent(BaseRecordHandler):
# -------------------------------------------------------------------
# CH - Chart
-class CHChart(BaseRecordHandler):
+class Chart(BaseRecordHandler):
def parseBytes (self):
x = globals.getSignedInt(self.bytes[0:4])
diff --git a/src/xlsstream.py b/src/xlsstream.py
index 571c3cc..c1d0bf5 100644
--- a/src/xlsstream.py
+++ b/src/xlsstream.py
@@ -112,7 +112,7 @@ recData = {
0x009C: ["FNGROUPCOUNT", "Built-in Function Group Count"],
0x009D: ["AUTOFILTERINFO", "Drop-Down Arrow Count", xlsrecord.AutofilterInfo],
0x009E: ["AUTOFILTER", "AutoFilter Data", xlsrecord.Autofilter],
- 0x00A0: ["SCL", "Window Zoom Magnification"],
+ 0x00A0: ["SCL", "Window Zoom Magnification", xlsrecord.Scl],
0x00A1: ["SETUP", "Page Setup"],
0x00A9: ["COORDLIST", "Polygon Object Vertex Coordinates"],
0x00AB: ["GCW", "Global Column-Width Flags"],
@@ -237,7 +237,7 @@ recData = {
0x089B: ["COMPRESSPICTURES", "Automatic Picture Compression Mode"],
0x08A3: ["FORCEFULLCALCULATION", "Force Full Calculation Mode"],
0x1001: ["UNITS", "[unused, must be ignored]"],
- 0x1002: ["CHCHART", "Chart Header Data", xlsrecord.CHChart],
+ 0x1002: ["CHART", "Position And Size of Chart Area", xlsrecord.Chart],
0x1003: ["CHSERIES", "Chart Series", xlsrecord.CHSeries],
0x1006: ["CHDATAFORMAT", "?"],
0x1007: ["CHLINEFORMAT", "Line or Border Formatting of A Chart"],
commit a45bdcd252b476097a99063ef73d1111f53e1e52
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Mon Aug 8 15:33:22 2011 -0400
UNITS record must be ignored, the spec says.
diff --git a/src/xlsstream.py b/src/xlsstream.py
index ff24d15..571c3cc 100644
--- a/src/xlsstream.py
+++ b/src/xlsstream.py
@@ -236,7 +236,7 @@ recData = {
0x089C: ["HEADERFOOTER", "Header Footer"],
0x089B: ["COMPRESSPICTURES", "Automatic Picture Compression Mode"],
0x08A3: ["FORCEFULLCALCULATION", "Force Full Calculation Mode"],
- 0x1001: ["CHUNITS", "?"],
+ 0x1001: ["UNITS", "[unused, must be ignored]"],
0x1002: ["CHCHART", "Chart Header Data", xlsrecord.CHChart],
0x1003: ["CHSERIES", "Chart Series", xlsrecord.CHSeries],
0x1006: ["CHDATAFORMAT", "?"],
More information about the Libreoffice-commits
mailing list