diff --git a/ChangeLog b/ChangeLog index 3488c1625..0935372f7 100644 --- a/ChangeLog +++ b/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/src/BaseDoc.py b/src/BaseDoc.py index 1e65f1b65..4ca70f1cb 100644 --- a/src/BaseDoc.py +++ b/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']))