* src/docgen/OpenOfficeDoc.py (_write_styles_file): Switch paragraph

alignment to "start" and "end" (was "left and "right").
* src/plugins/AncestorReport.py: Change prefixed style name ("AHN-").
Needed because HTML gets confised by ":" in the class name.
* src/plugins/Ancestors.py: Likewise ("AR-").
* src/plugins/DescendReport.py: Likewise ("DR-").
* src/plugins/DetAncestralReport.py: Likewise ("DAR-").
* src/plugins/DetDescendantReport.py: Likewise ("DDR-").
* src/plugins/FtmStyleAncestors.py: Likewise ("FTA-").
* src/plugins/FtmStyleDescendants.py: Likewise ("FTD-").
* src/plugins/FamilyGroup.py: Likewise ("FGR-").
* src/plugins/CustomBookText.py: Likewise ("CBT-").
* src/plugins/SimpleBookTitle.py: Likewise ("SBT-").
* src/plugins/IndivSummary.py: Likewise ("IVS-").
* src/plugins/IndivComplete.py: Likewise ("IDS-").


svn: r1903
This commit is contained in:
Alex Roitman
2003-07-18 13:43:13 +00:00
parent 0d4fd430b2
commit 5ee6d863e0
14 changed files with 308 additions and 296 deletions

View File

@@ -66,41 +66,41 @@ class FamilyGroup:
cell.set_bottom_border(1)
cell.set_right_border(1)
cell.set_left_border(1)
self.doc.add_cell_style('FGR:ParentHead',cell)
self.doc.add_cell_style('FGR-ParentHead',cell)
cell = TextDoc.TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(1)
cell.set_left_border(1)
self.doc.add_cell_style('FGR:TextContents',cell)
self.doc.add_cell_style('FGR-TextContents',cell)
cell = TextDoc.TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(0)
cell.set_left_border(1)
cell.set_padding(0.1)
self.doc.add_cell_style('FGR:TextChild1',cell)
self.doc.add_cell_style('FGR-TextChild1',cell)
cell = TextDoc.TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(1)
cell.set_left_border(1)
cell.set_padding(0.1)
self.doc.add_cell_style('FGR:TextChild2',cell)
self.doc.add_cell_style('FGR-TextChild2',cell)
cell = TextDoc.TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(1)
cell.set_right_border(1)
cell.set_left_border(1)
self.doc.add_cell_style('FGR:TextContentsEnd',cell)
self.doc.add_cell_style('FGR-TextContentsEnd',cell)
cell = TextDoc.TableCellStyle()
cell.set_padding(0.2)
cell.set_bottom_border(1)
cell.set_right_border(1)
cell.set_left_border(1)
self.doc.add_cell_style('FGR:ChildName',cell)
self.doc.add_cell_style('FGR-ChildName',cell)
table = TextDoc.TableStyle()
table.set_width(100)
@@ -108,7 +108,7 @@ class FamilyGroup:
table.set_column_width(0,20)
table.set_column_width(1,40)
table.set_column_width(2,40)
self.doc.add_table_style('FGR:ParentTable',table)
self.doc.add_table_style('FGR-ParentTable',table)
table = TextDoc.TableStyle()
table.set_width(100)
@@ -117,7 +117,7 @@ class FamilyGroup:
table.set_column_width(1,18)
table.set_column_width(2,35)
table.set_column_width(3,40)
self.doc.add_table_style('FGR:ChildTable',table)
self.doc.add_table_style('FGR-ChildTable',table)
def end(self):
if self.standalone:
@@ -133,10 +133,10 @@ class FamilyGroup:
else:
id = _("Wife")
self.doc.start_table(id,'FGR:ParentTable')
self.doc.start_table(id,'FGR-ParentTable')
self.doc.start_row()
self.doc.start_cell('FGR:ParentHead',3)
self.doc.start_paragraph('FGR:ParentName')
self.doc.start_cell('FGR-ParentHead',3)
self.doc.start_paragraph('FGR-ParentName')
self.doc.write_text(id + ': ')
self.doc.write_text(person.getPrimaryName().getRegularName())
self.doc.end_paragraph()
@@ -147,36 +147,36 @@ class FamilyGroup:
death = person.getDeath()
self.doc.start_row()
self.doc.start_cell("FGR:TextContents")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContents")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(_("Birth"))
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell("FGR:TextContents")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContents")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(birth.getDate())
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell("FGR:TextContentsEnd")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContentsEnd")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(birth.getPlaceName())
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
self.doc.start_row()
self.doc.start_cell("FGR:TextContents")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContents")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(_("Death"))
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell("FGR:TextContents")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContents")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(death.getDate())
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell("FGR:TextContentsEnd")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContentsEnd")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(death.getPlaceName())
self.doc.end_paragraph()
self.doc.end_cell()
@@ -193,26 +193,26 @@ class FamilyGroup:
mother_name = family.getMother().getPrimaryName().getRegularName()
self.doc.start_row()
self.doc.start_cell("FGR:TextContents")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContents")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(_("Father"))
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell("FGR:TextContentsEnd",2)
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContentsEnd",2)
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(father_name)
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
self.doc.start_row()
self.doc.start_cell("FGR:TextContents")
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContents")
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(_("Mother"))
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell("FGR:TextContentsEnd",2)
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell("FGR-TextContentsEnd",2)
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(mother_name)
self.doc.end_paragraph()
self.doc.end_cell()
@@ -229,21 +229,21 @@ class FamilyGroup:
place = ""
self.doc.start_row()
self.doc.start_cell(text)
self.doc.start_paragraph('FGR:Normal')
self.doc.start_paragraph('FGR-Normal')
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell('FGR:TextContents')
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell('FGR-TextContents')
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(name)
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell('FGR:TextContents')
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell('FGR-TextContents')
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(date)
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell('FGR:TextContentsEnd')
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell('FGR-TextContentsEnd')
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(place)
self.doc.end_paragraph()
self.doc.end_cell()
@@ -252,27 +252,27 @@ class FamilyGroup:
def dump_child(self,index,person):
self.doc.start_row()
self.doc.start_cell('FGR:TextChild1')
self.doc.start_paragraph('FGR:ChildText')
self.doc.start_cell('FGR-TextChild1')
self.doc.start_paragraph('FGR-ChildText')
if person.getGender() == RelLib.Person.male:
self.doc.write_text("%dM" % index)
else:
self.doc.write_text("%dF" % index)
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell('FGR:ChildName',3)
self.doc.start_paragraph('FGR:ChildText')
self.doc.start_cell('FGR-ChildName',3)
self.doc.start_paragraph('FGR-ChildText')
self.doc.write_text(person.getPrimaryName().getRegularName())
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
families = len(person.getFamilyList())
self.dump_child_event('FGR:TextChild1','Birth',person.getBirth())
self.dump_child_event('FGR-TextChild1','Birth',person.getBirth())
if families == 0:
self.dump_child_event('FGR:TextChild2',_('Death'),person.getDeath())
self.dump_child_event('FGR-TextChild2',_('Death'),person.getDeath())
else:
self.dump_child_event('FGR:TextChild1',_('Death'),person.getDeath())
self.dump_child_event('FGR-TextChild1',_('Death'),person.getDeath())
index = 1
for family in person.getFamilyList():
@@ -282,26 +282,26 @@ class FamilyGroup:
else:
spouse = family.getFather()
self.doc.start_row()
self.doc.start_cell('FGR:TextChild1')
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell('FGR-TextChild1')
self.doc.start_paragraph('FGR-Normal')
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell('FGR:TextContents')
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell('FGR-TextContents')
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(_("Spouse"))
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.start_cell('FGR:TextContentsEnd',2)
self.doc.start_paragraph('FGR:Normal')
self.doc.start_cell('FGR-TextContentsEnd',2)
self.doc.start_paragraph('FGR-Normal')
self.doc.write_text(spouse.getPrimaryName().getRegularName())
self.doc.end_paragraph()
self.doc.end_cell()
self.doc.end_row()
if index == families:
self.dump_child_event('FGR:TextChild2',_("Married"),m)
self.dump_child_event('FGR-TextChild2',_("Married"),m)
else:
self.dump_child_event('FGR:TextChild1',_("Married"),m)
self.dump_child_event('FGR-TextChild1',_("Married"),m)
#--------------------------------------------------------------------
#
@@ -312,24 +312,24 @@ class FamilyGroup:
if self.newpage:
self.doc.page_break()
self.doc.start_paragraph('FGR:Title')
self.doc.start_paragraph('FGR-Title')
self.doc.write_text(_("Family Group Report"))
self.doc.end_paragraph()
if self.family:
self.dump_parent(self.family.getFather())
self.doc.start_paragraph("FGR:blank")
self.doc.start_paragraph("FGR-blank")
self.doc.end_paragraph()
self.dump_parent(self.family.getMother())
length = len(self.family.getChildList())
if length > 0:
self.doc.start_paragraph("FGR:blank")
self.doc.start_paragraph("FGR-blank")
self.doc.end_paragraph()
self.doc.start_table('FGR:Children','FGR:ChildTable')
self.doc.start_table('FGR-Children','FGR-ChildTable')
self.doc.start_row()
self.doc.start_cell('FGR:ParentHead',4)
self.doc.start_paragraph('FGR:ParentName')
self.doc.start_cell('FGR-ParentHead',4)
self.doc.start_paragraph('FGR-ParentName')
self.doc.write_text(_("Children"))
self.doc.end_paragraph()
self.doc.end_cell()
@@ -597,7 +597,7 @@ def _make_default_style(default_style):
font = TextDoc.FontStyle()
font.set_size(4)
para.set_font(font)
default_style.add_style('FGR:blank',para)
default_style.add_style('FGR-blank',para)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SANS_SERIF)
@@ -606,7 +606,7 @@ def _make_default_style(default_style):
para = TextDoc.ParagraphStyle()
para.set_font(font)
para.set_description(_("The style used for the title of the page."))
default_style.add_style('FGR:Title',para)
default_style.add_style('FGR-Title',para)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SERIF)
@@ -615,7 +615,7 @@ def _make_default_style(default_style):
para = TextDoc.ParagraphStyle()
para.set_font(font)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style('FGR:Normal',para)
default_style.add_style('FGR-Normal',para)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SANS_SERIF)
@@ -624,7 +624,7 @@ def _make_default_style(default_style):
para = TextDoc.ParagraphStyle()
para.set_font(font)
para.set_description(_('The style used for the text related to the children.'))
default_style.add_style('FGR:ChildText',para)
default_style.add_style('FGR-ChildText',para)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SANS_SERIF)
@@ -633,7 +633,7 @@ def _make_default_style(default_style):
para = TextDoc.ParagraphStyle()
para.set_font(font)
para.set_description(_("The style used for the parent's name"))
default_style.add_style('FGR:ParentName',para)
default_style.add_style('FGR-ParentName',para)
def _build_spouse_map(person):
"""Create a mapping of all spouse names:families to be put