Remove the write_at function. Use draw_text instead. Add center_text to SVGDoc

svn: r8089
This commit is contained in:
Brian Matherly
2007-02-12 04:55:11 +00:00
parent 02096637b8
commit 2a6e0cb197
11 changed files with 41 additions and 94 deletions

View File

@@ -986,26 +986,6 @@ class OpenOfficeDoc(BaseDoc.BaseDoc):
self.cntnt.write('</text:p>\n')
self.cntnt.write('</draw:text-box>\n')
def write_at(self,style,text,x,y):
pstyle = self.style_list[style]
font = pstyle.get_font()
size = 1.1*(FontScale.string_width(font,text)/72.0) * 2.54
self.cntnt.write('<draw:text-box text:anchor-type="paragraph" ')
self.cntnt.write('draw:z-index="0" ')
self.cntnt.write('svg:width="%.3fcm" ' % size)
self.cntnt.write('svg:height="%.3fpt" ' % font.get_size())
self.cntnt.write('svg:x="%.3fcm" ' % x)
self.cntnt.write('svg:y="%.3fcm">\n' % float(y))
if text != "":
self.cntnt.write('<text:p text:style-name="X%s">' % style)
self.cntnt.write(text)
self.cntnt.write('</text:p>\n')
self.cntnt.write('</draw:text-box>\n')
#--------------------------------------------------------------------------
#
# Register plugins