* src/docgen/HtmlDoc.py: Properly build style declaration.

* src/plugins/FtmStyleDescendants.py: Setup before opening.


svn: r1721
This commit is contained in:
Alex Roitman 2003-06-13 16:17:45 +00:00
parent 59567076ce
commit 9b23b01451
3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,7 @@
2003-06-13 Tim Waugh <twaugh@redhat.com>
* src/docgen/OpenOfficeDoc.py: Escape special XML characters.
* src/docgen/HtmlDoc.py: Properly build style declaration.
* src/plugins/FtmStyleDescendants.py: Setup before opening.
2003-06-12 Tim Waugh <twaugh@redhat.com>
* src/docgen/OpenOfficeDoc.py: Surround images by paragraph tags

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
# Copyright (C) 2000-2003 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -91,7 +91,7 @@ class HtmlDoc(TextDoc.TextDoc):
self.base = ""
self.load_template()
self.build_header()
self.build_style_declaration()
self.style_declaration = None
self.image_dir = "images"
else:
self.meta = source.meta
@ -235,6 +235,8 @@ class HtmlDoc(TextDoc.TextDoc):
else:
line = self.file_header
self.f.write(line)
if not self.style_declaration:
self.build_style_declaration()
self.f.write(self.style_declaration)
def build_header(self):

View File

@ -60,6 +60,7 @@ class FtmDescendantReport(Report.Report):
self.max_generations = max
self.pgbrk = pgbrk
self.doc = doc
self.setup()
if output:
self.standalone = 1
self.doc.open(output)
@ -82,7 +83,6 @@ class FtmDescendantReport(Report.Report):
cell = TextDoc.TableCellStyle()
self.doc.add_cell_style('Normal',cell)
def apply_filter(self,person,index,generation=1):
if person == None or generation > self.max_generations:
@ -102,7 +102,6 @@ class FtmDescendantReport(Report.Report):
def write_report(self):
self.setup()
self.apply_filter(self.start,1)
name = self.start.getPrimaryName().getRegularName()