* src/docgen/OpenDrawDoc.py: add support for superscripts
* src/docgen/OpenOfficeDoc.py: add support for superscripts * src/plugins/Ancestors.py: New Ancestors report added svn: r1727
This commit is contained in:
parent
5b15e209cc
commit
f9c3e6291f
@ -108,6 +108,8 @@ class OpenDrawDoc(DrawDoc.DrawDoc):
|
||||
self.f.write('style:font-pitch="variable"/>\n')
|
||||
self.f.write('</office:font-decls>\n')
|
||||
self.f.write('<office:automatic-styles>\n')
|
||||
self.f.write('<style:style style:name="GSuper" style:family="text">')
|
||||
self.f.write('<style:properties style:text-position="super 58%"/>')
|
||||
self.f.write('<style:style style:name="P1" style:family="paragraph">\n')
|
||||
self.f.write('<style:properties fo:margin-left="0cm" ')
|
||||
self.f.write('fo:margin-right="0cm" fo:text-indent="0cm"/>\n')
|
||||
@ -366,8 +368,13 @@ class OpenDrawDoc(DrawDoc.DrawDoc):
|
||||
self.f.write('</text:p>\n')
|
||||
|
||||
def write_text(self,text):
|
||||
text = string.replace(text,'\t','<text:tab-stop/>')
|
||||
text = string.replace(text,'\n','<text:line-break/>')
|
||||
text = text.replace('&','&'); # Must be first
|
||||
text = text.replace('\t','<text:tab-stop/>')
|
||||
text = text.replace('\n','<text:line-break/>')
|
||||
text = text.replace('<','<');
|
||||
text = text.replace('>','>');
|
||||
text = text.replace('<super>','<text:span text:style-name="GSuper">')
|
||||
text = text.replace('</super>','</text:span>')
|
||||
self.f.write(text)
|
||||
|
||||
def _write_manifest(self):
|
||||
|
@ -113,6 +113,10 @@ class OpenOfficeDoc(TextDoc.TextDoc):
|
||||
self.f.write('style:font-pitch="variable"/>\n')
|
||||
self.f.write('</office:font-decls>\n')
|
||||
self.f.write('<office:automatic-styles>\n')
|
||||
self.f.write('<style:style style:name="GSuper" style:family="text">')
|
||||
self.f.write('<style:properties style:text-position="super 58%"/>')
|
||||
self.f.write('</style:style>\n')
|
||||
|
||||
for style_name in self.style_list.keys():
|
||||
style = self.style_list[style_name]
|
||||
self.f.write('<style:style style:name="NL')
|
||||
@ -525,6 +529,8 @@ class OpenOfficeDoc(TextDoc.TextDoc):
|
||||
text = string.replace(text,'<','<');
|
||||
text = string.replace(text,'>','>');
|
||||
text = string.replace(text,'\n','<text:line-break/>')
|
||||
text = text.replace('<super>','<text:span text:style-name="GSuper">')
|
||||
text = text.replace('</super>','</text:span>')
|
||||
self.f.write(text)
|
||||
|
||||
def _write_manifest(self):
|
||||
|
Loading…
Reference in New Issue
Block a user