summaryrefslogtreecommitdiffstats
path: root/share/extensions
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-08-26 08:44:06 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-08-26 08:44:06 +0000
commit84632bca5511a1daae902bbd9faad00d67fd58bf (patch)
tree2dd483c8d5c7411b9cbac3b263f3f77f86d37c38 /share/extensions
parentlibrevenge: update to latest patch from bug #1323592 (support old and new ver... (diff)
parentUI. Fix for Bug #340723 "Interface inconsistency of tooltips". (diff)
downloadinkscape-84632bca5511a1daae902bbd9faad00d67fd58bf.tar.gz
inkscape-84632bca5511a1daae902bbd9faad00d67fd58bf.zip
update to trunk (r13532)
(bzr r13398.1.8)
Diffstat (limited to 'share/extensions')
-rw-r--r--share/extensions/svg2xaml.inx1
-rwxr-xr-xshare/extensions/svg2xaml.xsl33
2 files changed, 19 insertions, 15 deletions
diff --git a/share/extensions/svg2xaml.inx b/share/extensions/svg2xaml.inx
index da621b8f7..74b8f731a 100644
--- a/share/extensions/svg2xaml.inx
+++ b/share/extensions/svg2xaml.inx
@@ -2,6 +2,7 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<_name>XAML Output</_name>
<id>org.inkscape.output.xaml</id>
+ <param name="silverlight" type="boolean" _gui-text="Silverlight compatible XAML">false</param>
<output>
<extension>.xaml</extension>
<mimetype>text/xml+xaml</mimetype>
diff --git a/share/extensions/svg2xaml.xsl b/share/extensions/svg2xaml.xsl
index 40b1f400b..040e6bcb2 100755
--- a/share/extensions/svg2xaml.xsl
+++ b/share/extensions/svg2xaml.xsl
@@ -3,7 +3,7 @@
<!--
Copyright (c) 2005-2007 authors:
Original version: Toine de Greef (a.degreef@chello.nl)
-Modified (2010-2011) by Nicolas Dufour (nicoduf@yahoo.fr) (blur support, units
+Modified (2010-2014) by Nicolas Dufour (nicoduf@yahoo.fr) (blur support, units
convertion, comments, and some other fixes)
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -39,7 +39,7 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<xsl:strip-space elements="*" />
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
-<xsl:param name="silverlight_compatible" select="2" />
+<xsl:param name="silverlight_compatible" select="$silverlight" />
<!--
// Containers //
@@ -53,10 +53,16 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
-->
<xsl:template match="/">
<xsl:choose>
- <xsl:when test="$silverlight_compatible = 1">
+ <xsl:when test="$silverlight_compatible = 'true'">
+ <xsl:comment>
+ <xsl:value-of select="'This file is compatible with Silverlight'" />
+ </xsl:comment>
<xsl:apply-templates mode="forward" />
</xsl:when>
<xsl:otherwise>
+ <xsl:comment>
+ <xsl:value-of select="'This file is NOT compatible with Silverlight'" />
+ </xsl:comment>
<Viewbox Stretch="Uniform">
<xsl:apply-templates mode="forward" />
</Viewbox>
@@ -837,7 +843,7 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<!--
// Unit to pixel converter //
- Values with units (except %) are converted to pixels and rounded.
+ Values with units (except %) are converted to pixels.
Unknown units are kept.
em, ex and % not implemented
-->
@@ -845,28 +851,25 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<xsl:param name="convert_value" />
<xsl:choose>
<xsl:when test="contains($convert_value, 'px')">
- <xsl:value-of select="round(translate($convert_value, 'px', ''))" />
+ <xsl:value-of select="translate($convert_value, 'px', '')" />
</xsl:when>
<xsl:when test="contains($convert_value, 'pt')">
- <xsl:value-of select="round(translate($convert_value, 'pt', '') * 1.25)" />
+ <xsl:value-of select="translate($convert_value, 'pt', '') * 1.25" />
</xsl:when>
<xsl:when test="contains($convert_value, 'pc')">
- <xsl:value-of select="round(translate($convert_value, 'pc', '') * 15)" />
+ <xsl:value-of select="translate($convert_value, 'pc', '') * 15" />
</xsl:when>
<xsl:when test="contains($convert_value, 'mm')">
- <xsl:value-of select="round(translate($convert_value, 'mm', '') * 3.543307)" />
+ <xsl:value-of select="translate($convert_value, 'mm', '') * 3.543307" />
</xsl:when>
<xsl:when test="contains($convert_value, 'cm')">
- <xsl:value-of select="round(translate($convert_value, 'cm', '') * 35.43307)" />
+ <xsl:value-of select="translate($convert_value, 'cm', '') * 35.43307" />
</xsl:when>
<xsl:when test="contains($convert_value, 'in')">
- <xsl:value-of select="round(translate($convert_value, 'in', '') * 90)" />
+ <xsl:value-of select="translate($convert_value, 'in', '') * 90" />
</xsl:when>
<xsl:when test="contains($convert_value, 'ft')">
- <xsl:value-of select="round(translate($convert_value, 'ft', '') * 1080)" />
- </xsl:when>
- <xsl:when test="not(string(number($convert_value))='NaN')">
- <xsl:value-of select="round($convert_value)" />
+ <xsl:value-of select="translate($convert_value, 'ft', '') * 1080" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$convert_value" />
@@ -2650,7 +2653,7 @@ exclude-result-prefixes="rdf xlink xs exsl libxslt">
<xsl:if test="@d">
<xsl:choose>
- <xsl:when test="$silverlight_compatible = 1">
+ <xsl:when test="$silverlight_compatible = 'true'">
<xsl:attribute name="Data">
<xsl:value-of select="translate(@d , ',', ' ')" />
</xsl:attribute>