summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-02 22:44:54 +0000
committerjabiertxof <info@marker.es>2016-10-02 22:44:54 +0000
commit90e142963afd950b2868434075890054aef090b3 (patch)
treeedcaf3d0d85b614e5f327fb58c909ffee5207e26 /src/xml/repr-io.cpp
parentAdded some widgets from caligraphic tool (diff)
parentAdjust dock size to minimum width during canvas table size allocation signal. (diff)
downloadinkscape-90e142963afd950b2868434075890054aef090b3.tar.gz
inkscape-90e142963afd950b2868434075890054aef090b3.zip
Update to trunk and some fixes
(bzr r14865.1.14)
Diffstat (limited to 'src/xml/repr-io.cpp')
-rw-r--r--src/xml/repr-io.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index 4a6f59b43..5f576d00f 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -11,7 +11,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <cstring>
@@ -34,11 +34,11 @@
#include "extension/extension.h"
#include "attribute-rel-util.h"
+#include "attribute-sort-util.h"
#include "preferences.h"
#include <glibmm/miscutils.h>
-#include <map>
using Inkscape::IO::Writer;
using Inkscape::Util::List;
@@ -882,6 +882,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;