diff options
| author | MenTaLguY <mental@rydia.net> | 2007-01-21 19:03:03 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-01-21 19:03:03 +0000 |
| commit | 63731301866e7b9cb231a43658a7c51ec2d70690 (patch) | |
| tree | 91b475a32308003e60e40ac0f318dc00be019a6e /src/text-context.cpp | |
| parent | Deprecate sp_repr_new* functions (diff) | |
| download | inkscape-63731301866e7b9cb231a43658a7c51ec2d70690.tar.gz inkscape-63731301866e7b9cb231a43658a7c51ec2d70690.zip | |
start switching sp_repr_new* over to XML::Document::create*, and rename create methods to match DOM
(bzr r2253)
Diffstat (limited to 'src/text-context.cpp')
| -rw-r--r-- | src/text-context.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp index e969ffbfc..b65bcf19f 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -473,7 +473,8 @@ sp_text_context_setup_text(SPTextContext *tc) SPEventContext *ec = SP_EVENT_CONTEXT(tc); /* Create <text> */ - Inkscape::XML::Node *rtext = sp_repr_new("svg:text"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DESKTOP(ec)->doc()); + Inkscape::XML::Node *rtext = xml_doc->createElement("svg:text"); rtext->setAttribute("xml:space", "preserve"); // we preserve spaces in the text objects we create /* Set style */ @@ -483,13 +484,13 @@ sp_text_context_setup_text(SPTextContext *tc) sp_repr_set_svg_double(rtext, "y", tc->pdoc[NR::Y]); /* Create <tspan> */ - Inkscape::XML::Node *rtspan = sp_repr_new("svg:tspan"); + Inkscape::XML::Node *rtspan = xml_doc->createElement("svg:tspan"); rtspan->setAttribute("sodipodi:role", "line"); // otherwise, why bother creating the tspan? rtext->addChild(rtspan, NULL); Inkscape::GC::release(rtspan); /* Create TEXT */ - Inkscape::XML::Node *rstring = sp_repr_new_text(""); + Inkscape::XML::Node *rstring = xml_doc->createTextNode(""); rtspan->addChild(rstring, NULL); Inkscape::GC::release(rstring); SPItem *text_item = SP_ITEM(ec->desktop->currentLayer()->appendChildRepr(rtext)); |
