[Libreoffice-commits] mso-dumper.git: 2 commits - msodumper/docrecord.py
Miklos Vajna
vmiklos at collabora.co.uk
Mon May 5 02:07:48 PDT 2014
msodumper/docrecord.py | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
New commits:
commit 8f9c1fcdc12ccfcaf952d523c7238315f617c19d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon May 5 11:07:01 2014 +0200
dump sprmPHugePapx
diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py
index fe4bf4b..6904c5e 100644
--- a/msodumper/docrecord.py
+++ b/msodumper/docrecord.py
@@ -1299,6 +1299,10 @@ class Sprm(DOCDirStream):
self.operand = self.getuInt32()
if self.sprm == 0x6a03 and transformed == r"\x01":
self.ct = PICFAndOfficeArtData(self)
+ elif self.sprm == 0x6646: # sprmPHugePapx
+ dataStream = mainStream.doc.getDirectoryStreamByName("Data")
+ dataStream.pos = self.operand
+ self.ct = PrcData(dataStream)
elif self.getOperandSize() == 7:
self.operand = self.getuInt64() & 0x0fffffff
elif self.getOperandSize() == 9:
commit b3c65365b1a8be1a521d103b832809ed28eafbcf
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon May 5 11:02:18 2014 +0200
doc: make mainStream available in Sprms
diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py
index 7b9dcfc..fe4bf4b 100644
--- a/msodumper/docrecord.py
+++ b/msodumper/docrecord.py
@@ -1406,8 +1406,8 @@ class Prl(DOCDirStream):
class GrpPrlAndIstd(DOCDirStream):
"""The GrpPrlAndIstd structure specifies the style and properties that are applied to a paragraph, a table row, or a table cell."""
- def __init__(self, bytes, offset, size):
- DOCDirStream.__init__(self, bytes)
+ def __init__(self, bytes, offset, size, mainStream=None):
+ DOCDirStream.__init__(self, bytes, mainStream=mainStream)
self.pos = offset
self.size = size
@@ -1417,7 +1417,7 @@ class GrpPrlAndIstd(DOCDirStream):
self.printAndSet("istd", self.getuInt16())
pos += 2
while (self.size - (pos - self.pos)) > 0:
- prl = Prl(self, pos)
+ prl = Prl(self, pos, mainStream=self.mainStream)
prl.dump()
pos += prl.getSize()
print '</grpPrlAndIstd>'
@@ -1451,7 +1451,7 @@ class Chpx(DOCDirStream):
class PapxInFkp(DOCDirStream):
"""The PapxInFkp structure specifies a set of text properties."""
def __init__(self, bytes, mainStream, offset):
- DOCDirStream.__init__(self, bytes)
+ DOCDirStream.__init__(self, bytes, mainStream=mainStream)
self.pos = offset
def dump(self):
@@ -1459,9 +1459,9 @@ class PapxInFkp(DOCDirStream):
self.printAndSet("cb", self.readuInt8())
if self.cb == 0:
self.printAndSet("cb_", self.readuInt8())
- grpPrlAndIstd = GrpPrlAndIstd(self.bytes, self.pos, 2 * self.cb_)
+ grpPrlAndIstd = GrpPrlAndIstd(self.bytes, self.pos, 2 * self.cb_, mainStream=self.mainStream)
else:
- grpPrlAndIstd = GrpPrlAndIstd(self.bytes, self.pos, self.cb)
+ grpPrlAndIstd = GrpPrlAndIstd(self.bytes, self.pos, self.cb, mainStream=self.mainStream)
grpPrlAndIstd.dump()
print '</papxInFkp>'
@@ -1471,7 +1471,7 @@ class BxPap(DOCDirStream):
size = 13 # in bytes, see 2.9.23
def __init__(self, bytes, mainStream, offset, parentoffset):
- DOCDirStream.__init__(self, bytes)
+ DOCDirStream.__init__(self, bytes, mainStream=mainStream)
self.pos = offset
self.parentpos = parentoffset
More information about the Libreoffice-commits
mailing list