* src/PaperMenu.py: Change from TextDoc to BaseDoc.

* src/Report.py: Likewise.
* src/SpreadSheetDoc.py: Likewise.
* src/StyleEditor.py: Likewise.
* src/docgen/OpenSpreadSheet.py: Likewise.
* src/docgen/AbiWord2Doc.py: Likewise.
* src/plugins/AncestorReport.py: Likewise.
* src/plugins/DescendReport.py: Likewise.
* src/plugins/DetAncestralReport.py: Likewise.
* src/plugins/DetDescendantReport.py: Likewise.
* src/plugins/EventCmp.py: Likewise.
* src/plugins/FamilyGroup.py: Likewise.
* src/plugins/FtmStyleAncestors.py: Likewise.
* src/plugins/GraphViz.py: Likewise.
* src/plugins/IndivComplete.py: Likewise.
* src/plugins/IndivSummary.py: Likewise.
* src/plugins/WebPage.py: Likewise.
* src/plugins/Ancestors.py: Likewise.
* src/plugins/CustomBookText.py: Likewise.
* src/BaseDoc.py: Likewise.


svn: r2074
This commit is contained in:
Alex Roitman 2003-09-02 00:47:09 +00:00
parent 42dea20684
commit f27d6ae5f7
21 changed files with 292 additions and 271 deletions

View File

@ -1,3 +1,25 @@
2003-09-01 Alex Roitman <shura@alex.neuro.umn.edu>
* src/PaperMenu.py: Change from TextDoc to BaseDoc.
* src/Report.py: Likewise.
* src/SpreadSheetDoc.py: Likewise.
* src/StyleEditor.py: Likewise.
* src/docgen/OpenSpreadSheet.py: Likewise.
* src/docgen/AbiWord2Doc.py: Likewise.
* src/plugins/AncestorReport.py: Likewise.
* src/plugins/DescendReport.py: Likewise.
* src/plugins/DetAncestralReport.py: Likewise.
* src/plugins/DetDescendantReport.py: Likewise.
* src/plugins/EventCmp.py: Likewise.
* src/plugins/FamilyGroup.py: Likewise.
* src/plugins/FtmStyleAncestors.py: Likewise.
* src/plugins/GraphViz.py: Likewise.
* src/plugins/IndivComplete.py: Likewise.
* src/plugins/IndivSummary.py: Likewise.
* src/plugins/WebPage.py: Likewise.
* src/plugins/Ancestors.py: Likewise.
* src/plugins/CustomBookText.py: Likewise.
* src/BaseDoc.py: Likewise.
2003-09-01 Tim Waugh <twaugh@redhat.com>
* src/plugins/Ancestors.py: Separate paternal and maternal ancestors
for easier reading.

View File

@ -5,10 +5,10 @@
#
# Modified September 2002 by Gary Shao
#
# Added line_break() method to TextDoc class to allow breaking a line
# Added line_break() method to BaseDoc class to allow breaking a line
# in a paragraph (in those document generators that support it).
#
# Added start_listing() and end_listing() methods to TextDoc class to
# Added start_listing() and end_listing() methods to BaseDoc class to
# allow displaying text blocks without automatic filling and justification.
# Creating a new listing element seems called for because many document
# generator implementation have to use a different mechanism for text
@ -23,11 +23,11 @@
# may be important, such as in code source or column-aligned data.
# Especially useful in styles for the new listing element discussed above.
#
# Added start_italic() and end_italic() methods to TextDoc class to
# Added start_italic() and end_italic() methods to BaseDoc class to
# complement the emphasis of text in a paragraph by bolding with the
# ability to italicize segments of text in a paragraph.
#
# Added the show_link() method to TextDoc to enable the creation of
# Added the show_link() method to BaseDoc to enable the creation of
# hyperlinks in HTML output. Only produces active links in HTML, while
# link will be represented as text in other generator output. (active
# links are technically possible in PDF documents, but the reportlab
@ -1041,7 +1041,7 @@ class GraphicsStyle:
#------------------------------------------------------------------------
#
# TextDoc
# BaseDoc
#
#------------------------------------------------------------------------
class BaseDoc:
@ -1052,7 +1052,7 @@ class BaseDoc:
"""
def __init__(self,styles,paper_type,template,orientation=PAPER_PORTRAIT):
"""
Creates a TextDoc instance, which provides a document generation
Creates a BaseDoc instance, which provides a document generation
interface. This class should never be instantiated directly, but
only through a derived class.

View File

