sxw2rml cannot support for Simplified Chinese Version OpenOffice 1.0 document
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Wishlist
|
OpenERP's Framework R&D |
Bug Description
I used the following python script convert sxw(OpenOffice 1.0 document) to rml document.
<pre>
import zipfile,sys
from pyopenoffice import PyOpenOffice
import StringIO
from lxml import etree
import xml.dom.minidom
import libxslt
import libxml2
fname = r'c:\test.sxw'
xsl_file = './normalized_
z = zipfile.
mimetype = z.read('mimetype')
if mimetype.
xsl_file = './normalized_
xsl = file(xsl_
tool = PyOpenOffice('.', save_pict = False)
sxw_file = fname
res = tool.unpackNorm
styledoc = libxml2.
style = libxslt.
doc = libxml2.
result = style.applyStyl
print result
</pre>
There are some bug of minidom python extended, and I fixed it.
@tiny_sxw2rml.pdf (5.x) or @openerp_
<pre>
</pre>
I fixed it like :
<pre>
....
....
</pre>
and some trouble with "content_styles" variable...
@normalized_
<pre>
<xsl:when test="not(
....
<xsl:when test="contains(
...
<xsl:when test="contains(
...
<xsl:otherwise> <------
...
<xsl:otherwise> <------
...
</pre>
In Simplified Chinese Version OpenOffice 1.0 document, The "fontName" is "宋体", "黑体".
I found in my "test.sxw" file, the normalized_
Then, How to fixed it and add docini/registerFont node to generated rml file. order to let OpenERP to support the Simplified Chinese Version OpenOffice 1.0 document can be convert to rml file.
Thanks...
mrshelly
2011/05/25
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Wishlist |
status: | New → Confirmed |