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

void prevent_id_clashes ( SPDocument imported_doc,
SPDocument current_doc 
)

This function resolves ID clashes between the document being imported and the current open document: IDs in the imported document that would clash with IDs in the existing document are changed, and references to those IDs are updated accordingly.

Definition at line 262 of file id-clash.cpp.

References change_clashing_ids(), find_references(), and fix_up_refs().

Referenced by Inkscape::UI::ClipboardManagerImpl::_pasteDefs(), and file_import().

{
    refmap_type *refmap = new refmap_type;
    id_changelist_type id_changes;
    SPObject *imported_root = SP_DOCUMENT_ROOT(imported_doc);
        
    find_references(imported_root, refmap);
    change_clashing_ids(imported_doc, current_doc, imported_root, refmap,
                        &id_changes);
    fix_up_refs(refmap, id_changes);

    delete refmap;
}

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