* src/docgen/KwordDoc.py (write_note): Implement function.
svn: r2516
This commit is contained in:
parent
7878b41dd5
commit
6ae0b14d61
@ -1,3 +1,6 @@
|
||||
2003-12-13 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/docgen/KwordDoc.py (write_note): Implement function.
|
||||
|
||||
2003-12-12 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/docgen/HtmlDoc.py (write_note): Set monospace font family
|
||||
for a preformatted note.
|
||||
|
@ -18,10 +18,13 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
import BaseDoc
|
||||
from latin_utf8 import latin_to_utf8
|
||||
|
||||
import time
|
||||
import string
|
||||
import cStringIO
|
||||
import gzip
|
||||
|
||||
@ -439,6 +442,19 @@ class KwordDoc(BaseDoc.BaseDoc):
|
||||
def horizontal_line(self):
|
||||
pass
|
||||
|
||||
def write_note(self,text,format,style_name):
|
||||
if format == 1:
|
||||
self.start_paragraph(style_name)
|
||||
self.write_text(text)
|
||||
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('<','<');
|
||||
|
Loading…
Reference in New Issue
Block a user