summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-06-12 10:10:38 +0000
committerjabiertxof <info@marker.es>2016-06-12 10:10:38 +0000
commit1d8ffb222283c4de342de6056c18d20165056814 (patch)
treec94a6381828a39eae79cc2d130c413cc9416966c /src/xml/repr-io.cpp
parentHandle path add and remove nodes (diff)
parentOptionally sort attributes and properties into a canonical order. (diff)
downloadinkscape-1d8ffb222283c4de342de6056c18d20165056814.tar.gz
inkscape-1d8ffb222283c4de342de6056c18d20165056814.zip
update to trunk
(bzr r13645.1.151)
Diffstat (limited to 'src/xml/repr-io.cpp')
-rw-r--r--src/xml/repr-io.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index 4a6f59b43..6977bc1e2 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -34,6 +34,7 @@
#include "extension/extension.h"
#include "attribute-rel-util.h"
+#include "attribute-sort-util.h"
#include "preferences.h"
@@ -882,6 +883,10 @@ static void sp_repr_write_stream_root_element(Node *repr, Writer &out,
bool clean = prefs->getBool("/options/svgoutput/check_on_writing");
if (clean) sp_attribute_clean_tree( repr );
+ // Sort attributes in a canonical order (helps with "diffing" SVG files).
+ bool sort = prefs->getBool("/options/svgoutput/sort_attributes");
+ if (sort) sp_attribute_sort_tree( repr );
+
Glib::QueryQuark xml_prefix=g_quark_from_static_string("xml");
NSMap ns_map;