summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-06-25 16:15:05 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-06-25 16:15:05 +0000
commit5c2d982cc636ee4e2bc12703c01c86e245dd821f (patch)
tree6e6f22800c7d38314e14eccd486b65c3c4286d81 /src/document.cpp
parentupdate to trunk (diff)
parentFix for the bug 1468396 (diff)
downloadinkscape-5c2d982cc636ee4e2bc12703c01c86e245dd821f.tar.gz
inkscape-5c2d982cc636ee4e2bc12703c01c86e245dd821f.zip
update to trunk
(bzr r13645.1.94)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 741e7c812..ebf5d312f 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -1634,11 +1634,18 @@ void SPDocument::setModifiedSinceSave(bool modified) {
void SPDocument::importDefs(SPDocument *source)
{
Inkscape::XML::Node *root = source->getReprRoot();
- Inkscape::XML::Node *defs = sp_repr_lookup_name(root, "svg:defs", 1);
Inkscape::XML::Node *target_defs = this->getDefs()->getRepr();
+ std::vector<Inkscape::XML::Node const *> defsNodes = sp_repr_lookup_name_many(root, "svg:defs");
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);
+ }
+}
+
+void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, Inkscape::XML::Node *target_defs)
+{
int stagger=0;
/* Note, "clipboard" throughout the comments means "the document that is either the clipboard