|
@@ -114,18 +114,43 @@
|
|
|
<xsl:variable name="textAlignment"
|
|
<xsl:variable name="textAlignment"
|
|
|
select="CommonProperties/HorizontalAlign/@value"></xsl:variable>
|
|
select="CommonProperties/HorizontalAlign/@value"></xsl:variable>
|
|
|
<!-- horizontal align -->
|
|
<!-- horizontal align -->
|
|
|
- <xsl:attribute name="textAlignment">
|
|
|
|
|
|
|
+ <xsl:if test="$textAlignment">
|
|
|
|
|
+ <xsl:attribute name="textAlignment">
|
|
|
<xsl:choose>
|
|
<xsl:choose>
|
|
|
<xsl:when test="$textAlignment='1'">Left</xsl:when>
|
|
<xsl:when test="$textAlignment='1'">Left</xsl:when>
|
|
|
<xsl:when test="$textAlignment='2'">Center</xsl:when>
|
|
<xsl:when test="$textAlignment='2'">Center</xsl:when>
|
|
|
<xsl:when test="$textAlignment='3'">Right</xsl:when>
|
|
<xsl:when test="$textAlignment='3'">Right</xsl:when>
|
|
|
</xsl:choose>
|
|
</xsl:choose>
|
|
|
</xsl:attribute>
|
|
</xsl:attribute>
|
|
|
|
|
+ </xsl:if>
|
|
|
<!-- font -->
|
|
<!-- font -->
|
|
|
<font fontName="Microsoft YaHei UI">
|
|
<font fontName="Microsoft YaHei UI">
|
|
|
<!-- font size -->
|
|
<!-- font size -->
|
|
|
<xsl:attribute name="size"><xsl:value-of
|
|
<xsl:attribute name="size"><xsl:value-of
|
|
|
select="round(Element/Element/FontProperties/FontSize/@value div $positionRate * 0.75)" /></xsl:attribute>
|
|
select="round(Element/Element/FontProperties/FontSize/@value div $positionRate * 0.75)" /></xsl:attribute>
|
|
|
|
|
+ <!-- font style -->
|
|
|
|
|
+ <xsl:variable name="fontStyle"
|
|
|
|
|
+ select="Element/Element/FontProperties/FontStyle/@value"></xsl:variable>
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$fontStyle mod 4 ='1'">
|
|
|
|
|
+ <xsl:attribute name="isBold">true</xsl:attribute>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="$fontStyle mod 4 ='2'">
|
|
|
|
|
+ <xsl:attribute name="isItalic">true</xsl:attribute>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="$fontStyle mod 4 ='3'">
|
|
|
|
|
+ <xsl:attribute name="isBold">true</xsl:attribute>
|
|
|
|
|
+ <xsl:attribute name="isItalic">true</xsl:attribute>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ <!-- font underline -->
|
|
|
|
|
+ <xsl:if test="Element/Element/FontProperties/Underline/@value">
|
|
|
|
|
+ <xsl:attribute name="isUnderline">true</xsl:attribute>
|
|
|
|
|
+ </xsl:if>
|
|
|
|
|
+ <!-- font strikethrough -->
|
|
|
|
|
+ <xsl:if test="Element/Element/FontProperties/Strikeout/@value">
|
|
|
|
|
+ <xsl:attribute name="isStrikeThrough">true</xsl:attribute>
|
|
|
|
|
+ </xsl:if>
|
|
|
</font>
|
|
</font>
|
|
|
</textElement>
|
|
</textElement>
|
|
|
<text>
|
|
<text>
|
|
@@ -133,6 +158,84 @@
|
|
|
</text>
|
|
</text>
|
|
|
</staticText>
|
|
</staticText>
|
|
|
</xsl:when>
|
|
</xsl:when>
|
|
|
|
|
+ <!-- textField -->
|
|
|
|
|
+ <xsl:when test="$type='FieldElement'">
|
|
|
|
|
+ <textField isBlankWhenNull="true">
|
|
|
|
|
+ <reportElement mode="Opaque">
|
|
|
|
|
+ <!-- position -->
|
|
|
|
|
+ <xsl:attribute name="x">
|
|
|
|
|
+ <xsl:value-of select="round(@x_position div $positionRate)" />
|
|
|
|
|
+ </xsl:attribute>
|
|
|
|
|
+ <xsl:attribute name="y">
|
|
|
|
|
+ <xsl:value-of select="round(@y_position div $positionRate)" />
|
|
|
|
|
+ </xsl:attribute>
|
|
|
|
|
+ <xsl:attribute name="width">
|
|
|
|
|
+ <xsl:value-of select="round(@width div $positionRate)" />
|
|
|
|
|
+ </xsl:attribute>
|
|
|
|
|
+ <xsl:attribute name="height">
|
|
|
|
|
+ <xsl:value-of select="round(@height div $positionRate)" />
|
|
|
|
|
+ </xsl:attribute>
|
|
|
|
|
+ </reportElement>
|
|
|
|
|
+ <textElement verticalAlignment="Middle">
|
|
|
|
|
+ <xsl:variable name="textAlignment"
|
|
|
|
|
+ select="CommonProperties/HorizontalAlign/@value"></xsl:variable>
|
|
|
|
|
+ <!-- horizontal align -->
|
|
|
|
|
+ <xsl:if test="$textAlignment">
|
|
|
|
|
+ <xsl:attribute name="textAlignment">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$textAlignment='1'">Left</xsl:when>
|
|
|
|
|
+ <xsl:when test="$textAlignment='2'">Center</xsl:when>
|
|
|
|
|
+ <xsl:when test="$textAlignment='3'">Right</xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:attribute>
|
|
|
|
|
+ </xsl:if>
|
|
|
|
|
+ <!-- font -->
|
|
|
|
|
+ <font fontName="Microsoft YaHei UI">
|
|
|
|
|
+ <!-- font size -->
|
|
|
|
|
+ <xsl:attribute name="size"><xsl:value-of
|
|
|
|
|
+ select="round(FontProperties/FontSize/@value div $positionRate * 0.75)" /></xsl:attribute>
|
|
|
|
|
+ <!-- font style -->
|
|
|
|
|
+ <xsl:variable name="fontStyle"
|
|
|
|
|
+ select="FontProperties/FontStyle/@value"></xsl:variable>
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$fontStyle mod 4 ='1'">
|
|
|
|
|
+ <xsl:attribute name="isBold">true</xsl:attribute>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="$fontStyle mod 4 ='2'">
|
|
|
|
|
+ <xsl:attribute name="isItalic">true</xsl:attribute>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="$fontStyle mod 4 ='3'">
|
|
|
|
|
+ <xsl:attribute name="isBold">true</xsl:attribute>
|
|
|
|
|
+ <xsl:attribute name="isItalic">true</xsl:attribute>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ <!-- font underline -->
|
|
|
|
|
+ <xsl:if test="FontProperties/Underline/@value">
|
|
|
|
|
+ <xsl:attribute name="isUnderline">true</xsl:attribute>
|
|
|
|
|
+ </xsl:if>
|
|
|
|
|
+ <!-- font strikethrough -->
|
|
|
|
|
+ <xsl:if test="FontProperties/Strikeout/@value">
|
|
|
|
|
+ <xsl:attribute name="isStrikeThrough">true</xsl:attribute>
|
|
|
|
|
+ </xsl:if>
|
|
|
|
|
+ </font>
|
|
|
|
|
+ </textElement>
|
|
|
|
|
+ <!-- textFieldExpression -->
|
|
|
|
|
+ <xsl:if test="Reference">
|
|
|
|
|
+ <xsl:variable name="type" select="Reference/@type"></xsl:variable>
|
|
|
|
|
+ <xsl:variable name="value" select="Reference/@value"></xsl:variable>
|
|
|
|
|
+ <textFieldExpression>
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$type='DatabaseField'">
|
|
|
|
|
+ $F{<xsl:value-of select="substring-after($value,'.')"></xsl:value-of>}
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="$type='FormulaField'">
|
|
|
|
|
+ <xsl:value-of select="$value"></xsl:value-of>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </textFieldExpression>
|
|
|
|
|
+ </xsl:if>
|
|
|
|
|
+ </textField>
|
|
|
|
|
+ </xsl:when>
|
|
|
</xsl:choose>
|
|
</xsl:choose>
|
|
|
</xsl:for-each>
|
|
</xsl:for-each>
|
|
|
</band>
|
|
</band>
|