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. svn: r1991
This commit is contained in:
parent
b997206104
commit
2801566eb8
@ -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>
|
||||
|
@ -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):
|
||||
"""
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user