msodumper/formula.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
New commits: commit cd132fda1534b5b40040c816100b912c3bf0cdef Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue Dec 30 02:08:59 2014 +0100 add more formula tokens diff --git a/msodumper/formula.py b/msodumper/formula.py index 0955ada..cd00237 100644 --- a/msodumper/formula.py +++ b/msodumper/formula.py @@ -182,6 +182,13 @@ class PtgAdd(PtgBase): def getText (self): return "(add)" +class PtgMul(PtgBase): + def parseBytes (self): + pass + + def getText (self): + return "(multiply)" + class PtgDiv(PtgBase): def parseBytes (self): pass @@ -237,6 +244,13 @@ class PtgAtt(PtgBase): def getText (self): return "(att: %s)"%self.attName +class PtgErr(PtgBase): + def parseBytes (self): + self.errCode = self.strm.readUnsignedInt(1) + + def getText (self): + return "(err: " + str(self.errCode) + ")" + class PtgArray(PtgBase): def parseBytes (self): self.strm.readBytes(7) @@ -735,12 +749,14 @@ class PtgRefN(PtgBase): _tokenMap = { 0x01: PtgExp, 0x03: PtgAdd, + 0x05: PtgMul, 0x06: PtgDiv, 0x10: PtgUnion, 0x15: PtgParen, 0x16: PtgMissArg, 0x17: PtgStr, 0x19: PtgAtt, + 0x1C: PtgErr, 0x1E: PtgInt, 0x1F: PtgNum, 0x22: PtgFuncVar, commit 30381ac8774f6598f2249b7475fdcb032d50c8fa Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue Dec 30 02:01:41 2014 +0100 add more formula tokens diff --git a/msodumper/formula.py b/msodumper/formula.py index 4827295..0955ada 100644 --- a/msodumper/formula.py +++ b/msodumper/formula.py @@ -182,6 +182,13 @@ class PtgAdd(PtgBase): def getText (self): return "(add)" +class PtgDiv(PtgBase): + def parseBytes (self): + pass + + def getText (self): + return "(div)" + class PtgMissArg(PtgBase): def parseBytes (self): pass @@ -268,6 +275,13 @@ class PtgNameX(PtgBase): def getText (self): return "(name: xti=%d, name=%d)"%(self.xti, self.nameID) +class PtgNum(PtgBase): + def parseBytes (self): + self.value = self.strm.readDouble() + + def getText (self): + return "(value: " + str(self.value) + " )" + class PtgInt(PtgBase): def parseBytes (self): self.value = self.strm.readUnsignedInt(2) @@ -721,12 +735,14 @@ class PtgRefN(PtgBase): _tokenMap = { 0x01: PtgExp, 0x03: PtgAdd, + 0x06: PtgDiv, 0x10: PtgUnion, 0x15: PtgParen, 0x16: PtgMissArg, 0x17: PtgStr, 0x19: PtgAtt, 0x1E: PtgInt, + 0x1F: PtgNum, 0x22: PtgFuncVar, 0x24: PtgRef, 0x25: PtgArea, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits