[Libreoffice-commits] .: src/xlsrecord.py src/xlsstream.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Feb 23 19:39:10 PST 2012
src/xlsrecord.py | 29 ++++++++++++++++++++++++++---
src/xlsstream.py | 4 ++--
2 files changed, 28 insertions(+), 5 deletions(-)
New commits:
commit b262254d0ef440a31883faa51f9c61f4e1fead71
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Thu Feb 23 22:39:27 2012 -0500
Dump a little more chart related records.
diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index d9c0a98..4e7d99c 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -3832,6 +3832,19 @@ class Frame(BaseRecordHandler):
'auto-position': self.autoPosition})
class LineFormat(BaseRecordHandler):
+
+ lineStyles = [
+ 'Solid', # 0x0000
+ 'Dash', # 0x0001
+ 'Dot', # 0x0002
+ 'Dash-dot', # 0x0003
+ 'Dash dot-dot ', # 0x0004
+ 'None', # 0x0005
+ 'Dark gray pattern', # 0x0006
+ 'Medium gray pattern', # 0x0007
+ 'Light gray pattern ' # 0x0008
+ ]
+
def __parseBytes(self):
self.rgb = self.readLongRGB()
self.lns = self.readUnsignedInt(2)
@@ -3845,7 +3858,9 @@ class LineFormat(BaseRecordHandler):
def parseBytes (self):
self.__parseBytes()
- # TODO: dump all data
+ self.appendLineString("line color", self.rgb.toString())
+ self.appendLineString("line style",
+ globals.getValueOrUnknown(LineFormat.lineStyles, self.lns))
def dumpData(self):
self.__parseBytes()
@@ -3913,7 +3928,8 @@ class MarkerFormat(BaseRecordHandler):
def parseBytes (self):
self.__parseBytes()
- # TODO: dump all data
+ self.appendLineString("foreground color", self.rgbFore.toString())
+ self.appendLineString("background color", self.rgbBack.toString())
def dumpData(self):
self.__parseBytes()
@@ -4108,13 +4124,20 @@ class CatLab(BaseRecordHandler):
'auto-catlabel-real': self.autoCatLabelReal})
class Chart3DBarShape(BaseRecordHandler):
+
def __parseBytes(self):
self.riser = self.readUnsignedInt(1)
self.taper = self.readUnsignedInt(1)
def parseBytes (self):
self.__parseBytes()
- # TODO: dump all data
+ s = ''
+ if self.riser:
+ s = 'ellipse'
+ else:
+ s = 'rectangle'
+ self.appendLineString("base shape of data points", s)
+ self.appendLineInt("taper style", self.taper)
def dumpData(self):
self.__parseBytes()
diff --git a/src/xlsstream.py b/src/xlsstream.py
index 7d831c9..c6c230f 100644
--- a/src/xlsstream.py
+++ b/src/xlsstream.py
@@ -249,7 +249,7 @@ recData = {
0x1003: ["SERIES", "Data Properties for Series, Trendlines or Error Bars", xlsrecord.Series],
0x1006: ["CHDATAFORMAT", "Data point or series that the formatting information that follows applies to (2.4.74)", xlsrecord.DataFormat],
0x1007: ["LINEFORMAT", "Appearance of A Line", xlsrecord.LineFormat],
- 0x1009: ["CHMARKERFORMAT", "Color, size, and shape of the markers", xlsrecord.MarkerFormat],
+ 0x1009: ["MARKERFORMAT", "Color, Size, and Shape of the Markers", xlsrecord.MarkerFormat],
0x100A: ["AREAFORMAT", "Patterns and Colors in Filled Region of Chart", xlsrecord.AreaFormat],
0x100B: ["CHPIEFORMAT", "Distance of a data point from the center", xlsrecord.PieFormat],
0x100C: ["CHATTACHEDLABEL", "Properties of a data label", xlsrecord.AttachedLabel],
@@ -296,7 +296,7 @@ recData = {
0x1051: ["BRAI", "Data Source of A Chart", xlsrecord.Brai],
0x105B: ["CHSERERRORBAR", "?"],
0x105D: ["CHSERIESFORMAT", "Series properties", xlsrecord.SerFmt],
- 0x105F: ["CH3DDATAFORMAT", "Shape of the data points(2.4.47)", xlsrecord.Chart3DBarShape],
+ 0x105F: ["CHART3DBARSHAPE", "Shape of the Data Points", xlsrecord.Chart3DBarShape],
0x1060: ["FBI", "Font Information for Chart", xlsrecord.Fbi],
0x1061: ["CHPIEEXT", "Pie/bar of pie chart group", xlsrecord.BobPop],
0x1062: ["AXCEXT", "Additional extension properties of a date axis(2.4.9)", xlsrecord.AxcExt],
More information about the Libreoffice-commits
mailing list