@ -30,7 +30,7 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
import TextDoc
import BaseDoc
import GrampsCfg
import const
import Utils
@ -82,12 +82,12 @@ def make_orientation_menu(main_menu):
myMenu = gtk.Menu()
menuitem = gtk.MenuItem(_("Portrait"))
menuitem.set_data("i",TextDoc.PAPER_PORTRAIT)
menuitem.set_data("i",BaseDoc.PAPER_PORTRAIT)
menuitem.show()
myMenu.append(menuitem)
menuitem = gtk.MenuItem(_("Landscape"))
menuitem.set_data("i",TextDoc.PAPER_LANDSCAPE)
menuitem.set_data("i",BaseDoc.PAPER_LANDSCAPE)
menuitem.show()
myMenu.append(menuitem)
@ -113,7 +113,7 @@ class PageSizeParser(handler.ContentHandler):
name = attrs['name']
height = Utils.gfloat(attrs['height'])
width = Utils.gfloat(attrs['width'])
self.paper_list.append(TextDoc.PaperStyle(name,height,width))
self.paper_list.append(BaseDoc.PaperStyle(name,height,width))
#-------------------------------------------------------------------------
#
@ -124,19 +124,18 @@ try:
parser = make_parser()
parser.setContentHandler(PageSizeParser(paper_sizes))
parser.parse(const.papersize)
paper_sizes.append(TextDoc.PaperStyle(_("Custom Size"),-1,-1))
paper_sizes.append(BaseDoc.PaperStyle(_("Custom Size"),-1,-1))
except (IOError,OSError,SAXParseException):
paper_sizes = [
TextDoc.PaperStyle("Letter",27.94,21.59),
TextDoc.PaperStyle("Legal",35.56,21.59),
TextDoc.PaperStyle("A3",42.0,29.7),
TextDoc.PaperStyle("A4",29.7,21.0),
TextDoc.PaperStyle("A5",21.0,14.8),
TextDoc.PaperStyle("B4",35.3,25.0),
TextDoc.PaperStyle("B6",17.6,12.5),
TextDoc.PaperStyle("C4",32.4,22.9),
TextDoc.PaperStyle("C5",22.9,16.2),
TextDoc.PaperStyle("C6",16.2,11.4),
TextDoc.PaperStyle(_("Custom Size"),-1,-1)
BaseDoc.PaperStyle("Letter",27.94,21.59),
BaseDoc.PaperStyle("Legal",35.56,21.59),
BaseDoc.PaperStyle("A3",42.0,29.7),
BaseDoc.PaperStyle("A4",29.7,21.0),
BaseDoc.PaperStyle("A5",21.0,14.8),
BaseDoc.PaperStyle("B4",35.3,25.0),
BaseDoc.PaperStyle("B6",17.6,12.5),
BaseDoc.PaperStyle("C4",32.4,22.9),
BaseDoc.PaperStyle("C5",22.9,16.2),
BaseDoc.PaperStyle("C6",16.2,11.4),
BaseDoc.PaperStyle(_("Custom Size"),-1,-1)
]

View File

