Fixed title in count_anc.py, added superscript for TextDoc

svn: r1485
This commit is contained in:
Don Allingham 2003-05-01 23:35:27 +00:00
parent e635f291f2
commit 07f2a15999
3 changed files with 24 additions and 1 deletions

View File

@ -1059,6 +1059,12 @@ class TextDoc:
def end_bold(self):
pass
def start_superscript(self):
pass
def end_superscript(self):
pass
def start_listing(self,style_name):
"""
Starts a new listing block, using the specified style name.
@ -1129,3 +1135,12 @@ class TextDoc:
text - text to write.
"""
pass
def write_cmdstr(self,text):
"""
Writes the text in the current paragraph. Should only be used after a
start_paragraph and before an end_paragraph.
text - text to write.
"""
pass

View File

@ -177,6 +177,12 @@ class PdfDoc(TextDoc.TextDoc):
def end_bold(self):
self.text = self.text + '</b>'
def start_superscript(self):
self.text = self.text + '<super>'
def end_superscript(self):
self.text = self.text + '</super>'
def start_table(self,name,style_name):
self.in_table = 1
self.cur_table = self.table_styles[style_name]
@ -280,6 +286,8 @@ class PdfDoc(TextDoc.TextDoc):
text = text.replace('&','&amp;'); # Must be first
text = text.replace('<','&lt;');
text = text.replace('>','&gt;');
text = text.replace('&lt;super&gt;','<super>');
text = text.replace('&lt;/super&gt;','</super>');
self.text = self.text + text.replace('\n','<br>');
#------------------------------------------------------------------------

View File

@ -78,7 +78,7 @@ class CountAncestors:
top = topDialog.get_widget("summary")
textwindow = topDialog.get_widget("textwindow")
topDialog.get_widget("summaryTitle").set_text(title)
topDialog.get_widget("title").set_text(title)
textwindow.get_buffer().set_text(text)
top.show()