diff options
author | Peter Jentsch <pjotr@guineapics.de> | 2012-05-01 00:24:51 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-09-10 07:56:28 +0200 |
commit | 9f29890d4e4fa916d46eeae081ef6e04eb1bfe81 (patch) | |
tree | 72a90bfd985f928e9e9ed3f54e365a5488dcb250 | |
parent | 3420be984986bcff03d6d127b913fc07372fe89f (diff) |
fix a problem when handling style named for conditional formatting.
Change-Id: Ia8deda31dc4624b1d05d2388c90dbcb17d033269
-rw-r--r-- | filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl index 32e42594633b..15874f2bae90 100644 --- a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl +++ b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl @@ -6981,23 +6981,29 @@ <xsl:with-param name="param-str" select="substring-before($condition-pos-str,$current-pos-str)"/> </xsl:call-template> </xsl:variable> + <xsl:variable name="base-style-name"> + <xsl:choose> + <xsl:when test="@ss:StyleID"> + <xsl:value-of select="@ss:StyleID"/> + </xsl:when> + <xsl:when test="../@ss:StyleID"> + <xsl:value-of select="../@ss:StyleID"/> + </xsl:when> + <xsl:when test="../../@ss:StyleID"> + <xsl:value-of select="../../@ss:StyleID"/> + </xsl:when> + </xsl:choose> + </xsl:variable> <xsl:variable name="style-name"> <xsl:choose> <xsl:when test="contains($condition-pos-str, $current-pos-str) and starts-with($temp-str, 'c')"> - <xsl:value-of select="concat(@ss:StyleID, '-ce', substring-after($temp-str, 'c'))"/> - </xsl:when> - <xsl:otherwise> <xsl:choose> - <xsl:when test="@ss:StyleID"> - <xsl:value-of select="@ss:StyleID"/> - </xsl:when> - <xsl:when test="../@ss:StyleID"> - <xsl:value-of select="../@ss:StyleID"/> - </xsl:when> - <xsl:when test="../../@ss:StyleID"> - <xsl:value-of select="../../@ss:StyleID"/> - </xsl:when> + <xsl:when test="string-length($base-style-name) > 0"><xsl:value-of select="concat($base-style-name, '-ce', substring-after($temp-str, 'c'))"/></xsl:when> + <xsl:otherwise><xsl:value-of select="concat('Default-ce', substring-after($temp-str, 'c'))"/></xsl:otherwise> </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$base-style-name"/> </xsl:otherwise> </xsl:choose> </xsl:variable> |