From 3eebd910d5283c54a101572f78e3c0b8881fc9f2 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Mon, 23 Apr 2007 11:46:26 +0000 Subject: [PATCH] Move Graphic Styles, Table Styles and Cell Styles into the StyleSheet class. All report styles are now defined in the "get_default_style()" function. svn: r8421 --- ChangeLog | 32 +++++ src/BaseDoc.py | 204 ++++++++++++++------------ src/ReportBase/_Report.py | 15 +- src/ReportBase/_ReportUtils.py | 16 ++- src/ReportBase/_StyleEditor.py | 31 ++-- src/docgen/AbiWord2Doc.py | 15 +- src/docgen/AsciiDoc.py | 7 +- src/docgen/HtmlDoc.py | 21 +-- src/docgen/KwordDoc.py | 12 +- src/docgen/LPRDoc.py | 36 +++-- src/docgen/LaTeXDoc.py | 222 +++++++++++++++-------------- src/docgen/ODFDoc.py | 67 +++++---- src/docgen/OpenOfficeDoc.py | 51 ++++--- src/docgen/PSDrawDoc.py | 31 ++-- src/docgen/PdfDoc.py | 46 +++--- src/docgen/RTFDoc.py | 16 ++- src/docgen/SvgDrawDoc.py | 32 +++-- src/plugins/AncestorChart2.py | 83 +++++++---- src/plugins/AncestorReport.py | 7 +- src/plugins/DescendChart.py | 81 +++++++---- src/plugins/DescendReport.py | 8 +- src/plugins/DetAncestralReport.py | 24 ++-- src/plugins/DetDescendantReport.py | 24 ++-- src/plugins/FamilyGroup.py | 135 +++++++++--------- src/plugins/FanChart.py | 109 +++++++------- src/plugins/IndivComplete.py | 64 +++++---- src/plugins/IndivSummary.py | 50 +++---- src/plugins/StatisticsChart.py | 202 +++++++++++++------------- src/plugins/TimeLine.py | 146 ++++++++++--------- 29 files changed, 991 insertions(+), 796 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23cadf276..32d9849f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,35 @@ +2007-04-23 Brian Matherly + * src/ReportBase/_ReportUtils.py: + * src/ReportBase/_StyleEditor.py: + * src/ReportBase/_Report.py: + * src/plugins/DescendReport.py: + * src/plugins/DetDescendantReport.py: + * src/plugins/IndivComplete.py: + * src/plugins/TimeLine.py: + * src/plugins/AncestorReport.py: + * src/plugins/DescendChart.py: + * src/plugins/DetAncestralReport.py: + * src/plugins/AncestorChart2.py: + * src/plugins/IndivSummary.py: + * src/plugins/FamilyGroup.py: + * src/plugins/StatisticsChart.py: + * src/plugins/FanChart.py: + * src/BaseDoc.py: + * src/docgen/HtmlDoc.py: + * src/docgen/ODFDoc.py: + * src/docgen/AbiWord2Doc.py: + * src/docgen/PdfDoc.py: + * src/docgen/SvgDrawDoc.py: + * src/docgen/LaTeXDoc.py: + * src/docgen/OpenOfficeDoc.py: + * src/docgen/KwordDoc.py: + * src/docgen/AsciiDoc.py: + * src/docgen/RTFDoc.py: + * src/docgen/LPRDoc.py: + * src/docgen/PSDrawDoc.py: + Move Graphic Styles, Table Styles and Cell Styles into the StyleSheet class. + All report styles are now defined in the "get_default_style()" function. + 2007-04-22 Brian Matherly * src/docgen/ODFDoc.py: escape still wasn't right. ancestor and descendant charts were wrong. diff --git a/src/BaseDoc.py b/src/BaseDoc.py index b8fc69f54..44858d0f6 100644 --- a/src/BaseDoc.py +++ b/src/BaseDoc.py @@ -2,6 +2,8 @@ # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2002 Gary Shao +# Copyright (C) 2007 Brian G. Matherly # # 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,38 +20,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# Modified September 2002 by Gary Shao -# -# 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 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 -# that is not going to be automatically filled and justified than that -# used for normal paragraphs. Examples are
 tags in HTML, using
-#   the Verbatim environment in LaTeX, and using the Preformatted class
-#   in reportlab for generating PDF.
-#
-#   Added another option, FONT_MONOSPACE, for use as a font face. This
-#   calls for a fixed-width font (e.g. Courier). It is intended primarily
-#   for supporting the display of text where alignment by character position
-#   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 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 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
-#   modules the PDF generator is based on does not support them at this
-#   time)
-#
-
 # $Id$
 
 """
@@ -928,8 +898,8 @@ class StyleSheetList:
                 continue
             sheet = self.map[name]
             xml_file.write('\n' % escxml(name))
-            for p_name in sheet.get_names():
-                para = sheet.get_style(p_name)
+            for p_name in sheet.get_paragraph_style_names():
+                para = sheet.get_paragraph_style(p_name)
                 xml_file.write('