summaryrefslogtreecommitdiffstats
path: root/src/xml
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
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')
-rw-r--r--src/xml/Makefile_insert51
-rw-r--r--src/xml/event.h14
-rw-r--r--src/xml/node-fns.cpp1
-rw-r--r--src/xml/rebase-hrefs.cpp3
-rw-r--r--src/xml/repr-css.cpp2
-rw-r--r--src/xml/repr-io.cpp8
-rw-r--r--src/xml/repr-util.cpp2
-rw-r--r--src/xml/repr.cpp2
-rw-r--r--src/xml/simple-node.cpp3
9 files changed, 14 insertions, 72 deletions
diff --git a/src/xml/Makefile_insert b/src/xml/Makefile_insert
deleted file mode 100644
index da55d7f7e..000000000
--- a/src/xml/Makefile_insert
+++ /dev/null
@@ -1,51 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- xml/comment-node.h \
- xml/composite-node-observer.cpp xml/composite-node-observer.h \
- xml/element-node.h \
- xml/helper-observer.cpp \
- xml/helper-observer.h \
- xml/node-observer.h \
- xml/quote.cpp \
- xml/quote.h \
- xml/repr-css.cpp \
- xml/log-builder.cpp \
- xml/log-builder.h \
- xml/node-fns.cpp \
- xml/node-fns.h \
- xml/pi-node.h \
- xml/rebase-hrefs.cpp \
- xml/rebase-hrefs.h \
- xml/repr-io.cpp \
- xml/repr-sorting.cpp \
- xml/repr-sorting.h \
- xml/repr-util.cpp \
- xml/repr.cpp \
- xml/repr.h \
- xml/simple-document.h \
- xml/simple-document.cpp \
- xml/simple-node.h \
- xml/simple-node.cpp \
- xml/node.h \
- xml/croco-node-iface.cpp \
- xml/croco-node-iface.h \
- xml/attribute-record.h \
- xml/sp-css-attr.h \
- xml/event.cpp xml/event.h xml/event-fns.h \
- xml/document.h \
- xml/node-event-vector.h \
- xml/node-iterators.h \
- xml/sp-css-attr.h \
- xml/subtree.cpp \
- xml/subtree.h \
- xml/text-node.h \
- xml/invalid-operation-exception.h
-
-# ######################
-# ### CxxTest stuff ####
-# ######################
-CXXTEST_TESTSUITES += \
- $(srcdir)/xml/rebase-hrefs-test.h \
- $(srcdir)/xml/repr-action-test.h \
- $(srcdir)/xml/quote-test.h
diff --git a/src/xml/event.h b/src/xml/event.h
index 73e68daeb..f6b734c29 100644
--- a/src/xml/event.h
+++ b/src/xml/event.h
@@ -33,13 +33,13 @@ namespace XML {
/**
* @brief Enumeration of all XML event types
*/
-enum EventType {
- EVENT_ADD, ///< Child added
- EVENT_DEL, ///< Child removed
- EVENT_CHG_ATTR, ///< Attribute changed
- EVENT_CHG_CONTENT, ///< Content changed
- EVENT_CHG_ORDER ///< Order of children changed
-};
+// enum EventType {
+// EVENT_ADD, ///< Child added
+// EVENT_DEL, ///< Child removed
+// EVENT_CHG_ATTR, ///< Attribute changed
+// EVENT_CHG_CONTENT, ///< Content changed
+// EVENT_CHG_ORDER ///< Order of children changed
+// };
/**
* @brief Generic XML modification event
diff --git a/src/xml/node-fns.cpp b/src/xml/node-fns.cpp
index eb3870978..e1506e3f2 100644
--- a/src/xml/node-fns.cpp
+++ b/src/xml/node-fns.cpp
@@ -1,5 +1,4 @@
#ifdef HAVE_CONFIG_H
-# include "config.h"
#endif
#include <map>
diff --git a/src/xml/rebase-hrefs.cpp b/src/xml/rebase-hrefs.cpp
index a8ac3b4cc..7e3d4fa7e 100644
--- a/src/xml/rebase-hrefs.cpp
+++ b/src/xml/rebase-hrefs.cpp
@@ -4,10 +4,7 @@
#include "io/sys.h"
#include "sp-object.h"
#include "streq.h"
-#include "util/share.h"
-#include "xml/attribute-record.h"
#include "xml/node.h"
-#include <glib.h>
#include <glibmm/miscutils.h>
#include <glibmm/convert.h>
#include <glibmm/uriutils.h>
diff --git a/src/xml/repr-css.cpp b/src/xml/repr-css.cpp
index c043904a7..9590fa97f 100644
--- a/src/xml/repr-css.cpp
+++ b/src/xml/repr-css.cpp
@@ -26,10 +26,8 @@
#include "xml/repr.h"
#include "xml/simple-document.h"
-#include "xml/simple-node.h"
#include "xml/sp-css-attr.h"
#include "style.h"
-#include "libcroco/cr-sel-eng.h"
using Inkscape::Util::List;
using Inkscape::XML::AttributeRecord;
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;
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index ce93bccab..4d093a4ea 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -17,8 +17,6 @@
#include "config.h"
-#include <math.h>
-
#if HAVE_STRING_H
# include <cstring>
#endif
diff --git a/src/xml/repr.cpp b/src/xml/repr.cpp
index 0a384c9c1..8ad1ac06b 100644
--- a/src/xml/repr.cpp
+++ b/src/xml/repr.cpp
@@ -17,7 +17,7 @@
#define noREPR_VERBOSE
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include <config.h>
#endif
#include <cstring>
diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp
index 3cbedc80b..6bd47fd22 100644
--- a/src/xml/simple-node.cpp
+++ b/src/xml/simple-node.cpp
@@ -21,14 +21,11 @@
#include "preferences.h"
-#include "xml/node.h"
#include "xml/simple-node.h"
#include "xml/node-event-vector.h"
#include "xml/node-fns.h"
-#include "xml/repr.h"
#include "debug/event-tracker.h"
#include "debug/simple-event.h"
-#include "util/share.h"
#include "util/format.h"
#include "attribute-rel-util.h"