[Libreoffice-commits] .: 2 commits - src/xlsrecord.py src/xlsstream.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Aug 8 21:21:31 PDT 2011
src/xlsrecord.py | 12 ++++++------
src/xlsstream.py | 7 +++++--
2 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit b23fad259dbe9b633e00906b8a9e91d5ed16d11b
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Tue Aug 9 00:22:05 2011 -0400
Another unused record identified.
diff --git a/src/xlsstream.py b/src/xlsstream.py
index e6b21b2..eea243a 100644
--- a/src/xlsstream.py
+++ b/src/xlsstream.py
@@ -31,6 +31,8 @@ from globals import output
class EndOfStream(Exception): pass
+unusedRecDesc = "[unused, must be ignored]"
+
# opcode: [canonical name, description, handler (optional)]
recData = {
@@ -236,7 +238,7 @@ recData = {
0x089C: ["HEADERFOOTER", "Header Footer"],
0x089B: ["COMPRESSPICTURES", "Automatic Picture Compression Mode"],
0x08A3: ["FORCEFULLCALCULATION", "Force Full Calculation Mode"],
- 0x1001: ["UNITS", "[unused, must be ignored]"],
+ 0x1001: ["UNITS", unusedRecDesc],
0x1002: ["CHART", "Position And Size of Chart Area", xlsrecord.Chart],
0x1003: ["SERIES", "Data Properties for Series, Trendlines or Error Bars", xlsrecord.Series],
0x1006: ["CHDATAFORMAT", "?"],
@@ -259,6 +261,7 @@ recData = {
0x101F: ["CHVALUERANGE", "Chart Axis Value Range", xlsrecord.CHValueRange],
0x1020: ["CHLABELRANGE", "Chart Axis Label Range", xlsrecord.CHLabelRange],
0x1021: ["CHAXISLINE", "?"],
+ 0x1022: ["CRTLINK", unusedRecDesc],
0x1024: ["DEFAULTTEXT", "Default Text", xlsrecord.DefaultText],
0x1025: ["TEXT", "Label Properties", xlsrecord.Text],
0x1026: ["CHFONT", "?"],
commit fecd9fe21d0b0eeccc62e68b54f4a3207d83c957
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Tue Aug 9 00:18:36 2011 -0400
CHLEGEND to LEGEND.
diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 194a09a..3df50a1 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -3488,20 +3488,20 @@ class CHLabelRange(BaseRecordHandler):
self.appendLineBoolean("axis reversed", reversed)
-class CHLegend(BaseRecordHandler):
+class Legend(BaseRecordHandler):
dockModeMap = {0: 'bottom', 1: 'corner', 2: 'top', 3: 'right', 4: 'left', 7: 'not docked'}
spacingMap = ['close', 'medium', 'open']
def getDockModeText (self, val):
- if CHLegend.dockModeMap.has_key(val):
- return CHLegend.dockModeMap[val]
+ if Legend.dockModeMap.has_key(val):
+ return Legend.dockModeMap[val]
else:
return '(unknown)'
def getSpacingText (self, val):
- if val < len(CHLegend.spacingMap):
- return CHLegend.spacingMap[val]
+ if val < len(Legend.spacingMap):
+ return Legend.spacingMap[val]
else:
return '(unknown)'
@@ -3510,7 +3510,7 @@ class CHLegend(BaseRecordHandler):
y = self.readSignedInt(4)
w = self.readSignedInt(4)
h = self.readSignedInt(4)
- dockMode = self.readUnsignedInt(1)
+ dockMode = self.readUnsignedInt(1) # [MS-XLS] says unused !?
spacing = self.readUnsignedInt(1)
flags = self.readUnsignedInt(2)
diff --git a/src/xlsstream.py b/src/xlsstream.py
index 58954bf..e6b21b2 100644
--- a/src/xlsstream.py
+++ b/src/xlsstream.py
@@ -247,7 +247,7 @@ recData = {
0x100C: ["CHATTACHEDLABEL", "?"],
0x100D: ["SERIESTEXT", "Series Category Name or Title Text in Chart", xlsrecord.SeriesText],
0x1014: ["CHTYPEGROUP", "?"],
- 0x1015: ["CHLEGEND", "?", xlsrecord.CHLegend],
+ 0x1015: ["LEGEND", "Legend Properties", xlsrecord.Legend],
0x1017: ["CHBAR, CHCOLUMN", "?", xlsrecord.CHBar],
0x1018: ["CHLINE", "?", xlsrecord.CHLine],
0x1019: ["CHPIE", "?"],
More information about the Libreoffice-commits
mailing list