From 3638efba5bec8a6afc9211aa6bbe289767d20b38 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 3 Jun 2011 19:45:55 -0700 Subject: Removed outdated/unsafe SP_DOCUMENT_DEFS macro and reduced usage of SP_ROOT() gtk type function/macro. (bzr r10254) --- src/rdf.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/rdf.cpp') diff --git a/src/rdf.cpp b/src/rdf.cpp index c9378cf53..cabbaaed3 100644 --- a/src/rdf.cpp +++ b/src/rdf.cpp @@ -18,6 +18,7 @@ #include "rdf.h" #include "sp-item-group.h" #include "inkscape.h" +#include "sp-root.h" /* Example RDF XML from various places... @@ -566,7 +567,9 @@ unsigned int RDFImpl::setReprText( Inkscape::XML::Node * repr, // set document's title element to the RDF title if (!strcmp(entity.name, "title")) { SPDocument *doc = SP_ACTIVE_DOCUMENT; - if(doc && doc->root) doc->root->setTitle(text); + if (doc && doc->getRoot()) { + doc->getRoot()->setTitle(text); + } } switch (entity.datatype) { @@ -1104,7 +1107,7 @@ void RDFImpl::setDefaults( SPDocument * doc ) g_assert( doc != NULL ); // Create metadata node if it doesn't already exist - if (!sp_item_group_get_child_by_name((SPGroup *) doc->root, NULL, + if (!sp_item_group_get_child_by_name( doc->getRoot(), NULL, XML_TAG_NAME_METADATA)) { if ( !doc->getReprDoc()) { g_critical("XML doc is null."); -- cgit v1.2.3