lib/avv2word/xslt/base.xslt in avv2word-1.1.26 vs lib/avv2word/xslt/base.xslt in avv2word-1.1.27
- old
+ new
@@ -414,12 +414,13 @@
<xsl:param name="class" select="@class" />
<xsl:param name="style" select="@style" />
<xsl:param name="line-height" select="@line-height" />
<xsl:param name="margin-bottom" select="@margin-bottom" />
<xsl:param name="margin-top" select="@margin-top" />
- <xsl:param name="text-indent" select="@text-indent" />
- <xsl:param name="text-hanging" select="@text-hanging" />
+ <xsl:param name="text-indent" select="@data-avv-padding-left" />
+ <xsl:param name="text-hanging" select="@data-avv-hanging" />
+ <xsl:param name="text-first" select="@data-avv-first" />
<xsl:variable name="alignment">
<xsl:choose>
<xsl:when test="contains(concat(' ', $class, ' '), ' center ') or contains(translate(normalize-space($style),' ',''), 'text-align:center')">center</xsl:when>
<xsl:when test="contains(concat(' ', $class, ' '), ' right ') or contains(translate(normalize-space($style),' ',''), 'text-align:right')">right</xsl:when>
<xsl:when test="contains(concat(' ', $class, ' '), ' left ') or contains(translate(normalize-space($style),' ',''), 'text-align:left')">left</xsl:when>
@@ -433,15 +434,20 @@
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="hanging">
<xsl:choose>
- <xsl:when test="string-length(normalize-space($indent)) > 0 and string-length(normalize-space($text-hanging)) > 0"><xsl:value-of select="$text-hanging"/></xsl:when>
- <xsl:when test="string-length(normalize-space($indent)) > 0">0</xsl:when>
+ <xsl:when test="$text-hanging > 0"><xsl:value-of select="$text-hanging"/></xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
+ <xsl:variable name="first">
+ <xsl:choose>
+ <xsl:when test="$text-first > 0"><xsl:value-of select="$text-first"/></xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:variable name="height">
<xsl:choose>
<xsl:when test="string-length($line-height) > 0"><xsl:value-of select="@line-height"/></xsl:when>
<xsl:otherwise>336</xsl:otherwise>
</xsl:choose>
@@ -459,15 +465,43 @@
</xsl:choose>
</xsl:variable>
<w:pPr>
<w:spacing w:lineRule="atLeast" w:line="{$height}" w:before="{$top}" w:after="{$bottom}"/>
<xsl:choose>
- <xsl:when test="string-length(normalize-space($alignment)) > 0 and string-length(normalize-space($indent)) > 0">
+ <xsl:when test="string-length(normalize-space($alignment)) > 0 and string-length(normalize-space($indent)) > 0 and string-length(normalize-space($hanging)) > 0">
<w:ind w:left="{$indent}" w:hanging="{$hanging}"/>
<w:jc w:val="{$alignment}"/>
</xsl:when>
- <xsl:when test="string-length(normalize-space($indent)) > 0">
+ <xsl:when test="string-length(normalize-space($alignment)) > 0 and string-length(normalize-space($indent)) > 0 and string-length(normalize-space($first)) > 0">
+ <w:ind w:left="{$indent}" w:firstLine="{$first}"/>
+ <w:jc w:val="{$alignment}"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($indent)) > 0 and string-length(normalize-space($hanging)) > 0">
<w:ind w:left="{$indent}" w:hanging="{$hanging}"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($indent)) > 0 and string-length(normalize-space($first)) > 0">
+ <w:ind w:left="{$indent}" w:firstLine="{$first}"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($indent)) > 0 and string-length(normalize-space($alignment)) > 0">
+ <w:ind w:left="{$indent}" w:firstLine="0"/>
+ <w:jc w:val="{$alignment}"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($hanging)) > 0 and string-length(normalize-space($alignment)) > 0">
+ <w:ind w:left="0" w:hanging="{$hanging}"/>
+ <w:jc w:val="{$alignment}"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($first)) > 0 and string-length(normalize-space($alignment)) > 0">
+ <w:ind w:left="0" w:firstLine="{$first}"/>
+ <w:jc w:val="{$alignment}"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($indent)) > 0">
+ <w:ind w:left="{$indent}" w:firstLine="0"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($hanging)) > 0">
+ <w:ind w:left="0" w:hanging="{$hanging}"/>
+ </xsl:when>
+ <xsl:when test="string-length(normalize-space($first)) > 0">
+ <w:ind w:left="0" w:firstLine="{$first}"/>
</xsl:when>
<xsl:when test="string-length(normalize-space($alignment)) > 0">
<w:jc w:val="{$alignment}"/>
</xsl:when>
</xsl:choose>