uri-references.cpp revision e0342dacef95afd3299b2ec5685d34effe886398
#define __SP_URI_REFERENCES_C__
/*
* Helper methods for resolving URI References
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* Copyright (C) 2001-2002 Lauris Kaplinski
* Copyright (C) 2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <iostream>
#include <cstring>
#include <string>
#include "document.h"
#include "sp-object.h"
#include "uri.h"
#include "uri-references.h"
#include "extract-uri.h"
#include <glibmm/miscutils.h>
namespace Inkscape {
{
/* FIXME !!! attach to owner's destroy signal to clean up in case */
}
{
}
{
detach();
}
{
// Attempt to get the document that contains the URI
if (_owner) {
} else if (_owner_document) {
}
// createChildDoc() assumes that the referenced file is an SVG.
// PNG and JPG files are allowed (in the case of feImage).
bool skip = false;
skip = true;
}
// The path contains references to seperate document files to load.
} else {
}
}
if(!document) {
return;
}
throw UnsupportedURIException();
}
/* FIXME !!! real xpointer support should be delegated to document */
/* for now this handles the minimal xpointer form that SVG 1.0
* requires of us
*/
/* FIXME !!! this is wasteful */
/* FIXME: It looks as though this is including "))" in the id. I suggest moving
the strlen calculation and validity testing to before strdup, and copying just
the id without the "))". -- pjrm */
throw MalformedURIException();
}
} else {
throw UnsupportedURIException();
}
} else {
}
/* FIXME !!! validate id as an NCName somewhere */
delete _uri;
}
void URIReference::detach()
{
delete _uri;
}
{
}
if (_obj) {
}
if (old_obj) {
/* release the old object _after_ the signal emission */
}
}
/* If an object is deleted, current semantics require that we release
* it on its "release" signal, rather than later, when its ID is actually
* unregistered from the document.
*/
{
}
} /* namespace Inkscape */
{
if ( trimmed ) {
}
}
return ref;
}
SPObject *
{
}
return ref;
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :