From 218bffffdb286f374bbd366c1c746f8eff3342aa Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 13 Jun 2003 16:17:45 +0000 Subject: [PATCH] * src/docgen/HtmlDoc.py: Properly build style declaration. * src/plugins/FtmStyleDescendants.py: Setup before opening. svn: r1721 --- ChangeLog | 2 ++ src/docgen/HtmlDoc.py | 6 ++++-- src/plugins/FtmStyleDescendants.py | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87792cdfe..83d7cd34b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2003-06-13 Tim Waugh * 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 * src/docgen/OpenOfficeDoc.py: Surround images by paragraph tags diff --git a/src/docgen/HtmlDoc.py b/src/docgen/HtmlDoc.py index b0782a294..c929bf220 100644 --- a/src/docgen/HtmlDoc.py +++ b/src/docgen/HtmlDoc.py @@ -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): diff --git a/src/plugins/FtmStyleDescendants.py b/src/plugins/FtmStyleDescendants.py index 98fa8ae6c..f39ddf451 100644 --- a/src/plugins/FtmStyleDescendants.py +++ b/src/plugins/FtmStyleDescendants.py @@ -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()