diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index 123a63e15..d077ae0d8 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -1274,6 +1274,7 @@ class TextReportDialog(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.template_name,self.orien) if self.print_report.get_active (): @@ -1313,7 +1314,9 @@ 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) + + self.doc = self.format(self.selected_style,self.paper, + self.template_name,self.orien) if self.print_report.get_active (): self.doc.print_requested () diff --git a/gramps2/src/docgen/OpenOfficeDoc.py b/gramps2/src/docgen/OpenOfficeDoc.py index e6006a5de..a30185c62 100644 --- a/gramps2/src/docgen/OpenOfficeDoc.py +++ b/gramps2/src/docgen/OpenOfficeDoc.py @@ -28,7 +28,7 @@ import tempfile import string import zipfile import time -from math import pi, cos, sin +from math import pi, cos, sin, fabs #------------------------------------------------------------------------- # @@ -86,11 +86,9 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): self.content_xml = tempfile.mktemp() self.f = open(self.content_xml,"wb") except IOError,msg: - errmsg = "%s\n%s" % (_("Could not create %s") % self.content_xml, msg) - raise Errors.ReportError(errmsg) + raise Errors.ReportError(_("Could not create %s") % self.content_xml, msg) except: - raise Errors.ReportError("Could not create %s" % self.content_xml) - + raise Errors.ReportError(_("Could not create %s") % self.content_xml) def init(self): self.f.write('\n') @@ -776,9 +774,10 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): self.f.write('') self.f.write('' % pname) @@ -786,7 +785,7 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): self.f.write('\n' % pname) self.write_text(string.join(text,'\n')) self.f.write('\n\n\n') - + def draw_path(self,style,path): stype = self.draw_styles[style] @@ -807,6 +806,7 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): self.f.write('svg:x="%d" svg:y="%d" ' % (x,y)) self.f.write('svg:viewBox="0 0 %d %d" ' % (int(maxx-minx)*1000,int(maxy-miny)*1000)) + self.f.write('draw:z-index="0" ') self.f.write('svg:width="%.4fcm" ' % (maxx-minx)) self.f.write('svg:height="%.4fcm" ' % (maxy-miny)) diff --git a/gramps2/src/docgen/PSDrawDoc.py b/gramps2/src/docgen/PSDrawDoc.py index 8d73e62d9..45583f5bd 100644 --- a/gramps2/src/docgen/PSDrawDoc.py +++ b/gramps2/src/docgen/PSDrawDoc.py @@ -54,7 +54,7 @@ def pt2cm(val): #------------------------------------------------------------------------- class PSDrawDoc(BaseDoc.BaseDoc): - def __init__(self,styles,type,orientation): + def __init__(self,styles,type,template,orientation): BaseDoc.BaseDoc.__init__(self,styles,type,orientation) self.f = None self.filename = None diff --git a/gramps2/src/docgen/SvgDrawDoc.py b/gramps2/src/docgen/SvgDrawDoc.py index c6581a964..d82c68c00 100644 --- a/gramps2/src/docgen/SvgDrawDoc.py +++ b/gramps2/src/docgen/SvgDrawDoc.py @@ -44,7 +44,7 @@ import FontScale #------------------------------------------------------------------------- class SvgDrawDoc(BaseDoc.BaseDoc): - def __init__(self,styles,type,orientation): + def __init__(self,styles,type,template,orientation): BaseDoc.BaseDoc.__init__(self,styles,type,orientation) self.f = None self.filename = None