@ -49,7 +49,7 @@ import const
import Utils
import Plugins
import GenericFilter
import TextDoc
import BaseDoc
import StyleEditor
import GrampsCfg
import PaperMenu
@ -359,9 +359,9 @@ class BareReportDialog:
def make_default_style(self):
"""Create the default style to be used by the associated report. This
routine is a default implementation and should be overridden."""
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=16,bold=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(1)
para.set(pad=0.5)
@ -455,13 +455,13 @@ class BareReportDialog:
self.col += 1
# Build the default style set for this report.
self.default_style = TextDoc.StyleSheet()
self.default_style = BaseDoc.StyleSheet()
self.make_default_style()
# Build the initial list of available styles sets. This
# includes the default style set and any style sets saved from
# previous invocations of gramps.
self.style_sheet_list = TextDoc.StyleSheetList(self.get_stylesheet_savefile(),
self.style_sheet_list = BaseDoc.StyleSheetList(self.get_stylesheet_savefile(),
self.default_style)
# Now build the actual menu.

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
@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import TextDoc
import BaseDoc
#------------------------------------------------------------------------
#
@ -26,9 +26,9 @@ import TextDoc
#
#------------------------------------------------------------------------
class SpreadSheetDoc:
def __init__(self,type,orientation=TextDoc.PAPER_PORTRAIT):
def __init__(self,type,orientation=BaseDoc.PAPER_PORTRAIT):
self.orientation = orientation
if orientation == TextDoc.PAPER_PORTRAIT:
if orientation == BaseDoc.PAPER_PORTRAIT:
self.width = type.get_width()
self.height = type.get_height()
else:
@ -39,7 +39,7 @@ class SpreadSheetDoc:
self.lmargin = 2.54
self.rmargin = 2.54
self.font = TextDoc.FontStyle()
self.font = BaseDoc.FontStyle()
self.actfont = self.font
self.style_list = {}
self.table_styles = {}
@ -56,16 +56,16 @@ class SpreadSheetDoc:
self.name = name
def add_style(self,name,style):
self.style_list[name] = TextDoc.ParagraphStyle(style)
self.style_list[name] = BaseDoc.ParagraphStyle(style)
def add_table_style(self,name,style):
self.table_styles[name] = TextDoc.TableStyle(style)
self.table_styles[name] = BaseDoc.TableStyle(style)
def add_cell_style(self,name,style):
self.cell_styles[name] = TextDoc.TableCellStyle(style)
self.cell_styles[name] = BaseDoc.TableCellStyle(style)
def change_font(self,font):
self.actfont = TextDoc.FontStyle(font)
self.actfont = BaseDoc.FontStyle(font)
def restore_font(self):
self.actfont = self.font

View File

@ -40,7 +40,7 @@ import gtk
#------------------------------------------------------------------------
import Utils
import const
import TextDoc
import BaseDoc
import ListModel
import locale
from gettext import gettext as _
@ -160,7 +160,7 @@ class StyleEditor:
"""
self.original_style = style
self.style = TextDoc.StyleSheet(style)
self.style = BaseDoc.StyleSheet(style)
self.parent = parent
self.top = gtk.glade.XML(const.stylesFile,"editor","gramps")
@ -207,18 +207,18 @@ class StyleEditor:
font = p.get_font()
self.top.get_widget("size").set_value(font.get_size())
if font.get_type_face() == TextDoc.FONT_SANS_SERIF:
if font.get_type_face() == BaseDoc.FONT_SANS_SERIF:
self.top.get_widget("roman").set_active(1)
else:
self.top.get_widget("swiss").set_active(1)
self.top.get_widget("bold").set_active(font.get_bold())
self.top.get_widget("italic").set_active(font.get_italic())
self.top.get_widget("underline").set_active(font.get_underline())
if p.get_alignment() == TextDoc.PARA_ALIGN_LEFT:
if p.get_alignment() == BaseDoc.PARA_ALIGN_LEFT:
self.top.get_widget("lalign").set_active(1)
elif p.get_alignment() == TextDoc.PARA_ALIGN_RIGHT:
elif p.get_alignment() == BaseDoc.PARA_ALIGN_RIGHT:
self.top.get_widget("ralign").set_active(1)
elif p.get_alignment() == TextDoc.PARA_ALIGN_CENTER:
elif p.get_alignment() == BaseDoc.PARA_ALIGN_CENTER:
self.top.get_widget("calign").set_active(1)
else:
self.top.get_widget("jalign").set_active(1)
@ -252,21 +252,21 @@ class StyleEditor:
font.set_size(int(self.top.get_widget("size").get_value()))
if self.top.get_widget("roman").get_active():
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
else:
font.set_type_face(TextDoc.FONT_SERIF)
font.set_type_face(BaseDoc.FONT_SERIF)
font.set_bold(self.top.get_widget("bold").get_active())
font.set_italic(self.top.get_widget("italic").get_active())
font.set_underline(self.top.get_widget("underline").get_active())
if self.top.get_widget("lalign").get_active():
p.set_alignment(TextDoc.PARA_ALIGN_LEFT)
p.set_alignment(BaseDoc.PARA_ALIGN_LEFT)
elif self.top.get_widget("ralign").get_active():
p.set_alignment(TextDoc.PARA_ALIGN_RIGHT)
p.set_alignment(BaseDoc.PARA_ALIGN_RIGHT)
elif self.top.get_widget("calign").get_active():
p.set_alignment(TextDoc.PARA_ALIGN_CENTER)
p.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
else:
p.set_alignment(TextDoc.PARA_ALIGN_JUSTIFY)
p.set_alignment(BaseDoc.PARA_ALIGN_JUSTIFY)
p.set_right_margin(Utils.gfloat(self.top.get_widget("rmargin").get_text()))
p.set_left_margin(Utils.gfloat(self.top.get_widget("lmargin").get_text()))

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
@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
"""
Provides a TextDoc based interface to the AbiWord document format.
Provides a BaseDoc based interface to the AbiWord document format.
"""
#-------------------------------------------------------------------------

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
@ -22,7 +22,7 @@ import os
import tempfile
import string
import TextDoc
import BaseDoc
from SpreadSheetDoc import *
from latin_utf8 import latin_to_utf8
@ -121,7 +121,7 @@ class OpenSpreadSheet(SpreadSheetDoc):
self.f.write('fo:padding-left="%.3fcm" ' % style.get_padding())
self.f.write('style:text-outline="false" ')
self.f.write('style:text-crossing-out="none" ')
if font.get_type_face() == TextDoc.FONT_SERIF:
if font.get_type_face() == BaseDoc.FONT_SERIF:
self.f.write('style:font-name="Times New Roman" ')
else:
self.f.write('style:font-name="Arial" ')

View File

@ -34,7 +34,7 @@ import string
#
#------------------------------------------------------------------------
import Report
import TextDoc
import BaseDoc
import RelLib
import Errors
from QuestionDialog import ErrorDialog
@ -384,25 +384,25 @@ def write_book_item(database,person,doc,options,newpage=0):
#------------------------------------------------------------------------
def _make_default_style(default_style):
"""Make the default output style for the Ahnentafel report."""
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=16,bold=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(1)
para.set(pad=0.5)
para.set_description(_('The style used for the title of the page.'))
default_style.add_style("AHN-Title",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=14,italic=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(2)
para.set(pad=0.5)
para.set_description(_('The style used for the generation header.'))
default_style.add_style("AHN-Generation",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("AHN-Entry",para)

View File

@ -30,7 +30,7 @@ import gtk
#------------------------------------------------------------------------
import const
import Report
import TextDoc
import BaseDoc
import RelLib
import Errors
import Relationship
@ -56,36 +56,36 @@ class ComprehensiveAncestorsReport (Report.Report):
self.sourcerefs = []
self.newpage = newpage
table = TextDoc.TableStyle ()
table = BaseDoc.TableStyle ()
table.set_column_widths ([15, 85])
table.set_width (100)
doc.add_table_style ("AR-PersonNoSpouse", table)
table = TextDoc.TableStyle ()
table = BaseDoc.TableStyle ()
table.set_column_widths ([10, 15, 75])
table.set_width (100)
doc.add_table_style ("AR-ChildNoSpouse", table)
for nspouse in range (1, 3):
table = TextDoc.TableStyle ()
table = BaseDoc.TableStyle ()
table.set_width (100)
widths = [15, 100 - 15 * (nspouse + 1)]
widths.extend ([15] * nspouse)
table.set_column_widths (widths)
doc.add_table_style ("AR-PersonWithSpouse%d" % nspouse, table)
table = TextDoc.TableStyle ()
table = BaseDoc.TableStyle ()
table.set_width (100)
widths = [10, 15, 90 - 15 * (nspouse + 1)]
widths.extend ([15] * nspouse)
table.set_column_widths (widths)
doc.add_table_style ("AR-ChildWithSpouse%d"% nspouse, table)
cell = TextDoc.TableCellStyle ()
cell = BaseDoc.TableCellStyle ()
cell.set_padding (1) # each side makes 2cm, the size of the photo
doc.add_cell_style ("AR-PaddedCell", cell)
cell = TextDoc.TableCellStyle ()
cell = BaseDoc.TableCellStyle ()
cell.set_padding (0.1)
cell.set_left_border (1)
cell.set_top_border (1)
@ -93,11 +93,11 @@ class ComprehensiveAncestorsReport (Report.Report):
cell.set_bottom_border (1)
doc.add_cell_style ("AR-NoPhoto", cell)
cell = TextDoc.TableCellStyle ()
cell = BaseDoc.TableCellStyle ()
cell.set_padding (0.1)
doc.add_cell_style ("AR-Photo", cell)
cell = TextDoc.TableCellStyle ()
cell = BaseDoc.TableCellStyle ()
cell.set_padding (0.1)
doc.add_cell_style ("AR-Entry", cell)
@ -345,7 +345,7 @@ class ComprehensiveAncestorsReport (Report.Report):
ret.append ((self.doc.start_row, []))
if suppress_children and len (already_described):
# Can't do proper formatting with TextDoc, so cheat.
# Can't do proper formatting with BaseDoc, so cheat.
ret.append ((self.doc.start_cell, ["AR-PaddedCell"]))
ret.append ((self.doc.end_cell, []))
@ -750,54 +750,54 @@ class ComprehensiveAncestorsReport (Report.Report):
def _make_default_style(default_style):
"""Make the default output style for the Comprehensive Ancestors report."""
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1,italic=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=16,bold=1,italic=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(1)
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
para.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
para.set(pad=0.5)
para.set_description(_('The style used for the title of the page.'))
default_style.add_style("AR-Title",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=14,italic=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(2)
para.set(pad=0.5)
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
para.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
para.set_description(_('The style used for the generation header.'))
default_style.add_style("AR-Heading",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(lmargin=1.0,pad=0.25)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("AR-Entry",para)
para = TextDoc.ParagraphStyle ()
para = BaseDoc.ParagraphStyle ()
para.set_description(_('Text style for missing photo.'))
default_style.add_style("AR-NoPhotoText", para)
details_font = TextDoc.FontStyle()
details_font.set(face=TextDoc.FONT_SANS_SERIF,size=8,italic=1)
para = TextDoc.ParagraphStyle()
details_font = BaseDoc.FontStyle()
details_font.set(face=BaseDoc.FONT_SANS_SERIF,size=8,italic=1)
para = BaseDoc.ParagraphStyle()
para.set(lmargin=2.7,pad=0,font = details_font)
para.set_description(_('Style for details about a person.'))
default_style.add_style("AR-Details",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(lmargin=2.5,pad=0.25)
para.set_description(_('The basic style used for the text display.'))
para.set_header_level (4)
default_style.add_style("AR-SubEntry",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(pad=0.05)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("AR-Endnotes",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(lmargin=1.0,pad=0.05)
para.set_description(_('Introduction to the children.'))
para.set_header_level (3)

View File

@ -37,7 +37,7 @@ import cStringIO
#
#------------------------------------------------------------------------
import Report
import TextDoc
import BaseDoc
import RelLib
import Errors
from QuestionDialog import ErrorDialog
@ -97,29 +97,29 @@ class CustomText(Report.Report):
def _make_default_style(default_style):
"""Make the default output style for the Custom Text report."""
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
para.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
para.set(pad=0.5)
para.set_description(_('The style used for the first portion of the custom text.'))
default_style.add_style("CBT-Initial",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set(pad=0.5)
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
para.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
para.set_description(_('The style used for the middle portion of the custom text.'))
default_style.add_style("CBT-Middle",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=12,bold=0,italic=0)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
para.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
para.set(pad=0.5)
para.set_description(_('The style used for the last portion of the custom text.'))
default_style.add_style("CBT-Final",para)

View File

@ -35,7 +35,7 @@ import string
#
#------------------------------------------------------------------------
import Report
import TextDoc
import BaseDoc
import Errors
from QuestionDialog import ErrorDialog
@ -283,19 +283,19 @@ def write_book_item(database,person,doc,options,newpage=0):
#------------------------------------------------------------------------
def _make_default_style(default_style):
"""Make the default output style for the Descendant Report."""
f = TextDoc.FontStyle()
f = BaseDoc.FontStyle()
f.set_size(14)
f.set_type_face(TextDoc.FONT_SANS_SERIF)
f.set_type_face(BaseDoc.FONT_SANS_SERIF)
f.set_bold(1)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_header_level(1)
p.set_font(f)
p.set_description(_("The style used for the title of the page."))
default_style.add_style("DR-Title",p)
f = TextDoc.FontStyle()
f = BaseDoc.FontStyle()
for i in range(1,32):
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(f)
p.set_left_margin(max(10.0,float(i-1)))
p.set_description(_("The style used for the level %d display.") % i)

View File

@ -30,7 +30,7 @@ from gettext import gettext as _
from QuestionDialog import ErrorDialog
import Report
import TextDoc
import BaseDoc
import gtk
import gnome.ui
@ -669,47 +669,47 @@ class DetAncestorReport(Report.Report):
#------------------------------------------------------------------------
def _make_default_style(default_style):
"""Make the default output style for the Detailed Ancestral Report"""
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=16,bold=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(1)
para.set(pad=0.5)
default_style.add_style("DAR-Title",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=14,italic=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(2)
para.set(pad=0.5)
default_style.add_style("DAR-Generation",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
#para.set_header_level(3)
para.set_left_margin(0.0) # in centimeters
para.set(pad=0.5)
default_style.add_style("DAR-ChildTitle",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=9)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=9)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
default_style.add_style("DAR-ChildList",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
default_style.add_style("DAR-NoteHeader",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(first_indent=0.5,lmargin=0.0,pad=0.25)
default_style.add_style("DAR-Entry",para)
table = TextDoc.TableStyle()
table = BaseDoc.TableStyle()
table.set_width(1000)
table.set_columns(3)
table.set_column_width(1,"30%")

View File

@ -30,7 +30,7 @@ from QuestionDialog import ErrorDialog
from gettext import gettext as _
import Report
import TextDoc
import BaseDoc
import gtk
import gnome.ui
@ -677,47 +677,47 @@ class DetDescendantReport(Report.Report):
#------------------------------------------------------------------------
def _make_default_style(default_style):
"""Make the default output style for the Detailed Descendant Report"""
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=16,bold=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(1)
para.set(pad=0.5)
default_style.add_style("DDR-Title",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=14,italic=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(2)
para.set(pad=0.5)
default_style.add_style("DDR-Generation",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=10,italic=0, bold=0)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
#para.set_header_level(3)
para.set_left_margin(0.0) # in centimeters
para.set(pad=0.5)
default_style.add_style("DDR-ChildTitle",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=9)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=9)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
default_style.add_style("DDR-ChildList",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(first_indent=0.0,lmargin=0.0,pad=0.25)
default_style.add_style("DDR-NoteHeader",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(first_indent=0.5,lmargin=0.0,pad=0.25)
default_style.add_style("DDR-Entry",para)
table = TextDoc.TableStyle()
table = BaseDoc.TableStyle()
table.set_width(1000)
table.set_columns(3)
table.set_column_width(1,"30%")

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
@ -44,7 +44,7 @@ import GenericFilter
import ListModel
import sort
import Utils
import TextDoc
import BaseDoc
import OpenSpreadSheet
import const
@ -64,26 +64,26 @@ class TableReport:
def initialize(self,cols):
t = TextDoc.TableStyle()
t = BaseDoc.TableStyle()
t.set_columns(cols)
for index in range(0,cols):
t.set_column_width(index,4)
self.doc.add_table_style("mytbl",t)
f = TextDoc.FontStyle()
f.set_type_face(TextDoc.FONT_SANS_SERIF)
f = BaseDoc.FontStyle()
f.set_type_face(BaseDoc.FONT_SANS_SERIF)
f.set_size(12)
f.set_bold(1)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(f)
p.set_background_color((0xcc,0xff,0xff))
p.set_padding(0.1)
self.doc.add_style("head",p)
f = TextDoc.FontStyle()
f.set_type_face(TextDoc.FONT_SANS_SERIF)
f = BaseDoc.FontStyle()
f.set_type_face(BaseDoc.FONT_SANS_SERIF)
f.set_size(10)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(f)
self.doc.add_style("data",p)
@ -323,8 +323,8 @@ class DisplayChart:
name = self.form.get_widget("filename").get_text()
pstyle = TextDoc.PaperStyle("junk",10,10)
doc = OpenSpreadSheet.OpenSpreadSheet(pstyle,TextDoc.PAPER_PORTRAIT)
pstyle = BaseDoc.PaperStyle("junk",10,10)
doc = OpenSpreadSheet.OpenSpreadSheet(pstyle,BaseDoc.PAPER_PORTRAIT)
spreadsheet = TableReport(name,doc)
spreadsheet.initialize(len(self.event_titles))

View File

@ -35,7 +35,7 @@ import gtk
#------------------------------------------------------------------------
import RelLib
import Report
import TextDoc
import BaseDoc
import Errors
import Utils
from gettext import gettext as _
@ -60,7 +60,7 @@ class FamilyGroup:
else:
self.standalone = 0
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_padding(0.2)
cell.set_top_border(1)
cell.set_bottom_border(1)
@ -68,41 +68,41 @@ class FamilyGroup:
cell.set_left_border(1)
self.doc.add_cell_style('FGR-ParentHead',cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_padding(0.1)
cell.set_bottom_border(1)
cell.set_left_border(1)
self.doc.add_cell_style('FGR-TextContents',cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.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)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.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)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.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)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.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)
table = TextDoc.TableStyle()
table = BaseDoc.TableStyle()
table.set_width(100)
table.set_columns(3)
table.set_column_width(0,20)
@ -110,7 +110,7 @@ class FamilyGroup:
table.set_column_width(2,40)
self.doc.add_table_style('FGR-ParentTable',table)
table = TextDoc.TableStyle()
table = BaseDoc.TableStyle()
table.set_width(100)
table.set_columns(4)
table.set_column_width(0,7)
@ -592,44 +592,44 @@ def write_book_item(database,person,doc,options,newpage=0):
#------------------------------------------------------------------------
def _make_default_style(default_style):
"""Make default output style for the Family Group Report."""
para = TextDoc.ParagraphStyle()
font = TextDoc.FontStyle()
para = BaseDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set_size(4)
para.set_font(font)
default_style.add_style('FGR-blank',para)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font = BaseDoc.FontStyle()
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(16)
font.set_bold(1)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_description(_("The style used for the title of the page."))
default_style.add_style('FGR-Title',para)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SERIF)
font = BaseDoc.FontStyle()
font.set_type_face(BaseDoc.FONT_SERIF)
font.set_size(10)
font.set_bold(0)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style('FGR-Normal',para)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font = BaseDoc.FontStyle()
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(10)
font.set_bold(1)
para = TextDoc.ParagraphStyle()
para = BaseDoc.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)
font = TextDoc.FontStyle()
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font = BaseDoc.FontStyle()
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(12)
font.set_bold(1)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_description(_("The style used for the parent's name"))
default_style.add_style('FGR-ParentName',para)

View File

@ -33,7 +33,7 @@ import cStringIO
#
#------------------------------------------------------------------------
import Report
import TextDoc
import BaseDoc
import RelLib
import Errors
from QuestionDialog import ErrorDialog
@ -723,42 +723,42 @@ class FtmAncestorReport(Report.Report):
def _make_default_style(default_style):
"""Make the default output style for the FTM Style Ancestral report."""
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1,italic=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=16,bold=1,italic=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(1)
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
para.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
para.set(pad=0.5)
para.set_description(_('The style used for the title of the page.'))
default_style.add_style("FTA-Title",para)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
para = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=14,italic=1)
para = BaseDoc.ParagraphStyle()
para.set_font(font)
para.set_header_level(2)
para.set(pad=0.5)
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
para.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
para.set_description(_('The style used for the generation header.'))
default_style.add_style("FTA-Generation",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(first_indent=-1.0,lmargin=1.0,pad=0.25)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("FTA-Entry",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(lmargin=1.0,pad=0.05)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("FTA-Details",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(lmargin=1.0,pad=0.25)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("FTA-SubEntry",para)
para = TextDoc.ParagraphStyle()
para = BaseDoc.ParagraphStyle()
para.set(pad=0.05)
para.set_description(_('The basic style used for the text display.'))
default_style.add_style("FTA-Endnotes",para)

View File

@ -42,7 +42,7 @@ import gtk
#------------------------------------------------------------------------
import Utils
import Report
import TextDoc
import BaseDoc
import GenericFilter
import Errors
@ -363,7 +363,7 @@ def write_dot(file, ind_list, orien, width, height, tb_margin,
(height*vpages)-(tb_margin*2)-((vpages-1)*1.0)))
file.write("page=\"%3.1f,%3.1f\";\n" % (width,height))
if orien == TextDoc.PAPER_LANDSCAPE:
if orien == BaseDoc.PAPER_LANDSCAPE:
file.write("rotate=90;\n")
if len(ind_list) > 1:

View File

@ -33,7 +33,7 @@ import string
#------------------------------------------------------------------------
import RelLib
import const
import TextDoc
import BaseDoc
import StyleEditor
import Report
import GenericFilter
@ -85,29 +85,29 @@ class IndivComplete(Report.Report):
self.standalone = 0
def setup(self):
tbl = TextDoc.TableStyle()
tbl = BaseDoc.TableStyle()
tbl.set_width(100)
tbl.set_columns(2)
tbl.set_column_width(0,20)
tbl.set_column_width(1,80)
self.d.add_table_style("IDS-IndTable",tbl)
tbl = TextDoc.TableStyle()
tbl = BaseDoc.TableStyle()
tbl.set_width(100)
tbl.set_columns(2)
tbl.set_column_width(0,50)
tbl.set_column_width(1,50)
self.d.add_table_style("IDS-ParentsTable",tbl)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_top_border(1)
cell.set_bottom_border(1)
self.d.add_cell_style("IDS-TableHead",cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
self.d.add_cell_style("IDS-NormalCell",cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_longlist(1)
self.d.add_cell_style("IDS-ListCell",cell)
@ -649,38 +649,38 @@ def write_book_item(database,person,doc,options,newpage=0):
#------------------------------------------------------------------------
def _make_default_style(default_style):
"""Make the default output style for the Individual Complete Report."""
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_bold(1)
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(16)
p = TextDoc.ParagraphStyle()
p.set_alignment(TextDoc.PARA_ALIGN_CENTER)
p = BaseDoc.ParagraphStyle()
p.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
p.set_font(font)
p.set_description(_("The style used for the title of the page."))
default_style.add_style("IDS-Title",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_bold(1)
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(12)
font.set_italic(1)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for category labels."))
default_style.add_style("IDS-TableTitle",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_bold(1)
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(12)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the spouse's name."))
default_style.add_style("IDS-Spouse",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_size(12)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_('The basic style used for the text display.'))
default_style.add_style("IDS-Normal",p)

View File

@ -41,7 +41,7 @@ import gtk
#------------------------------------------------------------------------
import RelLib
import const
import TextDoc
import BaseDoc
import StyleEditor
import Report
import Errors
@ -85,22 +85,22 @@ class IndivSummary(Report.Report):
self.newpage = newpage
def setup(self):
tbl = TextDoc.TableStyle()
tbl = BaseDoc.TableStyle()
tbl.set_width(100)
tbl.set_columns(2)
tbl.set_column_width(0,20)
tbl.set_column_width(1,80)
self.d.add_table_style("IVS-IndTable",tbl)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_top_border(1)
cell.set_bottom_border(1)
self.d.add_cell_style("IVS-TableHead",cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
self.d.add_cell_style("IVS-NormalCell",cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_longlist(1)
self.d.add_cell_style("IVS-ListCell",cell)
@ -578,38 +578,38 @@ def write_book_item(database,person,doc,options,newpage=0):
#------------------------------------------------------------------------
def _make_default_style(default_style):
"""Make the default output style for the Individual Summary Report."""
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_bold(1)
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(16)
p = TextDoc.ParagraphStyle()
p.set_alignment(TextDoc.PARA_ALIGN_CENTER)
p = BaseDoc.ParagraphStyle()
p.set_alignment(BaseDoc.PARA_ALIGN_CENTER)
p.set_font(font)
p.set_description(_("The style used for the title of the page."))
default_style.add_style("IVS-Title",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_bold(1)
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(12)
font.set_italic(1)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for category labels."))
default_style.add_style("IVS-TableTitle",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_bold(1)
font.set_type_face(TextDoc.FONT_SANS_SERIF)
font.set_type_face(BaseDoc.FONT_SANS_SERIF)
font.set_size(12)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the spouse's name."))
default_style.add_style("IVS-Spouse",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_size(12)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_('The basic style used for the text display.'))
default_style.add_style("IVS-Normal",p)

View File

@ -45,7 +45,7 @@ import gtk
#------------------------------------------------------------------------
import RelLib
import HtmlDoc
import TextDoc
import BaseDoc
import const
import GrampsCfg
import GenericFilter
@ -845,19 +845,19 @@ class WebReport(Report.Report):
self.progress_bar_done()
def add_styles(self,doc):
tbl = TextDoc.TableStyle()
tbl = BaseDoc.TableStyle()
tbl.set_width(100)
tbl.set_column_widths([15,85])
doc.add_table_style("IndTable",tbl)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
doc.add_cell_style("NormalCell",cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_padding(0.2)
doc.add_cell_style("ImageCell",cell)
cell = TextDoc.TableCellStyle()
cell = BaseDoc.TableCellStyle()
cell.set_padding(0.2)
doc.add_cell_style("NoteCell",cell)
@ -990,109 +990,109 @@ class WebReportDialog(Report.ReportDialog):
def make_default_style(self):
"""Make the default output style for the Web Pages Report."""
font = TextDoc.FontStyle()
font.set(bold=1, face=TextDoc.FONT_SANS_SERIF, size=16)
p = TextDoc.ParagraphStyle()
p.set(align=TextDoc.PARA_ALIGN_CENTER,font=font)
font = BaseDoc.FontStyle()
font.set(bold=1, face=BaseDoc.FONT_SANS_SERIF, size=16)
p = BaseDoc.ParagraphStyle()
p.set(align=BaseDoc.PARA_ALIGN_CENTER,font=font)
p.set_description(_("The style used for the title of the page."))
self.default_style.add_style("Title",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=12,italic=1)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12,italic=1)
p = BaseDoc.ParagraphStyle()
p.set(font=font,bborder=1)
p.set_description(_("The style used for the header that identifies "
"facts and events."))
self.default_style.add_style("EventsTitle",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=12,italic=1)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12,italic=1)
p = BaseDoc.ParagraphStyle()
p.set(font=font,bborder=1)
p.set_description(_("The style used for the header for the notes section."))
self.default_style.add_style("NotesTitle",p)
font = TextDoc.FontStyle()
font.set(face=TextDoc.FONT_SANS_SERIF,size=10)
p = TextDoc.ParagraphStyle()
p.set(font=font,align=TextDoc.PARA_ALIGN_CENTER)
font = BaseDoc.FontStyle()
font.set(face=BaseDoc.FONT_SANS_SERIF,size=10)
p = BaseDoc.ParagraphStyle()
p.set(font=font,align=BaseDoc.PARA_ALIGN_CENTER)
p.set_description(_("The style used for the copyright notice."))
self.default_style.add_style("Copyright",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=12,italic=1)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12,italic=1)
p = BaseDoc.ParagraphStyle()
p.set(font=font,bborder=1)
p.set_description(_("The style used for the header for the sources section."))
self.default_style.add_style("SourcesTitle",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=14,italic=1)
p = BaseDoc.ParagraphStyle()
p.set(font=font)
p.set_description(_("The style used on the index page that labels each section."))
self.default_style.add_style("IndexLabel",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=12,italic=1)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12,italic=1)
p = BaseDoc.ParagraphStyle()
p.set(font=font,bborder=1)
p.set_description(_("The style used for the header for the image section."))
self.default_style.add_style("GalleryTitle",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=12,italic=1)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12,italic=1)
p = BaseDoc.ParagraphStyle()
p.set(font=font,bborder=1)
p.set_description(_("The style used for the header for the marriages "
"and children section."))
self.default_style.add_style("FamilyTitle",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=12)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12)
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the spouse's name."))
self.default_style.add_style("Spouse",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set(size=12,italic=1)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the general data labels."))
self.default_style.add_style("Label",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_size(12)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the general data."))
self.default_style.add_style("Data",p)
font = TextDoc.FontStyle()
font.set(bold=1,face=TextDoc.FONT_SANS_SERIF,size=12)
p = TextDoc.ParagraphStyle()
font = BaseDoc.FontStyle()
font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12)
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the description of images."))
self.default_style.add_style("PhotoDescription",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set(size=12)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the notes associated with images."))
self.default_style.add_style("PhotoNote",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_size(10)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the source information."))
self.default_style.add_style("SourceParagraph",p)
font = TextDoc.FontStyle()
font = BaseDoc.FontStyle()
font.set_size(12)
p = TextDoc.ParagraphStyle()
p = BaseDoc.ParagraphStyle()
p.set_font(font)
p.set_description(_("The style used for the note information."))
self.default_style.add_style("NotesParagraph",p)