diff --git a/ChangeLog b/ChangeLog index be5b3643e..f39a46eed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2003-12-13 Alex Roitman + * src/docgen/KwordDoc.py (write_note): Implement function. + 2003-12-12 Alex Roitman * src/docgen/HtmlDoc.py (write_note): Set monospace font family for a preformatted note. diff --git a/src/docgen/KwordDoc.py b/src/docgen/KwordDoc.py index 57928e7dc..82ba48e96 100644 --- a/src/docgen/KwordDoc.py +++ b/src/docgen/KwordDoc.py @@ -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('<','<');