ODFdoc : issues 3439, 3440, 3461 and 3462.

svn: r13867
This commit is contained in:
Serge Noiraud 2009-12-20 23:51:18 +00:00
parent 5f1ffc9f6a
commit 06f3521239

View File

@ -216,7 +216,8 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
self.cntnt1.write(':xmlns:script:1.0" ') self.cntnt1.write(':xmlns:script:1.0" ')
self.cntnt1.write('xmlns:dom="http://www.w3.org/2001/xml-events" ') self.cntnt1.write('xmlns:dom="http://www.w3.org/2001/xml-events" ')
self.cntnt1.write('xmlns:xforms="http://www.w3.org/2002/xforms" ') self.cntnt1.write('xmlns:xforms="http://www.w3.org/2002/xforms" ')
self.cntnt1.write('office:class="text" office:version="1.0">\n') #self.cntnt1.write('office:class="text" office:version="1.0">\n')
self.cntnt1.write('office:version="1.0">\n')
self.cntnt1.write('<office:scripts/>\n') self.cntnt1.write('<office:scripts/>\n')
self.cntnt1.write('<office:font-face-decls>\n') self.cntnt1.write('<office:font-face-decls>\n')
self.cntnt1.write('<style:font-face style:name="Courier" ') self.cntnt1.write('<style:font-face style:name="Courier" ')
@ -1340,8 +1341,8 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
self.meta.write('<dc:date>') self.meta.write('<dc:date>')
self.meta.write(self.time) self.meta.write(self.time)
self.meta.write('</dc:date>\n') self.meta.write('</dc:date>\n')
self.meta.write('<dc:keyword>') #self.meta.write('<dc:keyword>')
self.meta.write('</dc:keyword>\n') #self.meta.write('</dc:keyword>\n')
self.meta.write('<meta:print-date>0-00-00T00:00:00</meta:print-date>\n') self.meta.write('<meta:print-date>0-00-00T00:00:00</meta:print-date>\n')
self.meta.write('<dc:language>%s</dc:language>\n' % self.lang) self.meta.write('<dc:language>%s</dc:language>\n' % self.lang)
self.meta.write('<meta:editing-cycles>1</meta:editing-cycles>\n') self.meta.write('<meta:editing-cycles>1</meta:editing-cycles>\n')
@ -1408,8 +1409,8 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
maxx = max(point[0], maxx) maxx = max(point[0], maxx)
maxy = max(point[1], maxy) maxy = max(point[1], maxy)
self.cntnt.write('<draw:polygon draw:style-name="%s" ') self.cntnt.write('<draw:polygon draw:style-name="%s" ' % style )
self.cntnt.write('draw:layer="layout" ' % style) self.cntnt.write('draw:layer="layout" ')
self.cntnt.write('draw:z-index="1" ') self.cntnt.write('draw:z-index="1" ')
x = int((minx)*1000) x = int((minx)*1000)
y = int((miny)*1000) y = int((miny)*1000)
@ -1467,10 +1468,11 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
self.cntnt.write('svg:y="%.2fcm">' % float(y)) self.cntnt.write('svg:y="%.2fcm">' % float(y))
self.cntnt.write('<draw:text-box> ' ) self.cntnt.write('<draw:text-box> ' )
self.cntnt.write('<text:p text:style-name="F%s">' % para_name) self.cntnt.write('<text:p text:style-name="F%s">' % para_name)
self.cntnt.write('<text:span text:style-name="F%s"' % para_name) #self.cntnt.write('<text:span text:style-name="F%s"' % para_name)
self.cntnt.write(' fo:max-height="%.2f">' % font.get_size() ) #self.cntnt.write(' fo:max-height="%.2f">' % font.get_size() )
self.cntnt.write(escape(text, _esc_map)) self.cntnt.write(escape(text, _esc_map))
self.cntnt.write('</text:span></text:p>') #self.cntnt.write('</text:span>')
self.cntnt.write('</text:p>')
self.cntnt.write('</draw:text-box>\n') self.cntnt.write('</draw:text-box>\n')
self.cntnt.write('</draw:frame>\n') self.cntnt.write('</draw:frame>\n')