[Libreoffice-commits] mso-dumper.git: msodumper/formula.py

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Dec 28 19:16:29 PST 2014


 msodumper/formula.py |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 258cbcd0d394c83dd66e1887b414d59915d3db74
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Dec 29 04:16:02 2014 +0100

    add another function

diff --git a/msodumper/formula.py b/msodumper/formula.py
index 111c61a..8ecece5 100644
--- a/msodumper/formula.py
+++ b/msodumper/formula.py
@@ -249,6 +249,14 @@ class PtgRef(PtgBase):
     def getText (self):
         return "(ref: row=%d,col=%d,rowRelative=%d,colRelative=%d)"%(self.row, self.col.col, self.col.rowRelative, self.col.colRelative)
 
+class PtgArea(PtgBase):
+    def parseBytes (self):
+        bytes = self.strm.readBytes(8)
+        self.cellRange = parseCellRangeAddress(bytes)
+
+    def getText (self):
+        return "(cell range: " + self.cellRange.getName() + ")"
+
 class PtgNameX(PtgBase):
     def parseBytes (self):
         self.xti = self.strm.readUnsignedInt(2)
@@ -718,6 +726,7 @@ _tokenMap = {
     0x1E: PtgInt,
     0x22: PtgFuncVar,
     0x24: PtgRef,
+    0x25: PtgArea,
     0x29: PtgMemFunc,
     0x2D: PtgAreaN,
     0x3B: _Area3d,


More information about the Libreoffice-commits mailing list