[Libreoffice-commits] mso-dumper.git: msodumper/docrecord.py
Miklos Vajna
vmiklos at collabora.co.uk
Fri Dec 4 08:15:25 PST 2015
msodumper/docrecord.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit dedeea77ee779636b8a396649c1dd9f9a78c8618
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Dec 4 17:12:02 2015 +0100
docrecord: dump the whole propBag array in SmartTagData
diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py
index bf315e1..9108dca 100644
--- a/msodumper/docrecord.py
+++ b/msodumper/docrecord.py
@@ -4231,13 +4231,14 @@ class Property(DOCDirStream):
class PropertyBag(DOCDirStream):
"""Specified by [MS-OSHARED] 2.3.4.3, specifies the smart tag data."""
- def __init__(self, parent):
+ def __init__(self, parent, index):
DOCDirStream.__init__(self, parent.bytes)
self.parent = parent
self.pos = parent.pos
+ self.index = index
def dump(self):
- print '<propBag type="PropertyBag" offset="%s">' % self.pos
+ print '<propBag type="PropertyBag" offset="%s" index="%s">' % (self.pos, self.index)
self.printAndSet("id", self.readuInt16())
self.printAndSet("cProp", self.readuInt16())
self.printAndSet("cbUnknown", self.readuInt16())
@@ -4256,12 +4257,15 @@ class SmartTagData(DOCDirStream):
self.size = mainStream.lcbFactoidData
def dump(self):
+ posOrig = self.pos
print '<smartTagData type="SmartTagData" offset="%d" size="%d bytes">' % (self.pos, self.size)
self.propBagStore = PropertyBagStore(self)
self.propBagStore.dump()
- # TODO this is an array in fact
- self.propBag = PropertyBag(self)
- self.propBag.dump()
+ i = 0
+ while self.pos < posOrig + self.size:
+ self.propBag = PropertyBag(self, i)
+ self.propBag.dump()
+ i += 1
print '</smartTagData>'
More information about the Libreoffice-commits
mailing list