Fixed python's changing of "." to "," for internationized formats
svn: r96
This commit is contained in:
@@ -25,6 +25,8 @@ from TextDoc import *
|
||||
from latin_utf8 import latin_to_utf8
|
||||
import const
|
||||
import string
|
||||
import utils
|
||||
cnv = utils.fl2txt
|
||||
|
||||
try:
|
||||
import Image
|
||||
@@ -57,14 +59,16 @@ class AbiWordDoc(TextDoc):
|
||||
self.f.write('orientation="portrait" ')
|
||||
else:
|
||||
self.f.write('orientation="landscape" ')
|
||||
self.f.write('width="%.4f" ' % (self.width/2.54))
|
||||
self.f.write('height="%.4f" ' % (self.height/2.54))
|
||||
self.f.write('width="%s" ' % cnv("%.4f",self.width/2.54))
|
||||
self.f.write('height="%s" ' % cnv("%.4f",self.height/2.54))
|
||||
self.f.write('units="inch" page-scale="1.000000"/>\n')
|
||||
self.f.write('<section ')
|
||||
rmargin = float(self.rmargin)/2.54
|
||||
lmargin = float(self.lmargin)/2.54
|
||||
self.f.write('props="page-margin-right:%.4fin; ' % rmargin)
|
||||
self.f.write('page-margin-left:%.4fin"' % lmargin)
|
||||
self.f.write('props="page-margin-right:%sin; ' % \
|
||||
cnv("%.4f",rmargin))
|
||||
self.f.write('page-margin-left:%sin"' % \
|
||||
cnv("%.4f",lmargin))
|
||||
self.f.write('>\n')
|
||||
|
||||
def close(self):
|
||||
@@ -114,8 +118,10 @@ class AbiWordDoc(TextDoc):
|
||||
|
||||
self.f.write('<image dataid="')
|
||||
self.f.write(tag)
|
||||
self.f.write('" props="width:%.3fin; ' % ((float(act_width)/72.0)/2.54))
|
||||
self.f.write('height:%.3fin"/>' % ((float(act_height)/72.0)/2.54))
|
||||
width = cnv("%.3f",((float(act_width)/72.0)/2.54))
|
||||
height = cnv("%.3f",((float(act_height)/72.0)/2.54))
|
||||
self.f.write('" props="width:%sin; ' % width)
|
||||
self.f.write('height:%sin"/>' % height)
|
||||
|
||||
def start_paragraph(self,style_name):
|
||||
style = self.style_list[style_name]
|
||||
@@ -129,13 +135,13 @@ class AbiWordDoc(TextDoc):
|
||||
self.f.write('text-align:center;')
|
||||
else:
|
||||
self.f.write('text-align:justify;')
|
||||
rmargin = float(style.get_right_margin())/2.54
|
||||
lmargin = float(style.get_left_margin())/2.54
|
||||
indent = float(style.get_first_indent())/2.54
|
||||
self.f.write(' margin-right:%.4fin;' % rmargin)
|
||||
self.f.write(' margin-left:%.4fin;' % lmargin)
|
||||
self.f.write(' tabstops:%.4fin/L;' % lmargin)
|
||||
self.f.write(' text-indent:%.4fin' % indent)
|
||||
rmargin = cnv("%.4f",float(style.get_right_margin())/2.54)
|
||||
lmargin = cnv("%.4f",float(style.get_left_margin())/2.54)
|
||||
indent = cnv("%.4f",float(style.get_first_indent())/2.54)
|
||||
self.f.write(' margin-right:%sin;' % rmargin)
|
||||
self.f.write(' margin-left:%sin;' % lmargin)
|
||||
self.f.write(' tabstops:%sin/L;' % lmargin)
|
||||
self.f.write(' text-indent:%sin' % indent)
|
||||
self.f.write('">')
|
||||
font = style.get_font()
|
||||
self.f.write('<c props="font-family:')
|
||||
|
Reference in New Issue
Block a user