* src/docgen/LaTeXDoc.py (write_note): Implement function.

* src/docgen/PdfDoc.py (write_note): Implement function.
* src/docgen/RTFDoc.py (write_note): Implement function.
* src/docgen/AbiWordDoc.py (write_note): Implement function.
* src/docgen/AbiWord2Doc.py (write_note): Implement function.


svn: r2513
This commit is contained in:
Alex Roitman
2003-12-13 04:05:01 +00:00
parent e962ebe517
commit 570fd76a2f
6 changed files with 108 additions and 8 deletions

View File

@@ -27,6 +27,7 @@ Provides a BaseDoc based interface to the AbiWord document format.
#
#-------------------------------------------------------------------------
import base64
import string
import BaseDoc
import Errors
@@ -220,6 +221,20 @@ class AbiWordDoc(BaseDoc.BaseDoc):
def end_paragraph(self):
self.f.write('</p>\n')
def write_note(self,text,format,style_name):
if format == 1:
for line in text.split('\n'):
self.start_paragraph(style_name)
self.write_text(line)
self.end_paragraph()
elif format == 0:
for line in text.split('\n\n'):
self.start_paragraph(style_name)
line = line.replace('\n',' ')
line = string.join(string.split(line))
self.write_text(line)
self.end_paragraph()
def write_text(self,text):
text = text.replace('&','&amp;'); # Must be first
text = text.replace('<','&lt;');