ooo-build r15056 - in trunk: . scratch/mso-dumper scratch/mso-dumper/src
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15056 - in trunk: . scratch/mso-dumper scratch/mso-dumper/src
- Date: Mon, 12 Jan 2009 14:48:36 +0000 (UTC)
Author: thorstenb
Date: Mon Jan 12 14:48:36 2009
New Revision: 15056
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15056&view=rev
Log:
* scratch/mso-dumper: renamed record/stream.py, ppt dumper needs
similar files; adapted clients
Added:
trunk/scratch/mso-dumper/src/xlsrecord.py (props changed)
- copied unchanged from r15055, /trunk/scratch/mso-dumper/src/record.py
trunk/scratch/mso-dumper/src/xlsstream.py (contents, props changed)
- copied, changed from r15055, /trunk/scratch/mso-dumper/src/stream.py
Removed:
trunk/scratch/mso-dumper/src/record.py
trunk/scratch/mso-dumper/src/stream.py
Modified:
trunk/ChangeLog
trunk/scratch/mso-dumper/src/ole.py
trunk/scratch/mso-dumper/xls_dump.py
Modified: trunk/scratch/mso-dumper/src/ole.py
==============================================================================
--- trunk/scratch/mso-dumper/src/ole.py (original)
+++ trunk/scratch/mso-dumper/src/ole.py Mon Jan 12 14:48:36 2009
@@ -1,6 +1,6 @@
import sys
-import stream, globals
+import globals
from globals import getSignedInt
# ----------------------------------------------------------------------------
# Reference: The Microsoft Compound Document File Format by Daniel Rentz
Copied: trunk/scratch/mso-dumper/src/xlsstream.py (from r15055, /trunk/scratch/mso-dumper/src/stream.py)
==============================================================================
--- /trunk/scratch/mso-dumper/src/stream.py (original)
+++ trunk/scratch/mso-dumper/src/xlsstream.py Mon Jan 12 14:48:36 2009
@@ -1,6 +1,6 @@
import sys
-import ole, globals, record
+import ole, globals, xlsrecord
from globals import output
class EndOfStream(Exception): pass
@@ -8,7 +8,7 @@
# opcode: [canonical name, description, handler (optional)]
recData = {
- 0x0006: ["FORMULA", "Formula Token Array and Result", record.Formula],
+ 0x0006: ["FORMULA", "Formula Token Array and Result", xlsrecord.Formula],
0x000A: ["EOF", "End of File"],
0x000C: ["CALCCOUNT", "Iteration Count"],
0x000D: ["CALCMODE", "Calculation Mode"],
@@ -21,15 +21,15 @@
0x0014: ["HEADER", "Print Header on Each Page"],
0x0015: ["FOOTER", "Print Footer on Each Page"],
0x0016: ["EXTERNCOUNT", "Number of External References"],
- 0x0017: ["EXTERNSHEET", "External Reference", record.ExternSheet],
- 0x0018: ["NAME", "Internal Defined Name", record.Name],
+ 0x0017: ["EXTERNSHEET", "External Reference", xlsrecord.ExternSheet],
+ 0x0018: ["NAME", "Internal Defined Name", xlsrecord.Name],
0x0019: ["WINDOWPROTECT", "Windows Are Protected"],
0x001A: ["VERTICALPAGEBREAKS", "Explicit Column Page Breaks"],
0x001B: ["HORIZONTALPAGEBREAKS", "Explicit Row Page Breaks"],
0x001C: ["NOTE", "Comment Associated with a Cell"],
0x001D: ["SELECTION", "Current Selection"],
0x0022: ["DATEMODE", "Base Date for Displaying Date Values"],
- 0x0023: ["EXTERNNAME", "Externally Defined Name", record.ExternName],
+ 0x0023: ["EXTERNNAME", "Externally Defined Name", xlsrecord.ExternName],
0x0026: ["LEFTMARGIN", "Left Margin Measurement"],
0x0027: ["RIGHTMARGIN", "Right Margin Measurement"],
0x0028: ["TOPMARGIN", "Top Margin Measurement"],
@@ -48,8 +48,8 @@
0x0051: ["DCONREF", "Data Consolidation References"],
0x0052: ["DCONNAME", "Data Consolidation Named References"],
0x0055: ["DEFCOLWIDTH", "Default Width for Columns"],
- 0x0059: ["XCT", "CRN Record Count", record.Xct],
- 0x005A: ["CRN", "Nonresident Operands", record.Crn],
+ 0x0059: ["XCT", "CRN Record Count", xlsrecord.Xct],
+ 0x005A: ["CRN", "Nonresident Operands", xlsrecord.Crn],
0x005B: ["FILESHARING", "File-Sharing Information"],
0x005C: ["WRITEACCESS", "Write Access User Name"],
0x005D: ["OBJ", "Describes a Graphic Object"],
@@ -90,9 +90,9 @@
0x00AB: ["GCW", "Global Column-Width Flags"],
0x00AE: ["SCENMAN", "Scenario Output Data"],
0x00AF: ["SCENARIO", "Scenario Data"],
- 0x00B0: ["SXVIEW", "View Definition", record.SXView],
- 0x00B1: ["SXVD", "View Fields", record.SXViewFields],
- 0x00B2: ["SXVI", "View Item", record.SXViewItem],
+ 0x00B0: ["SXVIEW", "View Definition", xlsrecord.SXView],
+ 0x00B1: ["SXVD", "View Fields", xlsrecord.SXViewFields],
+ 0x00B2: ["SXVI", "View Item", xlsrecord.SXViewItem],
0x00B4: ["SXIVD", "Row/Column Field IDs"],
0x00B5: ["SXLI", "Line Item Array"],
0x00B6: ["SXPI", "Page Item"],
@@ -104,22 +104,22 @@
0x00C1: ["MMS", "ADDMENU/DELMENU Record Group Count"],
0x00C2: ["ADDMENU", "Menu Addition"],
0x00C3: ["DELMENU", "Menu Deletion"],
- 0x00C5: ["SXDI", "Data Item", record.SXDataItem],
- 0x00C6: ["SXDB", "PivotTable Cache Data", record.SXDb],
- 0x00C7: ["SXFIELD", "Pivot Field", record.SXField],
+ 0x00C5: ["SXDI", "Data Item", xlsrecord.SXDataItem],
+ 0x00C6: ["SXDB", "PivotTable Cache Data", xlsrecord.SXDb],
+ 0x00C7: ["SXFIELD", "Pivot Field", xlsrecord.SXField],
0x00C8: ["SXINDEXLIST", "Indices to Source Data"],
- 0x00C9: ["SXDOUBLE", "Double Value", record.SXDouble],
- 0x00CA: ["SXBOOLEAN", "Boolean Value", record.SXBoolean],
- 0x00CB: ["SXERROR", "Error Code", record.SXError],
- 0x00CC: ["SXINTEGER", "Integer Value", record.SXInteger],
- 0x00CD: ["SXSTRING", "String", record.SXString],
+ 0x00C9: ["SXDOUBLE", "Double Value", xlsrecord.SXDouble],
+ 0x00CA: ["SXBOOLEAN", "Boolean Value", xlsrecord.SXBoolean],
+ 0x00CB: ["SXERROR", "Error Code", xlsrecord.SXError],
+ 0x00CC: ["SXINTEGER", "Integer Value", xlsrecord.SXInteger],
+ 0x00CD: ["SXSTRING", "String", xlsrecord.SXString],
0x00CE: ["SXDATETIME", "Date & Time Special Format"],
0x00CF: ["SXEMPTY", "Empty Value"],
0x00D0: ["SXTBL", "Multiple Consolidation Source Info"],
0x00D1: ["SXTBRGIITM", "Page Item Name Count"],
0x00D2: ["SXTBPG", "Page Item Indexes"],
0x00D3: ["OBPROJ", "Visual Basic Project"],
- 0x00D5: ["SXIDSTM", "Stream ID", record.SXStreamID],
+ 0x00D5: ["SXIDSTM", "Stream ID", xlsrecord.SXStreamID],
0x00D6: ["RSTRING", "Cell with Character Formatting"],
0x00D7: ["DBCELL", "Stream Offsets"],
0x00DA: ["BOOKBOOL", "Workbook Option Flag"],
@@ -131,7 +131,7 @@
0x00E0: ["XF", "Extended Format"],
0x00E1: ["INTERFACEHDR", "Beginning of User Interface Records"],
0x00E2: ["INTERFACEEND", "End of User Interface Records"],
- 0x00E3: ["SXVS", "View Source", record.SXViewSource],
+ 0x00E3: ["SXVS", "View Source", xlsrecord.SXViewSource],
0x00EA: ["TABIDCONF", "Sheet Tab ID of Conflict History"],
0x00EB: ["MSODRAWINGGROUP", "Microsoft Office Drawing Group"],
0x00EC: ["MSODRAWING", "Microsoft Office Drawing"],
@@ -148,9 +148,9 @@
0x00FC: ["SST", "Shared String Table"],
0x00FD: ["LABELSST", "Cell Value"],
0x00FF: ["EXTSST", "Extended Shared String Table"],
- 0x0100: ["SXVDEX", "Extended PivotTable View Fields", record.SXViewFieldsEx],
+ 0x0100: ["SXVDEX", "Extended PivotTable View Fields", xlsrecord.SXViewFieldsEx],
0x0103: ["SXFORMULA", "PivotTable Formula Record"],
- 0x0122: ["SXDBEX", "PivotTable Cache Data", record.SXDbEx],
+ 0x0122: ["SXDBEX", "PivotTable Cache Data", xlsrecord.SXDbEx],
0x013D: ["TABID", "Sheet Tab Index Array"],
0x0160: ["USESELFS", "Natural Language Formulas Flag"],
0x0161: ["DSF", "Double Stream File"],
@@ -158,14 +158,14 @@
0x01AA: ["USERSVIEWBEGIN", "Custom View Settings"],
0x01AB: ["USERSVIEWEND", "End of Custom View Records"],
0x01AD: ["QSI", "External Data Range"],
- 0x01AE: ["SUPBOOK", "Supporting Workbook", record.SupBook],
+ 0x01AE: ["SUPBOOK", "Supporting Workbook", xlsrecord.SupBook],
0x01AF: ["PROT4REV", "Shared Workbook Protection Flag"],
0x01B0: ["CONDFMT", "Conditional Formatting Range Information"],
0x01B1: ["CF", "Conditional Formatting Conditions"],
0x01B2: ["DVAL", "Data Validation Information"],
0x01B5: ["DCONBIN", "Data Consolidation Information"],
0x01B6: ["TXO", "Text Object"],
- 0x01B7: ["REFRESHALL", "Refresh Flag", record.RefreshAll],
+ 0x01B7: ["REFRESHALL", "Refresh Flag", xlsrecord.RefreshAll],
0x01B8: ["HLINK", "Hyperlink"],
0x01BB: ["SXFDBTYPE", "SQL Datatype Identifier"],
0x01BC: ["PROT4REVPASS", "Shared Workbook Protection Password"],
@@ -173,12 +173,12 @@
0x01C0: ["EXCEL9FILE", "Excel 9 File"],
0X01C1: ["RECALCID", "Recalc Information"],
0x0200: ["DIMENSIONS", "Cell Table Size"],
- 0x0201: ["BLANK", "Blank Cell", record.Blank],
- 0x0203: ["NUMBER", "Floating-Point Cell Value", record.Number],
+ 0x0201: ["BLANK", "Blank Cell", xlsrecord.Blank],
+ 0x0203: ["NUMBER", "Floating-Point Cell Value", xlsrecord.Number],
0x0204: ["LABEL", "Cell Value"],
0x0205: ["BOOLERR", "Cell Value"],
- 0x0207: ["STRING", "String Value of a Formula", record.String],
- 0x0208: ["ROW", "Describes a Row", record.Row],
+ 0x0207: ["STRING", "String Value of a Formula", xlsrecord.String],
+ 0x0208: ["ROW", "Describes a Row", xlsrecord.Row],
0x020B: ["INDEX", "Index Record"],
0x0218: ["NAME", "Defined Name"],
0x0221: ["ARRAY", "Array-Entered Formula"],
@@ -187,20 +187,20 @@
0x0231: ["FONT", "Font Description"],
0x0236: ["TABLE", "Data Table"],
0x023E: ["WINDOW2", "Sheet Window Information"],
- 0x027E: ["RK", "Cell with Encoded Integer or Floating-Point", record.RK],
+ 0x027E: ["RK", "Cell with Encoded Integer or Floating-Point", xlsrecord.RK],
0x0293: ["STYLE", "Style Information"],
0x041E: ["FORMAT", "Number Format"],
- 0x0802: ["QSISXTAG", "Pivot Table and Query Table Extensions", record.PivotQueryTableEx],
- 0x0809: ["BOF", "Beginning of File", record.BOF],
- 0x0810: ["SXVIEWEX9", "Pivot Table Extensions", record.SXViewEx9],
+ 0x0802: ["QSISXTAG", "Pivot Table and Query Table Extensions", xlsrecord.PivotQueryTableEx],
+ 0x0809: ["BOF", "Beginning of File", xlsrecord.BOF],
+ 0x0810: ["SXVIEWEX9", "Pivot Table Extensions", xlsrecord.SXViewEx9],
0x0862: ["SHEETLAYOUT", "Tab Color below Sheet Name"],
0x0867: ["SHEETPROTECTION", "Sheet Protection Options"],
0x0858: ["CHPIVOTREF", "Pivot Chart Reference"],
0x0863: ["BOOKEXT", "Extra Book Info"],
- 0x0864: ["SXADDL", "Pivot Table Additional Info", record.SXAddlInfo],
+ 0x0864: ["SXADDL", "Pivot Table Additional Info", xlsrecord.SXAddlInfo],
0x0868: ["RANGEPROTECTION", "Protected Range on Protected Sheet"],
0x1001: ["CHUNITS", "?"],
- 0x1002: ["CHCHART", "Chart Header Data", record.CHChart],
+ 0x1002: ["CHCHART", "Chart Header Data", xlsrecord.CHChart],
0x1003: ["CHSERIES", "?"],
0x1006: ["CHDATAFORMAT", "?"],
0x1007: ["CHLINEFORMAT", "Line or Border Formatting of A Chart"],
@@ -212,16 +212,16 @@
0x100D: ["CHSTRING", "?"],
0x1014: ["CHTYPEGROUP", "?"],
0x1015: ["CHLEGEND", "?"],
- 0x1017: ["CHBAR, CHCOLUMN", "?", record.CHBar],
- 0x1018: ["CHLINE", "?", record.CHLine],
+ 0x1017: ["CHBAR, CHCOLUMN", "?", xlsrecord.CHBar],
+ 0x1018: ["CHLINE", "?", xlsrecord.CHLine],
0x1019: ["CHPIE", "?"],
0x101A: ["CHAREA", "?"],
0x101B: ["CHSCATTER", "?"],
0x001C: ["CHCHARTLINE", "?"],
- 0x101D: ["CHAXIS", "Chart Axis", record.CHAxis],
+ 0x101D: ["CHAXIS", "Chart Axis", xlsrecord.CHAxis],
0x101E: ["CHTICK", "?"],
- 0x101F: ["CHVALUERANGE", "Chart Axis Value Range", record.CHValueRange],
- 0x1020: ["CHLABELRANGE", "Chart Axis Label Range", record.CHLabelRange],
+ 0x101F: ["CHVALUERANGE", "Chart Axis Value Range", xlsrecord.CHValueRange],
+ 0x1020: ["CHLABELRANGE", "Chart Axis Label Range", xlsrecord.CHLabelRange],
0x1021: ["CHAXISLINE", "?"],
0x1024: ["CHDEFAULTTEXT", "?"],
0x1025: ["CHTEXT", "?"],
@@ -238,7 +238,7 @@
0x103F: ["CHSURFACE", "?"],
0x1040: ["CHRADARAREA", "?"],
0x1041: ["CHAXESSET", "?"],
- 0x1044: ["CHPROPERTIES", "?", record.CHProperties],
+ 0x1044: ["CHPROPERTIES", "?", xlsrecord.CHProperties],
0x1045: ["CHSERGROUP", "?"],
0x1048: ["CHPIVOTREF", "?"],
0x104A: ["CHSERPARENT", "?"],
@@ -258,7 +258,7 @@
recDataRev = {
0x0137: ["INSERT*", "Change Track Insert"],
0x0138: ["INFO*", "Change Track Info"],
- 0x013B: ["CELLCONTENT*", "Change Track Cell Content", record.CTCellContent],
+ 0x013B: ["CELLCONTENT*", "Change Track Cell Content", xlsrecord.CTCellContent],
0x013D: ["SHEETID*", "Change Track Sheet Identifier"],
0x0140: ["MOVERANGE*", "Change Track Move Range"],
0x014D: ["INSERTSHEET*", "Change Track Insert Sheet"],
Modified: trunk/scratch/mso-dumper/xls_dump.py
==============================================================================
--- trunk/scratch/mso-dumper/xls_dump.py (original)
+++ trunk/scratch/mso-dumper/xls_dump.py Mon Jan 12 14:48:36 2009
@@ -2,7 +2,7 @@
import sys, os.path, getopt
sys.path.append(sys.path[0]+"/src")
-import ole, stream, globals
+import ole, xlsstream, globals
from globals import error
@@ -32,7 +32,7 @@
def dump (self):
file = open(self.filepath, 'rb')
strmData = globals.StreamData()
- strm = stream.XLStream(file.read(), self.params, strmData)
+ strm = xlsstream.XLStream(file.read(), self.params, strmData)
file.close()
strm.printStreamInfo()
strm.printHeader()
@@ -53,13 +53,13 @@
success = self.__readSubStream(dirstrm)
elif dirname == "Revision Log":
- dirstrm.type = stream.DirType.RevisionLog
+ dirstrm.type = xlsstream.DirType.RevisionLog
self.__readSubStream(dirstrm)
elif dirname == '_SX_DB_CUR':
- dirstrm.type = stream.DirType.PivotTableCache
+ dirstrm.type = xlsstream.DirType.PivotTableCache
self.__readSubStream(dirstrm)
elif strmData.isPivotCacheStream(dirname):
- dirstrm.type = stream.DirType.PivotTableCache
+ dirstrm.type = xlsstream.DirType.PivotTableCache
self.__readSubStream(dirstrm)
else:
globals.dumpBytes(dirstrm.bytes, 512)
@@ -71,7 +71,7 @@
while header != 0x000A:
header = strm.readRecord()
return True
- except stream.EndOfStream:
+ except xlsstream.EndOfStream:
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]