ooo-build r14457 - in trunk: . scratch/sc-xlsutil/src
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14457 - in trunk: . scratch/sc-xlsutil/src
- Date: Tue, 4 Nov 2008 03:45:27 +0000 (UTC)
Author: kyoshida
Date: Tue Nov 4 03:45:27 2008
New Revision: 14457
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14457&view=rev
Log:
2008-11-03 Kohei Yoshida <kyoshida novell com>
* scratch/sc-xlsutil/src/record.py:
* scratch/sc-xlsutil/src/stream.py: more handlers for chart-related
records.
Modified:
trunk/ChangeLog
trunk/scratch/sc-xlsutil/src/record.py
trunk/scratch/sc-xlsutil/src/stream.py
Modified: trunk/scratch/sc-xlsutil/src/record.py
==============================================================================
--- trunk/scratch/sc-xlsutil/src/record.py (original)
+++ trunk/scratch/sc-xlsutil/src/record.py Tue Nov 4 03:45:27 2008
@@ -34,6 +34,10 @@
def appendLine (self, line):
self.lines.append(line)
+ def appendLineBoolean (self, name, value):
+ text = "%s: %s"%(name, self.getYesNo(value))
+ self.appendLine(text)
+
def readBytes (self, length):
r = self.bytes[self.pos:self.pos+length]
self.pos += length
@@ -1033,6 +1037,23 @@
self.appendLine("position: (x, y) = (%d, %d)"%(x, y))
self.appendLine("size: (width, height) = (%d, %d)"%(w, h))
+
+class CHAxis(BaseRecordHandler):
+
+ axisTypeList = ['x-axis', 'y-axis', 'z-axis']
+
+ def parseBytes (self):
+ axisType = self.readUnsignedInt(2)
+ x = self.readSignedInt(4)
+ y = self.readSignedInt(4)
+ w = self.readSignedInt(4)
+ h = self.readSignedInt(4)
+ if axisType < len(CHAxis.axisTypeList):
+ self.appendLine("axis type: %s (%d)"%(CHAxis.axisTypeList[axisType], axisType))
+ else:
+ self.appendLine("axis type: unknown")
+ self.appendLine("area: (x, y, w, h) = (%d, %d, %d, %d) [no longer used]"%(x, y, w, h))
+
class CHProperties(BaseRecordHandler):
@@ -1068,6 +1089,25 @@
self.appendLine("empty value treatment: %s"%emptyValues)
+class CHLabelRange(BaseRecordHandler):
+
+ def parseBytes (self):
+ axisCross = self.readUnsignedInt(2)
+ freqLabel = self.readUnsignedInt(2)
+ freqTick = self.readUnsignedInt(2)
+ self.appendLine("axis crossing: %d"%axisCross)
+ self.appendLine("label frequency: %d"%freqLabel)
+ self.appendLine("tick frequency: %d"%freqTick)
+
+ flags = self.readUnsignedInt(2)
+ betweenCateg = (flags & 0x0001)
+ maxCross = (flags & 0x0002)
+ reversed = (flags & 0x0004)
+ self.appendLineBoolean("axis between categories", betweenCateg)
+ self.appendLineBoolean("other axis crosses at maximum", maxCross)
+ self.appendLineBoolean("axis reversed", reversed)
+
+
class CHValueRange(BaseRecordHandler):
def parseBytes (self):
Modified: trunk/scratch/sc-xlsutil/src/stream.py
==============================================================================
--- trunk/scratch/sc-xlsutil/src/stream.py (original)
+++ trunk/scratch/sc-xlsutil/src/stream.py Tue Nov 4 03:45:27 2008
@@ -218,10 +218,10 @@
0x101A: ["CHAREA", "?"],
0x101B: ["CHSCATTER", "?"],
0x001C: ["CHCHARTLINE", "?"],
- 0x101D: ["CHAXIS", "?"],
+ 0x101D: ["CHAXIS", "Chart Axis", record.CHAxis],
0x101E: ["CHTICK", "?"],
- 0x101F: ["CHVALUERANGE", "?", record.CHValueRange],
- 0x1020: ["CHLABELRANGE", "?"],
+ 0x101F: ["CHVALUERANGE", "Chart Axis Value Range", record.CHValueRange],
+ 0x1020: ["CHLABELRANGE", "Chart Axis Label Range", record.CHLabelRange],
0x1021: ["CHAXISLINE", "?"],
0x1024: ["CHDEFAULTTEXT", "?"],
0x1025: ["CHTEXT", "?"],
@@ -251,6 +251,7 @@
0x105D: ["CHSERIESFORMAT", "?"],
0x105F: ["CH3DDATAFORMAT", "?"],
0x1061: ["CHPIEEXT", "?"],
+ 0x1062: ["CHLABELRANGE2", "?"],
0x1066: ["CHESCHERFORMAT", "?"]
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]