ooo-build r15306 - in trunk: . scratch/mso-dumper/src
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15306 - in trunk: . scratch/mso-dumper/src
- Date: Mon, 9 Feb 2009 17:45:07 +0000 (UTC)
Author: kyoshida
Date: Mon Feb 9 17:45:07 2009
New Revision: 15306
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15306&view=rev
Log:
2009-02-09 Kohei Yoshida <kyoshida novell com>
* scratch/mso-dumper/src/xlsrecord.py:
* scratch/mso-dumper/src/xlsstream.py: added handler for CHSOURCELINK
record (that stores chart source link information).
Modified:
trunk/ChangeLog
trunk/scratch/mso-dumper/src/xlsrecord.py
trunk/scratch/mso-dumper/src/xlsstream.py
Modified: trunk/scratch/mso-dumper/src/xlsrecord.py
==============================================================================
--- trunk/scratch/mso-dumper/src/xlsrecord.py (original)
+++ trunk/scratch/mso-dumper/src/xlsrecord.py Mon Feb 9 17:45:07 2009
@@ -1457,3 +1457,40 @@
self.appendLine("percent: %s"%self.getYesNo(percent))
self.appendLine("shadow: %s"%self.getYesNo(shadow))
+
+class CHSourceLink(BaseRecordHandler):
+
+ destTypes = ['title', 'values', 'category', 'bubbles']
+ linkTypes = ['default', 'directly', 'worksheet']
+
+ DEST_TITLE = 0;
+ DEST_VALUES = 1;
+ DEST_CATEGORY = 2;
+ DEST_BUBBLES = 3;
+
+ LINK_DEFAULT = 0;
+ LINK_DIRECTLY = 1;
+ LINK_WORKSHEET = 2;
+
+ def parseBytes (self):
+ destType = self.readUnsignedInt(1)
+ linkType = self.readUnsignedInt(1)
+ flags = self.readUnsignedInt(2)
+ numFmt = self.readUnsignedInt(2)
+
+ destName = 'unknown'
+ if destType < len(CHSourceLink.destTypes):
+ destName = CHSourceLink.destTypes[destType]
+
+ linkName = 'unknown'
+ if linkType < len(CHSourceLink.linkTypes):
+ linkName = CHSourceLink.linkTypes[linkType]
+
+ self.appendLine("destination type: %s"%destName)
+ self.appendLine("link type: %s"%linkName)
+
+ if linkType == CHSourceLink.LINK_WORKSHEET:
+ # external reference. Read the formula tokens.
+ lenToken = self.readUnsignedInt(2)
+ tokens = self.readBytes(lenToken)
+ self.appendLine("formula tokens: %s"%globals.getRawBytes(tokens,True,False))
Modified: trunk/scratch/mso-dumper/src/xlsstream.py
==============================================================================
--- trunk/scratch/mso-dumper/src/xlsstream.py (original)
+++ trunk/scratch/mso-dumper/src/xlsstream.py Mon Feb 9 17:45:07 2009
@@ -246,7 +246,7 @@
0x104E: ["CHFORMAT", "?"],
0x104F: ["CHFRAMEPOS", "?"],
0x1050: ["CHFORMATRUNS", "?"],
- 0x1051: ["CHSOURCELINK", "Data Source of A Chart"],
+ 0x1051: ["CHSOURCELINK", "Data Source of A Chart", xlsrecord.CHSourceLink],
0x105B: ["CHSERERRORBAR", "?"],
0x105D: ["CHSERIESFORMAT", "?"],
0x105F: ["CH3DDATAFORMAT", "?"],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]