* 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:
@@ -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('&','&'); # Must be first
|
||||
text = text.replace('<','<');
|
||||
|
||||
Reference in New Issue
Block a user