[Libreoffice-commits] .: src/olestream.py
Radek DoulÃk
rodo at kemper.freedesktop.org
Fri Jul 8 08:41:15 PDT 2011
src/olestream.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 3f357b41c89e69d7857512bb340ece9e54bf27d0
Author: Radek Doulik <rodo at novell.com>
Date: Fri Jul 8 17:40:18 2011 +0200
fix DocumentSummaryInformation reading when the second property set is absent
diff --git a/src/olestream.py b/src/olestream.py
index 0914edd..a622082 100644
--- a/src/olestream.py
+++ b/src/olestream.py
@@ -175,10 +175,11 @@ class PropertySetStream(object):
print ("FMT ID 0: %s"%globals.getRawBytes(fmtID0, True, False))
offset0 = self.strm.readUnsignedInt(4)
print ("offset 0: 0x%4.4X"%offset0)
- fmtID1 = self.strm.readBytes(16)
- print ("FMT ID 1: %s"%globals.getRawBytes(fmtID0, True, False))
- offset1 = self.strm.readUnsignedInt(4)
- print ("offset 1: 0x%4.4X\n"%offset1)
+ if sets > 1:
+ fmtID1 = self.strm.readBytes(16)
+ print ("FMT ID 1: %s"%globals.getRawBytes(fmtID0, True, False))
+ offset1 = self.strm.readUnsignedInt(4)
+ print ("offset 1: 0x%4.4X\n"%offset1)
self.readSet(offset0)
if sets > 1:
self.strm.setCurrentPos(offset1);
More information about the Libreoffice-commits
mailing list