RTF input plugin text align problem.

This commit is contained in:
Sengian 2010-07-16 23:00:32 +02:00
parent 4ad0b4745a
commit b7aacbfb6a
2 changed files with 17 additions and 1 deletions

View File

@ -265,9 +265,20 @@
<xsl:value-of select="@line-height"/>
<xsl:text>pt;</xsl:text>
</xsl:if>
<xsl:if test="(@align = 'just')">
<xsl:text>text-align: justify;</xsl:text>
</xsl:if>
<xsl:if test="(@align = 'cent')">
<xsl:text>text-align: center;</xsl:text>
</xsl:if>
<xsl:if test="(@align = 'left')">
<xsl:text>text-align: left;</xsl:text>
</xsl:if>
<xsl:if test="(@align = 'right')">
<xsl:text>text-align: right;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="rtf:inline">
<xsl:variable name="num-attrs" select="count(@*)"/>
<xsl:choose>

View File

@ -199,6 +199,11 @@ class RTFInput(InputFormatPlugin):
except RtfInvalidCodeException, e:
raise ValueError(_('This RTF file has a feature calibre does not '
'support. Convert it to HTML first and then try it.\n%s')%e)
'''dataxml = open('dataxml.xml', 'w')
dataxml.write(xml)
dataxml.close'''
d = glob.glob(os.path.join('*_rtf_pict_dir', 'picts.rtf'))
if d:
imap = {}