X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-tref.cpp;h=eddcd270c482a79be553201b5d7a21f5d9840833;hb=HEAD;hp=850ebbd423bdbf2ef7f3d25755c46ae74804c0e6;hpb=ab17729e09d54ccfcb65645e6dae62a343e9c6b7;p=inkscape.git diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp index 850ebbd42..eddcd270c 100644 --- a/src/sp-tref.cpp +++ b/src/sp-tref.cpp @@ -1,5 +1,3 @@ -#define __SP_TREF_CPP__ - /** \file * SVG implementation - All character data within the referenced * element, including character data enclosed within additional markup, @@ -10,6 +8,8 @@ /* * Authors: * Gail Banaszkiewicz + * Jon A. Cruz + * Abhishek Sharma * * Copyright (C) 2007 Gail Banaszkiewicz * @@ -154,12 +154,12 @@ sp_tref_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) ((SPObjectClass *) tref_parent_class)->build(object, document, repr); } - sp_object_read_attr(object, "xlink:href"); - sp_object_read_attr(object, "x"); - sp_object_read_attr(object, "y"); - sp_object_read_attr(object, "dx"); - sp_object_read_attr(object, "dy"); - sp_object_read_attr(object, "rotate"); + object->readAttr( "xlink:href" ); + object->readAttr( "x" ); + object->readAttr( "y" ); + object->readAttr( "dx" ); + object->readAttr( "dy" ); + object->readAttr( "rotate" ); } /** @@ -507,8 +507,7 @@ sp_tref_fully_contained(SPObject *start_item, Glib::ustring::iterator &start, } -void -sp_tref_update_text(SPTRef *tref) +void sp_tref_update_text(SPTRef *tref) { if (tref) { // Get the character data that will be used with this tref @@ -521,7 +520,7 @@ sp_tref_update_text(SPTRef *tref) } // Create the node and SPString to be the tref's child - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(tref)); + Inkscape::XML::Document *xml_doc = SP_OBJECT_DOCUMENT(tref)->getReprDoc(); Inkscape::XML::Node *newStringRepr = xml_doc->createTextNode(charData.c_str()); tref->stringChild = SP_OBJECT(g_object_new(sp_repr_type_lookup(newStringRepr), NULL)); @@ -586,7 +585,7 @@ sp_tref_convert_to_tspan(SPObject *obj) Inkscape::XML::Node *tref_parent = sp_repr_parent(tref_repr); SPDocument *document = SP_OBJECT(tref)->document; - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); + Inkscape::XML::Document *xml_doc = document->getReprDoc(); Inkscape::XML::Node *new_tspan_repr = xml_doc->createElement("svg:tspan"); @@ -633,7 +632,7 @@ sp_tref_convert_to_tspan(SPObject *obj) //////////////////// else { GSList *l = NULL; - for (SPObject *child = obj->first_child() ; child != NULL ; child = SP_OBJECT_NEXT(child) ) { + for (SPObject *child = obj->firstChild() ; child != NULL ; child = child->getNext() ) { sp_object_ref (SP_OBJECT (child), obj); l = g_slist_prepend (l, child); } @@ -663,4 +662,4 @@ sp_tref_convert_to_tspan(SPObject *obj) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :