summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2016-06-12 10:52:33 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2016-06-12 10:52:33 +0000
commit013ba80c5b0115dbb0f6da01e1f42806a4037eb8 (patch)
treefe8d764a8e808c2084df8ace149d472109f3ae25 /src/xml/repr-io.cpp
parentFixed Bool LPE review issues (diff)
parentOptionally sort attributes and properties into a canonical order. (diff)
downloadinkscape-013ba80c5b0115dbb0f6da01e1f42806a4037eb8.tar.gz
inkscape-013ba80c5b0115dbb0f6da01e1f42806a4037eb8.zip
updated to latest trunk
(bzr r14876.2.3)
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;