summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-util.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-04-26 09:46:39 +0000
committerMarc Jeanmougin <mc@M0nst3r.bouyguesbox.fr>2015-04-26 09:46:39 +0000
commitac6617a55b9f7c05db084eeaa5684fb42d5e1406 (patch)
tree1fc8e668890618463d48298074559c7fe6bc5040 /src/xml/repr-util.cpp
parentmerge (diff)
parentextensions. ink2canvas.py - do not parse html comments. (Bug 1446204) (diff)
downloadinkscape-ac6617a55b9f7c05db084eeaa5684fb42d5e1406.tar.gz
inkscape-ac6617a55b9f7c05db084eeaa5684fb42d5e1406.zip
merging
(bzr r13922.1.13)
Diffstat (limited to 'src/xml/repr-util.cpp')
-rw-r--r--src/xml/repr-util.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 447f2ff40..3858f08a7 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -32,6 +32,7 @@
#include <2geom/point.h>
#include "svg/stringstream.h"
#include "svg/css-ostringstream.h"
+#include "svg/svg-length.h"
#include "xml/repr.h"
#include "xml/repr-sorting.h"
@@ -502,6 +503,20 @@ unsigned int sp_repr_set_svg_double(Inkscape::XML::Node *repr, gchar const *key,
return true;
}
+/**
+ * For attributes where an exponent is allowed.
+ *
+ * Not suitable for property attributes.
+ */
+unsigned int sp_repr_set_svg_length(Inkscape::XML::Node *repr, gchar const *key, SVGLength &val)
+{
+ g_return_val_if_fail(repr != NULL, FALSE);
+ g_return_val_if_fail(key != NULL, FALSE);
+
+ repr->setAttribute(key, val.write());
+ return true;
+}
+
unsigned sp_repr_set_point(Inkscape::XML::Node *repr, gchar const *key, Geom::Point const & val)
{
g_return_val_if_fail(repr != NULL, FALSE);