diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
| commit | e7248b2fa042f42a5c4dd14cd86ab6a5b4524059 (patch) | |
| tree | 9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/xml | |
| parent | updated to latest trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.tar.gz inkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.zip | |
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/xml')
| -rw-r--r-- | src/xml/Makefile_insert | 51 | ||||
| -rw-r--r-- | src/xml/event.h | 14 | ||||
| -rw-r--r-- | src/xml/node-fns.cpp | 1 | ||||
| -rw-r--r-- | src/xml/rebase-hrefs.cpp | 5 | ||||
| -rw-r--r-- | src/xml/repr-css.cpp | 2 | ||||
| -rw-r--r-- | src/xml/repr-io.cpp | 32 | ||||
| -rw-r--r-- | src/xml/repr-util.cpp | 2 | ||||
| -rw-r--r-- | src/xml/repr.cpp | 2 | ||||
| -rw-r--r-- | src/xml/simple-node.cpp | 3 |
9 files changed, 16 insertions, 96 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..a34df09a5 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> @@ -279,7 +276,7 @@ void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_b #ifdef WIN32 /* Native Windows path separators are replaced with / so that the href * also works on Gnu/Linux and OSX */ - std::replace(href.begin(), href.end(), '\\', '/'); + std::replace(new_href.begin(), new_href.end(), '\\', '/'); #endif ir->setAttribute("xlink:href", new_href.c_str()); } else { 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 6977bc1e2..d8e0f5418 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> @@ -39,7 +39,6 @@ #include "preferences.h" #include <glibmm/miscutils.h> -#include <map> using Inkscape::IO::Writer; using Inkscape::Util::List; @@ -405,7 +404,12 @@ Document *sp_repr_read_mem (const gchar * buffer, gint length, const gchar *defa g_return_val_if_fail (buffer != NULL, NULL); - doc = xmlParseMemory (const_cast<gchar *>(buffer), length); + int parser_options = XML_PARSE_HUGE | XML_PARSE_RECOVER; + parser_options |= XML_PARSE_NONET; // TODO: should we allow network access? + // proper solution would be to check the preference "/options/externalresources/xml/allow_net_access" + // as done in XmlSource::readXml which gets called by the analogous sp_repr_read_file() + // but sp_repr_read_mem() seems to be called in locations where Inkscape::Preferences::get() fails badly + doc = xmlReadMemory (const_cast<gchar *>(buffer), length, NULL, NULL, parser_options); rdoc = sp_repr_do_read (doc, default_ns); if (doc) { @@ -1009,28 +1013,6 @@ void sp_repr_write_stream_element( Node * repr, Writer & out, add_whitespace = false; } - // THIS DOESN'T APPEAR TO DO ANYTHING. Can it be commented out or deleted? - { - GQuark const href_key = g_quark_from_static_string("xlink:href"); - //GQuark const absref_key = g_quark_from_static_string("sodipodi:absref"); - - gchar const *xxHref = 0; - //gchar const *xxAbsref = 0; - for ( List<AttributeRecord const> ai(attributes); ai; ++ai ) { - if ( ai->key == href_key ) { - xxHref = ai->value; - //} else if ( ai->key == absref_key ) { - //xxAbsref = ai->value; - } - } - - // Might add a special case for absref but no href. - if ( old_href_base && new_href_base && xxHref ) { - //g_message("href rebase test with [%s] and [%s]", xxHref, xxAbsref); - //std::string newOne = rebase_href_attrs( old_href_base, new_href_base, xxHref, xxAbsref ); - } - } - for ( List<AttributeRecord const> iter = rebase_href_attrs(old_href_base, new_href_base, attributes); iter ; ++iter ) 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" |
