[ooo-build-commit] scratch/mso-dumper
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Dec 31 21:04:42 PST 2009
scratch/mso-dumper/src/xlsmodel.py | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
New commits:
commit cc48ce27d134c94d085c5df2b832ae80e68c711a
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Jan 1 00:03:33 2010 -0500
[xls-dump] Tuck ModelType classes into their respective base class.
* scratch/mso-dumper/src/xlsmodel.py:
diff --git a/scratch/mso-dumper/src/xlsmodel.py b/scratch/mso-dumper/src/xlsmodel.py
index 2e2a2a2..d1b8a78 100644
--- a/scratch/mso-dumper/src/xlsmodel.py
+++ b/scratch/mso-dumper/src/xlsmodel.py
@@ -58,12 +58,12 @@ class Workbook(ModelBase):
return nd
-class SheetModelType:
- WorkbookGlobal = 0
- Worksheet = 1
+class SheetBase(object):
+ class Type:
+ WorkbookGlobal = 0
+ Worksheet = 1
-class SheetBase(object):
def __init__ (self, modelType):
self.modelType = modelType
self.version = None
@@ -107,7 +107,7 @@ class WorkbookGlobal(SheetBase):
self.visible = True
def __init__ (self):
- SheetBase.__init__(self, SheetModelType.WorkbookGlobal)
+ SheetBase.__init__(self, SheetBase.Type.WorkbookGlobal)
self.__sheetData = []
self.__sharedStrings = []
@@ -143,7 +143,7 @@ class WorkbookGlobal(SheetBase):
class Worksheet(SheetBase):
def __init__ (self):
- SheetBase.__init__(self, SheetModelType.Worksheet)
+ SheetBase.__init__(self, SheetBase.Type.Worksheet)
self.rows = {}
def setCell (self, col, row, cell):
@@ -169,21 +169,21 @@ class Worksheet(SheetBase):
return nd
-class CellModelType:
- Label = 0
- Number = 1
- Formula = 2
- Unknown = 999
+class CellBase(object):
+ class Type:
+ Label = 0
+ Number = 1
+ Formula = 2
+ Unknown = 999
-class CellBase(object):
def __init__ (self, modelType):
self.modelType = modelType
class LabelCell(CellBase):
def __init__ (self):
- CellBase.__init__(self, CellModelType.Label)
+ CellBase.__init__(self, CellBase.Type.Label)
self.strID = None
def createDOM (self, wb):
@@ -197,7 +197,7 @@ class LabelCell(CellBase):
class NumberCell(CellBase):
def __init__ (self, value):
- CellBase.__init__(self, CellModelType.Number)
+ CellBase.__init__(self, CellBase.Type.Number)
self.value = value
def createDOM (self, wb):
@@ -208,7 +208,7 @@ class NumberCell(CellBase):
class FormulaCell(CellBase):
def __init__ (self):
- CellBase.__init__(self, CellModelType.Formula)
+ CellBase.__init__(self, CellBase.Type.Formula)
self.tokens = None
def createDOM (self, wb):
More information about the ooo-build-commit
mailing list