From 1584227b86483b13789e1b87f91a936740741f65 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 13 Jun 2003 04:07:13 +0000 Subject: [PATCH] * src/docgen/OpenOfficeDoc.py: Surround images by paragraph tags when inside the table cell. svn: r1718 --- ChangeLog | 4 ++++ src/docgen/OpenOfficeDoc.py | 9 +++++++++ 2 files changed, 13 insertions(+) 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','')