From 8a1ccd0768566c11cacc4c95b001673fad7fdf6a Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Wed, 31 Jan 2007 03:13:31 +0000 Subject: [PATCH] * src/docgen/ODFDoc.py: add start_superscript and stop_superscript * src/docgen/KwordDoc.py: add start_superscript and stop_superscript * src/docgen/RTFDoc.py: add start_superscript and stop_superscript * src/docgen/HtmlDoc.py: add start_superscript and stop_superscript * src/docgen/OpenOfficeDoc.py: add start_superscript and stop_superscript * src/docgen/LaTeXDoc.py: add start_superscript and stop_superscript svn: r8019 --- gramps2/ChangeLog | 8 ++++++++ gramps2/src/docgen/HtmlDoc.py | 6 ++++++ gramps2/src/docgen/KwordDoc.py | 9 +++++++++ gramps2/src/docgen/LaTeXDoc.py | 6 ++++++ gramps2/src/docgen/ODFDoc.py | 6 ++++++ gramps2/src/docgen/OpenOfficeDoc.py | 6 ++++++ gramps2/src/docgen/RTFDoc.py | 6 ++++++ 7 files changed, 47 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 22591b00c..d4ab8dde8 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,11 @@ +2007-01-30 Brian Matherly + * src/docgen/ODFDoc.py: add start_superscript and stop_superscript + * src/docgen/KwordDoc.py: add start_superscript and stop_superscript + * src/docgen/RTFDoc.py: add start_superscript and stop_superscript + * src/docgen/HtmlDoc.py: add start_superscript and stop_superscript + * src/docgen/OpenOfficeDoc.py: add start_superscript and stop_superscript + * src/docgen/LaTeXDoc.py: add start_superscript and stop_superscript + 2007-01-30 Don Allingham * src/plugins/EventCmp.py: (#886) properly handle CANCEL on save dialog * src/ReportBase/_ReportDialog.py: error reporting diff --git a/gramps2/src/docgen/HtmlDoc.py b/gramps2/src/docgen/HtmlDoc.py index 797e47172..42250572e 100644 --- a/gramps2/src/docgen/HtmlDoc.py +++ b/gramps2/src/docgen/HtmlDoc.py @@ -469,6 +469,12 @@ class HtmlDoc(BaseDoc.BaseDoc): def end_bold(self): self.f.write('') + + def start_superscript(self): + self.f.write('') + + def end_superscript(self): + self.f.write('') def write_note(self,text,format,style_name): if format == 1: diff --git a/gramps2/src/docgen/KwordDoc.py b/gramps2/src/docgen/KwordDoc.py index 8b20bacc9..45e0dd064 100644 --- a/gramps2/src/docgen/KwordDoc.py +++ b/gramps2/src/docgen/KwordDoc.py @@ -390,6 +390,15 @@ class KwordDoc(BaseDoc.BaseDoc): txt = '\n' % (self.bold_start,length) txt = txt + '\n\n\n' % self.font_face self.format_list.append(txt) + + def start_superscript(self): + self.sup_start = len(self.text) + + def end_superscript(self): + length = len(self.text) - self.sup_start + txt = '\n' % (self.sup_start, length) + txt = txt + '\n' + self.format_list.append(txt) def start_table(self,name,style_name): self.tbl= self.table_styles[style_name] diff --git a/gramps2/src/docgen/LaTeXDoc.py b/gramps2/src/docgen/LaTeXDoc.py index 0854216e6..c81800032 100644 --- a/gramps2/src/docgen/LaTeXDoc.py +++ b/gramps2/src/docgen/LaTeXDoc.py @@ -374,6 +374,12 @@ class LaTeXDoc(BaseDoc.BaseDoc): def end_bold(self): """End bold face""" self.f.write('}') + + def start_superscript(self): + self.f.write('\\textsuperscript{') + + def end_superscript(self): + self.f.write('}') def start_table(self,name,style_name): """Begin new table""" diff --git a/gramps2/src/docgen/ODFDoc.py b/gramps2/src/docgen/ODFDoc.py index ac629d35b..c271a7a60 100644 --- a/gramps2/src/docgen/ODFDoc.py +++ b/gramps2/src/docgen/ODFDoc.py @@ -505,6 +505,12 @@ class ODFDoc(BaseDoc.BaseDoc): def end_bold(self): self.cntnt.write('') + + def start_superscript(self): + self.cntnt.write('') + + def end_superscript(self): + self.cntnt.write('') def _add_zip(self,zfile,name,data,t): zipinfo = zipfile.ZipInfo(name.encode('latin-1')) diff --git a/gramps2/src/docgen/OpenOfficeDoc.py b/gramps2/src/docgen/OpenOfficeDoc.py index 30c2b4950..cc401c3c3 100644 --- a/gramps2/src/docgen/OpenOfficeDoc.py +++ b/gramps2/src/docgen/OpenOfficeDoc.py @@ -471,6 +471,12 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): def end_bold(self): self.cntnt.write('') + + def start_superscript(self): + self.cntnt.write('') + + def end_superscript(self): + self.cntnt.write('') def _add_zip(self,zfile,name,data,t): zipinfo = zipfile.ZipInfo(name.encode('latin-1')) diff --git a/gramps2/src/docgen/RTFDoc.py b/gramps2/src/docgen/RTFDoc.py index b914731ca..b8a46e59f 100644 --- a/gramps2/src/docgen/RTFDoc.py +++ b/gramps2/src/docgen/RTFDoc.py @@ -256,6 +256,12 @@ class RTFDoc(BaseDoc.BaseDoc): self.opened = 0 self.f.write('}') + def start_superscript(self): + self.text = self.text + '{{\*\updnprop5801}\up10 ' + + def end_superscript(self): + self.text = self.text + '}' + #-------------------------------------------------------------------- # # Start a table. Grab the table style, and store it. Keep a flag to