* src/plugins/FanChart.py: remove print statement

* src/docgen/RTFDoc.py: change from TextDoc to BaseDoc
* src/docgen/PdfDoc.py: change from TextDoc to BaseDoc
* src/docgen/LaTeXDoc.py: change from TextDoc to BaseDoc
* src/docgen/KwordDoc.py: change from TextDoc to BaseDoc
* src/docgen/HtmlDoc.py: change from TextDoc to BaseDoc
* src/docgen/AbiWordDoc.py: change from TextDoc to BaseDoc
* src/docgen/AbiWord2Doc.py: change from TextDoc to BaseDoc


svn: r2036
This commit is contained in:
Don Allingham
2003-08-25 03:11:40 +00:00
parent 3d80f515b2
commit 5f736636a3
8 changed files with 61 additions and 62 deletions

View File

@@ -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.
"""
#-------------------------------------------------------------------------
@@ -29,7 +29,7 @@ Provides a TextDoc based interface to the AbiWord document format.
import os
import base64
import TextDoc
import BaseDoc
from latin_utf8 import latin_to_utf8
import string
import Plugins
@@ -42,14 +42,14 @@ from gettext import gettext as _
# Class Definitions
#
#-------------------------------------------------------------------------
class AbiWordDoc(TextDoc.TextDoc):
"""AbiWord document generator. Inherits from the TextDoc generic
class AbiWordDoc(BaseDoc.BaseDoc):
"""AbiWord document generator. Inherits from the BaseDoc generic
document interface class."""
def __init__(self,styles,type,template,orientation):
"""Initializes the AbiWordDoc class, calling the __init__ routine
of the parent TextDoc class"""
TextDoc.TextDoc.__init__(self,styles,type,template,orientation)
of the parent BaseDoc class"""
BaseDoc.BaseDoc.__init__(self,styles,type,template,orientation)
self.f = None
self.level = 0
self.new_page = 0
@@ -79,7 +79,7 @@ class AbiWordDoc(TextDoc.TextDoc):
self.f.write('version="0.9.6.1" fileformat="1.0">\n')
self.f.write('<pagesize ')
self.f.write('pagetype="%s" ' % self.paper.get_name())
if self.orientation == TextDoc.PAPER_PORTRAIT:
if self.orientation == BaseDoc.PAPER_PORTRAIT:
self.f.write('orientation="portrait" ')
else:
self.f.write('orientation="landscape" ')
@@ -158,11 +158,11 @@ class AbiWordDoc(TextDoc.TextDoc):
self.f.write('<p props="')
self.f.write('margin-top:%.4fin; ' % (float(style.get_padding())/2.54))
self.f.write('margin-bottom:%.4fin; ' % (float(style.get_padding())/2.54))
if style.get_alignment() == TextDoc.PARA_ALIGN_RIGHT:
if style.get_alignment() == BaseDoc.PARA_ALIGN_RIGHT:
self.f.write('text-align:right;')
elif style.get_alignment() == TextDoc.PARA_ALIGN_LEFT:
elif style.get_alignment() == BaseDoc.PARA_ALIGN_LEFT:
self.f.write('text-align:left;')
elif style.get_alignment() == TextDoc.PARA_ALIGN_CENTER:
elif style.get_alignment() == BaseDoc.PARA_ALIGN_CENTER:
self.f.write('text-align:center;')
else:
self.f.write('text-align:justify;')
@@ -176,7 +176,7 @@ class AbiWordDoc(TextDoc.TextDoc):
self.f.write('">')
font = style.get_font()
self.f.write('<c props="font-family:')
if font.get_type_face() == TextDoc.FONT_SANS_SERIF:
if font.get_type_face() == BaseDoc.FONT_SANS_SERIF:
self.f.write('Arial;')
else:
self.f.write('Times New Roman;')
@@ -203,7 +203,7 @@ class AbiWordDoc(TextDoc.TextDoc):
self.current_style = style
font = style.get_font()
self.cdata = '<c props="font-family:'
if font.get_type_face() == TextDoc.FONT_SANS_SERIF:
if font.get_type_face() == BaseDoc.FONT_SANS_SERIF:
self.cdata = self.cdata + 'Arial;'
else:
self.cdata = self.cdata + 'Times New Roman;'
@@ -245,7 +245,7 @@ class AbiWordDoc(TextDoc.TextDoc):
def start_bold(self):
font = self.current_style.get_font()
self.f.write('</c><c props="font-family:')
if font.get_type_face() == TextDoc.FONT_SANS_SERIF:
if font.get_type_face() == BaseDoc.FONT_SANS_SERIF:
self.f.write('Arial;')
else:
self.f.write('Times New Roman;')
@@ -263,7 +263,7 @@ class AbiWordDoc(TextDoc.TextDoc):
def end_bold(self):
font = self.current_style.get_font()
self.f.write('</c><c props="font-family:')
if font.get_type_face() == TextDoc.FONT_SANS_SERIF:
if font.get_type_face() == BaseDoc.FONT_SANS_SERIF:
self.f.write('Arial;')
else:
self.f.write('Times New Roman;')