From a920c6186d15be3386066c365c6e7b7ae74e4caf Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 4 Jan 2017 22:07:53 +0200 Subject: Remove some code that doesn't do anything. There was a comment to this effect there. (bzr r15369.1.13) --- src/xml/repr-io.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/xml') diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index 5f576d00f..ae6f238d4 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -1008,28 +1008,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 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 iter = rebase_href_attrs(old_href_base, new_href_base, attributes); iter ; ++iter ) -- cgit v1.2.3 From ed72a9f7a5d8bf4b20b4a815f5b59dcfec1365bc Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sun, 29 Jan 2017 15:03:48 +0100 Subject: [Bug #1659347] Windows: '/' in relative image links rewritten as '\' on save. Fixed bugs: - https://launchpad.net/bugs/1659347 (bzr r15459) --- src/xml/rebase-hrefs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xml') diff --git a/src/xml/rebase-hrefs.cpp b/src/xml/rebase-hrefs.cpp index 7e3d4fa7e..a34df09a5 100644 --- a/src/xml/rebase-hrefs.cpp +++ b/src/xml/rebase-hrefs.cpp @@ -276,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 { -- cgit v1.2.3