From d1947e768272c703674129d5c583204ff2b59251 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 13 Jul 2016 13:36:19 +0200 Subject: Second part of new SPObject children list (bzr r14954.1.19) --- src/id-clash.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/id-clash.cpp') diff --git a/src/id-clash.cpp b/src/id-clash.cpp index 4bd66e858..fecad9eee 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -187,9 +187,9 @@ find_references(SPObject *elem, refmap_type &refmap) } // recurse - for (SPObject *child = elem->firstChild(); child; child = child->getNext() ) + for (auto& child: elem->_children) { - find_references(child, refmap); + find_references(&child, refmap); } } @@ -242,9 +242,9 @@ change_clashing_ids(SPDocument *imported_doc, SPDocument *current_doc, // recurse - for (SPObject *child = elem->firstChild(); child; child = child->getNext() ) + for (auto& child: elem->_children) { - change_clashing_ids(imported_doc, current_doc, child, refmap, id_changes); + change_clashing_ids(imported_doc, current_doc, &child, refmap, id_changes); } } -- cgit v1.2.3 From 24d3f50003ca3cec6a03a7f5267cc4fe5588c69f Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 14 Jul 2016 13:17:21 +0200 Subject: Renamed children list in SPObject (bzr r14954.1.21) --- src/id-clash.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/id-clash.cpp') diff --git a/src/id-clash.cpp b/src/id-clash.cpp index fecad9eee..cb5893133 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -187,7 +187,7 @@ find_references(SPObject *elem, refmap_type &refmap) } // recurse - for (auto& child: elem->_children) + for (auto& child: elem->children) { find_references(&child, refmap); } @@ -242,7 +242,7 @@ change_clashing_ids(SPDocument *imported_doc, SPDocument *current_doc, // recurse - for (auto& child: elem->_children) + for (auto& child: elem->children) { change_clashing_ids(imported_doc, current_doc, &child, refmap, id_changes); } -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/id-clash.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/id-clash.cpp') diff --git a/src/id-clash.cpp b/src/id-clash.cpp index 4bd66e858..b14526e79 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -23,8 +23,6 @@ #include "sp-object.h" #include "style.h" #include "sp-paint-server.h" -#include "xml/node.h" -#include "xml/repr.h" #include "sp-root.h" #include "sp-gradient.h" -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/id-clash.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/id-clash.cpp') diff --git a/src/id-clash.cpp b/src/id-clash.cpp index b14526e79..4bd66e858 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -23,6 +23,8 @@ #include "sp-object.h" #include "style.h" #include "sp-paint-server.h" +#include "xml/node.h" +#include "xml/repr.h" #include "sp-root.h" #include "sp-gradient.h" -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/id-clash.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/id-clash.cpp') diff --git a/src/id-clash.cpp b/src/id-clash.cpp index 4bd66e858..b14526e79 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -23,8 +23,6 @@ #include "sp-object.h" #include "style.h" #include "sp-paint-server.h" -#include "xml/node.h" -#include "xml/repr.h" #include "sp-root.h" #include "sp-gradient.h" -- cgit v1.2.3 From 528e1e0c53da088889b4108b1ffb6173a520c96f Mon Sep 17 00:00:00 2001 From: peregrine Date: Wed, 8 Feb 2017 06:29:21 +0100 Subject: [Bug #1658320] Color names have additional numbers. Fixed bugs: - https://launchpad.net/bugs/1658320 (bzr r15494) --- src/id-clash.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/id-clash.cpp') diff --git a/src/id-clash.cpp b/src/id-clash.cpp index c284843b8..162cb9e89 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -373,9 +373,9 @@ void rename_id(SPObject *elem, Glib::ustring const &new_name) gchar *id = g_strdup(new_name.c_str()); //id is not empty here as new_name is check to be not empty g_strcanon (id, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.:", '_'); Glib::ustring new_name2 = id; //will not fail as id can not be NULL, see length check on new_name - g_free (id); if (!isalnum (new_name2[0])) { g_message("Invalid Id, will not change."); + g_free (id); return; } @@ -396,7 +396,7 @@ void rename_id(SPObject *elem, Glib::ustring const &new_name) break; } } - + g_free (id); // Change to the new ID elem->getRepr()->setAttribute("id", new_name2); // Make a note of this change, if we need to fix up refs to it -- cgit v1.2.3