* 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>
|
2003-12-12 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* src/docgen/HtmlDoc.py (write_note): Set monospace font family
|
* src/docgen/HtmlDoc.py (write_note): Set monospace font family
|
||||||
for a preformatted note.
|
for a preformatted note.
|
||||||
|
@ -18,10 +18,13 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from latin_utf8 import latin_to_utf8
|
from latin_utf8 import latin_to_utf8
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
import string
|
||||||
import cStringIO
|
import cStringIO
|
||||||
import gzip
|
import gzip
|
||||||
|
|
||||||
@ -439,6 +442,19 @@ class KwordDoc(BaseDoc.BaseDoc):
|
|||||||
def horizontal_line(self):
|
def horizontal_line(self):
|
||||||
pass
|
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):
|
def write_text(self,text):
|
||||||
text = text.replace('&','&'); # Must be first
|
text = text.replace('&','&'); # Must be first
|
||||||
text = text.replace('<','<');
|
text = text.replace('<','<');
|
||||||
|
Loading…
Reference in New Issue
Block a user