[Libreoffice-commits] .: src/xlsrecord.py
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Apr 8 23:11:06 PDT 2011
src/xlsrecord.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit 306e57b76c7e8cfa7326199ad191ec8e3293f1f9
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Sat Apr 9 02:09:10 2011 -0400
Some attempts to parse cached values of OLE link.
diff --git a/src/xlsrecord.py b/src/xlsrecord.py
index 4d97008..047bdf2 100644
--- a/src/xlsrecord.py
+++ b/src/xlsrecord.py
@@ -1657,6 +1657,7 @@ class ExternName(BaseRecordHandler):
self.storageID = self.readUnsignedInt(4)
nameLen = self.readUnsignedInt(1)
self.name = self.readUnicodeString(nameLen)
+ self.moper = self.readRemainingBytes()
else:
# assume external defined name (could be DDE link).
# TODO: differentiate DDE link from external defined name.
@@ -1681,6 +1682,19 @@ class ExternName(BaseRecordHandler):
self.appendLine("type: OLE")
self.appendLine("storage ID: 0x%4.4X"%self.storageID)
self.appendLine("name: %s"%self.name)
+ if len(self.moper) > 0:
+ try:
+ strm = globals.ByteStream(self.moper)
+ lastCol = strm.readUnsignedInt(1)
+ lastRow = strm.readUnsignedInt(2)
+ self.appendLine("last column: %d"%lastCol)
+ self.appendLine("last row: %d"%lastRow)
+ rest = strm.readRemainingBytes()
+ restStr = globals.getRawBytes(rest, True, False)
+ self.appendLine("cache: %s"%restStr)
+
+ except:
+ pass
else:
# TODO: Test this.
self.appendLine("type: defined name")
More information about the Libreoffice-commits
mailing list