* src/docgen/KwordDoc.py (write_note): Implement function.
svn: r2516
This commit is contained in:
parent
4194a587a8
commit
5822f74770
@ -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