[Libreoffice-commits] .: src/docdraw.py src/msodraw.py
Miklos Vajna
vmiklos at kemper.freedesktop.org
Wed Dec 5 07:10:33 PST 2012
src/docdraw.py | 16 +---------------
src/msodraw.py | 14 ++++++++++++++
2 files changed, 15 insertions(+), 15 deletions(-)
New commits:
commit d9fb9309fb8b737d5fe6eaaade287658a448abf8
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed Dec 5 16:09:56 2012 +0100
docdraw.OfficeArtClientData -> msodraw.FClientData
diff --git a/src/docdraw.py b/src/docdraw.py
index 4753d5a..60ce011 100644
--- a/src/docdraw.py
+++ b/src/docdraw.py
@@ -49,20 +49,6 @@ class OfficeArtDggContainer(DOCDirStream):
assert pos == self.pos + self.rh.recLen
self.officeArtContent.pos = pos
-class OfficeArtClientData(DOCDirStream):
- def __init__(self, officeArtSpContainer, pos):
- DOCDirStream.__init__(self, officeArtSpContainer.bytes)
- self.pos = pos
- self.officeArtSpContainer = officeArtSpContainer
-
- def dumpXml(self, compat, rh):
- self.rh = rh
- print '<clientData type="OfficeArtClientData" offset="%d">' % self.pos
- pos = self.pos
- self.printAndSet("data", self.readuInt32())
- print '</clientData>'
- assert self.pos == pos + self.rh.recLen
-
class OfficeArtFOPTEOPID(DOCDirStream):
"""The OfficeArtFOPTEOPID record specifies the header for an entry in a property table."""
def __init__(self, parent):
@@ -245,7 +231,7 @@ recMap = {
0xf009: [msodraw.FSPGR],
0xf00a: [msodraw.FSP],
0xf00b: [OfficeArtFOPT, True],
- 0xf011: [OfficeArtClientData, True],
+ 0xf011: [msodraw.FClientData],
0xf11e: [msodraw.SplitMenuColorContainer],
}
diff --git a/src/msodraw.py b/src/msodraw.py
index c487ef1..53e8dd8 100644
--- a/src/msodraw.py
+++ b/src/msodraw.py
@@ -558,6 +558,19 @@ class MSOCR:
recHdl.appendLine('<fSchemeIndex value="%d"/>' % self.isSchemeIndex)
recHdl.appendLine('</msocr>')
+class FClientData:
+ def __init__ (self, strm):
+ self.data = strm.readUnsignedInt(4)
+
+ def appendLines (self, recHdl, rh):
+ recHdl.appendLine("FClientData content")
+ recHdl.appendLine(" data: 0x%8.8X"%self.data)
+
+ def dumpXml(self, recHdl, rh):
+ recHdl.appendLine('<clientData type="OfficeArtClientData">')
+ recHdl.appendLine('<data value="0x%8.8X"/>' % self.data)
+ recHdl.appendLine('</clientData>')
+
class SplitMenuColorContainer:
def __init__ (self, strm):
self.smca = []
@@ -619,6 +632,7 @@ recData = {
RecordHeader.Type.FConnectorRule: FConnectorRule,
RecordHeader.Type.FDGSL: FDGSL,
RecordHeader.Type.FClientAnchor: FClientAnchorSheet,
+ RecordHeader.Type.FClientData: FClientData,
RecordHeader.Type.SplitMenuColorContainer: SplitMenuColorContainer
}
More information about the Libreoffice-commits
mailing list