[Libreoffice-commits] mso-dumper.git: 2 commits - msodumper/docrecord.py
Michael Stahl
mstahl at redhat.com
Fri Feb 17 22:02:13 UTC 2017
msodumper/docrecord.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 5e117b0f158617c1c2ec23238fae5f85dcedc1d5
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Feb 17 22:06:34 2017 +0100
docrecord: try to survive missing fieldType
diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py
index baa3d22..5b879f8 100644
--- a/msodumper/docrecord.py
+++ b/msodumper/docrecord.py
@@ -1287,7 +1287,10 @@ class NilPICFAndBinData(BinaryStream):
self.printAndSet("ignored13", self.readInt32())
self.printAndSet("ignored14", self.readInt32())
self.printAndSet("ignored15", self.readInt16())
- fieldType = chpxFkp.transformeds[-2]
+ if len(chpxFkp.transformeds) > 1:
+ fieldType = chpxFkp.transformeds[-2]
+ else:
+ fieldType = ")-MISSING-("
if fieldType == " FORMTEXT ":
FFData(self).dump()
else:
commit 7e60cac0e789677a6e599c1f1ef1a2b1854ebe45
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Feb 17 21:56:26 2017 +0100
docrecord: add some missing shifts in FFDataBits.dump
diff --git a/msodumper/docrecord.py b/msodumper/docrecord.py
index 77588ca..baa3d22 100644
--- a/msodumper/docrecord.py
+++ b/msodumper/docrecord.py
@@ -1199,13 +1199,13 @@ class FFDataBits(BinaryStream):
print '<FFDataBits>'
buf = self.readuInt8()
self.printAndSet("iType", buf & 0x0003, dict=IType) # 1..2nd bits
- self.printAndSet("iRes", buf & 0x007c) # 3..7th bits
+ self.printAndSet("iRes", (buf & 0x007c) >> 2) # 3..7th bits
self.printAndSet("fOwnHelp", self.getBit(buf, 8))
buf = self.readuInt8()
self.printAndSet("fOwnStat", self.getBit(buf, 1))
self.printAndSet("fProt", self.getBit(buf, 2))
self.printAndSet("iSize", self.getBit(buf, 3))
- self.printAndSet("iTypeTxt", buf & 0x0038, dict=ITypeTxt) # 4..6th bits
+ self.printAndSet("iTypeTxt", (buf & 0x0038) >> 3, dict=ITypeTxt) # 4..6th bits
self.printAndSet("fRecalc", self.getBit(buf, 7))
self.printAndSet("fHasListBox", self.getBit(buf, 8))
print '</FFDataBits>'
More information about the Libreoffice-commits
mailing list