summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-08-02 14:13:52 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-08-02 14:13:52 +0000
commitccc1eda3878a76a3266ab29fc5f0d9b3b259d305 (patch)
tree940839115a6066841e1b381e343e3244bb90519a /src/document.cpp
parentFixed bugs in branch review and updated to new api (diff)
parentFixed some typos in bsector and bspline (diff)
downloadinkscape-ccc1eda3878a76a3266ab29fc5f0d9b3b259d305.tar.gz
inkscape-ccc1eda3878a76a3266ab29fc5f0d9b3b259d305.zip
update to trunk
(bzr r13879.1.21)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/document.cpp b/src/document.cpp
index ebf5d312f..2ea969910 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -1640,7 +1640,7 @@ void SPDocument::importDefs(SPDocument *source)
prevent_id_clashes(source, this);
for (std::vector<Inkscape::XML::Node const *>::iterator defs = defsNodes.begin(); defs != defsNodes.end(); ++defs) {
- importDefsNode(source, const_cast<Inkscape::XML::Node *>(*defs), target_defs);
+ importDefsNode(source, const_cast<Inkscape::XML::Node *>(*defs), target_defs);
}
}
@@ -1688,11 +1688,10 @@ void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, I
/* First pass: remove duplicates in clipboard of definitions in document */
for (Inkscape::XML::Node *def = defs->firstChild() ; def ; def = def->next()) {
-
+ if(def->type() != Inkscape::XML::ELEMENT_NODE)continue;
/* If this clipboard has been pasted into one document, and is now being pasted into another,
or pasted again into the same, it will already have been processed. If we detect that then
skip the rest of this pass. */
-
Glib::ustring defid = def->attribute("id");
if( defid.find( DuplicateDefString ) != Glib::ustring::npos )break;
@@ -1722,6 +1721,7 @@ void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, I
/* Second pass: remove duplicates in clipboard of earlier definitions in clipboard */
for (Inkscape::XML::Node *def = defs->firstChild() ; def ; def = def->next()) {
+ if(def->type() != Inkscape::XML::ELEMENT_NODE)continue;
Glib::ustring defid = def->attribute("id");
if( defid.find( DuplicateDefString ) != Glib::ustring::npos )continue; // this one already handled
SPObject *src = source->getObjectByRepr(def);
@@ -1749,6 +1749,7 @@ void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, I
/* Final pass: copy over those parts which are not duplicates */
for (Inkscape::XML::Node *def = defs->firstChild() ; def ; def = def->next()) {
+ if(def->type() != Inkscape::XML::ELEMENT_NODE)continue;
/* Ignore duplicate defs marked in the first pass */
Glib::ustring defid = def->attribute("id");