~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/document.cpp

  • Committer: joncruz
  • Date: 2009-06-09 08:41:43 UTC
  • Revision ID: joncruz@users.sourceforge.net-20090609084143-6q8ltcrb4g4d5n50
Removed sodipodi:version

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
{
264
264
    SPDocument *document;
265
265
    Inkscape::XML::Node *rroot;
266
 
    Inkscape::Version sodipodi_version;
267
266
    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
268
267
 
269
268
    rroot = rdoc->root();
293
292
 
294
293
    document->root = sp_object_repr_build_tree(document, rroot);
295
294
 
296
 
    sodipodi_version = SP_ROOT(document->root)->version.sodipodi;
297
 
 
298
295
    /* fixme: Not sure about this, but lets assume ::build updates */
299
 
    rroot->setAttribute("sodipodi:version", SODIPODI_VERSION);
300
296
    rroot->setAttribute("inkscape:version", Inkscape::version_string);
301
297
    /* fixme: Again, I moved these here to allow version determining in ::build (Lauris) */
302
298
 
313
309
 
314
310
    /* Eliminate obsolete sodipodi:docbase, for privacy reasons */
315
311
    rroot->setAttribute("sodipodi:docbase", NULL);
316
 
    
 
312
 
317
313
    /* Eliminate any claim to adhere to a profile, as we don't try to */
318
314
    rroot->setAttribute("baseProfile", NULL);
319
315
 
321
317
    if (!sp_item_group_get_child_by_name((SPGroup *) document->root, NULL, "sodipodi:namedview")) {
322
318
        // if there's none in the document already,
323
319
        Inkscape::XML::Node *rnew = NULL;
324
 
        
 
320
 
325
321
        rnew = rdoc->createElement("sodipodi:namedview");
326
322
        //rnew->setAttribute("id", "base");
327
323
 
351
347
            prefs->getInt("/template/base/inkscape:window-width", 640));
352
348
        sp_repr_set_int(rnew, "inkscape:window-height",
353
349
            prefs->getInt("/template/base/inkscape:window-height", 480));
354
 
        
 
350
 
355
351
        // insert into the document
356
352
        rroot->addChild(rnew, NULL);
357
353
        // clean up
672
668
 
673
669
    do_change_uri(document, filename, false);
674
670
}
675
 
    
 
671
 
676
672
/**
677
673
 * Changes the base, name and uri members of \a document, and updates any
678
674
 * relative hrefs in the document to be relative to the new base.