Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

void Inkscape::UI::ClipboardManagerImpl::_pasteDefs ( SPDocument clipdoc ) [private]

Paste SVG defs from the document retrieved from the clipboard into the active document.

Parameters:
clipdocThe document to paste
Precondition:
clipdoc != NULL and pasting into the active document is possible

Definition at line 844 of file clipboard.cpp.

References _copyNode(), prevent_id_clashes(), and sp_repr_lookup_name().

Referenced by _pasteDocument(), pastePathEffect(), and pasteStyle().

{
    // boilerplate vars copied from _pasteDocument
    SPDesktop *desktop = SP_ACTIVE_DESKTOP;
    SPDocument *target_document = sp_desktop_document(desktop);
    Inkscape::XML::Node
        *root = sp_document_repr_root(clipdoc),
        *defs = sp_repr_lookup_name(root, "svg:defs", 1),
        *target_defs = SP_OBJECT_REPR(SP_DOCUMENT_DEFS(target_document));
    Inkscape::XML::Document *target_xmldoc = sp_document_repr_doc(target_document);

    prevent_id_clashes(clipdoc, target_document);

    for (Inkscape::XML::Node *def = defs->firstChild() ; def ; def = def->next()) {
        _copyNode(def, target_xmldoc, target_defs);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index