[Libreoffice-commits] .: src/docdraw.py

Miklos Vajna vmiklos at kemper.freedesktop.org
Fri Dec 7 08:11:44 PST 2012


 src/docdraw.py |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 9e12312d60b92f7501ae6e7f23b36f8584449f1d
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Fri Dec 7 17:11:39 2012 +0100

    docdraw: no longer depend on DOCDirStream

diff --git a/src/docdraw.py b/src/docdraw.py
index ca62227..915bb48 100644
--- a/src/docdraw.py
+++ b/src/docdraw.py
@@ -7,13 +7,14 @@
 
 import struct
 import globals
-from docdirstream import DOCDirStream
 import docsprm
 import msodraw
 
-class OfficeArtContainer(DOCDirStream):
+class OfficeArtContainer(globals.ByteStream):
     def __init__(self, parent, name, type, contained):
-        DOCDirStream.__init__(self, parent.bytes)
+        self.bytes = parent.bytes
+        self.size = len(self.bytes)
+        self.pos = 0
         self.name = name
         self.type = type
         self.contained = contained
@@ -48,6 +49,9 @@ class OfficeArtContainer(DOCDirStream):
         assert pos == self.pos + self.rh.recLen
         self.parent.pos = pos
 
+    def appendLine(self, line):
+        self.parent.appendLine(line)
+
 class OfficeArtDggContainer(OfficeArtContainer):
     """The OfficeArtDggContainer record type specifies the container for all the OfficeArt file records that contain document-wide data."""
     def __init__(self, officeArtContent, name):


More information about the Libreoffice-commits mailing list