uri-references.cpp revision f68aabe351946119c80978525cd86564dd33e02f
#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 <cstring>
#include <string>
#include "document.h"
#include "sp-object.h"
#include "uri.h"
#include "uri-references.h"
#include "extract-uri.h"
namespace Inkscape {
{
/* FIXME !!! attach to owner's destroy signal to clean up in case */
}
{
}
{
detach();
}
{
if (_owner) {
} else if (_owner_document) {
} else {
}
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 */
if (_uri) {
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;
}