ooo-build r11415 - in trunk: . scratch/sc-xlsutil/src



Author: kyoshida
Date: Fri Jan 25 18:26:04 2008
New Revision: 11415
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11415&view=rev

Log:
2008-01-25  Kohei Yoshida  <kyoshida novell com>

	* scratch/sc-xlsutil/src/record.py:
	* scratch/sc-xlsutil/src/stream.py: more chart record types.


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	Fri Jan 25 18:26:04 2008
@@ -40,18 +40,18 @@
         BaseRecordHandler.__init__(self, header, size, bytes)
 
     def parseBytes (self):
-        ver = globals.getSignedInt(self.bytes[0:2])
+        ver = globals.getRawBytes(self.bytes[0:2])
         dataType = globals.getSignedInt(self.bytes[2:4])
         buildID = globals.getSignedInt(self.bytes[4:6])
         buildYear = globals.getSignedInt(self.bytes[6:8])
-        fileHistoryFlags = globals.getSignedInt(self.bytes[8:12])
+        fileHistoryFlags = globals.getRawBytes(self.bytes[8:12])
         lowestExcelVer = globals.getSignedInt(self.bytes[12:16])
 
-        self.appendLine("BIFF version: %d"%ver)
+        self.appendLine("BIFF version: " + ver)
         self.appendLine("build ID: %d"%buildID)
         self.appendLine("build year: %d"%buildYear)
         self.appendLine("type: %s"%BOF.Type[dataType])
-        self.appendLine("file history flags: " + globals.getRawBytes(self.bytes[8:12]))
+        self.appendLine("file history flags: " + fileHistoryFlags)
         self.appendLine("lowest Excel version: %d"%lowestExcelVer)
         
 
@@ -61,9 +61,28 @@
     def __init__ (self, header, size, bytes):
         BaseRecordHandler.__init__(self, header, size, bytes)
 
+    def parseBytes (self):
+        pass
+
     def output (self):
         BaseRecordHandler.output(self)
 
 
 
+class CHChart(BaseRecordHandler):
+
+    def __init__ (self, header, size, bytes):
+        BaseRecordHandler.__init__(self, header, size, bytes)
+
+    def parseBytes (self):
+        x = globals.getSignedInt(self.bytes[0:4])
+        y = globals.getSignedInt(self.bytes[4:8])
+        w = globals.getSignedInt(self.bytes[8:12])
+        h = globals.getSignedInt(self.bytes[12:16])
+        self.appendLine("position: (x, y) = (%d, %d)"%(x, y))
+        self.appendLine("size: (width, height) = (%d, %d)"%(w, h))
+        
+
+    def output (self):
+        BaseRecordHandler.output(self)
 

Modified: trunk/scratch/sc-xlsutil/src/stream.py
==============================================================================
--- trunk/scratch/sc-xlsutil/src/stream.py	(original)
+++ trunk/scratch/sc-xlsutil/src/stream.py	Fri Jan 25 18:26:04 2008
@@ -181,20 +181,74 @@
     0x0809: ["BOF", "Beginning of File", record.BOF],
     0x0862: ["SHEETLAYOUT", "Tab Color below Sheet Name"],
     0x0867: ["SHEETPROTECTION", "Sheet Protection Options"],
-    0x0868: ["RANGEPROTECTION", "Protected Range on Protected Sheet"]
+    0x0858: ["CHPIVOTREF", "Pivot Chart Reference"],
+    0x0868: ["RANGEPROTECTION", "Protected Range on Protected Sheet"],
+    0x1001: ["CHUNITS", "?"],
+    0x1002: ["CHCHART", "Chart Header Data", record.CHChart],
+    0x1003: ["CHSERIES", "?"],
+    0x1006: ["CHDATAFORMAT", "?"],
+    0x1007: ["CHLINEFORMAT", "Line or Border Formatting of A Chart"],
+    0x1009: ["CHMARKERFORMAT", "?"],
+    0x100D: ["CHSTRING", "Series Category Name or Title Text in Chart"],
+    0x100A: ["CHAREAFORMAT", "Area Formatting Attribute of A Chart"],
+    0x100B: ["CHPIEFORMAT", "?"],
+    0x100C: ["CHATTACHEDLABEL", "?"],
+    0x100D: ["CHSTRING", "?"],
+    0x1014: ["CHTYPEGROUP", "?"],
+    0x1015: ["CHLEGEND", "?"],
+    0x1017: ["CHBAR, CHCOLUMN", "?"],
+    0x1018: ["CHLINE", "?"],
+    0x1019: ["CHPIE", "?"],
+    0x101A: ["CHAREA", "?"],
+    0x101B: ["CHSCATTER", "?"],
+    0x001C: ["CHCHARTLINE", "?"],
+    0x101D: ["CHAXIS", "?"],
+    0x101E: ["CHTICK", "?"],
+    0x101F: ["CHVALUERANGE", "?"],
+    0x1020: ["CHLABELRANGE", "?"],
+    0x1021: ["CHAXISLINE", "?"],
+    0x1024: ["CHDEFAULTTEXT", "?"],
+    0x1025: ["CHTEXT", "?"],
+    0x1026: ["CHFONT", "?"],
+    0x1027: ["CHOBJECTLINK", "?"],
+    0x1032: ["CHFRAME", "Border and Area Formatting of A Chart"],
+    0x1033: ["CHBEGIN", "Start of Chart Record Block"],
+    0x1034: ["CHEND", "End of Chart Record Block"],
+    0x1035: ["CHPLOTFRAME", "Chart Plot Frame"],
+    0x103A: ["CHCHART3D", "?"],
+    0x103C: ["CHPICFORMAT", "?"],
+    0x103D: ["CHDROPBAR", "?"],
+    0x103E: ["CHRADARLINE", "?"],
+    0x103F: ["CHSURFACE", "?"],
+    0x1040: ["CHRADARAREA", "?"],
+    0x1041: ["CHAXESSET", "?"],
+    0x1044: ["CHPROPERTIES", "?"],
+    0x1045: ["CHSERGROUP", "?"],
+    0x1048: ["CHPIVOTREF", "?"],
+    0x104A: ["CHSERPARENT", "?"],
+    0x104B: ["CHSERTRENDLINE", "?"],
+    0x104E: ["CHFORMAT", "?"],
+    0x104F: ["CHFRAMEPOS", "?"],
+    0x1050: ["CHFORMATRUNS", "?"],
+    0x1051: ["CHSOURCELINK", "Data Source of A Chart"],
+    0x105B: ["CHSERERRORBAR", "?"],
+    0x105D: ["CHSERIESFORMAT", "?"],
+    0x105F: ["CH3DDATAFORMAT", "?"],
+    0x1061: ["CHPIEEXT", "?"],
+    0x1066: ["CHESCHERFORMAT", "?"]
 }
 
 recDataRev = {
-    0x0137: ["INSERT", "Change Track Insert"],
-    0x0138: ["INFO", "Change Track Info"],
-    0x013B: ["CELLCONTENT", "Change Track Cell Content", record.CTCellContent],
-    0x013D: ["SHEETID", "Change Track Sheet Identifier"],
-    0x0140: ["MOVERANGE", "Change Track Move Range"],
-    0x014D: ["INSERTSHEET", "Change Track Insert Sheet"],
-    0x014E: ["BONB", "Change Track Beginning of Nested Block"],
-    0x0150: ["BONB", "Change Track Beginning of Nested Block"],
-    0x014F: ["EONB", "Change Track End of Nested Block"],
-    0x0151: ["EONB", "Change Track End of Nested Block"]
+    0x0137: ["INSERT*", "Change Track Insert"],
+    0x0138: ["INFO*", "Change Track Info"],
+    0x013B: ["CELLCONTENT*", "Change Track Cell Content", record.CTCellContent],
+    0x013D: ["SHEETID*", "Change Track Sheet Identifier"],
+    0x0140: ["MOVERANGE*", "Change Track Move Range"],
+    0x014D: ["INSERTSHEET*", "Change Track Insert Sheet"],
+    0x014E: ["BONB*", "Change Track Beginning of Nested Block"],
+    0x0150: ["BONB*", "Change Track Beginning of Nested Block"],
+    0x014F: ["EONB*", "Change Track End of Nested Block"],
+    0x0151: ["EONB*", "Change Track End of Nested Block"]
 }
 
 class XLStream(object):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]