From 013e1e77578f6733bf483fa5ab450d361b479e8b Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 21 Jan 2007 04:14:59 +0000 Subject: [PATCH] * src/BaseDoc.py: save/load paragraph description (#850) svn: r7945 --- gramps2/ChangeLog | 1 + gramps2/src/BaseDoc.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 3488c1625..0935372f7 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,5 @@ 2007-01-20 Don Allingham + * src/BaseDoc.py: save/load paragraph description (#850) * src/QuestionDialog.py: close window before calling callback * src/DataViews/_PersonView.py (PersonView.change_db): apply dirty flag to initial build to prevent forcing of build on load diff --git a/gramps2/src/BaseDoc.py b/gramps2/src/BaseDoc.py index 1e65f1b65..4ca70f1cb 100644 --- a/gramps2/src/BaseDoc.py +++ b/gramps2/src/BaseDoc.py @@ -890,6 +890,7 @@ class StyleSheetList: tmargin = float(para.get_top_margin()) bmargin = float(para.get_bottom_margin()) padding = float(para.get_padding()) + xml_file.write('description="%s" ' % para.get_description()) xml_file.write('rmargin="%s" ' % Utils.gformat(rmargin)) xml_file.write('lmargin="%s" ' % Utils.gformat(lmargin)) xml_file.write('first="%s" ' % Utils.gformat(findent)) @@ -1027,6 +1028,9 @@ class SheetParser(handler.ContentHandler): self.f.set_underline(int(attrs['underline'])) self.f.set_color(cnv2color(attrs['color'])) elif tag == "para": + if attrs.has_key('description'): + self.p.set_description(attrs['description']) + self.p.set_right_margin(Utils.gfloat(attrs['rmargin'])) self.p.set_right_margin(Utils.gfloat(attrs['rmargin'])) self.p.set_left_margin(Utils.gfloat(attrs['lmargin'])) self.p.set_first_indent(Utils.gfloat(attrs['first']))