diff --git a/ChangeLog b/ChangeLog index 5d84379a2..125e05629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ 2003-08-11 Tim Waugh <twaugh@redhat.com> + * src/docgen/OpenDrawDoc.py: Fixed tag mismatch. Added report printing + support. + * src/Report.py: Report printing support added to Draw-style + reports. * src/plugins/Ancestors.py: Use Relationship.get_grandparents_string. 2003-08-10 Don Allingham <dallingham@users.sourceforge.net> diff --git a/src/Report.py b/src/Report.py index a035109a2..97edc715e 100644 --- a/src/Report.py +++ b/src/Report.py @@ -1312,7 +1312,8 @@ class DrawReportDialog(ReportDialog): def make_document(self): """Create a document of the type requested by the user.""" self.doc = self.format(self.selected_style,self.paper,self.orien) - + if self.print_report.get_active (): + self.doc.print_requested () class TemplateParser(handler.ContentHandler): """ diff --git a/src/docgen/OpenDrawDoc.py b/src/docgen/OpenDrawDoc.py index 1164ba080..b677a5b01 100644 --- a/src/docgen/OpenDrawDoc.py +++ b/src/docgen/OpenDrawDoc.py @@ -110,6 +110,7 @@ class OpenDrawDoc(DrawDoc.DrawDoc): self.f.write('<office:automatic-styles>\n') self.f.write('<style:style style:name="GSuper" style:family="text">') self.f.write('<style:properties style:text-position="super 58%"/>') + self.f.write('</style:style>\n') self.f.write('<style:style style:name="P1" style:family="paragraph">\n') self.f.write('<style:properties fo:margin-left="0cm" ') self.f.write('fo:margin-right="0cm" fo:text-indent="0cm"/>\n') @@ -152,6 +153,11 @@ class OpenDrawDoc(DrawDoc.DrawDoc): except: raise Errors.ReportError("Could not create %s" % self.filename) + print self.print_req + if self.print_req: + os.environ["FILE"] = self.filename + os.system ('/usr/bin/oodraw "$FILE" &') + def _write_zip(self): file = zipfile.ZipFile(self.filename,"w",zipfile.ZIP_DEFLATED) @@ -597,4 +603,9 @@ class OpenDrawDoc(DrawDoc.DrawDoc): # Register document generator # #------------------------------------------------------------------------- -Plugins.register_draw_doc(_("OpenOffice.org Draw"),OpenDrawDoc,1,1,".sxd"); +print_label = None +if os.access ("/usr/bin/oodraw", os.X_OK): + print_label = _("Open in OpenOffice.org") + +Plugins.register_draw_doc(_("OpenOffice.org Draw"),OpenDrawDoc,1,1,".sxd", + print_label);