diff --git a/ChangeLog b/ChangeLog index c62fa6f4e..d4018cd5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-06-12 Tim Waugh + * src/docgen/OpenOfficeDoc.py: Surround images by paragraph tags + when inside the table cell. + 2003-06-12 Don Allingham * src/DrawDoc.py: support for drawing wedges and rotated text * src/docgen/PSDrawDoc.py: postscipt support for wedges and rotated diff --git a/src/docgen/OpenOfficeDoc.py b/src/docgen/OpenOfficeDoc.py index 0f54878aa..d1065f52f 100644 --- a/src/docgen/OpenOfficeDoc.py +++ b/src/docgen/OpenOfficeDoc.py @@ -61,6 +61,7 @@ class OpenOfficeDoc(TextDoc.TextDoc): self.level = 0 self.time = "0000-00-00T00:00:00" self.new_page = 0 + self.new_cell = 0 def open(self,filename): t = time.localtime(time.time()) @@ -259,6 +260,8 @@ class OpenOfficeDoc(TextDoc.TextDoc): base = os.path.basename(name) tag = string.replace(base,'.','_') + if self.new_cell: + self.f.write('\n') if pos == "left": self.f.write('\n') + if self.new_cell: + self.f.write('\n') def start_table(self,name,style_name): self.f.write('\n' % span) else: self.f.write('>\n') + self.new_cell = 1 def end_cell(self): self.f.write('\n') for col in range(1,self.span): self.f.write('\n') + self.new_cell = 0 def start_bold(self): self.f.write('') @@ -504,12 +511,14 @@ class OpenOfficeDoc(TextDoc.TextDoc): if leader != None: self.f.write(leader) self.f.write('') + self.new_cell = 0 def end_paragraph(self): if self.level == 0: self.f.write('\n') else: self.f.write('\n') + self.new_cell = 1 def write_text(self,text): text = string.replace(text,'\n','')